diff --git a/plugins/oscd-designer/__snapshots__/oscd-designer.spec.snap.js b/plugins/oscd-designer/__snapshots__/oscd-designer.spec.snap.js index efc4562..7a20558 100644 --- a/plugins/oscd-designer/__snapshots__/oscd-designer.spec.snap.js +++ b/plugins/oscd-designer/__snapshots__/oscd-designer.spec.snap.js @@ -1,6 +1,39 @@ /* @web/test-runner snapshot v1 */ export const snapshots = {}; +snapshots["Designer given a voltage level allows placing a new bus bar"] = +` + + +
+ + + + +
+
+
+
+`; +/* end snapshot Designer given a voltage level allows placing a new bus bar */ + snapshots["Designer given a bay updates reparented bays' connectivity node paths"] = ` + + @@ -198,10 +270,11 @@ snapshots["Designer given conducting equipment connects equipment on connection esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + @@ -343,10 +447,11 @@ snapshots["Designer given conducting equipment connects equipment on connect men esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + + + @@ -821,10 +989,11 @@ snapshots["Designer given conducting equipment with established connectivity con esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + @@ -1004,10 +1204,11 @@ snapshots["Designer given conducting equipment with established connectivity avo esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + @@ -1149,10 +1381,11 @@ snapshots["Designer given conducting equipment with established connectivity kee esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + @@ -1401,10 +1665,11 @@ snapshots["Designer given conducting equipment with established connectivity bet esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + @@ -1544,10 +1840,11 @@ snapshots["Designer given conducting equipment with established connectivity bet esld:h="25" esld:w="50" name="S1" - xmlns:esld="https://transpower.co.nz/SCL/SSD/SLD/v0" > + + + + + + + + + + @@ -2581,37 +3037,6 @@ snapshots["Designer given conducting equipment with established connectivity bet `; /* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment removes superfluous connectivity nodes when disconnecting */ -snapshots["Designer given a voltage level allows placing a new bus bar"] = -` - - -
- - - - -
-
-
-
-`; -/* end snapshot Designer given a voltage level allows placing a new bus bar */ - snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment keeps internal connectivity nodes when moving containers"] = ` + + - - - -
- - - - -
-
-
-
+ + + + +
+ + + + +
+
+
- - - - - - -
- - - - - - - - -
-
-
+
`; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar keeps the bus bar when moving containers */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes conducting equipment on delete menu item select */ -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar resizes the bus bar on first menu item select"] = +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes bays on delete menu item select"] = ` - + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+
+
+
+ +
+`; +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes bays on delete menu item select */ + +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes voltage levels on delete menu item select"] = +` + + + + + + + + + +`; +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes voltage levels on delete menu item select */ + +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar keeps the bus bar when moving containers"] = +` + + + + + +
+ + + + +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+
+
+
+
+
+`; +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar keeps the bus bar when moving containers */ + +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar does not merge bus bar sections with feeder sections"] = +` + + + + + +
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + + + +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+
+ + +
+ + + + + + + + +
+
+
+
+
+
+
+`; +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar does not merge bus bar sections with feeder sections */ + +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar resizes the bus bar on first menu item select"] = +` + + + `; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on third menu item select */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on last menu item select */ -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes conducting equipment on delete menu item select"] = +snapshots["Designer given a voltage level opens a menu on voltage level right click"] = +` + + + + Resize + + + + + Move + + + + + Move Label + + + text_rotation_none + + + + + Edit + + + edit + + + + + Delete + + + delete + + +
  • +
  • + + + V1 + + + some description + + +
    +
    +`; +/* end snapshot Designer given a voltage level opens a menu on voltage level right click */ + +snapshots["Designer given conducting equipment opens a menu on equipment right click"] = +` + + + + Connect right + + + east + + + + + Ground right + + + chevron_right + + + + + Connect left + + + west + + + + + Ground left + + + chevron_left + + + + + Mirror + + + flip + + + + + Rotate + + + rotate_90_degrees_cw + + + + + Move + + + + + Move Label + + + text_rotation_none + + + + + Edit + + + edit + + + + + Delete + + + delete + + +
  • +
  • + + + CBR1 + + + CBR — CBR description + + +
    +
    +`; +/* end snapshot Designer given conducting equipment opens a menu on equipment right click */ + +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar resizes the bus bar on resize menu item select"] = ` + + + +
    + + + + +
    +
    +
    +
    - -
    -
    -
    - - - - - - - - - - - - - - - - +
    + + + + + + +
    +
    + + + + +
    + +
    - -
    -`; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes conducting equipment on delete menu item select */ - -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes bays on delete menu item select"] = -` - - - + + + + + + `; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes bays on delete menu item select */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar resizes the bus bar on resize menu item select */ -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes voltage levels on delete menu item select"] = +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar moves the bus bar on move menu item select"] = ` + + + +
    + + + + +
    +
    +
    +
    + + - -
    - -
    -`; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment deletes voltage levels on delete menu item select */ - -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar does not merge bus bar sections with feeder sections"] = -` - - - -
    +
    - - -
    -
    - -
    - - - - - - - - - - -
    - - - - - - - - -
    -
    -
    + `; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar does not merge bus bar sections with feeder sections */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar moves the bus bar on move menu item select */ -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on last menu item select"] = +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on delete menu item select"] = ` `; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on last menu item select */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar removes the bus bar on delete menu item select */ -snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar requests bus bar edit wizard on penultimate menu item select"] = +snapshots["Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar deletes the bus bar on delete menu item select"] = ` + + `; -/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar requests bus bar edit wizard on penultimate menu item select */ +/* end snapshot Designer given conducting equipment with established connectivity between more than two pieces of equipment and a bus bar deletes the bus bar on delete menu item select */ diff --git a/plugins/oscd-designer/icons.js b/plugins/oscd-designer/icons.js index 721db9f..b71d7bd 100644 --- a/plugins/oscd-designer/icons.js +++ b/plugins/oscd-designer/icons.js @@ -1,11 +1,12 @@ -import { html, svg } from 'lit'; +import { html, nothing, svg } from 'lit'; +import { eqTypes, isEqType, ringedEqTypes } from './util.js'; export const resizePath = svg ``; export const movePath = svg ``; const voltageLevelPath = svg ``; const bayPath = svg ` `; const equipmentPaths = { - IFL: svg ` + CAB: svg ` + /> - + -`, - DIS: svg ` + /> + /> + /> + `, + CAP: svg ` + /> -`, + /> + + + `, CBR: svg ` -`, + `, CTR: svg ` -`, + `, + DIS: svg ` + + + + + `, + GEN: svg ` + + `, + IFL: svg ` + + + + `, + LIN: svg ` + + + + `, + MOT: svg ` + + `, + REA: svg ` + + + + `, + RES: svg ` + + + + `, + SAR: svg ` + + + + + + `, + SMC: svg ` + + `, VTR: svg ` @@ -257,30 +466,30 @@ const equipmentPaths = { cy="15" r="5" stroke="currentColor" - fill="transparent" + fill="none" stroke-width="1.5" stroke-linecap="round" /> - - + -`, -}; + `; const defaultEquipmentPath = svg ` `; export function equipmentPath(equipmentType) { - if (equipmentType && equipmentType in equipmentPaths) + if (equipmentType && isEqType(equipmentType)) return equipmentPaths[equipmentType]; return defaultEquipmentPath; } @@ -345,6 +554,7 @@ export function equipmentGraphic(equipmentType) { slot="graphic" > ${equipmentPath(equipmentType)} + ${equipmentType && ringedEqTypes.has(equipmentType) ? eqRingPath : nothing} `; } export function equipmentIcon(equipmentType) { @@ -356,6 +566,7 @@ export function equipmentIcon(equipmentType) { slot="icon" > ${equipmentPath(equipmentType)} + ${ringedEqTypes.has(equipmentType) ? eqRingPath : nothing} `; } function equipmentSymbol(equipmentType) { @@ -434,7 +645,7 @@ export const powerTransformerTwoWindingSymbol = svg ` @@ -443,7 +654,7 @@ export const powerTransformerTwoWindingSymbol = svg ` @@ -459,13 +670,19 @@ export const powerTransformerTwoWindingSymbol = svg ``; export const symbols = svg ` + + + + + + - ${Object.keys(equipmentPaths).map(eqType => equipmentSymbol(eqType))} + ${eqTypes.map(eqType => equipmentSymbol(eqType))} ${equipmentSymbol('ConductingEquipment')} ${connectivityNodeMarker} ${groundedMarker} diff --git a/plugins/oscd-designer/icons.js.map b/plugins/oscd-designer/icons.js.map index 73f65d6..a14c38e 100644 --- a/plugins/oscd-designer/icons.js.map +++ b/plugins/oscd-designer/icons.js.map @@ -1 +1 @@ -{"version":3,"file":"icons.js","sourceRoot":"","sources":["../icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;GAE1B,CAAC;AAEJ,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA,+NAA+N,CAAC;AAE3P,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;KAOvB,CAAC;AAEN,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+Dd,CAAC;AAEN,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAA;;;;;;;IAOhC,gBAAgB;OACb,CAAC;AAER,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAA;;;;;;;IAOnC,gBAAgB;OACb,CAAC;AAER,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA;;;;;;;IAOvB,OAAO;OACJ,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAA;;;;;;;IAO1B,OAAO;OACJ,CAAC;AAER,MAAM,cAAc,GAA+C;IACjE,GAAG,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBT;IACC,GAAG,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BT;IACC,GAAG,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;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AAC,cAAc,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAClE,eAAe,CAAC,qBAAqB,CAAC;IACtC,sBAAsB;IACtB,cAAc;;CAEjB,CAAC","sourcesContent":["import { html, svg, TemplateResult } from 'lit';\n\nexport const resizePath = svg``;\n\nexport const movePath = svg``;\n\nconst voltageLevelPath = svg``;\n\nconst bayPath = svg`\n \n \n \n \n \n \n `;\n\nexport const voltageLevelIcon = html`\n ${voltageLevelPath}\n`;\n\nexport const voltageLevelGraphic = html`\n ${voltageLevelPath}\n`;\n\nexport const bayIcon = html`\n ${bayPath}\n`;\n\nexport const bayGraphic = html`\n ${bayPath}\n`;\n\nconst equipmentPaths: Partial>> = {\n IFL: svg`\n \n \n \n`,\n DIS: svg`\n \n \n \n \n`,\n CBR: svg`\n \n \n \n \n \n`,\n CTR: svg`\n \n \n`,\n VTR: svg`\n \n \n \n \n \n`,\n};\n\nconst defaultEquipmentPath = svg`\n \n \n \n \n \n`;\n\nexport function equipmentPath(equipmentType: string | null): TemplateResult<2> {\n if (equipmentType && equipmentType in equipmentPaths)\n return equipmentPaths[equipmentType]!;\n return defaultEquipmentPath;\n}\n\nexport function equipmentGraphic(\n equipmentType: string | null\n): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport function equipmentIcon(equipmentType: string): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nfunction equipmentSymbol(equipmentType: string): TemplateResult<2> {\n return svg`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport const connectivityNodeMarker = svg`\n \n`;\n\nexport const groundedMarker = svg`\n \n \n \n`;\n\nexport const powerTransformerTwoWindingSymbol = svg`\n \n \n \n \n`;\n\nexport const symbols = svg`\n \n \n \n \n \n \n \n ${Object.keys(equipmentPaths).map(eqType => equipmentSymbol(eqType))}\n ${equipmentSymbol('ConductingEquipment')}\n ${connectivityNodeMarker}\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,IAAI,CAAA;UACH,aAAa;;;;;;MAMjB,aAAa,CAAC,aAAa,CAAC;MAC5B,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO;SACpD,CAAC;AACV,CAAC;AAED,SAAS,eAAe,CAAC,aAAqB;IAC5C,OAAO,GAAG,CAAA;UACF,aAAa;;;;MAIjB,aAAa,CAAC,aAAa,CAAC;YACtB,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;UAY/B,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkCvB,CAAC;AAEX,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyCzC,CAAC;AAEX,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;IActB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,eAAe,CAAC,qBAAqB,CAAC;IACtC,sBAAsB;IACtB,cAAc;;CAEjB,CAAC","sourcesContent":["import { html, nothing, svg, TemplateResult } from 'lit';\nimport { EqType, eqTypes, isEqType, ringedEqTypes } from './util.js';\n\nexport const resizePath = svg``;\n\nexport const movePath = svg``;\n\nconst voltageLevelPath = svg``;\n\nconst bayPath = svg`\n \n \n \n \n \n \n `;\n\nexport const voltageLevelIcon = html`\n ${voltageLevelPath}\n`;\n\nexport const voltageLevelGraphic = html`\n ${voltageLevelPath}\n`;\n\nexport const bayIcon = html`\n ${bayPath}\n`;\n\nexport const bayGraphic = html`\n ${bayPath}\n`;\n\nconst equipmentPaths: Record> = {\n CAB: svg`\n \n \n \n \n \n `,\n CAP: svg`\n \n \n \n \n `,\n CBR: svg`\n \n \n \n \n \n `,\n CTR: svg`\n \n \n `,\n DIS: svg`\n \n \n \n \n `,\n GEN: svg`\n \n `,\n IFL: svg`\n \n \n \n `,\n LIN: svg`\n \n \n \n `,\n MOT: svg`\n \n `,\n REA: svg`\n \n \n \n `,\n RES: svg`\n \n \n \n `,\n SAR: svg`\n \n \n \n \n \n `,\n SMC: svg`\n \n `,\n VTR: svg`\n \n \n \n`,\n};\n\nexport const eqRingPath = svg`\n \n \n `;\n\nconst defaultEquipmentPath = svg`\n \n \n \n \n \n`;\n\nexport function equipmentPath(equipmentType: string | null): TemplateResult<2> {\n if (equipmentType && isEqType(equipmentType))\n return equipmentPaths[equipmentType]!;\n return defaultEquipmentPath;\n}\n\nexport function equipmentGraphic(\n equipmentType: string | null\n): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n ${equipmentType && ringedEqTypes.has(equipmentType) ? eqRingPath : nothing}\n `;\n}\n\nexport function equipmentIcon(equipmentType: string): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n ${ringedEqTypes.has(equipmentType) ? eqRingPath : nothing}\n `;\n}\n\nfunction equipmentSymbol(equipmentType: string): TemplateResult<2> {\n return svg`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport const connectivityNodeMarker = svg`\n \n`;\n\nexport const groundedMarker = svg`\n \n \n \n`;\n\nexport const powerTransformerTwoWindingSymbol = svg`\n \n \n \n \n`;\n\nexport const symbols = svg`\n \n \n \n \n \n \n \n \n \n \n \n \n \n ${eqTypes.map(eqType => equipmentSymbol(eqType))}\n ${equipmentSymbol('ConductingEquipment')}\n ${connectivityNodeMarker}\n ${groundedMarker}\n \n`;\n"]} \ No newline at end of file diff --git a/plugins/oscd-designer/oscd-designer.js b/plugins/oscd-designer/oscd-designer.js index 53f2df4..9cee263 100644 --- a/plugins/oscd-designer/oscd-designer.js +++ b/plugins/oscd-designer/oscd-designer.js @@ -15,7 +15,7 @@ const r=window,a=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&" * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var w;_[y]=!0,_.elementProperties=new Map,_.elementStyles=[],_.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:_}),(null!==(m=h.reactiveElementVersions)&&void 0!==m?m:h.reactiveElementVersions=[]).push("1.6.3");const E=window,S=E.trustedTypes,A=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,I="?"+$,k=`<${I}>`,N=document,T=()=>N.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,D="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,z=/>/g,P=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,M=/"/g,B=/^(?:script|style|textarea|title)$/i,V=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=V(1),q=V(2),G=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),X=new WeakMap,Y=N.createTreeWalker(N,129,null,!1);function W(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,n=[];let o,r=2===e?"":"",a=O;for(let e=0;e"===s[0]?(a=null!=o?o:O,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,d=s[1],a=void 0===s[3]?P:'"'===s[3]?M:H):a===M||a===H?a=P:a===F||a===z?a=O:(a=P,o=void 0);const p=a===P&&t[e+1].startsWith("/>")?" ":"";r+=a===O?i+k:l>=0?(n.push(d),i.slice(0,l)+C+i.slice(l)+$+p):i+$+(-2===l?(n.push(void 0),e):p)}return[W(t,r+(t[i]||"")+(2===e?"":"")),n]};class Z{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,d=this.parts,[s,l]=K(t,e);if(this.el=Z.createElement(s,i),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=Y.nextNode())&&d.length0){n.textContent=S?S.emptyScript:"";for(let i=0;iR(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==j&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(N.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Z.createElement(W(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(i);else{const t=new J(o,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new Z(t)),e}T(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new tt(this.k(T()),this.k(T()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(void 0===o)t=Q(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==G,r&&(this._$AH=t);else{const n=t;let a,d;for(t=o[0],a=0;at}):void 0,C="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,k="?"+$,I=`<${k}>`,N=document,T=()=>N.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,D="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,z=/>/g,P=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,M=/"/g,B=/^(?:script|style|textarea|title)$/i,V=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=V(1),q=V(2),G=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),X=new WeakMap,Y=N.createTreeWalker(N,129,null,!1);function W(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,n=[];let o,r=2===e?"":"",a=O;for(let e=0;e"===s[0]?(a=null!=o?o:O,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,d=s[1],a=void 0===s[3]?P:'"'===s[3]?M:H):a===M||a===H?a=P:a===F||a===z?a=O:(a=P,o=void 0);const p=a===P&&t[e+1].startsWith("/>")?" ":"";r+=a===O?i+I:l>=0?(n.push(d),i.slice(0,l)+C+i.slice(l)+$+p):i+$+(-2===l?(n.push(void 0),e):p)}return[W(t,r+(t[i]||"")+(2===e?"":"")),n]};class Z{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,d=this.parts,[s,l]=K(t,e);if(this.el=Z.createElement(s,i),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=Y.nextNode())&&d.length0){n.textContent=S?S.emptyScript:"";for(let i=0;iR(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==j&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(N.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Z.createElement(W(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(i);else{const t=new J(o,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new Z(t)),e}T(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new tt(this.k(T()),this.k(T()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(void 0===o)t=Q(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==G,r&&(this._$AH=t);else{const n=t;let a,d;for(t=o[0],a=0;ae=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e) * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function Et(t,e,i){let n,o=t;return"object"==typeof t?(o=t.slot,n=t):n={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return bt({descriptor:n=>({get(){var n;const o="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(o),a=null!=r?wt(r,t):[];return i?a.filter((t=>t.matches(i))):a},enumerable:!0,configurable:!0})})}({slot:o,flatten:e,selector:i}):bt({descriptor:t=>({get(){var t,e;const i="slot"+(o?`[name=${o}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(n))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}function St(t){return new CustomEvent("oscd-edit",{composed:!0,bubbles:!0,detail:t})}const At=["TransformerWinding","ConductingEquipment"],Ct=["GeneralEquipment","PowerTransformer",...At],$t=["Substation","VoltageLevel","Bay"],It=["Process","Line"],kt=["EqSubFunction","EqFunction"],Nt=["ConnectivityNode",...["SubFunction","Function","TapChanger","SubEquipment",...Ct,...$t,...It,...kt]],Tt=["LN0","LN"],Lt=["GSSE","GOOSE","ConfReportControl","SMVsc","DynDataSet","ConfDataSet"],Rt=[...["SCL",...["SubNetwork","GOOSESecurity","SMVSecurity",...Nt],...["ConnectedAP","PhysConn","SDO","DO","DAI","SDI","DOI","Inputs","RptEnabled","Server","ServerAt","SettingControl","Communication","Log","LDevice","DataSet","AccessPoint","IED","NeutralPoint",...["SampledValueControl","GSEControl","LogControl","ReportControl"],"GSE","SMV","BDA","DA"],"LNodeType","DOType","DAType","EnumType"],"Text","Private","Hitem","AccessControl","Header","LNode","Val","Voltage","Services","Subject","IssuerName","MinTime","MaxTime","Association","FCDA","ClientLN","IEDName","ExtRef","Protocol",...Tt,"FileHandling","TimeSyncProt","CommProt","SGEdit","ConfSG","GetDirectory","GetDataObjectDefinition","DataObjectDirectory","GetDataSetValue","SetDataSetValue","DataSetDirectory","ReadWrite","TimerActivatedControl","GetCBValues","GSEDir","ConfLdName","DynAssociation","SettingGroups",...Lt,"ConfLogControl","ConfSigRef","ReportSettings","LogSettings","GSESettings","SMVSettings","ConfLNs","ClientServices","SupSubscription","ValueHandling","RedProt","McSecurity","KDC","Address","P","ProtNs","EnumVal","Terminal","BitRate","Authentication","DataTypeTemplates","History","OptFields","SmvOpts","TrgOps","SamplesPerSec","SmpRate","SecPerSamples"],Dt=["Text","Private"],Ot=[...Dt],Ft=[...Dt],zt=[...Dt],Pt=[...Ft,"Val"],Ht=[...Ot,"LNode"],Mt=[...Ht],Bt=[...Mt],Vt=[...Mt,"PowerTransformer","GeneralEquipment"],Ut=[...Bt,"Terminal"],qt=[...Ft,"Address"],Gt=[...Ot],jt=[...Gt,"IEDName"],Xt=[...Ft,"DataSet","ReportControl","LogControl","DOI","Inputs","Log"],Yt=[...Mt,"GeneralEquipment","Function"],Wt=[...Gt,"TrgOps"],Kt=[...Mt,"GeneralEquipment","EqSubFunction"],Zt={AccessControl:{parents:["LDevice"],children:[]},AccessPoint:{parents:["IED"],children:[...Ot,"Server","LN","ServerAt","Services","GOOSESecurity","SMVSecurity"]},Address:{parents:["ConnectedAP","GSE","SMV"],children:["P"]},Association:{parents:["Server"],children:[]},Authentication:{parents:["Server"],children:[]},BDA:{parents:["DAType"],children:[...Pt]},BitRate:{parents:["SubNetwork"],children:[]},Bay:{parents:["VoltageLevel"],children:[...Vt,"ConductingEquipment","ConnectivityNode","Function"]},ClientLN:{parents:["RptEnabled"],children:[]},ClientServices:{parents:["Services"],children:["TimeSyncProt","McSecurity"]},CommProt:{parents:["Services"],children:[]},Communication:{parents:["SCL"],children:[...Ft,"SubNetwork"]},ConductingEquipment:{parents:["Process","Line","SubFunction","Function","Bay"],children:[...Ut,"EqFunction","SubEquipment"]},ConfDataSet:{parents:["Services"],children:[]},ConfLdName:{parents:["Services"],children:[]},ConfLNs:{parents:["Services"],children:[]},ConfLogControl:{parents:["Services"],children:[]},ConfReportControl:{parents:["Services"],children:[]},ConfSG:{parents:["SettingGroups"],children:[]},ConfSigRef:{parents:["Services"],children:[]},ConnectedAP:{parents:["SubNetwork"],children:[...Ft,"Address","GSE","SMV","PhysConn"]},ConnectivityNode:{parents:["Bay","Line"],children:[...Ht]},DA:{parents:["DOType"],children:[...Pt]},DAI:{parents:["DOI","SDI"],children:[...Ft,"Val"]},DAType:{parents:["DataTypeTemplates"],children:[...zt,"BDA","ProtNs"]},DO:{parents:["LNodeType"],children:[...Ft]},DOI:{parents:[...Tt],children:[...Ft,"SDI","DAI"]},DOType:{parents:["DataTypeTemplates"],children:[...zt,"SDO","DA"]},DataObjectDirectory:{parents:["Services"],children:[]},DataSet:{parents:[...Tt],children:[...Ot,"FCDA"]},DataSetDirectory:{parents:["Services"],children:[]},DataTypeTemplates:{parents:["SCL"],children:["LNodeType","DOType","DAType","EnumType"]},DynAssociation:{parents:["Services"],children:[]},DynDataSet:{parents:["Services"],children:[]},EnumType:{parents:["DataTypeTemplates"],children:[...zt,"EnumVal"]},EnumVal:{parents:["EnumType"],children:[]},EqFunction:{parents:["GeneralEquipment","TapChanger","TransformerWinding","PowerTransformer","SubEquipment","ConductingEquipment"],children:[...Kt]},EqSubFunction:{parents:["EqSubFunction","EqFunction"],children:[...Kt]},ExtRef:{parents:["Inputs"],children:[]},FCDA:{parents:["DataSet"],children:[]},FileHandling:{parents:["Services"],children:[]},Function:{parents:["Bay","VoltageLevel","Substation","Process","Line"],children:[...Mt,"SubFunction","GeneralEquipment","ConductingEquipment"]},GeneralEquipment:{parents:["SubFunction","Function",...It,...kt,...$t],children:[...Bt,"EqFunction"]},GetCBValues:{parents:["Services"],children:[]},GetDataObjectDefinition:{parents:["Services"],children:[]},GetDataSetValue:{parents:["Services"],children:[]},GetDirectory:{parents:["Services"],children:[]},GOOSE:{parents:["Services"],children:[]},GOOSESecurity:{parents:["AccessPoint"],children:[...Ot,"Subject","IssuerName"]},GSE:{parents:["ConnectedAP"],children:[...qt,"MinTime","MaxTime"]},GSEDir:{parents:["Services"],children:[]},GSEControl:{parents:["LN0"],children:[...jt,"Protocol"]},GSESettings:{parents:["Services"],children:[]},GSSE:{parents:["Services"],children:[]},Header:{parents:["SCL"],children:["Text","History"]},History:{parents:["Header"],children:["Hitem"]},Hitem:{parents:["History"],children:[]},IED:{parents:["SCL"],children:[...Ft,"Services","AccessPoint","KDC"]},IEDName:{parents:["GSEControl","SampledValueControl"],children:[]},Inputs:{parents:[...Tt],children:[...Ft,"ExtRef"]},IssuerName:{parents:["GOOSESecurity","SMVSecurity"],children:[]},KDC:{parents:["IED"],children:[]},LDevice:{parents:["Server"],children:[...Ft,"LN0","LN","AccessControl"]},LN:{parents:["AccessPoint","LDevice"],children:[...Xt]},LN0:{parents:["LDevice"],children:[...Xt,"GSEControl","SampledValueControl","SettingControl"]},LNode:{parents:[...Nt],children:[...Ft]},LNodeType:{parents:["DataTypeTemplates"],children:[...zt,"DO"]},Line:{parents:["Process","SCL"],children:[...Yt,"Voltage","ConductingEquipment"]},Log:{parents:[...Tt],children:[...Ft]},LogControl:{parents:[...Tt],children:[...Wt]},LogSettings:{parents:["Services"],children:[]},MaxTime:{parents:["GSE"],children:[]},McSecurity:{parents:["GSESettings","SMVSettings","ClientServices"],children:[]},MinTime:{parents:["GSE"],children:[]},NeutralPoint:{parents:["TransformerWinding"],children:[...Ft]},OptFields:{parents:["ReportControl"],children:[]},P:{parents:["Address","PhysConn"],children:[]},PhysConn:{parents:["ConnectedAP"],children:[...Ft,"P"]},PowerTransformer:{parents:[...$t],children:[...Bt,"TransformerWinding","SubEquipment","EqFunction"]},Private:{parents:[],children:[]},Process:{parents:["Process","SCL"],children:[...Yt,"ConductingEquipment","Substation","Line","Process"]},ProtNs:{parents:["DAType","DA"],children:[]},Protocol:{parents:["GSEControl","SampledValueControl"],children:[]},ReadWrite:{parents:["Services"],children:[]},RedProt:{parents:["Services"],children:[]},ReportControl:{parents:[...Tt],children:[...Wt,"OptFields","RptEnabled"]},ReportSettings:{parents:["Services"],children:[]},RptEnabled:{parents:["ReportControl"],children:[...Ft,"ClientLN"]},SamplesPerSec:{parents:["SMVSettings"],children:[]},SampledValueControl:{parents:["LN0"],children:[...jt,"SmvOpts"]},SecPerSamples:{parents:["SMVSettings"],children:[]},SCL:{parents:[],children:[...Dt,"Header","Substation","Communication","IED","DataTypeTemplates","Line","Process"]},SDI:{parents:["DOI","SDI"],children:[...Ft,"SDI","DAI"]},SDO:{parents:["DOType"],children:[...Ot]},Server:{parents:["AccessPoint"],children:[...Ft,"Authentication","LDevice","Association"]},ServerAt:{parents:["AccessPoint"],children:[...Ft]},Services:{parents:["IED","AccessPoint"],children:["DynAssociation","SettingGroups","GetDirectory","GetDataObjectDefinition","DataObjectDirectory","GetDataSetValue","SetDataSetValue","DataSetDirectory","ConfDataSet","DynDataSet","ReadWrite","TimerActivatedControl","ConfReportControl","GetCBValues","ConfLogControl","ReportSettings","LogSettings","GSESettings","SMVSettings","GSEDir","GOOSE","GSSE","SMVsc","FileHandling","ConfLNs","ClientServices","ConfLdName","SupSubscription","ConfSigRef","ValueHandling","RedProt","TimeSyncProt","CommProt"]},SetDataSetValue:{parents:["Services"],children:[]},SettingControl:{parents:["LN0"],children:[...Ft]},SettingGroups:{parents:["Services"],children:["SGEdit","ConfSG"]},SGEdit:{parents:["SettingGroups"],children:[]},SmpRate:{parents:["SMVSettings"],children:[]},SMV:{parents:["ConnectedAP"],children:[...qt]},SmvOpts:{parents:["SampledValueControl"],children:[]},SMVsc:{parents:["Services"],children:[]},SMVSecurity:{parents:["AccessPoint"],children:[...Ot,"Subject","IssuerName"]},SMVSettings:{parents:["Services"],children:["SmpRate","SamplesPerSec","SecPerSamples","McSecurity"]},SubEquipment:{parents:["TapChanger","PowerTransformer","ConductingEquipment","TransformerWinding",...At],children:[...Mt,"EqFunction"]},SubFunction:{parents:["SubFunction","Function"],children:[...Mt,"GeneralEquipment","ConductingEquipment","SubFunction"]},SubNetwork:{parents:["Communication"],children:[...Ot,"BitRate","ConnectedAP"]},Subject:{parents:["GOOSESecurity","SMVSecurity"],children:[]},Substation:{parents:["SCL"],children:[...Vt,"VoltageLevel","Function"]},SupSubscription:{parents:["Services"],children:[]},TapChanger:{parents:["TransformerWinding"],children:[...Mt,"SubEquipment","EqFunction"]},Terminal:{parents:[...Ct],children:[...Ft]},Text:{parents:Rt.filter((t=>"Text"!==t&&"Private"!==t)),children:[]},TimerActivatedControl:{parents:["Services"],children:[]},TimeSyncProt:{parents:["Services","ClientServices"],children:[]},TransformerWinding:{parents:["PowerTransformer"],children:[...Ut,"TapChanger","NeutralPoint","EqFunction","SubEquipment"]},TrgOps:{parents:["ReportControl"],children:[]},Val:{parents:["DAI","DA","BDA"],children:[]},ValueHandling:{parents:["Services"],children:[]},Voltage:{parents:["VoltageLevel"],children:[]},VoltageLevel:{parents:["Substation"],children:[...Vt,"Voltage","Bay","Function"]}},Qt=new Set(Rt);function Jt(t){return Qt.has(t)}function te(t,e){if(!Jt(e))return null;const i=t.tagName,n=Array.from(t.children);if("Services"===i||"SettingGroups"===i||!Jt(i))return n.find((t=>t.tagName===e))??null;const o=Zt[i].children;let r,a=o.findIndex((t=>t===e));if(a<0)return null;for(;at.tagName===o[a])),a+=1;return r??null}function ee(t){return`${se(t.parentElement)}>${t.getAttribute("connectivityNode")}`}function ie(t){const[e,i]=["name","ix"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e}${i?`[${i}]`:""}`}function ne(t){const[e,i]=["ldInst","cbName"].map((e=>t.getAttribute(e)));return`${e} ${i}`}function oe(t){return"SCL"===t.parentElement.tagName?t.getAttribute("name"):`${se(t.parentElement)}>${t.getAttribute("name")}`}function re(t){return se(t.parentElement).toString()}function ae(t){return`#${t.id}`}const de={AccessControl:{identity:re},AccessPoint:{identity:oe},Address:{identity:re},Association:{identity:function(t){const[e,i,n,o,r]=["iedName","ldInst","prefix","lnClass","lnInst","lnType"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e} ${i}/${n??""} ${o} ${r??""}`}},Authentication:{identity:re},BDA:{identity:oe},BitRate:{identity:re},Bay:{identity:oe},ClientLN:{identity:function(t){const[e,i,n,o,r,a]=["apRef","iedName","ldInst","prefix","lnClass","lnInst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${i} ${e||""} ${n}/${o??""} ${r} ${a}`}},ClientServices:{identity:re},CommProt:{identity:re},Communication:{identity:re},ConductingEquipment:{identity:oe},ConfDataSet:{identity:re},ConfLdName:{identity:re},ConfLNs:{identity:re},ConfLogControl:{identity:re},ConfReportControl:{identity:re},ConfSG:{identity:re},ConfSigRef:{identity:re},ConnectedAP:{identity:function(t){const[e,i]=["iedName","apName"].map((e=>t.getAttribute(e)));return`${e} ${i}`}},ConnectivityNode:{identity:oe},DA:{identity:oe},DAI:{identity:ie},DAType:{identity:ae},DO:{identity:oe},DOI:{identity:oe},DOType:{identity:ae},DataObjectDirectory:{identity:re},DataSet:{identity:oe},DataSetDirectory:{identity:re},DataTypeTemplates:{identity:re},DynAssociation:{identity:re},DynDataSet:{identity:re},EnumType:{identity:ae},EnumVal:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("ord")}`}},EqFunction:{identity:oe},EqSubFunction:{identity:oe},ExtRef:{identity:function(t){if(!t.parentElement)return NaN;const e=se(t.parentElement),i=t.getAttribute("iedName"),n=t.getAttribute("intAddr"),o=Array.from(t.parentElement.querySelectorAll(`ExtRef[intAddr="${n}"]`)).indexOf(t);if(!i)return`${e}>${n}[${o}]`;const[r,a,d,s,l,c,p,m,h,u,f,g]=["ldInst","prefix","lnClass","lnInst","doName","daName","serviceType","srcLDInst","srcPrefix","srcLNClass","srcLNInst","srcCBName"].map((e=>t.getAttribute(e))),b=g?`${p}:${g} ${m??""}/${h??""} ${u??""} ${f??""}`:"";return`${e}>${b?`${b} `:""}${`${i} ${r}/${a??""} ${d} ${s??""} ${l} ${c||""}`}${n?`@${n}`:""}`}},FCDA:{identity:function(t){const[e,i,n,o,r,a,d,s]=["ldInst","prefix","lnClass","lnInst","doName","daName","fc","ix"].map((e=>t.getAttribute(e))),l=`${e}/${i??""} ${n} ${o??""}.${r} ${a||""}`;return`${se(t.parentElement)}>${l} (${d}${s?` [${s}]`:""})`}},FileHandling:{identity:re},Function:{identity:oe},GeneralEquipment:{identity:oe},GetCBValues:{identity:re},GetDataObjectDefinition:{identity:re},GetDataSetValue:{identity:re},GetDirectory:{identity:re},GOOSE:{identity:re},GOOSESecurity:{identity:oe},GSE:{identity:ne},GSEDir:{identity:re},GSEControl:{identity:oe},GSESettings:{identity:re},GSSE:{identity:re},Header:{identity:re},History:{identity:re},Hitem:{identity:function(t){return`${t.getAttribute("version")}\t${t.getAttribute("revision")}`}},IED:{identity:oe},IEDName:{identity:function(t){const e=t.textContent,[i,n,o,r,a]=["apRef","ldInst","prefix","lnClass","lnInst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e} ${i||""} ${n||""}/${o??""} ${r??""} ${a??""}`}},Inputs:{identity:re},IssuerName:{identity:re},KDC:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("iedName")} ${t.getAttribute("apName")}`}},LDevice:{identity:function(t){return`${se(t.closest("IED"))}>>${t.getAttribute("inst")}`}},LN:{identity:function(t){const[e,i,n]=["prefix","lnClass","inst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e??""} ${i} ${n}`}},LN0:{identity:re},LNode:{identity:function(t){const[e,i,n,o,r,a]=["iedName","ldInst","prefix","lnClass","lnInst","lnType"].map((e=>t.getAttribute(e)));return"None"===e?`${se(t.parentElement)}>(${o} ${a})`:`${e} ${i||"(Client)"}/${n??""} ${o} ${r??""}`}},LNodeType:{identity:ae},Line:{identity:oe},Log:{identity:oe},LogControl:{identity:oe},LogSettings:{identity:re},MaxTime:{identity:re},McSecurity:{identity:re},MinTime:{identity:re},NeutralPoint:{identity:ee},OptFields:{identity:re},P:{identity:function(t){if(!t.parentElement)return NaN;const e=t.parentElement,i=t.getAttribute("type");if("PhysConn"===e.tagName)return`${se(t.parentElement)}>${i}`;const n=Array.from(t.parentElement.children).filter((t=>t.getAttribute("type")===i)).findIndex((e=>e.isSameNode(t)));return`${se(t.parentElement)}>${i} [${n}]`}},PhysConn:{identity:function(t){if(!t.parentElement)return NaN;if(!t.parentElement.querySelector('PhysConn[type="RedConn"]'))return NaN;const e=t.getAttribute("type");return t.parentElement.children.length>1&&"Connection"!==e&&"RedConn"!==e?NaN:`${se(t.parentElement)}>${e}`}},PowerTransformer:{identity:oe},Private:{identity:()=>NaN},Process:{identity:oe},ProtNs:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("type")||"8-MMS"}\t${t.textContent}`}},Protocol:{identity:re},ReadWrite:{identity:re},RedProt:{identity:re},ReportControl:{identity:oe},ReportSettings:{identity:re},RptEnabled:{identity:re},SamplesPerSec:{identity:re},SampledValueControl:{identity:oe},SecPerSamples:{identity:re},SCL:{identity:function(){return""}},SDI:{identity:ie},SDO:{identity:oe},Server:{identity:re},ServerAt:{identity:re},Services:{identity:re},SetDataSetValue:{identity:re},SettingControl:{identity:re},SettingGroups:{identity:re},SGEdit:{identity:re},SmpRate:{identity:re},SMV:{identity:ne},SmvOpts:{identity:re},SMVsc:{identity:re},SMVSecurity:{identity:oe},SMVSettings:{identity:re},SubEquipment:{identity:oe},SubFunction:{identity:oe},SubNetwork:{identity:oe},Subject:{identity:re},Substation:{identity:oe},SupSubscription:{identity:re},TapChanger:{identity:oe},Terminal:{identity:ee},Text:{identity:re},TimerActivatedControl:{identity:re},TimeSyncProt:{identity:re},TransformerWinding:{identity:oe},TrgOps:{identity:re},Val:{identity:function(t){if(!t.parentElement)return NaN;const e=t.getAttribute("sGroup"),i=Array.from(t.parentElement.children).filter((t=>t.getAttribute("sGroup")===e)).findIndex((e=>e.isSameNode(t)));return`${se(t.parentElement)}>${e?`${e}.`:""} ${i}`}},ValueHandling:{identity:re},Voltage:{identity:re},VoltageLevel:{identity:oe}};function se(t){if(null===t)return NaN;if(t.closest("Private"))return NaN;const e=t.tagName;return Jt(e)?de[e].identity(t):NaN} +function Et(t,e,i){let n,o=t;return"object"==typeof t?(o=t.slot,n=t):n={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return bt({descriptor:n=>({get(){var n;const o="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(o),a=null!=r?wt(r,t):[];return i?a.filter((t=>t.matches(i))):a},enumerable:!0,configurable:!0})})}({slot:o,flatten:e,selector:i}):bt({descriptor:t=>({get(){var t,e;const i="slot"+(o?`[name=${o}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(n))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}function St(t){return new CustomEvent("oscd-edit",{composed:!0,bubbles:!0,detail:t})}const At=["TransformerWinding","ConductingEquipment"],Ct=["GeneralEquipment","PowerTransformer",...At],$t=["Substation","VoltageLevel","Bay"],kt=["Process","Line"],It=["EqSubFunction","EqFunction"],Nt=["ConnectivityNode",...["SubFunction","Function","TapChanger","SubEquipment",...Ct,...$t,...kt,...It]],Tt=["LN0","LN"],Lt=["GSSE","GOOSE","ConfReportControl","SMVsc","DynDataSet","ConfDataSet"],Rt=[...["SCL",...["SubNetwork","GOOSESecurity","SMVSecurity",...Nt],...["ConnectedAP","PhysConn","SDO","DO","DAI","SDI","DOI","Inputs","RptEnabled","Server","ServerAt","SettingControl","Communication","Log","LDevice","DataSet","AccessPoint","IED","NeutralPoint",...["SampledValueControl","GSEControl","LogControl","ReportControl"],"GSE","SMV","BDA","DA"],"LNodeType","DOType","DAType","EnumType"],"Text","Private","Hitem","AccessControl","Header","LNode","Val","Voltage","Services","Subject","IssuerName","MinTime","MaxTime","Association","FCDA","ClientLN","IEDName","ExtRef","Protocol",...Tt,"FileHandling","TimeSyncProt","CommProt","SGEdit","ConfSG","GetDirectory","GetDataObjectDefinition","DataObjectDirectory","GetDataSetValue","SetDataSetValue","DataSetDirectory","ReadWrite","TimerActivatedControl","GetCBValues","GSEDir","ConfLdName","DynAssociation","SettingGroups",...Lt,"ConfLogControl","ConfSigRef","ReportSettings","LogSettings","GSESettings","SMVSettings","ConfLNs","ClientServices","SupSubscription","ValueHandling","RedProt","McSecurity","KDC","Address","P","ProtNs","EnumVal","Terminal","BitRate","Authentication","DataTypeTemplates","History","OptFields","SmvOpts","TrgOps","SamplesPerSec","SmpRate","SecPerSamples"],Dt=["Text","Private"],Ot=[...Dt],Ft=[...Dt],zt=[...Dt],Pt=[...Ft,"Val"],Ht=[...Ot,"LNode"],Mt=[...Ht],Bt=[...Mt],Vt=[...Mt,"PowerTransformer","GeneralEquipment"],Ut=[...Bt,"Terminal"],qt=[...Ft,"Address"],Gt=[...Ot],jt=[...Gt,"IEDName"],Xt=[...Ft,"DataSet","ReportControl","LogControl","DOI","Inputs","Log"],Yt=[...Mt,"GeneralEquipment","Function"],Wt=[...Gt,"TrgOps"],Kt=[...Mt,"GeneralEquipment","EqSubFunction"],Zt={AccessControl:{parents:["LDevice"],children:[]},AccessPoint:{parents:["IED"],children:[...Ot,"Server","LN","ServerAt","Services","GOOSESecurity","SMVSecurity"]},Address:{parents:["ConnectedAP","GSE","SMV"],children:["P"]},Association:{parents:["Server"],children:[]},Authentication:{parents:["Server"],children:[]},BDA:{parents:["DAType"],children:[...Pt]},BitRate:{parents:["SubNetwork"],children:[]},Bay:{parents:["VoltageLevel"],children:[...Vt,"ConductingEquipment","ConnectivityNode","Function"]},ClientLN:{parents:["RptEnabled"],children:[]},ClientServices:{parents:["Services"],children:["TimeSyncProt","McSecurity"]},CommProt:{parents:["Services"],children:[]},Communication:{parents:["SCL"],children:[...Ft,"SubNetwork"]},ConductingEquipment:{parents:["Process","Line","SubFunction","Function","Bay"],children:[...Ut,"EqFunction","SubEquipment"]},ConfDataSet:{parents:["Services"],children:[]},ConfLdName:{parents:["Services"],children:[]},ConfLNs:{parents:["Services"],children:[]},ConfLogControl:{parents:["Services"],children:[]},ConfReportControl:{parents:["Services"],children:[]},ConfSG:{parents:["SettingGroups"],children:[]},ConfSigRef:{parents:["Services"],children:[]},ConnectedAP:{parents:["SubNetwork"],children:[...Ft,"Address","GSE","SMV","PhysConn"]},ConnectivityNode:{parents:["Bay","Line"],children:[...Ht]},DA:{parents:["DOType"],children:[...Pt]},DAI:{parents:["DOI","SDI"],children:[...Ft,"Val"]},DAType:{parents:["DataTypeTemplates"],children:[...zt,"BDA","ProtNs"]},DO:{parents:["LNodeType"],children:[...Ft]},DOI:{parents:[...Tt],children:[...Ft,"SDI","DAI"]},DOType:{parents:["DataTypeTemplates"],children:[...zt,"SDO","DA"]},DataObjectDirectory:{parents:["Services"],children:[]},DataSet:{parents:[...Tt],children:[...Ot,"FCDA"]},DataSetDirectory:{parents:["Services"],children:[]},DataTypeTemplates:{parents:["SCL"],children:["LNodeType","DOType","DAType","EnumType"]},DynAssociation:{parents:["Services"],children:[]},DynDataSet:{parents:["Services"],children:[]},EnumType:{parents:["DataTypeTemplates"],children:[...zt,"EnumVal"]},EnumVal:{parents:["EnumType"],children:[]},EqFunction:{parents:["GeneralEquipment","TapChanger","TransformerWinding","PowerTransformer","SubEquipment","ConductingEquipment"],children:[...Kt]},EqSubFunction:{parents:["EqSubFunction","EqFunction"],children:[...Kt]},ExtRef:{parents:["Inputs"],children:[]},FCDA:{parents:["DataSet"],children:[]},FileHandling:{parents:["Services"],children:[]},Function:{parents:["Bay","VoltageLevel","Substation","Process","Line"],children:[...Mt,"SubFunction","GeneralEquipment","ConductingEquipment"]},GeneralEquipment:{parents:["SubFunction","Function",...kt,...It,...$t],children:[...Bt,"EqFunction"]},GetCBValues:{parents:["Services"],children:[]},GetDataObjectDefinition:{parents:["Services"],children:[]},GetDataSetValue:{parents:["Services"],children:[]},GetDirectory:{parents:["Services"],children:[]},GOOSE:{parents:["Services"],children:[]},GOOSESecurity:{parents:["AccessPoint"],children:[...Ot,"Subject","IssuerName"]},GSE:{parents:["ConnectedAP"],children:[...qt,"MinTime","MaxTime"]},GSEDir:{parents:["Services"],children:[]},GSEControl:{parents:["LN0"],children:[...jt,"Protocol"]},GSESettings:{parents:["Services"],children:[]},GSSE:{parents:["Services"],children:[]},Header:{parents:["SCL"],children:["Text","History"]},History:{parents:["Header"],children:["Hitem"]},Hitem:{parents:["History"],children:[]},IED:{parents:["SCL"],children:[...Ft,"Services","AccessPoint","KDC"]},IEDName:{parents:["GSEControl","SampledValueControl"],children:[]},Inputs:{parents:[...Tt],children:[...Ft,"ExtRef"]},IssuerName:{parents:["GOOSESecurity","SMVSecurity"],children:[]},KDC:{parents:["IED"],children:[]},LDevice:{parents:["Server"],children:[...Ft,"LN0","LN","AccessControl"]},LN:{parents:["AccessPoint","LDevice"],children:[...Xt]},LN0:{parents:["LDevice"],children:[...Xt,"GSEControl","SampledValueControl","SettingControl"]},LNode:{parents:[...Nt],children:[...Ft]},LNodeType:{parents:["DataTypeTemplates"],children:[...zt,"DO"]},Line:{parents:["Process","SCL"],children:[...Yt,"Voltage","ConductingEquipment"]},Log:{parents:[...Tt],children:[...Ft]},LogControl:{parents:[...Tt],children:[...Wt]},LogSettings:{parents:["Services"],children:[]},MaxTime:{parents:["GSE"],children:[]},McSecurity:{parents:["GSESettings","SMVSettings","ClientServices"],children:[]},MinTime:{parents:["GSE"],children:[]},NeutralPoint:{parents:["TransformerWinding"],children:[...Ft]},OptFields:{parents:["ReportControl"],children:[]},P:{parents:["Address","PhysConn"],children:[]},PhysConn:{parents:["ConnectedAP"],children:[...Ft,"P"]},PowerTransformer:{parents:[...$t],children:[...Bt,"TransformerWinding","SubEquipment","EqFunction"]},Private:{parents:[],children:[]},Process:{parents:["Process","SCL"],children:[...Yt,"ConductingEquipment","Substation","Line","Process"]},ProtNs:{parents:["DAType","DA"],children:[]},Protocol:{parents:["GSEControl","SampledValueControl"],children:[]},ReadWrite:{parents:["Services"],children:[]},RedProt:{parents:["Services"],children:[]},ReportControl:{parents:[...Tt],children:[...Wt,"OptFields","RptEnabled"]},ReportSettings:{parents:["Services"],children:[]},RptEnabled:{parents:["ReportControl"],children:[...Ft,"ClientLN"]},SamplesPerSec:{parents:["SMVSettings"],children:[]},SampledValueControl:{parents:["LN0"],children:[...jt,"SmvOpts"]},SecPerSamples:{parents:["SMVSettings"],children:[]},SCL:{parents:[],children:[...Dt,"Header","Substation","Communication","IED","DataTypeTemplates","Line","Process"]},SDI:{parents:["DOI","SDI"],children:[...Ft,"SDI","DAI"]},SDO:{parents:["DOType"],children:[...Ot]},Server:{parents:["AccessPoint"],children:[...Ft,"Authentication","LDevice","Association"]},ServerAt:{parents:["AccessPoint"],children:[...Ft]},Services:{parents:["IED","AccessPoint"],children:["DynAssociation","SettingGroups","GetDirectory","GetDataObjectDefinition","DataObjectDirectory","GetDataSetValue","SetDataSetValue","DataSetDirectory","ConfDataSet","DynDataSet","ReadWrite","TimerActivatedControl","ConfReportControl","GetCBValues","ConfLogControl","ReportSettings","LogSettings","GSESettings","SMVSettings","GSEDir","GOOSE","GSSE","SMVsc","FileHandling","ConfLNs","ClientServices","ConfLdName","SupSubscription","ConfSigRef","ValueHandling","RedProt","TimeSyncProt","CommProt"]},SetDataSetValue:{parents:["Services"],children:[]},SettingControl:{parents:["LN0"],children:[...Ft]},SettingGroups:{parents:["Services"],children:["SGEdit","ConfSG"]},SGEdit:{parents:["SettingGroups"],children:[]},SmpRate:{parents:["SMVSettings"],children:[]},SMV:{parents:["ConnectedAP"],children:[...qt]},SmvOpts:{parents:["SampledValueControl"],children:[]},SMVsc:{parents:["Services"],children:[]},SMVSecurity:{parents:["AccessPoint"],children:[...Ot,"Subject","IssuerName"]},SMVSettings:{parents:["Services"],children:["SmpRate","SamplesPerSec","SecPerSamples","McSecurity"]},SubEquipment:{parents:["TapChanger","PowerTransformer","ConductingEquipment","TransformerWinding",...At],children:[...Mt,"EqFunction"]},SubFunction:{parents:["SubFunction","Function"],children:[...Mt,"GeneralEquipment","ConductingEquipment","SubFunction"]},SubNetwork:{parents:["Communication"],children:[...Ot,"BitRate","ConnectedAP"]},Subject:{parents:["GOOSESecurity","SMVSecurity"],children:[]},Substation:{parents:["SCL"],children:[...Vt,"VoltageLevel","Function"]},SupSubscription:{parents:["Services"],children:[]},TapChanger:{parents:["TransformerWinding"],children:[...Mt,"SubEquipment","EqFunction"]},Terminal:{parents:[...Ct],children:[...Ft]},Text:{parents:Rt.filter((t=>"Text"!==t&&"Private"!==t)),children:[]},TimerActivatedControl:{parents:["Services"],children:[]},TimeSyncProt:{parents:["Services","ClientServices"],children:[]},TransformerWinding:{parents:["PowerTransformer"],children:[...Ut,"TapChanger","NeutralPoint","EqFunction","SubEquipment"]},TrgOps:{parents:["ReportControl"],children:[]},Val:{parents:["DAI","DA","BDA"],children:[]},ValueHandling:{parents:["Services"],children:[]},Voltage:{parents:["VoltageLevel"],children:[]},VoltageLevel:{parents:["Substation"],children:[...Vt,"Voltage","Bay","Function"]}},Qt=new Set(Rt);function Jt(t){return Qt.has(t)}function te(t,e){if(!Jt(e))return null;const i=t.tagName,n=Array.from(t.children);if("Services"===i||"SettingGroups"===i||!Jt(i))return n.find((t=>t.tagName===e))??null;const o=Zt[i].children;let r,a=o.findIndex((t=>t===e));if(a<0)return null;for(;at.tagName===o[a])),a+=1;return r??null}function ee(t){return`${se(t.parentElement)}>${t.getAttribute("connectivityNode")}`}function ie(t){const[e,i]=["name","ix"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e}${i?`[${i}]`:""}`}function ne(t){const[e,i]=["ldInst","cbName"].map((e=>t.getAttribute(e)));return`${e} ${i}`}function oe(t){return"SCL"===t.parentElement.tagName?t.getAttribute("name"):`${se(t.parentElement)}>${t.getAttribute("name")}`}function re(t){return se(t.parentElement).toString()}function ae(t){return`#${t.id}`}const de={AccessControl:{identity:re},AccessPoint:{identity:oe},Address:{identity:re},Association:{identity:function(t){const[e,i,n,o,r]=["iedName","ldInst","prefix","lnClass","lnInst","lnType"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e} ${i}/${n??""} ${o} ${r??""}`}},Authentication:{identity:re},BDA:{identity:oe},BitRate:{identity:re},Bay:{identity:oe},ClientLN:{identity:function(t){const[e,i,n,o,r,a]=["apRef","iedName","ldInst","prefix","lnClass","lnInst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${i} ${e||""} ${n}/${o??""} ${r} ${a}`}},ClientServices:{identity:re},CommProt:{identity:re},Communication:{identity:re},ConductingEquipment:{identity:oe},ConfDataSet:{identity:re},ConfLdName:{identity:re},ConfLNs:{identity:re},ConfLogControl:{identity:re},ConfReportControl:{identity:re},ConfSG:{identity:re},ConfSigRef:{identity:re},ConnectedAP:{identity:function(t){const[e,i]=["iedName","apName"].map((e=>t.getAttribute(e)));return`${e} ${i}`}},ConnectivityNode:{identity:oe},DA:{identity:oe},DAI:{identity:ie},DAType:{identity:ae},DO:{identity:oe},DOI:{identity:oe},DOType:{identity:ae},DataObjectDirectory:{identity:re},DataSet:{identity:oe},DataSetDirectory:{identity:re},DataTypeTemplates:{identity:re},DynAssociation:{identity:re},DynDataSet:{identity:re},EnumType:{identity:ae},EnumVal:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("ord")}`}},EqFunction:{identity:oe},EqSubFunction:{identity:oe},ExtRef:{identity:function(t){if(!t.parentElement)return NaN;const e=se(t.parentElement),i=t.getAttribute("iedName"),n=t.getAttribute("intAddr"),o=Array.from(t.parentElement.querySelectorAll(`ExtRef[intAddr="${n}"]`)).indexOf(t);if(!i)return`${e}>${n}[${o}]`;const[r,a,d,s,l,c,p,m,h,u,f,g]=["ldInst","prefix","lnClass","lnInst","doName","daName","serviceType","srcLDInst","srcPrefix","srcLNClass","srcLNInst","srcCBName"].map((e=>t.getAttribute(e))),b=g?`${p}:${g} ${m??""}/${h??""} ${u??""} ${f??""}`:"";return`${e}>${b?`${b} `:""}${`${i} ${r}/${a??""} ${d} ${s??""} ${l} ${c||""}`}${n?`@${n}`:""}`}},FCDA:{identity:function(t){const[e,i,n,o,r,a,d,s]=["ldInst","prefix","lnClass","lnInst","doName","daName","fc","ix"].map((e=>t.getAttribute(e))),l=`${e}/${i??""} ${n} ${o??""}.${r} ${a||""}`;return`${se(t.parentElement)}>${l} (${d}${s?` [${s}]`:""})`}},FileHandling:{identity:re},Function:{identity:oe},GeneralEquipment:{identity:oe},GetCBValues:{identity:re},GetDataObjectDefinition:{identity:re},GetDataSetValue:{identity:re},GetDirectory:{identity:re},GOOSE:{identity:re},GOOSESecurity:{identity:oe},GSE:{identity:ne},GSEDir:{identity:re},GSEControl:{identity:oe},GSESettings:{identity:re},GSSE:{identity:re},Header:{identity:re},History:{identity:re},Hitem:{identity:function(t){return`${t.getAttribute("version")}\t${t.getAttribute("revision")}`}},IED:{identity:oe},IEDName:{identity:function(t){const e=t.textContent,[i,n,o,r,a]=["apRef","ldInst","prefix","lnClass","lnInst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e} ${i||""} ${n||""}/${o??""} ${r??""} ${a??""}`}},Inputs:{identity:re},IssuerName:{identity:re},KDC:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("iedName")} ${t.getAttribute("apName")}`}},LDevice:{identity:function(t){return`${se(t.closest("IED"))}>>${t.getAttribute("inst")}`}},LN:{identity:function(t){const[e,i,n]=["prefix","lnClass","inst"].map((e=>t.getAttribute(e)));return`${se(t.parentElement)}>${e??""} ${i} ${n}`}},LN0:{identity:re},LNode:{identity:function(t){const[e,i,n,o,r,a]=["iedName","ldInst","prefix","lnClass","lnInst","lnType"].map((e=>t.getAttribute(e)));return"None"===e?`${se(t.parentElement)}>(${o} ${a})`:`${e} ${i||"(Client)"}/${n??""} ${o} ${r??""}`}},LNodeType:{identity:ae},Line:{identity:oe},Log:{identity:oe},LogControl:{identity:oe},LogSettings:{identity:re},MaxTime:{identity:re},McSecurity:{identity:re},MinTime:{identity:re},NeutralPoint:{identity:ee},OptFields:{identity:re},P:{identity:function(t){if(!t.parentElement)return NaN;const e=t.parentElement,i=t.getAttribute("type");if("PhysConn"===e.tagName)return`${se(t.parentElement)}>${i}`;const n=Array.from(t.parentElement.children).filter((t=>t.getAttribute("type")===i)).findIndex((e=>e.isSameNode(t)));return`${se(t.parentElement)}>${i} [${n}]`}},PhysConn:{identity:function(t){if(!t.parentElement)return NaN;if(!t.parentElement.querySelector('PhysConn[type="RedConn"]'))return NaN;const e=t.getAttribute("type");return t.parentElement.children.length>1&&"Connection"!==e&&"RedConn"!==e?NaN:`${se(t.parentElement)}>${e}`}},PowerTransformer:{identity:oe},Private:{identity:()=>NaN},Process:{identity:oe},ProtNs:{identity:function(t){return`${se(t.parentElement)}>${t.getAttribute("type")||"8-MMS"}\t${t.textContent}`}},Protocol:{identity:re},ReadWrite:{identity:re},RedProt:{identity:re},ReportControl:{identity:oe},ReportSettings:{identity:re},RptEnabled:{identity:re},SamplesPerSec:{identity:re},SampledValueControl:{identity:oe},SecPerSamples:{identity:re},SCL:{identity:function(){return""}},SDI:{identity:ie},SDO:{identity:oe},Server:{identity:re},ServerAt:{identity:re},Services:{identity:re},SetDataSetValue:{identity:re},SettingControl:{identity:re},SettingGroups:{identity:re},SGEdit:{identity:re},SmpRate:{identity:re},SMV:{identity:ne},SmvOpts:{identity:re},SMVsc:{identity:re},SMVSecurity:{identity:oe},SMVSettings:{identity:re},SubEquipment:{identity:oe},SubFunction:{identity:oe},SubNetwork:{identity:oe},Subject:{identity:re},Substation:{identity:oe},SupSubscription:{identity:re},TapChanger:{identity:oe},Terminal:{identity:ee},Text:{identity:re},TimerActivatedControl:{identity:re},TimeSyncProt:{identity:re},TransformerWinding:{identity:oe},TrgOps:{identity:re},Val:{identity:function(t){if(!t.parentElement)return NaN;const e=t.getAttribute("sGroup"),i=Array.from(t.parentElement.children).filter((t=>t.getAttribute("sGroup")===e)).findIndex((e=>e.isSameNode(t)));return`${se(t.parentElement)}>${e?`${e}.`:""} ${i}`}},ValueHandling:{identity:re},Voltage:{identity:re},VoltageLevel:{identity:oe}};function se(t){if(null===t)return NaN;if(t.closest("Private"))return NaN;const e=t.tagName;return Jt(e)?de[e].identity(t):NaN} /** * @license * Copyright 2021 Google LLC @@ -162,7 +162,7 @@ var _e=["touchstart","pointerdown","mousedown","keydown"],we=["touchend","pointe * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Ce=1,$e=2,Ie=3,ke=4,Ne=t=>(...e)=>({_$litDirective$:t,values:e});class Te{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} +const Ce=1,$e=2,ke=3,Ie=4,Ne=t=>(...e)=>({_$litDirective$:t,values:e});class Te{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} /** * @license * Copyright 2018 Google LLC @@ -266,7 +266,12 @@ const Ze=t=>void 0===t.strings,Qe={},Je=(t,e)=>{var i,n;const o=t._$AN;if(void 0 * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function ii(t){void 0!==this._$AN?(ti(this),this._$AM=t,ei(this)):this._$AM=t}function ni(t,e=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=i;t{var e,i,n,o;t.type==$e&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=ni),null!==(i=(o=t)._$AQ)&&void 0!==i||(o._$AQ=ii))};class ri extends Te{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ei(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(Je(this,t),ti(this))}setValue(t){if(Ze(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const ai=new WeakMap,di=Ne(class extends ri{render(t){return j}update(t,[e]){var i;const n=e!==this.G;return n&&void 0!==this.G&&this.ot(void 0),(n||this.rt!==this.lt)&&(this.G=e,this.dt=null===(i=t.options)||void 0===i?void 0:i.host,this.ot(this.lt=t.element)),j}ot(t){var e;if("function"==typeof this.G){const i=null!==(e=this.dt)&&void 0!==e?e:globalThis;let n=ai.get(i);void 0===n&&(n=new WeakMap,ai.set(i,n)),void 0!==n.get(this.G)&&this.G.call(this.dt,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,i;return"function"==typeof this.G?null===(e=ai.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.G):null===(i=this.G)||void 0===i?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}); + */function ii(t){void 0!==this._$AN?(ti(this),this._$AM=t,ei(this)):this._$AM=t}function ni(t,e=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=i;t{var e,i,n,o;t.type==$e&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=ni),null!==(i=(o=t)._$AQ)&&void 0!==i||(o._$AQ=ii))};class ri extends Te{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ei(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(Je(this,t),ti(this))}setValue(t){if(Ze(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class ai{}const di=new WeakMap,si=Ne(class extends ri{render(t){return j}update(t,[e]){var i;const n=e!==this.G;return n&&void 0!==this.G&&this.ot(void 0),(n||this.rt!==this.lt)&&(this.G=e,this.dt=null===(i=t.options)||void 0===i?void 0:i.host,this.ot(this.lt=t.element)),j}ot(t){var e;if("function"==typeof this.G){const i=null!==(e=this.dt)&&void 0!==e?e:globalThis;let n=di.get(i);void 0===n&&(n=new WeakMap,di.set(i,n)),void 0!==n.get(this.G)&&this.G.call(this.dt,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,i;return"function"==typeof this.G?null===(e=di.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.G):null===(i=this.G)||void 0===i?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}); /** * @license * Copyright 2016 Google Inc. All rights reserved. @@ -282,7 +287,7 @@ const Ze=t=>void 0===t.strings,Qe={},Je=(t,e)=>{var i,n;const o=t._$AN;if(void 0 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */(()=>{var t,e,i;const n=Symbol(),o=Symbol(),r=Symbol(),a=Symbol(),d=Symbol(),s=Symbol(),l=Symbol(),c=Symbol(),p=Symbol(),m=Symbol(),h=Symbol(),u=Symbol(),f=Symbol();class g{constructor(){this[t]=[],this[e]=[],this[i]=new Set}destructor(){this[p](this[r]);const t=this;t[n]=null,t[r]=null,t[o]=null}get top(){const t=this[n];return t[t.length-1]||null}push(t){t&&t!==this.top&&(this.remove(t),this[s](t),this[n].push(t))}remove(t){const e=this[n].indexOf(t);return-1!==e&&(this[n].splice(e,1),e===this[n].length&&this[s](this.top),!0)}pop(){const t=this.top;return t&&this.remove(t),t}has(t){return-1!==this[n].indexOf(t)}[(t=n,e=r,i=o,s)](t){const e=this[o],i=this[r];if(!t)return this[p](i),e.clear(),void(this[r]=[]);const n=this[m](t);if(n[n.length-1].parentNode!==document.body)throw Error("Non-connected element cannot be a blocking element");this[r]=n;const a=this[h](t);if(!i.length)return void this[c](n,a,e);let d=i.length-1,s=n.length-1;for(;d>0&&s>0&&i[d]===n[s];)d--,s--;i[d]!==n[s]&&this[l](i[d],n[s]),d>0&&this[p](i.slice(0,d)),s>0&&this[c](n.slice(0,s),a,null)}[l](t,e){const i=t[a];this[u](t)&&!t.inert&&(t.inert=!0,i.add(t)),i.has(e)&&(e.inert=!1,i.delete(e)),e[d]=t[d],e[a]=i,t[d]=void 0,t[a]=void 0}[p](t){for(const e of t){e[d].disconnect(),e[d]=void 0;const t=e[a];for(const e of t)e.inert=!1;e[a]=void 0}}[c](t,e,i){for(const n of t){const t=n.parentNode,o=t.children,r=new Set;for(let t=0;t{var t,e,i;const n=Symbol(),o=Symbol(),r=Symbol(),a=Symbol(),d=Symbol(),s=Symbol(),l=Symbol(),c=Symbol(),p=Symbol(),m=Symbol(),h=Symbol(),u=Symbol(),f=Symbol();class g{constructor(){this[t]=[],this[e]=[],this[i]=new Set}destructor(){this[p](this[r]);const t=this;t[n]=null,t[r]=null,t[o]=null}get top(){const t=this[n];return t[t.length-1]||null}push(t){t&&t!==this.top&&(this.remove(t),this[s](t),this[n].push(t))}remove(t){const e=this[n].indexOf(t);return-1!==e&&(this[n].splice(e,1),e===this[n].length&&this[s](this.top),!0)}pop(){const t=this.top;return t&&this.remove(t),t}has(t){return-1!==this[n].indexOf(t)}[(t=n,e=r,i=o,s)](t){const e=this[o],i=this[r];if(!t)return this[p](i),e.clear(),void(this[r]=[]);const n=this[m](t);if(n[n.length-1].parentNode!==document.body)throw Error("Non-connected element cannot be a blocking element");this[r]=n;const a=this[h](t);if(!i.length)return void this[c](n,a,e);let d=i.length-1,s=n.length-1;for(;d>0&&s>0&&i[d]===n[s];)d--,s--;i[d]!==n[s]&&this[l](i[d],n[s]),d>0&&this[p](i.slice(0,d)),s>0&&this[c](n.slice(0,s),a,null)}[l](t,e){const i=t[a];this[u](t)&&!t.inert&&(t.inert=!0,i.add(t)),i.has(e)&&(e.inert=!1,i.delete(e)),e[d]=t[d],e[a]=i,t[d]=void 0,t[a]=void 0}[p](t){for(const e of t){e[d].disconnect(),e[d]=void 0;const t=e[a];for(const e of t)e.inert=!1;e[a]=void 0}}[c](t,e,i){for(const n of t){const t=n.parentNode,o=t.children,r=new Set;for(let t=0;tvoid 0===t.strings,Qe={},Je=(t,e)=>{var i,n;const o=t._$AN;if(void 0 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var ci,pi={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},mi={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},hi={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},ui=function(){function t(){this.rafIDs=new Map}return t.prototype.request=function(t,e){var i=this;this.cancel(t);var n=requestAnimationFrame((function(n){i.rafIDs.delete(t),e(n)}));this.rafIDs.set(t,n)},t.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},t.prototype.cancelAll=function(){var t=this;this.rafIDs.forEach((function(e,i){t.cancel(i)}))},t.prototype.getQueue=function(){var t=[];return this.rafIDs.forEach((function(e,i){t.push(i)})),t},t}();!function(t){t.POLL_SCROLL_POS="poll_scroll_position",t.POLL_LAYOUT_CHANGE="poll_layout_change"}(ci||(ci={}));var fi=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.dialogOpen=!1,o.isFullscreen=!1,o.animationFrame=0,o.animationTimer=0,o.escapeKeyAction=mi.CLOSE_ACTION,o.scrimClickAction=mi.CLOSE_ACTION,o.autoStackButtons=!0,o.areButtonsStacked=!1,o.suppressDefaultPressSelector=mi.SUPPRESS_DEFAULT_PRESS_SELECTOR,o.animFrame=new ui,o.contentScrollHandler=function(){o.handleScrollEvent()},o.windowResizeHandler=function(){o.layout()},o.windowOrientationChangeHandler=function(){o.layout()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return pi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return mi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return hi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.hasClass(pi.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(pi.FULLSCREEN)},n.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},n.prototype.open=function(t){var e=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(pi.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),t&&t.isAboveFullscreenDialog&&this.adapter.addClass(pi.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){e.adapter.addClass(pi.OPEN),e.adapter.addBodyClass(pi.SCROLL_LOCK),e.layout(),e.animationTimer=setTimeout((function(){e.handleAnimationTimerEnd(),e.adapter.trapFocus(e.adapter.getInitialFocusEl()),e.adapter.notifyOpened()}),hi.DIALOG_ANIMATION_OPEN_TIME_MS)}))},n.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(t),this.adapter.addClass(pi.CLOSING),this.adapter.removeClass(pi.OPEN),this.adapter.removeBodyClass(pi.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)}),hi.DIALOG_ANIMATION_CLOSE_TIME_MS))},n.prototype.showSurfaceScrim=function(){var t=this;this.adapter.addClass(pi.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){t.adapter.addClass(pi.SURFACE_SCRIM_SHOWN)}))},n.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(pi.SURFACE_SCRIM_SHOWN),this.adapter.addClass(pi.SURFACE_SCRIM_HIDING)},n.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(pi.SURFACE_SCRIM_HIDING),this.adapter.removeClass(pi.SURFACE_SCRIM_SHOWING)},n.prototype.isOpen=function(){return this.dialogOpen},n.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},n.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction=t},n.prototype.getScrimClickAction=function(){return this.scrimClickAction},n.prototype.setScrimClickAction=function(t){this.scrimClickAction=t},n.prototype.getAutoStackButtons=function(){return this.autoStackButtons},n.prototype.setAutoStackButtons=function(t){this.autoStackButtons=t},n.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},n.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},n.prototype.layout=function(){var t=this;this.animFrame.request(ci.POLL_LAYOUT_CHANGE,(function(){t.layoutInternal()}))},n.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,mi.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},n.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var i=t.composedPath?t.composedPath()[0]:t.target,n=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(i,this.suppressDefaultPressSelector);e&&n&&this.adapter.clickDefaultButton()}},n.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},n.prototype.handleScrollEvent=function(){var t=this;this.animFrame.request(ci.POLL_SCROLL_POS,(function(){t.toggleScrollDividerHeader(),t.toggleScrollDividerFooter()}))},n.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},n.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(pi.OPENING),this.adapter.removeClass(pi.CLOSING)},n.prototype.runNextAnimationFrame=function(t){var e=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){e.animationFrame=0,clearTimeout(e.animationTimer),e.animationTimer=setTimeout(t,0)}))},n.prototype.detectStackedButtons=function(){this.adapter.removeClass(pi.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(pi.STACKED),t!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=t)},n.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(pi.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(pi.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},n.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(pi.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(pi.SCROLL_DIVIDER_HEADER):this.adapter.addClass(pi.SCROLL_DIVIDER_HEADER)},n.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(pi.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(pi.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(pi.SCROLL_DIVIDER_FOOTER)},n}(be); +var pi,mi={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},hi={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},ui={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},fi=function(){function t(){this.rafIDs=new Map}return t.prototype.request=function(t,e){var i=this;this.cancel(t);var n=requestAnimationFrame((function(n){i.rafIDs.delete(t),e(n)}));this.rafIDs.set(t,n)},t.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},t.prototype.cancelAll=function(){var t=this;this.rafIDs.forEach((function(e,i){t.cancel(i)}))},t.prototype.getQueue=function(){var t=[];return this.rafIDs.forEach((function(e,i){t.push(i)})),t},t}();!function(t){t.POLL_SCROLL_POS="poll_scroll_position",t.POLL_LAYOUT_CHANGE="poll_layout_change"}(pi||(pi={}));var gi=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.dialogOpen=!1,o.isFullscreen=!1,o.animationFrame=0,o.animationTimer=0,o.escapeKeyAction=hi.CLOSE_ACTION,o.scrimClickAction=hi.CLOSE_ACTION,o.autoStackButtons=!0,o.areButtonsStacked=!1,o.suppressDefaultPressSelector=hi.SUPPRESS_DEFAULT_PRESS_SELECTOR,o.animFrame=new fi,o.contentScrollHandler=function(){o.handleScrollEvent()},o.windowResizeHandler=function(){o.layout()},o.windowOrientationChangeHandler=function(){o.layout()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return mi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return hi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return ui},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.hasClass(mi.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(mi.FULLSCREEN)},n.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},n.prototype.open=function(t){var e=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(mi.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),t&&t.isAboveFullscreenDialog&&this.adapter.addClass(mi.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){e.adapter.addClass(mi.OPEN),e.adapter.addBodyClass(mi.SCROLL_LOCK),e.layout(),e.animationTimer=setTimeout((function(){e.handleAnimationTimerEnd(),e.adapter.trapFocus(e.adapter.getInitialFocusEl()),e.adapter.notifyOpened()}),ui.DIALOG_ANIMATION_OPEN_TIME_MS)}))},n.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(t),this.adapter.addClass(mi.CLOSING),this.adapter.removeClass(mi.OPEN),this.adapter.removeBodyClass(mi.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)}),ui.DIALOG_ANIMATION_CLOSE_TIME_MS))},n.prototype.showSurfaceScrim=function(){var t=this;this.adapter.addClass(mi.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){t.adapter.addClass(mi.SURFACE_SCRIM_SHOWN)}))},n.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(mi.SURFACE_SCRIM_SHOWN),this.adapter.addClass(mi.SURFACE_SCRIM_HIDING)},n.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(mi.SURFACE_SCRIM_HIDING),this.adapter.removeClass(mi.SURFACE_SCRIM_SHOWING)},n.prototype.isOpen=function(){return this.dialogOpen},n.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},n.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction=t},n.prototype.getScrimClickAction=function(){return this.scrimClickAction},n.prototype.setScrimClickAction=function(t){this.scrimClickAction=t},n.prototype.getAutoStackButtons=function(){return this.autoStackButtons},n.prototype.setAutoStackButtons=function(t){this.autoStackButtons=t},n.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},n.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},n.prototype.layout=function(){var t=this;this.animFrame.request(pi.POLL_LAYOUT_CHANGE,(function(){t.layoutInternal()}))},n.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,hi.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},n.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var i=t.composedPath?t.composedPath()[0]:t.target,n=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(i,this.suppressDefaultPressSelector);e&&n&&this.adapter.clickDefaultButton()}},n.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},n.prototype.handleScrollEvent=function(){var t=this;this.animFrame.request(pi.POLL_SCROLL_POS,(function(){t.toggleScrollDividerHeader(),t.toggleScrollDividerFooter()}))},n.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},n.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(mi.OPENING),this.adapter.removeClass(mi.CLOSING)},n.prototype.runNextAnimationFrame=function(t){var e=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){e.animationFrame=0,clearTimeout(e.animationTimer),e.animationTimer=setTimeout(t,0)}))},n.prototype.detectStackedButtons=function(){this.adapter.removeClass(mi.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(mi.STACKED),t!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=t)},n.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(mi.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(mi.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},n.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(mi.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(mi.SCROLL_DIVIDER_HEADER):this.adapter.addClass(mi.SCROLL_DIVIDER_HEADER)},n.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(mi.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(mi.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(mi.SCROLL_DIVIDER_FOOTER)},n}(be); /** * @license * Copyright 2019 Google Inc. @@ -328,17 +333,17 @@ var ci,pi={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-di * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -function gi(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var i={get passive(){return e=!0,!1}},n=function(){};t.document.addEventListener("test",n,i),t.document.removeEventListener("test",n,i)}catch(t){e=!1}return e} +function bi(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var i={get passive(){return e=!0,!1}},n=function(){};t.document.addEventListener("test",n,i),t.document.removeEventListener("test",n,i)}catch(t){e=!1}return e} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */(t)&&{passive:!0}}const bi=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)} + */(t)&&{passive:!0}}const xi=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */,xi=document.$blockingElements;class vi extends ge{constructor(){super(...arguments),this.hideActions=!1,this.stacked=!1,this.heading="",this.scrimClickAction="close",this.escapeKeyAction="close",this.open=!1,this.defaultAction="close",this.actionAttribute="dialogAction",this.initialFocusAttribute="dialogInitialFocus",this.initialSupressDefaultPressSelector="",this.mdcFoundationClass=fi,this.boundHandleClick=null,this.boundHandleKeydown=null,this.boundHandleDocumentKeydown=null}set suppressDefaultPressSelector(t){this.mdcFoundation?this.mdcFoundation.setSuppressDefaultPressSelector(t):this.initialSupressDefaultPressSelector=t}get suppressDefaultPressSelector(){return this.mdcFoundation?this.mdcFoundation.getSuppressDefaultPressSelector():this.initialSupressDefaultPressSelector}get primaryButton(){let t=this.primarySlot.assignedNodes();t=t.filter((t=>t instanceof HTMLElement));const e=t[0];return e||null}emitNotification(t,e){const i=new CustomEvent(t,{detail:e?{action:e}:{}});this.dispatchEvent(i)}getInitialFocusEl(){const t=`[${this.initialFocusAttribute}]`,e=this.querySelector(t);if(e)return e;const i=this.primarySlot.assignedNodes({flatten:!0}),n=this.searchNodeTreesForAttribute(i,this.initialFocusAttribute);if(n)return n;const o=this.secondarySlot.assignedNodes({flatten:!0}),r=this.searchNodeTreesForAttribute(o,this.initialFocusAttribute);if(r)return r;const a=this.contentSlot.assignedNodes({flatten:!0});return this.searchNodeTreesForAttribute(a,this.initialFocusAttribute)}searchNodeTreesForAttribute(t,e){for(const i of t)if(i instanceof HTMLElement){if(i.hasAttribute(e))return i;{const t=i.querySelector(`[${e}]`);if(t)return t}}return null}createAdapter(){return Object.assign(Object.assign({},me(this.mdcRoot)),{addBodyClass:()=>document.body.style.overflow="hidden",removeBodyClass:()=>document.body.style.overflow="",areButtonsStacked:()=>this.stacked,clickDefaultButton:()=>{const t=this.primaryButton;t&&t.click()},eventTargetMatches:(t,e)=>!!t&&pe(t,e),getActionFromEvent:t=>{if(!t.target)return"";const e= + */,vi=document.$blockingElements;class yi extends ge{constructor(){super(...arguments),this.hideActions=!1,this.stacked=!1,this.heading="",this.scrimClickAction="close",this.escapeKeyAction="close",this.open=!1,this.defaultAction="close",this.actionAttribute="dialogAction",this.initialFocusAttribute="dialogInitialFocus",this.initialSupressDefaultPressSelector="",this.mdcFoundationClass=gi,this.boundHandleClick=null,this.boundHandleKeydown=null,this.boundHandleDocumentKeydown=null}set suppressDefaultPressSelector(t){this.mdcFoundation?this.mdcFoundation.setSuppressDefaultPressSelector(t):this.initialSupressDefaultPressSelector=t}get suppressDefaultPressSelector(){return this.mdcFoundation?this.mdcFoundation.getSuppressDefaultPressSelector():this.initialSupressDefaultPressSelector}get primaryButton(){let t=this.primarySlot.assignedNodes();t=t.filter((t=>t instanceof HTMLElement));const e=t[0];return e||null}emitNotification(t,e){const i=new CustomEvent(t,{detail:e?{action:e}:{}});this.dispatchEvent(i)}getInitialFocusEl(){const t=`[${this.initialFocusAttribute}]`,e=this.querySelector(t);if(e)return e;const i=this.primarySlot.assignedNodes({flatten:!0}),n=this.searchNodeTreesForAttribute(i,this.initialFocusAttribute);if(n)return n;const o=this.secondarySlot.assignedNodes({flatten:!0}),r=this.searchNodeTreesForAttribute(o,this.initialFocusAttribute);if(r)return r;const a=this.contentSlot.assignedNodes({flatten:!0});return this.searchNodeTreesForAttribute(a,this.initialFocusAttribute)}searchNodeTreesForAttribute(t,e){for(const i of t)if(i instanceof HTMLElement){if(i.hasAttribute(e))return i;{const t=i.querySelector(`[${e}]`);if(t)return t}}return null}createAdapter(){return Object.assign(Object.assign({},me(this.mdcRoot)),{addBodyClass:()=>document.body.style.overflow="hidden",removeBodyClass:()=>document.body.style.overflow="",areButtonsStacked:()=>this.stacked,clickDefaultButton:()=>{const t=this.primaryButton;t&&t.click()},eventTargetMatches:(t,e)=>!!t&&pe(t,e),getActionFromEvent:t=>{if(!t.target)return"";const e= /** * @license * Copyright 2018 Google Inc. @@ -361,35 +366,35 @@ function gi(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -function(t,e){if(t.closest)return t.closest(e);for(var i=t;i;){if(pe(i,e))return i;i=i.parentElement}return null}(t.target,`[${this.actionAttribute}]`);return e&&e.getAttribute(this.actionAttribute)},getInitialFocusEl:()=>this.getInitialFocusEl(),isContentScrollable:()=>{const t=this.contentElement;return!!t&&t.scrollHeight>t.offsetHeight},notifyClosed:t=>this.emitNotification("closed",t),notifyClosing:t=>{this.closingDueToDisconnect||(this.open=!1),this.emitNotification("closing",t)},notifyOpened:()=>this.emitNotification("opened"),notifyOpening:()=>{this.open=!0,this.emitNotification("opening")},reverseButtons:()=>{},releaseFocus:()=>{xi.remove(this)},trapFocus:t=>{this.isConnected&&(xi.push(this),t&&t.focus())},registerContentEventHandler:(t,e)=>{this.contentElement.addEventListener(t,e)},deregisterContentEventHandler:(t,e)=>{this.contentElement.removeEventListener(t,e)},isScrollableContentAtTop:()=>{const t=this.contentElement;return!!t&&0===t.scrollTop},isScrollableContentAtBottom:()=>{const t=this.contentElement;return!!t&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e,gi())},deregisterWindowEventHandler:(t,e)=>{window.removeEventListener(t,e,gi())}})}render(){const t={[pi.STACKED]:this.stacked};let e=U``;this.heading&&(e=this.renderHeading());const i={"mdc-dialog__actions":!this.hideActions};return U`
    ${e}
    `}renderHeading(){return U`

    ${this.heading}

    `}firstUpdated(){super.firstUpdated(),this.mdcFoundation.setAutoStackButtons(!0),this.initialSupressDefaultPressSelector?this.suppressDefaultPressSelector=this.initialSupressDefaultPressSelector:this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,"mwc-textarea","mwc-menu mwc-list-item","mwc-select mwc-list-item"].join(", "),this.boundHandleClick=this.mdcFoundation.handleClick.bind(this.mdcFoundation),this.boundHandleKeydown=this.mdcFoundation.handleKeydown.bind(this.mdcFoundation),this.boundHandleDocumentKeydown=this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation)}connectedCallback(){super.connectedCallback(),this.open&&this.mdcFoundation&&!this.mdcFoundation.isOpen()&&(this.setEventListeners(),this.mdcFoundation.open())}disconnectedCallback(){super.disconnectedCallback(),this.open&&this.mdcFoundation&&(this.removeEventListeners(),this.closingDueToDisconnect=!0,this.mdcFoundation.close(this.currentAction||this.defaultAction),this.closingDueToDisconnect=!1,this.currentAction=void 0,xi.remove(this))}forceLayout(){this.mdcFoundation.layout()}focus(){const t=this.getInitialFocusEl();t&&t.focus()}blur(){if(!this.shadowRoot)return;const t=this.shadowRoot.activeElement;if(t)t instanceof HTMLElement&&t.blur();else{const t=this.getRootNode(),e=t instanceof Document?t.activeElement:null;e instanceof HTMLElement&&e.blur()}}setEventListeners(){this.boundHandleClick&&this.mdcRoot.addEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.addEventListener("keydown",this.boundHandleKeydown,gi()),this.boundHandleDocumentKeydown&&document.addEventListener("keydown",this.boundHandleDocumentKeydown,gi())}removeEventListeners(){this.boundHandleClick&&this.mdcRoot.removeEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.removeEventListener("keydown",this.boundHandleKeydown),this.boundHandleDocumentKeydown&&document.removeEventListener("keydown",this.boundHandleDocumentKeydown)}close(){this.open=!1}show(){this.open=!0}}n([vt(".mdc-dialog")],vi.prototype,"mdcRoot",void 0),n([vt('slot[name="primaryAction"]')],vi.prototype,"primarySlot",void 0),n([vt('slot[name="secondaryAction"]')],vi.prototype,"secondarySlot",void 0),n([vt("#contentSlot")],vi.prototype,"contentSlot",void 0),n([vt(".mdc-dialog__content")],vi.prototype,"contentElement",void 0),n([vt(".mdc-container")],vi.prototype,"conatinerElement",void 0),n([ft({type:Boolean})],vi.prototype,"hideActions",void 0),n([ft({type:Boolean}),bi((function(){this.forceLayout()}))],vi.prototype,"stacked",void 0),n([ft({type:String})],vi.prototype,"heading",void 0),n([ft({type:String}),bi((function(t){this.mdcFoundation.setScrimClickAction(t)}))],vi.prototype,"scrimClickAction",void 0),n([ft({type:String}),bi((function(t){this.mdcFoundation.setEscapeKeyAction(t)}))],vi.prototype,"escapeKeyAction",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t){this.mdcFoundation&&this.isConnected&&(t?(this.setEventListeners(),this.mdcFoundation.open()):(this.removeEventListeners(),this.mdcFoundation.close(this.currentAction||this.defaultAction),this.currentAction=void 0))}))],vi.prototype,"open",void 0),n([ft()],vi.prototype,"defaultAction",void 0),n([ft()],vi.prototype,"actionAttribute",void 0),n([ft()],vi.prototype,"initialFocusAttribute",void 0); +function(t,e){if(t.closest)return t.closest(e);for(var i=t;i;){if(pe(i,e))return i;i=i.parentElement}return null}(t.target,`[${this.actionAttribute}]`);return e&&e.getAttribute(this.actionAttribute)},getInitialFocusEl:()=>this.getInitialFocusEl(),isContentScrollable:()=>{const t=this.contentElement;return!!t&&t.scrollHeight>t.offsetHeight},notifyClosed:t=>this.emitNotification("closed",t),notifyClosing:t=>{this.closingDueToDisconnect||(this.open=!1),this.emitNotification("closing",t)},notifyOpened:()=>this.emitNotification("opened"),notifyOpening:()=>{this.open=!0,this.emitNotification("opening")},reverseButtons:()=>{},releaseFocus:()=>{vi.remove(this)},trapFocus:t=>{this.isConnected&&(vi.push(this),t&&t.focus())},registerContentEventHandler:(t,e)=>{this.contentElement.addEventListener(t,e)},deregisterContentEventHandler:(t,e)=>{this.contentElement.removeEventListener(t,e)},isScrollableContentAtTop:()=>{const t=this.contentElement;return!!t&&0===t.scrollTop},isScrollableContentAtBottom:()=>{const t=this.contentElement;return!!t&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e,bi())},deregisterWindowEventHandler:(t,e)=>{window.removeEventListener(t,e,bi())}})}render(){const t={[mi.STACKED]:this.stacked};let e=U``;this.heading&&(e=this.renderHeading());const i={"mdc-dialog__actions":!this.hideActions};return U`
    ${e}
    `}renderHeading(){return U`

    ${this.heading}

    `}firstUpdated(){super.firstUpdated(),this.mdcFoundation.setAutoStackButtons(!0),this.initialSupressDefaultPressSelector?this.suppressDefaultPressSelector=this.initialSupressDefaultPressSelector:this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,"mwc-textarea","mwc-menu mwc-list-item","mwc-select mwc-list-item"].join(", "),this.boundHandleClick=this.mdcFoundation.handleClick.bind(this.mdcFoundation),this.boundHandleKeydown=this.mdcFoundation.handleKeydown.bind(this.mdcFoundation),this.boundHandleDocumentKeydown=this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation)}connectedCallback(){super.connectedCallback(),this.open&&this.mdcFoundation&&!this.mdcFoundation.isOpen()&&(this.setEventListeners(),this.mdcFoundation.open())}disconnectedCallback(){super.disconnectedCallback(),this.open&&this.mdcFoundation&&(this.removeEventListeners(),this.closingDueToDisconnect=!0,this.mdcFoundation.close(this.currentAction||this.defaultAction),this.closingDueToDisconnect=!1,this.currentAction=void 0,vi.remove(this))}forceLayout(){this.mdcFoundation.layout()}focus(){const t=this.getInitialFocusEl();t&&t.focus()}blur(){if(!this.shadowRoot)return;const t=this.shadowRoot.activeElement;if(t)t instanceof HTMLElement&&t.blur();else{const t=this.getRootNode(),e=t instanceof Document?t.activeElement:null;e instanceof HTMLElement&&e.blur()}}setEventListeners(){this.boundHandleClick&&this.mdcRoot.addEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.addEventListener("keydown",this.boundHandleKeydown,bi()),this.boundHandleDocumentKeydown&&document.addEventListener("keydown",this.boundHandleDocumentKeydown,bi())}removeEventListeners(){this.boundHandleClick&&this.mdcRoot.removeEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.removeEventListener("keydown",this.boundHandleKeydown),this.boundHandleDocumentKeydown&&document.removeEventListener("keydown",this.boundHandleDocumentKeydown)}close(){this.open=!1}show(){this.open=!0}}n([vt(".mdc-dialog")],yi.prototype,"mdcRoot",void 0),n([vt('slot[name="primaryAction"]')],yi.prototype,"primarySlot",void 0),n([vt('slot[name="secondaryAction"]')],yi.prototype,"secondarySlot",void 0),n([vt("#contentSlot")],yi.prototype,"contentSlot",void 0),n([vt(".mdc-dialog__content")],yi.prototype,"contentElement",void 0),n([vt(".mdc-container")],yi.prototype,"conatinerElement",void 0),n([ft({type:Boolean})],yi.prototype,"hideActions",void 0),n([ft({type:Boolean}),xi((function(){this.forceLayout()}))],yi.prototype,"stacked",void 0),n([ft({type:String})],yi.prototype,"heading",void 0),n([ft({type:String}),xi((function(t){this.mdcFoundation.setScrimClickAction(t)}))],yi.prototype,"scrimClickAction",void 0),n([ft({type:String}),xi((function(t){this.mdcFoundation.setEscapeKeyAction(t)}))],yi.prototype,"escapeKeyAction",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t){this.mdcFoundation&&this.isConnected&&(t?(this.setEventListeners(),this.mdcFoundation.open()):(this.removeEventListeners(),this.mdcFoundation.close(this.currentAction||this.defaultAction),this.currentAction=void 0))}))],yi.prototype,"open",void 0),n([ft()],yi.prototype,"defaultAction",void 0),n([ft()],yi.prototype,"actionAttribute",void 0),n([ft()],yi.prototype,"initialFocusAttribute",void 0); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const yi=c`.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface,#fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}.mdc-dialog__surface{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline6-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size,1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height,2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight,500);letter-spacing:.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing,.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform,inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size,1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height,1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing,.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);transition:opacity 280ms cubic-bezier(.4,0,.2,1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index,7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width:592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width:592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width:960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width:720px)and (max-width:672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width:720px)and (min-width:672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width:720px)and (max-height:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width:720px)and (min-height:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width:720px)and (max-height:400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width:600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width:960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-dialog__surface[dir=rtl],[dir=rtl] .mdc-dialog__surface{text-align:right}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors:active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-dialog__title[dir=rtl],[dir=rtl] .mdc-dialog__title{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors:active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors:active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__header+.mdc-dialog__content,.mdc-dialog__title+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors:active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}.mdc-dialog__button[dir=rtl],[dir=rtl] .mdc-dialog__button{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}.mdc-dialog__button:first-child[dir=rtl],[dir=rtl] .mdc-dialog__button:first-child{margin-left:0;margin-right:0}.mdc-dialog__button[dir=rtl],[dir=rtl] .mdc-dialog__button{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--closing,.mdc-dialog--open,.mdc-dialog--opening{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0s cubic-bezier(0,0,.2,1)}.mdc-dialog--closing .mdc-dialog__container,.mdc-dialog--closing .mdc-dialog__scrim{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow,0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12))}@media(min-width:560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width,560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32);background-color:var(--mdc-dialog-scrim-color,rgba(0,0,0,.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87);color:var(--mdc-dialog-heading-ink-color,rgba(0,0,0,.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6);color:var(--mdc-dialog-content-ink-color,rgba(0,0,0,.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-color:rgba(0,0,0,.12);border-color:var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width,280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height,calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}#actions ::slotted([dir=rtl]),[dir=rtl] #actions ::slotted(*){margin-left:0;margin-right:8px}#actions ::slotted([dir=rtl]),[dir=rtl] #actions ::slotted(*){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions :not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}` +const _i=c`.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface,#fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}.mdc-dialog__surface{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline6-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size,1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height,2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight,500);letter-spacing:.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing,.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform,inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size,1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height,1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing,.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);transition:opacity 280ms cubic-bezier(.4,0,.2,1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index,7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width:592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width:592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width:960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width:720px)and (max-width:672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width:720px)and (min-width:672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width:720px)and (max-height:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width:720px)and (min-height:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width:720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width:720px)and (max-height:400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width:600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width:960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-dialog__surface[dir=rtl],[dir=rtl] .mdc-dialog__surface{text-align:right}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors:active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-dialog__title[dir=rtl],[dir=rtl] .mdc-dialog__title{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors:active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors:active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__header+.mdc-dialog__content,.mdc-dialog__title+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors:active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}.mdc-dialog__button[dir=rtl],[dir=rtl] .mdc-dialog__button{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}.mdc-dialog__button:first-child[dir=rtl],[dir=rtl] .mdc-dialog__button:first-child{margin-left:0;margin-right:0}.mdc-dialog__button[dir=rtl],[dir=rtl] .mdc-dialog__button{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--closing,.mdc-dialog--open,.mdc-dialog--opening{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0s cubic-bezier(0,0,.2,1)}.mdc-dialog--closing .mdc-dialog__container,.mdc-dialog--closing .mdc-dialog__scrim{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow,0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12))}@media(min-width:560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width,560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32);background-color:var(--mdc-dialog-scrim-color,rgba(0,0,0,.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87);color:var(--mdc-dialog-heading-ink-color,rgba(0,0,0,.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6);color:var(--mdc-dialog-content-ink-color,rgba(0,0,0,.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-color:rgba(0,0,0,.12);border-color:var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width,280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height,calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}#actions ::slotted([dir=rtl]),[dir=rtl] #actions ::slotted(*){margin-left:0;margin-right:8px}#actions ::slotted([dir=rtl]),[dir=rtl] #actions ::slotted(*){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions :not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}` /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */;let _i=class extends vi{};_i.styles=[yi],_i=n([mt("mwc-dialog")],_i); + */;let wi=class extends yi{};wi.styles=[_i],wi=n([mt("mwc-dialog")],wi); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class wi extends ct{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new Me((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:t=>{const e=t.type;this.onDown("mousedown"===e?"mouseup":"touchend",t)}}]}get text(){const t=this.textContent;return t?t.trim():""}render(){const t=this.renderText(),e=this.graphic?this.renderGraphic():U``,i=this.hasMeta?this.renderMeta():U``;return U` ${this.renderRipple()} ${e} ${t} ${i}`}renderRipple(){return this.shouldRenderRipple?U` `:this.activated?U`
    `:""}renderGraphic(){const t={multi:this.multipleGraphics};return U` `}renderMeta(){return U` `}renderText(){const t=this.twoline?this.renderTwoline():this.renderSingleLine();return U` ${t} `}renderSingleLine(){return U``}renderTwoline(){return U` `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(t,e){const i=()=>{window.removeEventListener(t,i),this.rippleHandlers.endPress()};window.addEventListener(t,i),this.rippleHandlers.startPress(e)}fireRequestSelected(t,e){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:e,selected:t}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const t of this.listeners)for(const e of t.eventNames)t.target.addEventListener(e,t.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const t of this.listeners)for(const e of t.eventNames)t.target.removeEventListener(e,t.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const t=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}n([vt("slot")],wi.prototype,"slotElement",void 0),n([yt("mwc-ripple")],wi.prototype,"ripple",void 0),n([ft({type:String})],wi.prototype,"value",void 0),n([ft({type:String,reflect:!0})],wi.prototype,"group",void 0),n([ft({type:Number,reflect:!0})],wi.prototype,"tabindex",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],wi.prototype,"disabled",void 0),n([ft({type:Boolean,reflect:!0})],wi.prototype,"twoline",void 0),n([ft({type:Boolean,reflect:!0})],wi.prototype,"activated",void 0),n([ft({type:String,reflect:!0})],wi.prototype,"graphic",void 0),n([ft({type:Boolean})],wi.prototype,"multipleGraphics",void 0),n([ft({type:Boolean})],wi.prototype,"hasMeta",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t){t?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],wi.prototype,"noninteractive",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t){const e=this.getAttribute("role"),i="gridcell"===e||"option"===e||"row"===e||"tab"===e;i&&t?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(t,"property")}))],wi.prototype,"selected",void 0),n([gt()],wi.prototype,"shouldRenderRipple",void 0),n([gt()],wi.prototype,"_managingList",void 0); +class Ei extends ct{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new Me((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:t=>{const e=t.type;this.onDown("mousedown"===e?"mouseup":"touchend",t)}}]}get text(){const t=this.textContent;return t?t.trim():""}render(){const t=this.renderText(),e=this.graphic?this.renderGraphic():U``,i=this.hasMeta?this.renderMeta():U``;return U` ${this.renderRipple()} ${e} ${t} ${i}`}renderRipple(){return this.shouldRenderRipple?U` `:this.activated?U`
    `:""}renderGraphic(){const t={multi:this.multipleGraphics};return U` `}renderMeta(){return U` `}renderText(){const t=this.twoline?this.renderTwoline():this.renderSingleLine();return U` ${t} `}renderSingleLine(){return U``}renderTwoline(){return U` `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(t,e){const i=()=>{window.removeEventListener(t,i),this.rippleHandlers.endPress()};window.addEventListener(t,i),this.rippleHandlers.startPress(e)}fireRequestSelected(t,e){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:e,selected:t}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const t of this.listeners)for(const e of t.eventNames)t.target.addEventListener(e,t.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const t of this.listeners)for(const e of t.eventNames)t.target.removeEventListener(e,t.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const t=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}n([vt("slot")],Ei.prototype,"slotElement",void 0),n([yt("mwc-ripple")],Ei.prototype,"ripple",void 0),n([ft({type:String})],Ei.prototype,"value",void 0),n([ft({type:String,reflect:!0})],Ei.prototype,"group",void 0),n([ft({type:Number,reflect:!0})],Ei.prototype,"tabindex",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],Ei.prototype,"disabled",void 0),n([ft({type:Boolean,reflect:!0})],Ei.prototype,"twoline",void 0),n([ft({type:Boolean,reflect:!0})],Ei.prototype,"activated",void 0),n([ft({type:String,reflect:!0})],Ei.prototype,"graphic",void 0),n([ft({type:Boolean})],Ei.prototype,"multipleGraphics",void 0),n([ft({type:Boolean})],Ei.prototype,"hasMeta",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t){t?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],Ei.prototype,"noninteractive",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t){const e=this.getAttribute("role"),i="gridcell"===e||"option"===e||"row"===e||"tab"===e;i&&t?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(t,"property")}))],Ei.prototype,"selected",void 0),n([gt()],Ei.prototype,"shouldRenderRipple",void 0),n([gt()],Ei.prototype,"_managingList",void 0); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const Ei=c`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding,16px);padding-right:var(--mdc-list-side-padding,16px);outline:0;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}:host:focus{outline:0}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary,#6200ee);--mdc-ripple-color:var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12);background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size,24px);height:var(--mdc-list-item-meta-size,24px);margin-left:auto;margin-right:0;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size,24px);line-height:var(--mdc-list-item-meta-size,24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size,24px)!important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item__meta[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,40px);height:var(--mdc-list-item-graphic-size,40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,40px);line-height:var(--mdc-list-item-graphic-size,40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,40px)!important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin,16px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-left:var(--mdc-list-item-graphic-margin,16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,24px);height:var(--mdc-list-item-graphic-size,24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin,32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,24px);line-height:var(--mdc-list-item-graphic-size,24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,24px)!important}:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-left:var(--mdc-list-item-graphic-margin,32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=large]:not([twoLine])),:host([graphic=medium]:not([twoLine])){height:72px}:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,56px);height:var(--mdc-list-item-graphic-size,56px)}:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,56px);line-height:var(--mdc-list-item-graphic-size,56px)}:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,56px)!important}:host([graphic=large]){padding-left:0}` +const Si=c`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding,16px);padding-right:var(--mdc-list-side-padding,16px);outline:0;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}:host:focus{outline:0}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary,#6200ee);--mdc-ripple-color:var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12);background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size,24px);height:var(--mdc-list-item-meta-size,24px);margin-left:auto;margin-right:0;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size,24px);line-height:var(--mdc-list-item-meta-size,24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size,24px)!important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item__meta[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,40px);height:var(--mdc-list-item-graphic-size,40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,40px);line-height:var(--mdc-list-item-graphic-size,40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,40px)!important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin,16px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-left:var(--mdc-list-item-graphic-margin,16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,24px);height:var(--mdc-list-item-graphic-size,24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin,32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,24px);line-height:var(--mdc-list-item-graphic-size,24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,24px)!important}:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-left:var(--mdc-list-item-graphic-margin,32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=large]:not([twoLine])),:host([graphic=medium]:not([twoLine])){height:72px}:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size,56px);height:var(--mdc-list-item-graphic-size,56px)}:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size,56px);line-height:var(--mdc-list-item-graphic-size,56px)}:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size,56px)!important}:host([graphic=large]){padding-left:0}` /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */;let Si=class extends wi{};Si.styles=[Ei],Si=n([mt("mwc-list-item")],Si); + */;let Ai=class extends Ei{};Ai.styles=[Si],Ai=n([mt("mwc-list-item")],Ai); /** * @license * Copyright 2020 Google Inc. @@ -412,7 +417,7 @@ const Ei=c`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:tra * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var Ai="Unknown",Ci="Backspace",$i="Enter",Ii="Spacebar",ki="PageUp",Ni="PageDown",Ti="End",Li="Home",Ri="ArrowLeft",Di="ArrowUp",Oi="ArrowRight",Fi="ArrowDown",zi="Delete",Pi="Escape",Hi="Tab",Mi=new Set;Mi.add(Ci),Mi.add($i),Mi.add(Ii),Mi.add(ki),Mi.add(Ni),Mi.add(Ti),Mi.add(Li),Mi.add(Ri),Mi.add(Di),Mi.add(Oi),Mi.add(Fi),Mi.add(zi),Mi.add(Pi),Mi.add(Hi);var Bi=8,Vi=13,Ui=32,qi=33,Gi=34,ji=35,Xi=36,Yi=37,Wi=38,Ki=39,Zi=40,Qi=46,Ji=27,tn=9,en=new Map;en.set(Bi,Ci),en.set(Vi,$i),en.set(Ui,Ii),en.set(qi,ki),en.set(Gi,Ni),en.set(ji,Ti),en.set(Xi,Li),en.set(Yi,Ri),en.set(Wi,Di),en.set(Ki,Oi),en.set(Zi,Fi),en.set(Qi,zi),en.set(Ji,Pi),en.set(tn,Hi);var nn,on,rn=new Set;function an(t){var e=t.key;if(Mi.has(e))return e;var i=en.get(t.keyCode);return i||Ai} +var Ci="Unknown",$i="Backspace",ki="Enter",Ii="Spacebar",Ni="PageUp",Ti="PageDown",Li="End",Ri="Home",Di="ArrowLeft",Oi="ArrowUp",Fi="ArrowRight",zi="ArrowDown",Pi="Delete",Hi="Escape",Mi="Tab",Bi=new Set;Bi.add($i),Bi.add(ki),Bi.add(Ii),Bi.add(Ni),Bi.add(Ti),Bi.add(Li),Bi.add(Ri),Bi.add(Di),Bi.add(Oi),Bi.add(Fi),Bi.add(zi),Bi.add(Pi),Bi.add(Hi),Bi.add(Mi);var Vi=8,Ui=13,qi=32,Gi=33,ji=34,Xi=35,Yi=36,Wi=37,Ki=38,Zi=39,Qi=40,Ji=46,tn=27,en=9,nn=new Map;nn.set(Vi,$i),nn.set(Ui,ki),nn.set(qi,Ii),nn.set(Gi,Ni),nn.set(ji,Ti),nn.set(Xi,Li),nn.set(Yi,Ri),nn.set(Wi,Di),nn.set(Ki,Oi),nn.set(Zi,Fi),nn.set(Qi,zi),nn.set(Ji,Pi),nn.set(tn,Hi),nn.set(en,Mi);var on,rn,an=new Set;function dn(t){var e=t.key;if(Bi.has(e))return e;var i=nn.get(t.keyCode);return i||Ci} /** * @license * Copyright 2018 Google Inc. @@ -434,29 +439,29 @@ var Ai="Unknown",Ci="Backspace",$i="Enter",Ii="Spacebar",ki="PageUp",Ni="PageDow * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */rn.add(ki),rn.add(Ni),rn.add(Ti),rn.add(Li),rn.add(Ri),rn.add(Di),rn.add(Oi),rn.add(Fi);var dn="mdc-list-item--activated",sn="mdc-list-item",ln="mdc-list-item--disabled",cn="mdc-list-item--selected",pn="mdc-list-item__text",mn="mdc-list-item__primary-text",hn="mdc-list";(nn={})[""+dn]="mdc-list-item--activated",nn[""+sn]="mdc-list-item",nn[""+ln]="mdc-list-item--disabled",nn[""+cn]="mdc-list-item--selected",nn[""+mn]="mdc-list-item__primary-text",nn[""+hn]="mdc-list";var un=((on={})[""+dn]="mdc-deprecated-list-item--activated",on[""+sn]="mdc-deprecated-list-item",on[""+ln]="mdc-deprecated-list-item--disabled",on[""+cn]="mdc-deprecated-list-item--selected",on[""+pn]="mdc-deprecated-list-item__text",on[""+mn]="mdc-deprecated-list-item__primary-text",on[""+hn]="mdc-deprecated-list",on),fn={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",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",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+sn+" button:not(:disabled),\n ."+sn+" a,\n ."+un[sn]+" button:not(:disabled),\n ."+un[sn]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+sn+" button:not(:disabled),\n ."+sn+" a,\n ."+sn+' input[type="radio"]:not(:disabled),\n .'+sn+' input[type="checkbox"]:not(:disabled),\n .'+un[sn]+" button:not(:disabled),\n ."+un[sn]+" a,\n ."+un[sn]+' input[type="radio"]:not(:disabled),\n .'+un[sn]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},gn={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300}; + */an.add(Ni),an.add(Ti),an.add(Li),an.add(Ri),an.add(Di),an.add(Oi),an.add(Fi),an.add(zi);var sn="mdc-list-item--activated",ln="mdc-list-item",cn="mdc-list-item--disabled",pn="mdc-list-item--selected",mn="mdc-list-item__text",hn="mdc-list-item__primary-text",un="mdc-list";(on={})[""+sn]="mdc-list-item--activated",on[""+ln]="mdc-list-item",on[""+cn]="mdc-list-item--disabled",on[""+pn]="mdc-list-item--selected",on[""+hn]="mdc-list-item__primary-text",on[""+un]="mdc-list";var fn=((rn={})[""+sn]="mdc-deprecated-list-item--activated",rn[""+ln]="mdc-deprecated-list-item",rn[""+cn]="mdc-deprecated-list-item--disabled",rn[""+pn]="mdc-deprecated-list-item--selected",rn[""+mn]="mdc-deprecated-list-item__text",rn[""+hn]="mdc-deprecated-list-item__primary-text",rn[""+un]="mdc-deprecated-list",rn),gn={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",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",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+ln+" button:not(:disabled),\n ."+ln+" a,\n ."+fn[ln]+" button:not(:disabled),\n ."+fn[ln]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+ln+" button:not(:disabled),\n ."+ln+" a,\n ."+ln+' input[type="radio"]:not(:disabled),\n .'+ln+' input[type="checkbox"]:not(:disabled),\n .'+fn[ln]+" button:not(:disabled),\n ."+fn[ln]+" a,\n ."+fn[ln]+' input[type="radio"]:not(:disabled),\n .'+fn[ln]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},bn={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300}; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const bn=(t,e)=>t-e,xn=["input","button","textarea","select"];function vn(t){return t instanceof Set}const yn=t=>{const e=t===gn.UNSET_INDEX?new Set:t;return vn(e)?new Set(e):new Set([e])};class _n extends be{constructor(t){super(Object.assign(Object.assign({},_n.defaultAdapter),t)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=gn.UNSET_INDEX,this.focusedItemIndex_=gn.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return fn}static get numbers(){return gn}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(t){this.wrapFocus_=t}setMulti(t){this.isMulti_=t;const e=this.selectedIndex_;if(t){if(!vn(e)){const t=e===gn.UNSET_INDEX;this.selectedIndex_=t?new Set:new Set([e])}}else if(vn(e))if(e.size){const t=Array.from(e).sort(bn);this.selectedIndex_=t[0]}else this.selectedIndex_=gn.UNSET_INDEX}setVerticalOrientation(t){this.isVertical_=t}setUseActivatedClass(t){this.useActivatedClass_=t}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(t){this.isIndexValid_(t)&&(this.isMulti_?this.setMultiSelectionAtIndex_(yn(t)):this.setSingleSelectionAtIndex_(t))}handleFocusIn(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,0)}handleFocusOut(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(t,e,i){const n="ArrowLeft"===an(t),o="ArrowUp"===an(t),r="ArrowRight"===an(t),a="ArrowDown"===an(t),d="Home"===an(t),s="End"===an(t),l="Enter"===an(t),c="Spacebar"===an(t);if(this.adapter.isRootFocused())return void(o||s?(t.preventDefault(),this.focusLastElement()):(a||d)&&(t.preventDefault(),this.focusFirstElement()));let p,m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=i,m<0))){if(this.isVertical_&&a||!this.isVertical_&&r)this.preventDefaultEvent(t),p=this.focusNextElement(m);else if(this.isVertical_&&o||!this.isVertical_&&n)this.preventDefaultEvent(t),p=this.focusPrevElement(m);else if(d)this.preventDefaultEvent(t),p=this.focusFirstElement();else if(s)this.preventDefaultEvent(t),p=this.focusLastElement();else if((l||c)&&e){const e=t.target;if(e&&"A"===e.tagName&&l)return;this.preventDefaultEvent(t),this.setSelectedIndexOnAction_(m,!0)}this.focusedItemIndex_=m,void 0!==p&&(this.setTabindexAtIndex_(p),this.focusedItemIndex_=p)}}handleSingleSelection(t,e,i){t!==gn.UNSET_INDEX&&(this.setSelectedIndexOnAction_(t,e,i),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)}focusNextElement(t){let e=t+1;if(e>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter.focusItemAtIndex(e),e}focusPrevElement(t){let e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(e),e}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const t=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(t),t}setEnabled(t,e){this.isIndexValid_(t)&&this.adapter.setDisabledStateForElementIndex(t,!e)}preventDefaultEvent(t){const e=`${t.target.tagName}`.toLowerCase();-1===xn.indexOf(e)&&t.preventDefault()}setSingleSelectionAtIndex_(t,e=!0){this.selectedIndex_!==t&&(this.selectedIndex_!==gn.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),e&&this.adapter.setSelectedStateForElementIndex(t,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(t,!0),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t,this.adapter.notifySelected(t))}setMultiSelectionAtIndex_(t,e=!0){const i=((t,e)=>{const i=Array.from(t),n=Array.from(e),o={added:[],removed:[]},r=i.sort(bn),a=n.sort(bn);let d=0,s=0;for(;d=0&&this.focusedItemIndex_!==t&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(t,0)}setTabindexToFirstSelectedItem_(){let t=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==gn.UNSET_INDEX?t=this.selectedIndex_:vn(this.selectedIndex_)&&this.selectedIndex_.size>0&&(t=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(t)}isIndexValid_(t){if(t instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===t.size)return!0;{let e=!1;for(const i of t)if(e=this.isIndexInRange_(i),e)break;return e}}if("number"==typeof t){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return t===gn.UNSET_INDEX||this.isIndexInRange_(t)}return!1}isIndexInRange_(t){const e=this.adapter.getListItemCount();return t>=0&&tt-e,vn=["input","button","textarea","select"];function yn(t){return t instanceof Set}const _n=t=>{const e=t===bn.UNSET_INDEX?new Set:t;return yn(e)?new Set(e):new Set([e])};class wn extends be{constructor(t){super(Object.assign(Object.assign({},wn.defaultAdapter),t)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=bn.UNSET_INDEX,this.focusedItemIndex_=bn.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return gn}static get numbers(){return bn}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(t){this.wrapFocus_=t}setMulti(t){this.isMulti_=t;const e=this.selectedIndex_;if(t){if(!yn(e)){const t=e===bn.UNSET_INDEX;this.selectedIndex_=t?new Set:new Set([e])}}else if(yn(e))if(e.size){const t=Array.from(e).sort(xn);this.selectedIndex_=t[0]}else this.selectedIndex_=bn.UNSET_INDEX}setVerticalOrientation(t){this.isVertical_=t}setUseActivatedClass(t){this.useActivatedClass_=t}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(t){this.isIndexValid_(t)&&(this.isMulti_?this.setMultiSelectionAtIndex_(_n(t)):this.setSingleSelectionAtIndex_(t))}handleFocusIn(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,0)}handleFocusOut(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(t,e,i){const n="ArrowLeft"===dn(t),o="ArrowUp"===dn(t),r="ArrowRight"===dn(t),a="ArrowDown"===dn(t),d="Home"===dn(t),s="End"===dn(t),l="Enter"===dn(t),c="Spacebar"===dn(t);if(this.adapter.isRootFocused())return void(o||s?(t.preventDefault(),this.focusLastElement()):(a||d)&&(t.preventDefault(),this.focusFirstElement()));let p,m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=i,m<0))){if(this.isVertical_&&a||!this.isVertical_&&r)this.preventDefaultEvent(t),p=this.focusNextElement(m);else if(this.isVertical_&&o||!this.isVertical_&&n)this.preventDefaultEvent(t),p=this.focusPrevElement(m);else if(d)this.preventDefaultEvent(t),p=this.focusFirstElement();else if(s)this.preventDefaultEvent(t),p=this.focusLastElement();else if((l||c)&&e){const e=t.target;if(e&&"A"===e.tagName&&l)return;this.preventDefaultEvent(t),this.setSelectedIndexOnAction_(m,!0)}this.focusedItemIndex_=m,void 0!==p&&(this.setTabindexAtIndex_(p),this.focusedItemIndex_=p)}}handleSingleSelection(t,e,i){t!==bn.UNSET_INDEX&&(this.setSelectedIndexOnAction_(t,e,i),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)}focusNextElement(t){let e=t+1;if(e>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter.focusItemAtIndex(e),e}focusPrevElement(t){let e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(e),e}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const t=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(t),t}setEnabled(t,e){this.isIndexValid_(t)&&this.adapter.setDisabledStateForElementIndex(t,!e)}preventDefaultEvent(t){const e=`${t.target.tagName}`.toLowerCase();-1===vn.indexOf(e)&&t.preventDefault()}setSingleSelectionAtIndex_(t,e=!0){this.selectedIndex_!==t&&(this.selectedIndex_!==bn.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),e&&this.adapter.setSelectedStateForElementIndex(t,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(t,!0),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t,this.adapter.notifySelected(t))}setMultiSelectionAtIndex_(t,e=!0){const i=((t,e)=>{const i=Array.from(t),n=Array.from(e),o={added:[],removed:[]},r=i.sort(xn),a=n.sort(xn);let d=0,s=0;for(;d=0&&this.focusedItemIndex_!==t&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(t,0)}setTabindexToFirstSelectedItem_(){let t=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==bn.UNSET_INDEX?t=this.selectedIndex_:yn(this.selectedIndex_)&&this.selectedIndex_.size>0&&(t=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(t)}isIndexValid_(t){if(t instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===t.size)return!0;{let e=!1;for(const i of t)if(e=this.isIndexInRange_(i),e)break;return e}}if("number"==typeof t){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return t===bn.UNSET_INDEX||this.isIndexInRange_(t)}return!1}isIndexInRange_(t){const e=this.adapter.getListItemCount();return t>=0&&tt.hasAttribute("mwc-list-item");function En(){const t=this.itemsReadyResolver;this.itemsReady=new Promise((t=>this.itemsReadyResolver=t)),t()}class Sn extends ge{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=_n,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const t=function(t,e=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout((()=>{t(n)}),e)}}(this.layout.bind(this));this.debouncedLayout=(e=!0)=>{En.call(this),t(e)}}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.itemsReady,t}get items(){return this.items_}updateItems(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[],i=[];for(const t of e)wn(t)&&(i.push(t),t._managingList=this),t.hasAttribute("divider")&&!t.hasAttribute("role")&&t.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach(((t,e)=>{this.itemRoles?t.setAttribute("role",this.itemRoles):t.removeAttribute("role"),t.selected&&n.add(e)})),this.multi)this.select(n);else{const t=n.size?n.entries().next().value[1]:-1;this.select(t)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const t=this.index;if(!vn(t))return-1===t?null:this.items[t];const e=[];for(const i of t)e.push(this.items[i]);return e}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const t=null===this.innerRole?void 0:this.innerRole,e=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return U`
      ${this.renderPlaceholder()}
    `}renderPlaceholder(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[];return void 0!==this.emptyMessage&&0===e.length?U` ${this.emptyMessage} `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusIn(t,e)}}onFocusOut(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusOut(t,e)}}onKeydown(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t),i=t.target,n=wn(i);this.mdcFoundation.handleKeydown(t,n,e)}}onRequestSelected(t){if(this.mdcFoundation){let e=this.getIndexOfTarget(t);if(-1===e&&(this.layout(),e=this.getIndexOfTarget(t),-1===e))return;if(this.items[e].disabled)return;const i=t.detail.selected,n=t.detail.source;this.mdcFoundation.handleSingleSelection(e,"interaction"===n,i),t.stopPropagation()}}getIndexOfTarget(t){const e=this.items,i=t.composedPath();for(const t of i){let i=-1;if(t.nodeType===Node.ELEMENT_NODE&&wn(t)&&(i=e.indexOf(t)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(t,e)=>{if(!this.mdcRoot)return"";const i=this.items[t];return i?i.getAttribute(e):""},setAttributeForElementIndex:(t,e,i)=>{if(!this.mdcRoot)return;const n=this.items[t];n&&n.setAttribute(e,i)},focusItemAtIndex:t=>{const e=this.items[t];e&&e.focus()},setTabIndexForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.tabindex=e)},notifyAction:t=>{const e={bubbles:!0,composed:!0};e.detail={index:t};const i=new CustomEvent("action",e);this.dispatchEvent(i)},notifySelected:(t,e)=>{const i={bubbles:!0,composed:!0};i.detail={index:t,diff:e};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>(t=>{const e=fe();if(!e.length)return!1;const i=e[e.length-1],n=new Event("check-if-focused",{bubbles:!0,composed:!0});let o=[];const r=t=>{o=t.composedPath()};return document.body.addEventListener("check-if-focused",r),i.dispatchEvent(n),document.body.removeEventListener("check-if-focused",r),-1!==o.indexOf(t)})(this),isRootFocused:()=>{const t=this.mdcRoot;return t.getRootNode().activeElement===t},setDisabledStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.disabled=e)},getDisabledStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.disabled},setSelectedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.selected=e)},getSelectedStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.selected},setActivatedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.activated=e)}},this.mdcAdapter}selectUi(t,e=!1){const i=this.items[t];i&&(i.selected=!0,i.activated=e)}deselectUi(t){const e=this.items[t];e&&(e.selected=!1,e.activated=!1)}select(t){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(t)}toggle(t,e){this.multi&&this.mdcFoundation.toggleMultiAtIndex(t,e)}onListItemConnected(t){const e=t.target;this.layout(-1===this.items.indexOf(e))}layout(t=!0){t&&this.updateItems();const e=this.items[0];for(const t of this.items)t.tabindex=-1;e&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=e):e.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const t=fe();if(!t.length)return-1;for(let e=t.length-1;e>=0;e--){const i=t[e];if(wn(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(t){for(const t of this.items)if(0===t.tabindex){t.tabindex=-1;break}this.items[t].tabindex=0,this.items[t].focus()}focus(){const t=this.mdcRoot;t&&t.focus()}blur(){const t=this.mdcRoot;t&&t.blur()}}n([ft({type:String})],Sn.prototype,"emptyMessage",void 0),n([vt(".mdc-deprecated-list")],Sn.prototype,"mdcRoot",void 0),n([Et("",!0,"*")],Sn.prototype,"assignedElements",void 0),n([Et("",!0,'[tabindex="0"]')],Sn.prototype,"tabbableElements",void 0),n([ft({type:Boolean}),bi((function(t){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(t)}))],Sn.prototype,"activatable",void 0),n([ft({type:Boolean}),bi((function(t,e){this.mdcFoundation&&this.mdcFoundation.setMulti(t),void 0!==e&&this.layout()}))],Sn.prototype,"multi",void 0),n([ft({type:Boolean}),bi((function(t){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(t)}))],Sn.prototype,"wrapFocus",void 0),n([ft({type:String}),bi((function(t,e){void 0!==e&&this.updateItems()}))],Sn.prototype,"itemRoles",void 0),n([ft({type:String})],Sn.prototype,"innerRole",void 0),n([ft({type:String})],Sn.prototype,"innerAriaLabel",void 0),n([ft({type:Boolean})],Sn.prototype,"rootTabbable",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t){var e,i;if(t){const t=null!==(i=null===(e=this.tabbableElements)||void 0===e?void 0:e[0])&&void 0!==i?i:null;this.previousTabindex=t,t&&t.setAttribute("tabindex","-1")}else!t&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],Sn.prototype,"noninteractive",void 0); + */const En=t=>t.hasAttribute("mwc-list-item");function Sn(){const t=this.itemsReadyResolver;this.itemsReady=new Promise((t=>this.itemsReadyResolver=t)),t()}class An extends ge{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=wn,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const t=function(t,e=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout((()=>{t(n)}),e)}}(this.layout.bind(this));this.debouncedLayout=(e=!0)=>{Sn.call(this),t(e)}}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.itemsReady,t}get items(){return this.items_}updateItems(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[],i=[];for(const t of e)En(t)&&(i.push(t),t._managingList=this),t.hasAttribute("divider")&&!t.hasAttribute("role")&&t.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach(((t,e)=>{this.itemRoles?t.setAttribute("role",this.itemRoles):t.removeAttribute("role"),t.selected&&n.add(e)})),this.multi)this.select(n);else{const t=n.size?n.entries().next().value[1]:-1;this.select(t)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const t=this.index;if(!yn(t))return-1===t?null:this.items[t];const e=[];for(const i of t)e.push(this.items[i]);return e}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const t=null===this.innerRole?void 0:this.innerRole,e=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return U`
      ${this.renderPlaceholder()}
    `}renderPlaceholder(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[];return void 0!==this.emptyMessage&&0===e.length?U` ${this.emptyMessage} `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusIn(t,e)}}onFocusOut(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusOut(t,e)}}onKeydown(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t),i=t.target,n=En(i);this.mdcFoundation.handleKeydown(t,n,e)}}onRequestSelected(t){if(this.mdcFoundation){let e=this.getIndexOfTarget(t);if(-1===e&&(this.layout(),e=this.getIndexOfTarget(t),-1===e))return;if(this.items[e].disabled)return;const i=t.detail.selected,n=t.detail.source;this.mdcFoundation.handleSingleSelection(e,"interaction"===n,i),t.stopPropagation()}}getIndexOfTarget(t){const e=this.items,i=t.composedPath();for(const t of i){let i=-1;if(t.nodeType===Node.ELEMENT_NODE&&En(t)&&(i=e.indexOf(t)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(t,e)=>{if(!this.mdcRoot)return"";const i=this.items[t];return i?i.getAttribute(e):""},setAttributeForElementIndex:(t,e,i)=>{if(!this.mdcRoot)return;const n=this.items[t];n&&n.setAttribute(e,i)},focusItemAtIndex:t=>{const e=this.items[t];e&&e.focus()},setTabIndexForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.tabindex=e)},notifyAction:t=>{const e={bubbles:!0,composed:!0};e.detail={index:t};const i=new CustomEvent("action",e);this.dispatchEvent(i)},notifySelected:(t,e)=>{const i={bubbles:!0,composed:!0};i.detail={index:t,diff:e};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>(t=>{const e=fe();if(!e.length)return!1;const i=e[e.length-1],n=new Event("check-if-focused",{bubbles:!0,composed:!0});let o=[];const r=t=>{o=t.composedPath()};return document.body.addEventListener("check-if-focused",r),i.dispatchEvent(n),document.body.removeEventListener("check-if-focused",r),-1!==o.indexOf(t)})(this),isRootFocused:()=>{const t=this.mdcRoot;return t.getRootNode().activeElement===t},setDisabledStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.disabled=e)},getDisabledStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.disabled},setSelectedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.selected=e)},getSelectedStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.selected},setActivatedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.activated=e)}},this.mdcAdapter}selectUi(t,e=!1){const i=this.items[t];i&&(i.selected=!0,i.activated=e)}deselectUi(t){const e=this.items[t];e&&(e.selected=!1,e.activated=!1)}select(t){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(t)}toggle(t,e){this.multi&&this.mdcFoundation.toggleMultiAtIndex(t,e)}onListItemConnected(t){const e=t.target;this.layout(-1===this.items.indexOf(e))}layout(t=!0){t&&this.updateItems();const e=this.items[0];for(const t of this.items)t.tabindex=-1;e&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=e):e.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const t=fe();if(!t.length)return-1;for(let e=t.length-1;e>=0;e--){const i=t[e];if(En(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(t){for(const t of this.items)if(0===t.tabindex){t.tabindex=-1;break}this.items[t].tabindex=0,this.items[t].focus()}focus(){const t=this.mdcRoot;t&&t.focus()}blur(){const t=this.mdcRoot;t&&t.blur()}}n([ft({type:String})],An.prototype,"emptyMessage",void 0),n([vt(".mdc-deprecated-list")],An.prototype,"mdcRoot",void 0),n([Et("",!0,"*")],An.prototype,"assignedElements",void 0),n([Et("",!0,'[tabindex="0"]')],An.prototype,"tabbableElements",void 0),n([ft({type:Boolean}),xi((function(t){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(t)}))],An.prototype,"activatable",void 0),n([ft({type:Boolean}),xi((function(t,e){this.mdcFoundation&&this.mdcFoundation.setMulti(t),void 0!==e&&this.layout()}))],An.prototype,"multi",void 0),n([ft({type:Boolean}),xi((function(t){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(t)}))],An.prototype,"wrapFocus",void 0),n([ft({type:String}),xi((function(t,e){void 0!==e&&this.updateItems()}))],An.prototype,"itemRoles",void 0),n([ft({type:String})],An.prototype,"innerRole",void 0),n([ft({type:String})],An.prototype,"innerAriaLabel",void 0),n([ft({type:Boolean})],An.prototype,"rootTabbable",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t){var e,i;if(t){const t=null!==(i=null===(e=this.tabbableElements)||void 0===e?void 0:e[0])&&void 0!==i?i:null;this.previousTabindex=t,t&&t.setAttribute("tabindex","-1")}else!t&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],An.prototype,"noninteractive",void 0); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const An=c`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));padding:var(--mdc-list-vertical-padding,8px) 0}.mdc-deprecated-list:focus{outline:0}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0,0,0,.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding,16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin,72px);margin-right:0;width:calc(100% - var(--mdc-list-inset-margin,72px))}.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]),[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]){margin-left:0;margin-right:var(--mdc-list-inset-margin,72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc(100% - var(--mdc-list-inset-margin,72px) - var(--mdc-list-side-padding,16px))}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size:20px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size:36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}` +const Cn=c`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));padding:var(--mdc-list-vertical-padding,8px) 0}.mdc-deprecated-list:focus{outline:0}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0,0,0,.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding,16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin,72px);margin-right:0;width:calc(100% - var(--mdc-list-inset-margin,72px))}.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]),[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]){margin-left:0;margin-right:var(--mdc-list-inset-margin,72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc(100% - var(--mdc-list-inset-margin,72px) - var(--mdc-list-side-padding,16px))}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size:20px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size:36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}` /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */;let Cn=class extends Sn{};Cn.styles=[An],Cn=n([mt("mwc-list")],Cn); + */;let $n=class extends An{};$n.styles=[Cn],$n=n([mt("mwc-list")],$n); /** * @license * Copyright 2018 Google Inc. @@ -479,30 +484,30 @@ const An=c`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cub * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var $n={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},In={NOTCH_ELEMENT_PADDING:8},kn={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},Nn=function(t){function n(e){return t.call(this,i(i({},n.defaultAdapter),e))||this}return e(n,t),Object.defineProperty(n,"strings",{get:function(){return $n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return kn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return In},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(t){var e=n.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=In.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(e)},n.prototype.closeNotch=function(){var t=n.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},n}(be); +var kn={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},In={NOTCH_ELEMENT_PADDING:8},Nn={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},Tn=function(t){function n(e){return t.call(this,i(i({},n.defaultAdapter),e))||this}return e(n,t),Object.defineProperty(n,"strings",{get:function(){return kn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return Nn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return In},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(t){var e=n.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=In.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(e)},n.prototype.closeNotch=function(){var t=n.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},n}(be); /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class Tn extends ge{constructor(){super(...arguments),this.mdcFoundationClass=Nn,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:t=>this.mdcRoot.classList.add(t),removeClass:t=>this.mdcRoot.classList.remove(t),setNotchWidthProperty:t=>this.notchElement.style.setProperty("width",`${t}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(t,e){this.mdcFoundation&&(t&&void 0!==e?this.mdcFoundation.notch(e):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const t=Le({"mdc-notched-outline--notched":this.open});return U` `}}n([vt(".mdc-notched-outline")],Tn.prototype,"mdcRoot",void 0),n([ft({type:Number})],Tn.prototype,"width",void 0),n([ft({type:Boolean,reflect:!0})],Tn.prototype,"open",void 0),n([vt(".mdc-notched-outline__notch")],Tn.prototype,"notchElement",void 0); +class Ln extends ge{constructor(){super(...arguments),this.mdcFoundationClass=Tn,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:t=>this.mdcRoot.classList.add(t),removeClass:t=>this.mdcRoot.classList.remove(t),setNotchWidthProperty:t=>this.notchElement.style.setProperty("width",`${t}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(t,e){this.mdcFoundation&&(t&&void 0!==e?this.mdcFoundation.notch(e):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const t=Le({"mdc-notched-outline--notched":this.open});return U` `}}n([vt(".mdc-notched-outline")],Ln.prototype,"mdcRoot",void 0),n([ft({type:Number})],Ln.prototype,"width",void 0),n([ft({type:Boolean,reflect:!0})],Ln.prototype,"open",void 0),n([vt(".mdc-notched-outline__notch")],Ln.prototype,"notchElement",void 0); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const Ln=c`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / .75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}:host([dir=rtl]),[dir=rtl] :host{text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / .75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}@supports(top:max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small,4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color,var(--mdc-theme-primary,#6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width,1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset,0)}` +const Rn=c`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / .75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}:host([dir=rtl]),[dir=rtl] :host{text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / .75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}@supports(top:max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small,4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color,var(--mdc-theme-primary,#6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width,1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset,0)}` /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */;let Rn=class extends Tn{}; + */;let Dn=class extends Ln{}; /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -var Dn,On;Rn.styles=[Ln],Rn=n([mt("mwc-notched-outline")],Rn);const Fn=null!==(On=null===(Dn=window.ShadyDOM)||void 0===Dn?void 0:Dn.inUse)&&void 0!==On&&On;class zn extends ge{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||Fn)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}zn.shadowRootOptions={mode:"open",delegatesFocus:!0},n([ft({type:Boolean})],zn.prototype,"disabled",void 0); +var On,Fn;Dn.styles=[Rn],Dn=n([mt("mwc-notched-outline")],Dn);const zn=null!==(Fn=null===(On=window.ShadyDOM)||void 0===On?void 0:On.inUse)&&void 0!==Fn&&Fn;class Pn extends ge{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||zn)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}Pn.shadowRootOptions={mode:"open",delegatesFocus:!0},n([ft({type:Boolean})],Pn.prototype,"disabled",void 0); /** * @license * Copyright 2016 Google Inc. @@ -525,7 +530,7 @@ var Dn,On;Rn.styles=[Ln],Rn=n([mt("mwc-notched-outline")],Rn);const Fn=null!==(O * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var Pn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Hn=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.shakeAnimationEndHandler=function(){o.handleShakeAnimationEnd()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Pn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(t){var e=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.float=function(t){var e=n.cssClasses,i=e.LABEL_FLOAT_ABOVE,o=e.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},n.prototype.setRequired=function(t){var e=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.handleShakeAnimationEnd=function(){var t=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},n}(be); +var Hn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Mn=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.shakeAnimationEndHandler=function(){o.handleShakeAnimationEnd()},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Hn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(t){var e=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.float=function(t){var e=n.cssClasses,i=e.LABEL_FLOAT_ABOVE,o=e.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},n.prototype.setRequired=function(t){var e=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.handleShakeAnimationEnd=function(){var t=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},n}(be); /** * @license * Copyright 2016 Google Inc. @@ -547,7 +552,7 @@ var Pn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */const Mn=Ne(class extends Te{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Ce:case Ie:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Hn(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}); + */const Bn=Ne(class extends Te{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Ce:case ke:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Mn(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}); /** * @license * Copyright 2018 Google Inc. @@ -569,7 +574,7 @@ var Pn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */var Bn={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},Vn=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.transitionEndHandler=function(t){o.handleTransitionEnd(t)},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Bn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(Bn.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Bn.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(Bn.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(Bn.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(Bn.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Bn.LINE_RIPPLE_DEACTIVATING))},n}(be); + */var Vn={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},Un=function(t){function n(e){var o=t.call(this,i(i({},n.defaultAdapter),e))||this;return o.transitionEndHandler=function(t){o.handleTransitionEnd(t)},o}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Vn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(Vn.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Vn.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(Vn.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(Vn.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(Vn.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Vn.LINE_RIPPLE_DEACTIVATING))},n}(be); /** * @license * Copyright 2018 Google Inc. @@ -591,7 +596,7 @@ var Pn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */const Un=Ne(class extends Te{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Ce:case Ie:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Vn(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); + */const qn=Ne(class extends Te{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Ce:case ke:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Un(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); /** * @license * Copyright 2016 Google Inc. @@ -613,40 +618,40 @@ var Pn={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - */var qn={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"},Gn={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",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},jn={LABEL_SCALE:.75},Xn=["pattern","min","max","required","step","minlength","maxlength"],Yn=["color","date","datetime-local","month","range","time","week"],Wn=["mousedown","touchstart"],Kn=["click","keydown"],Zn=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=o.helperText,r.characterCounter=o.characterCounter,r.leadingIcon=o.leadingIcon,r.trailingIcon=o.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(t){r.setTransformOrigin(t)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(t){r.handleValidationAttributeChange(t)},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Gn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return qn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return jn},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return Yn.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"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:!1,configurable:!0}),n.prototype.init=function(){var t,e,i,n;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);try{for(var r=o(Wn),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Kn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,e,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(Wn),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Kn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return Xn.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*jn.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},n.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.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),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)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var e=n.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),o=this.helperText.getId();i&&o?this.adapter.setInputAttr(qn.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(qn.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var e=n.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.styleDisabled=function(t){var e=n.cssClasses,i=e.DISABLED,o=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var e=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(be),Qn=Zn; + */var Gn={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"},jn={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",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},Xn={LABEL_SCALE:.75},Yn=["pattern","min","max","required","step","minlength","maxlength"],Wn=["color","date","datetime-local","month","range","time","week"],Kn=["mousedown","touchstart"],Zn=["click","keydown"],Qn=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=o.helperText,r.characterCounter=o.characterCounter,r.leadingIcon=o.leadingIcon,r.trailingIcon=o.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(t){r.setTransformOrigin(t)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(t){r.handleValidationAttributeChange(t)},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return jn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Gn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Xn},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return Wn.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"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:!1,configurable:!0}),n.prototype.init=function(){var t,e,i,n;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);try{for(var r=o(Kn),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Zn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,e,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=o(Kn),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}try{for(var s=o(Zn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return Yn.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*Xn.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},n.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.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),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)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var e=n.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),o=this.helperText.getId();i&&o?this.adapter.setInputAttr(Gn.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(Gn.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var e=n.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.styleDisabled=function(t){var e=n.cssClasses,i=e.DISABLED,o=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(o)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var e=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(be),Jn=Qn; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Jn=Ne(class extends Te{constructor(t){if(super(t),t.type!==Ie&&t.type!==Ce&&t.type!==ke)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ze(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===G||e===j)return e;const i=t.element,n=t.name;if(t.type===Ie){if(e===i[n])return G}else if(t.type===ke){if(!!e===i.hasAttribute(n))return G}else if(t.type===Ce&&i.getAttribute(n)===e+"")return G;return((t,e=Qe)=>{t._$AH=e})(t),e}}),to=["touchstart","touchmove","scroll","mousewheel"],eo=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)}; +const to=Ne(class extends Te{constructor(t){if(super(t),t.type!==ke&&t.type!==Ce&&t.type!==Ie)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ze(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===G||e===j)return e;const i=t.element,n=t.name;if(t.type===ke){if(e===i[n])return G}else if(t.type===Ie){if(!!e===i.hasAttribute(n))return G}else if(t.type===Ce&&i.getAttribute(n)===e+"")return G;return((t,e=Qe)=>{t._$AH=e})(t),e}}),eo=["touchstart","touchmove","scroll","mousewheel"],io=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)}; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class io extends zn{constructor(){super(...arguments),this.mdcFoundationClass=Qn,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=eo(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const t=new CustomEvent("focus");this.formElement.dispatchEvent(t),this.formElement.focus()}blur(){const t=new CustomEvent("blur");this.formElement.dispatchEvent(t),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(t,e,i){this.formElement.setSelectionRange(t,e,i)}update(t){t.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),t.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(t)}setFormData(t){this.name&&t.append(this.name,this.value)}render(){const t=this.charCounter&&-1!==this.maxLength,e=!!this.helper||!!this.validationMessage||t,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return U` ${this.renderHelperText(e,t)} `}updated(t){t.has("value")&&void 0!==t.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":U` `}renderOutline(){return this.outlined?U` ${this.renderLabel()} `:""}renderLabel(){return this.label?U` ${this.label} `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(t,e=!1){return U`${t}`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(t,e=!1){return U` ${t}`}renderInput(t){const e=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,o=this.validationMessage&&!this.isUiValid,r=this.label?"label":void 0,a=t?"helper-text":void 0,d=this.focused||this.helperPersistent||o?"helper-text":void 0;return U` `}renderLineRipple(){return this.outlined?"":U` `}renderHelperText(t,e){const i=this.validationMessage&&!this.isUiValid,n={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},o=this.focused||this.helperPersistent||i?void 0:"true",r=i?this.validationMessage:this.helper;return t?U`
    ${r}
    ${this.renderCharCounter(e)}
    `:""}renderCharCounter(t){const e=Math.min(this.value.length,this.maxLength);return t?U` ${e} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.mdcFoundation.setValid(t),this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=eo(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(t,e)=>this.addEventListener(t,e),deregisterTextFieldInteractionHandler:(t,e)=>this.removeEventListener(t,e),registerValidationAttributeChangeHandler:t=>{const e=new MutationObserver((e=>{t((t=>t.map((t=>t.attributeName)).filter((t=>t)))(e))}));return e.observe(this.formElement,{attributes:!0}),e},deregisterValidationAttributeChangeHandler:t=>t.disconnect()},me(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(t,e)=>this.formElement.addEventListener(t,e,{passive:t in to}),deregisterInputInteractionHandler:(t,e)=>this.formElement.removeEventListener(t,e)}}getLabelAdapterMethods(){return{floatLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(t),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(t),setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:t=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}}}async getUpdateComplete(){var t;const e=await super.getUpdateComplete();return await(null===(t=this.outlineElement)||void 0===t?void 0:t.updateComplete),e}firstUpdated(){var t;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(t=this.outlineElement)||void 0===t||t.updateComplete.then((()=>{var t;this.outlineWidth=(null===(t=this.labelElement)||void 0===t?void 0:t.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const t=this.labelElement;if(!t)return void(this.outlineOpen=!1);const e=!!this.label&&!!this.value;if(t.floatingLabelFoundation.float(e),!this.outlined)return;this.outlineOpen=e,await this.updateComplete;const i=t.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}n([vt(".mdc-text-field")],io.prototype,"mdcRoot",void 0),n([vt("input")],io.prototype,"formElement",void 0),n([vt(".mdc-floating-label")],io.prototype,"labelElement",void 0),n([vt(".mdc-line-ripple")],io.prototype,"lineRippleElement",void 0),n([vt("mwc-notched-outline")],io.prototype,"outlineElement",void 0),n([vt(".mdc-notched-outline__notch")],io.prototype,"notchElement",void 0),n([ft({type:String})],io.prototype,"value",void 0),n([ft({type:String})],io.prototype,"type",void 0),n([ft({type:String})],io.prototype,"placeholder",void 0),n([ft({type:String}),bi((function(t,e){void 0!==e&&this.label!==e&&this.layout()}))],io.prototype,"label",void 0),n([ft({type:String})],io.prototype,"icon",void 0),n([ft({type:String})],io.prototype,"iconTrailing",void 0),n([ft({type:Boolean,reflect:!0})],io.prototype,"disabled",void 0),n([ft({type:Boolean})],io.prototype,"required",void 0),n([ft({type:Number})],io.prototype,"minLength",void 0),n([ft({type:Number})],io.prototype,"maxLength",void 0),n([ft({type:Boolean,reflect:!0}),bi((function(t,e){void 0!==e&&this.outlined!==e&&this.layout()}))],io.prototype,"outlined",void 0),n([ft({type:String})],io.prototype,"helper",void 0),n([ft({type:Boolean})],io.prototype,"validateOnInitialRender",void 0),n([ft({type:String})],io.prototype,"validationMessage",void 0),n([ft({type:Boolean})],io.prototype,"autoValidate",void 0),n([ft({type:String})],io.prototype,"pattern",void 0),n([ft({type:String})],io.prototype,"min",void 0),n([ft({type:String})],io.prototype,"max",void 0),n([ft({type:String})],io.prototype,"step",void 0),n([ft({type:Number})],io.prototype,"size",void 0),n([ft({type:Boolean})],io.prototype,"helperPersistent",void 0),n([ft({type:Boolean})],io.prototype,"charCounter",void 0),n([ft({type:Boolean})],io.prototype,"endAligned",void 0),n([ft({type:String})],io.prototype,"prefix",void 0),n([ft({type:String})],io.prototype,"suffix",void 0),n([ft({type:String})],io.prototype,"name",void 0),n([ft({type:String})],io.prototype,"inputMode",void 0),n([ft({type:Boolean})],io.prototype,"readOnly",void 0),n([ft({type:String})],io.prototype,"autocapitalize",void 0),n([gt()],io.prototype,"outlineOpen",void 0),n([gt()],io.prototype,"outlineWidth",void 0),n([gt()],io.prototype,"isUiValid",void 0),n([gt()],io.prototype,"focused",void 0),n([xt({passive:!0})],io.prototype,"handleInputChange",null); + */class no extends Pn{constructor(){super(...arguments),this.mdcFoundationClass=Jn,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=io(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const t=new CustomEvent("focus");this.formElement.dispatchEvent(t),this.formElement.focus()}blur(){const t=new CustomEvent("blur");this.formElement.dispatchEvent(t),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(t,e,i){this.formElement.setSelectionRange(t,e,i)}update(t){t.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),t.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(t)}setFormData(t){this.name&&t.append(this.name,this.value)}render(){const t=this.charCounter&&-1!==this.maxLength,e=!!this.helper||!!this.validationMessage||t,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return U` ${this.renderHelperText(e,t)} `}updated(t){t.has("value")&&void 0!==t.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":U` `}renderOutline(){return this.outlined?U` ${this.renderLabel()} `:""}renderLabel(){return this.label?U` ${this.label} `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(t,e=!1){return U`${t}`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(t,e=!1){return U` ${t}`}renderInput(t){const e=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,o=this.validationMessage&&!this.isUiValid,r=this.label?"label":void 0,a=t?"helper-text":void 0,d=this.focused||this.helperPersistent||o?"helper-text":void 0;return U` `}renderLineRipple(){return this.outlined?"":U` `}renderHelperText(t,e){const i=this.validationMessage&&!this.isUiValid,n={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},o=this.focused||this.helperPersistent||i?void 0:"true",r=i?this.validationMessage:this.helper;return t?U`
    ${r}
    ${this.renderCharCounter(e)}
    `:""}renderCharCounter(t){const e=Math.min(this.value.length,this.maxLength);return t?U` ${e} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.mdcFoundation.setValid(t),this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=io(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(t,e)=>this.addEventListener(t,e),deregisterTextFieldInteractionHandler:(t,e)=>this.removeEventListener(t,e),registerValidationAttributeChangeHandler:t=>{const e=new MutationObserver((e=>{t((t=>t.map((t=>t.attributeName)).filter((t=>t)))(e))}));return e.observe(this.formElement,{attributes:!0}),e},deregisterValidationAttributeChangeHandler:t=>t.disconnect()},me(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(t,e)=>this.formElement.addEventListener(t,e,{passive:t in eo}),deregisterInputInteractionHandler:(t,e)=>this.formElement.removeEventListener(t,e)}}getLabelAdapterMethods(){return{floatLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(t),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(t),setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:t=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}}}async getUpdateComplete(){var t;const e=await super.getUpdateComplete();return await(null===(t=this.outlineElement)||void 0===t?void 0:t.updateComplete),e}firstUpdated(){var t;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(t=this.outlineElement)||void 0===t||t.updateComplete.then((()=>{var t;this.outlineWidth=(null===(t=this.labelElement)||void 0===t?void 0:t.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const t=this.labelElement;if(!t)return void(this.outlineOpen=!1);const e=!!this.label&&!!this.value;if(t.floatingLabelFoundation.float(e),!this.outlined)return;this.outlineOpen=e,await this.updateComplete;const i=t.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}n([vt(".mdc-text-field")],no.prototype,"mdcRoot",void 0),n([vt("input")],no.prototype,"formElement",void 0),n([vt(".mdc-floating-label")],no.prototype,"labelElement",void 0),n([vt(".mdc-line-ripple")],no.prototype,"lineRippleElement",void 0),n([vt("mwc-notched-outline")],no.prototype,"outlineElement",void 0),n([vt(".mdc-notched-outline__notch")],no.prototype,"notchElement",void 0),n([ft({type:String})],no.prototype,"value",void 0),n([ft({type:String})],no.prototype,"type",void 0),n([ft({type:String})],no.prototype,"placeholder",void 0),n([ft({type:String}),xi((function(t,e){void 0!==e&&this.label!==e&&this.layout()}))],no.prototype,"label",void 0),n([ft({type:String})],no.prototype,"icon",void 0),n([ft({type:String})],no.prototype,"iconTrailing",void 0),n([ft({type:Boolean,reflect:!0})],no.prototype,"disabled",void 0),n([ft({type:Boolean})],no.prototype,"required",void 0),n([ft({type:Number})],no.prototype,"minLength",void 0),n([ft({type:Number})],no.prototype,"maxLength",void 0),n([ft({type:Boolean,reflect:!0}),xi((function(t,e){void 0!==e&&this.outlined!==e&&this.layout()}))],no.prototype,"outlined",void 0),n([ft({type:String})],no.prototype,"helper",void 0),n([ft({type:Boolean})],no.prototype,"validateOnInitialRender",void 0),n([ft({type:String})],no.prototype,"validationMessage",void 0),n([ft({type:Boolean})],no.prototype,"autoValidate",void 0),n([ft({type:String})],no.prototype,"pattern",void 0),n([ft({type:String})],no.prototype,"min",void 0),n([ft({type:String})],no.prototype,"max",void 0),n([ft({type:String})],no.prototype,"step",void 0),n([ft({type:Number})],no.prototype,"size",void 0),n([ft({type:Boolean})],no.prototype,"helperPersistent",void 0),n([ft({type:Boolean})],no.prototype,"charCounter",void 0),n([ft({type:Boolean})],no.prototype,"endAligned",void 0),n([ft({type:String})],no.prototype,"prefix",void 0),n([ft({type:String})],no.prototype,"suffix",void 0),n([ft({type:String})],no.prototype,"name",void 0),n([ft({type:String})],no.prototype,"inputMode",void 0),n([ft({type:Boolean})],no.prototype,"readOnly",void 0),n([ft({type:String})],no.prototype,"autocapitalize",void 0),n([gt()],no.prototype,"outlineOpen",void 0),n([gt()],no.prototype,"outlineWidth",void 0),n([gt()],no.prototype,"isUiValid",void 0),n([gt()],no.prototype,"focused",void 0),n([xt({passive:!0})],no.prototype,"handleInputChange",null); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const no=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(.4,0,.2,1),color 150ms cubic-bezier(.4,0,.2,1)}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0;content:"*"}.mdc-floating-label--required[dir=rtl]::after,[dir=rtl] .mdc-floating-label--required::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0)) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-106%) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-106%) scale(.75)}}.mdc-line-ripple::after,.mdc-line-ripple::before{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(.4,0,.2,1),opacity 180ms cubic-bezier(.4,0,.2,1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / .75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);height:28px;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1);width:100%;min-width:0;border:none;border-radius:0;background:0 0;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:0}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0s cubic-bezier(.4,0,.2,1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0s cubic-bezier(.4,0,.2,1);opacity:0}}@media all{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);height:28px;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens:none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before,.mdc-text-field--filled:hover .mdc-text-field__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens:none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-34.75px) scale(.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small,4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}@supports(top:max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::after,.mdc-text-field--outlined .mdc-text-field__ripple::before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none!important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0)) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-10.25px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0)) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-24.75px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 64px / .75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 64px / .75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 96px / .75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98,0,238,.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0,0,0,.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0,0,0,.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.06)}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0;margin-right:0}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:0}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.42);border-bottom-color:var(--mdc-text-field-idle-line-color,rgba(0,0,0,.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.87);border-bottom-color:var(--mdc-text-field-hover-line-color,rgba(0,0,0,.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.06);border-bottom-color:var(--mdc-text-field-disabled-line-color,rgba(0,0,0,.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color,#f5f5f5)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-error-color,var(--mdc-theme-error,#b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width:2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color,rgba(0,0,0,.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color,#fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}` +const oo=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(.4,0,.2,1),color 150ms cubic-bezier(.4,0,.2,1)}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0;content:"*"}.mdc-floating-label--required[dir=rtl]::after,[dir=rtl] .mdc-floating-label--required::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0)) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-106%) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-106%) scale(.75)}}.mdc-line-ripple::after,.mdc-line-ripple::before{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(.4,0,.2,1),opacity 180ms cubic-bezier(.4,0,.2,1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / .75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);height:28px;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1);width:100%;min-width:0;border:none;border-radius:0;background:0 0;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:0}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0s cubic-bezier(.4,0,.2,1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0s cubic-bezier(.4,0,.2,1);opacity:0}}@media all{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size,1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);height:28px;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens:none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::after,.mdc-text-field--filled .mdc-text-field__ripple::before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before,.mdc-text-field--filled:hover .mdc-text-field__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens:none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-34.75px) scale(.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small,4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}}@supports(top:max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}@supports(top:max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:max(16px,var(--mdc-shape-small,4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:max(16px,calc(var(--mdc-shape-small,4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::after,.mdc-text-field--outlined .mdc-text-field__ripple::before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none!important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0)) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-10.25px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0)) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 0)) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 0)) translateY(-24.75px) scale(.75)}100%{transform:translateX(calc(0 - 0)) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 64px / .75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(32px) scale(.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 64px / .75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / .75 - 96px / .75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98,0,238,.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0,0,0,.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0,0,0,.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0,0,0,.06)}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0s cubic-bezier(.4,0,.2,1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0;margin-right:0}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:0}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.42);border-bottom-color:var(--mdc-text-field-idle-line-color,rgba(0,0,0,.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.87);border-bottom-color:var(--mdc-text-field-hover-line-color,rgba(0,0,0,.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0,0,0,.06);border-bottom-color:var(--mdc-text-field-disabled-line-color,rgba(0,0,0,.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error,#b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color,#f5f5f5)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-error-color,var(--mdc-theme-error,#b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width:2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color,rgba(0,0,0,.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color,#fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color:var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.38))}` /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */;let oo=class extends io{};oo.styles=[no],oo=n([mt("mwc-textfield")],oo);const ro=q`t.toString(16))).join("")}function uo(t){var e;return["true","1"].includes(null!==(e=null==t?void 0:t.trim())&&void 0!==e?e:"false")}function fo(t){var e;return"Bay"===t.tagName&&uo(null===(e=t.querySelector("Section[bus]"))||void 0===e?void 0:e.getAttribute("bus"))}function go(t){const[e,i,n,o,r,a,d]=["x","y","w","h","rot","lx","ly"].map((e=>{var i;return parseFloat(null!==(i=t.getAttributeNS(so,e))&&void 0!==i?i:"0")})),s=[e,i].map((t=>Math.max(0,t))),l=[n,o].map((t=>Math.max(1,t))),c=[a,d].map((t=>Math.max(0,t))),p=uo(t.getAttribute("bus"));return{pos:s,dim:l,label:c,flip:uo(t.getAttributeNS(so,"flip")),rot:(r%4+4)%4,bus:p}}function bo(t){var e;const i=[];if(uo(null===(e=t.querySelector("Section[bus]"))||void 0===e?void 0:e.getAttribute("bus"))){Array.from(t.querySelectorAll("Section:not([bus])")).forEach((t=>i.push({node:t})));const e=Array.from(t.querySelectorAll("Section[bus]")),n=e[0];Array.from(n.children).slice(1).forEach((t=>i.push({node:t})));const o=e[e.length-1].lastElementChild;o&&i.push({parent:n,node:o,reference:null}),e.slice(1).forEach((t=>i.push({node:t})))}else i.push({node:t});return Array.from(t.ownerDocument.querySelectorAll(`Terminal[connectivityNode="${t.getAttribute("pathName")}"]`)).forEach((t=>i.push({node:t}))),i}function xo(t){const[e,i]=["x","y"].map((e=>t.getAttributeNS(so,e))),n=n=>n!==t&&n.getAttributeNS(so,"x")===e&&n.getAttributeNS(so,"y")===i,o=Array.from(t.closest("Private").getElementsByTagNameNS(so,"Section")).flatMap((t=>Array.from(t.children).filter(n))).map((t=>t.parentElement));if(o.length>2)return[];if(o.length<2)return bo(t.closest("ConnectivityNode"));const[r,a]=o.map((t=>uo(t.getAttribute("bus"))));if(r!==a)return[];const d=[],[s,l]=o;n(s.firstElementChild)&&d.push(function(t){const e=[];return Array.from(t.children).reverse().forEach((i=>e.push({parent:t,node:i,reference:null}))),e}(s));const c=Array.from(l.children);n(l.lastElementChild)&&c.reverse(),c.slice(1).forEach((t=>d.push({parent:s,node:t,reference:null})));const p=Array.from(s.children).find(n),m=n(s.firstElementChild)?s.children[1]:s.children[s.childElementCount-2],h=c[1];return m&&p&&h&&function(t,e,i){const[[n,o],[r,a],[d,s]]=[t,e,i].map((t=>["x","y"].map((e=>t.getAttributeNS(so,e)))));return n===r&&r===d||o===a&&a===s}(m,p,h)&&d.push({node:p}),d.push({node:l}),d}function vo(t,e,i){var n;const o=[],r=Array.from(t.getElementsByTagName("ConnectivityNode"));"ConnectivityNode"===t.tagName&&r.push(t);const a=e.closest("Substation").getAttribute("name");let d=null===(n=e.closest("VoltageLevel"))||void 0===n?void 0:n.getAttribute("name");return"VoltageLevel"===t.tagName&&(d=i),r.forEach((n=>{var r,s;let l=n.getAttribute("name");t===n&&(l=i);let c=null!==(s=null===(r=n.parentElement)||void 0===r?void 0:r.getAttribute("name"))&&void 0!==s?s:"";if("Bay"===t.tagName&&(c=i),"Bay"===e.tagName&&e.hasAttribute("name")&&(c=e.getAttribute("name")),l&&c){const t=`${a}/${d}/${c}/${l}`;o.push({element:n,attributes:{pathName:t}}),a&&d&&c&&o.push(...function(t,e,i,n,o,r,a){const d=[],s=e.getAttribute("pathName");if(!s)return[];const[l,c,p,m]=s.split("/");return Array.from(e.getRootNode().querySelectorAll(`Terminal[substationName="${l}"][voltageLevelName="${c}"][bayName="${p}"][cNodeName="${m}"], Terminal[connectivityNode="${s}"]`)).forEach((t=>{d.push({element:t,attributes:{substationName:i,voltageLevelName:n,bayName:o,connectivityNode:a,cNodeName:r}})})),d}(0,n,a,d,c,l,t))}})),o}function yo(t,e){const i=[];i.push({node:t,parent:e,reference:te(e,t.tagName)});const n=function(t,e){var i,n,o;const r=Array.from(e.children),a=t.getAttribute("name");if(a&&!r.find((t=>t.getAttribute("name")===a)))return a;const d=null!==(o=null!==(n=null===(i=t.getAttribute("name"))||void 0===i?void 0:i.replace(/[0-9]*$/,""))&&void 0!==n?n:t.getAttribute("type"))&&void 0!==o?o:t.tagName.charAt(0);let s=1;function l(t){return t.getAttribute("name")===d+s.toString()}for(;r.find(l);)s+=1;return d+s.toString()}(t,e);return n!==t.getAttribute("name")&&i.push({element:t,attributes:{name:n}}),i.push(...vo(t,e,n)),i}function _o(t){const e=[];e.push({node:t});const i=t.getAttribute("connectivityNode"),n=t.ownerDocument.querySelector(`ConnectivityNode[pathName="${i}"]`),o=Array.from(t.ownerDocument.querySelectorAll(`Terminal[connectivityNode="${i}"]`)).filter((e=>e!==t));if(n&&o.length&&o.some((t=>t.closest("Bay")))&&o.every((t=>t.closest("Bay")!==n.closest("Bay")))&&!fo(n.closest("Bay"))){const t=o.find((t=>t.closest("Bay"))).closest("Bay");t&&e.push(...yo(n,t))}const r=null==n?void 0:n.querySelector(`Private[type="${ao}"]`),a=null==r?void 0:r.querySelector(`Vertex[*|uuid="${t.getAttributeNS(so,"uuid")}"]`),d=null==a?void 0:a.parentElement;if(!d)return e;e.push({node:d});const s=a===d.lastElementChild?d.firstElementChild:d.lastElementChild;return s&&e.push(...xo(s)),e}function wo(t){const{pos:[e,i],rot:n}=go(t);return{top:{close:[[e+.5,i],[e+1,i+.5],[e+.5,i+1],[e,i+.5]][n],far:[[e+.5,i-.5],[e+1.5,i+.5],[e+.5,i+1.5],[e-.5,i+.5]][n]},bottom:{close:[[e+.5,i+1],[e,i+.5],[e+.5,i],[e+1,i+.5]][n],far:[[e+.5,i+1.5],[e-.5,i+.5],[e+.5,i-.5],[e+1.5,i+.5]][n]}}}function Eo(t){return new CustomEvent("oscd-sld-place",{bubbles:!0,composed:!0,detail:t})}function So(t){return new CustomEvent("oscd-sld-connect",{bubbles:!0,composed:!0,detail:t})}function Ao(t){return new CustomEvent("oscd-sld-rotate",{bubbles:!0,composed:!0,detail:t})}function Co(t){return new CustomEvent("oscd-sld-start-resize",{bubbles:!0,composed:!0,detail:t})}function $o(t){return new CustomEvent("oscd-sld-start-place",{bubbles:!0,composed:!0,detail:t})}function ko(t){return new CustomEvent("oscd-sld-start-place-label",{bubbles:!0,composed:!0,detail:t})}function Io(t){return new CustomEvent("oscd-sld-start-connect",{bubbles:!0,composed:!0,detail:t})}const No=q``,ao=q``,so=q``,To=q``,Lo=q``,lo=q``,Ro=q` `,co=U``,Do=U` - ${so} -`,po=U``,Oo=U` - ${so} -`,mo=U``,Fo=U` - ${lo} -`,ho=U``,zo=U` - ${lo} -`,uo={IFL:q` + ${Ro} +`,Po={CAB:q` + /> - + -`,DIS:q` + /> + /> + /> + `,CAP:q` + /> -`,CBR:q` + /> + + + `,CBR:q` -`,CTR:q` + `,CTR:q` + `,DIS:q` + + + + + `,GEN:q` + + `,IFL:q` + + + + `,LIN:q` + + + + `,MOT:q` + + `,REA:q` + + + + `,RES:q` + + + + `,SAR:q` + + -`,VTR:q` + + + + `,SMC:q` + + `,VTR:q` @@ -880,42 +1084,41 @@ const no=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm cy="15" r="5" stroke="currentColor" - fill="transparent" + fill="none" stroke-width="1.5" stroke-linecap="round" /> - - + -`},fo=q` + `,Mo=q` -`;function go(t){return t&&t in uo?uo[t]:fo}function bo(t){return U` - ${go(t)} - `}function xo(t){return q``}function Uo(t){return q` - ${go(t)} - `}const vo=q``}const qo=q` -`,yo=q``,Go=q` -`,_o=q` +`,jo=q` + + + + + + - ${Object.keys(uo).map((t=>xo(t)))} - ${xo("ConductingEquipment")} - ${vo} - ${yo} + ${co.map((t=>Uo(t)))} + ${Uo("ConductingEquipment")} + ${qo} + ${Go} -`,wo="Transpower-SLD-Vertices",Eo="https://transpower.co.nz/SCL/SSD/SLD/v0",So="http://www.w3.org/2000/svg";function Ao(t){var e;return["true","1"].includes(null!==(e=null==t?void 0:t.trim())&&void 0!==e?e:"false")}function Co(t){var e;return"Bay"===t.tagName&&Ao(null===(e=t.querySelector("Section[bus]"))||void 0===e?void 0:e.getAttribute("bus"))}function $o(t){const[e,i,n,o,r,a,d]=["x","y","w","h","rot","lx","ly"].map((e=>{var i;return parseFloat(null!==(i=t.getAttributeNS(Eo,e))&&void 0!==i?i:"0")})),s=[e,i].map((t=>Math.max(0,t))),l=[n,o].map((t=>Math.max(1,t))),c=[a,d].map((t=>Math.max(0,t))),p=Ao(t.getAttribute("bus"));return{pos:s,dim:l,label:c,flip:Ao(t.getAttributeNS(Eo,"flip")),rot:(r%4+4)%4,bus:p}}function Io(t){var e;const i=[];if(Ao(null===(e=t.querySelector("Section[bus]"))||void 0===e?void 0:e.getAttribute("bus"))){Array.from(t.querySelectorAll("Section:not([bus])")).forEach((t=>i.push({node:t})));const e=Array.from(t.querySelectorAll("Section[bus]")),n=e[0];Array.from(n.children).slice(1).forEach((t=>i.push({node:t})));const o=e[e.length-1].lastElementChild;o&&i.push({parent:n,node:o,reference:null}),e.slice(1).forEach((t=>i.push({node:t})))}else i.push({node:t});return Array.from(t.ownerDocument.querySelectorAll(`Terminal[connectivityNode="${t.getAttribute("pathName")}"]`)).forEach((t=>i.push({node:t}))),i}function ko(t){const[e,i]=["x","y"].map((e=>t.getAttributeNS(Eo,e))),n=n=>n!==t&&n.getAttributeNS(Eo,"x")===e&&n.getAttributeNS(Eo,"y")===i,o=Array.from(t.closest("Private").getElementsByTagNameNS(Eo,"Section")).flatMap((t=>Array.from(t.children).filter(n))).map((t=>t.parentElement));if(o.length>2)return[];if(o.length<2)return Io(t.closest("ConnectivityNode"));const[r,a]=o.map((t=>Ao(t.getAttribute("bus"))));if(r!==a)return[];const d=[],[s,l]=o;n(s.firstElementChild)&&d.push(function(t){const e=[];return Array.from(t.children).reverse().forEach((i=>e.push({parent:t,node:i,reference:null}))),e}(s));const c=Array.from(l.children);n(l.lastElementChild)&&c.reverse(),c.slice(1).forEach((t=>d.push({parent:s,node:t,reference:null})));const p=Array.from(s.children).find(n),m=n(s.firstElementChild)?s.children[1]:s.children[s.childElementCount-2],h=c[1];return m&&p&&h&&function(t,e,i){const[[n,o],[r,a],[d,s]]=[t,e,i].map((t=>["x","y"].map((e=>t.getAttributeNS(Eo,e)))));return n===r&&r===d||o===a&&a===s}(m,p,h)&&d.push({node:p}),d.push({node:l}),d}function No(t,e,i){var n;const o=[],r=Array.from(t.getElementsByTagName("ConnectivityNode"));"ConnectivityNode"===t.tagName&&r.push(t);const a=e.closest("Substation").getAttribute("name");let d=null===(n=e.closest("VoltageLevel"))||void 0===n?void 0:n.getAttribute("name");return"VoltageLevel"===t.tagName&&(d=i),r.forEach((n=>{var r,s;let l=n.getAttribute("name");t===n&&(l=i);let c=null!==(s=null===(r=n.parentElement)||void 0===r?void 0:r.getAttribute("name"))&&void 0!==s?s:"";if("Bay"===t.tagName&&(c=i),"Bay"===e.tagName&&e.hasAttribute("name")&&(c=e.getAttribute("name")),l&&c){const t=`${a}/${d}/${c}/${l}`;o.push({element:n,attributes:{pathName:t}}),a&&d&&c&&o.push(...function(t,e,i,n,o,r,a){const d=[],[s,l,c]=["Substation","VoltageLevel","Bay"].map((t=>{var i,n;return null!==(n=null===(i=e.closest(t))||void 0===i?void 0:i.getAttribute("name"))&&void 0!==n?n:""})),p=e.getAttribute("name"),m=`${s}/${l}/${c}/${p}`;return Array.from(t.ownerDocument.querySelectorAll(`Terminal[substationName="${s}"][voltageLevelName="${l}"][bayName="${c}"][cNodeName="${p}"], Terminal[connectivityNode="${m}"]`)).forEach((t=>{d.push({element:t,attributes:{substationName:i,voltageLevelName:n,bayName:o,connectivityNode:a,cNodeName:r}})})),d}(e,n,a,d,c,l,t))}})),o}function To(t,e){const i=[];i.push({node:t,parent:e,reference:te(e,t.tagName)});const n=function(t,e){var i,n;const o=Array.from(e.children),r=t.getAttribute("name");if(r&&!o.find((t=>t.getAttribute("name")===r)))return r;const a=null!==(n=null===(i=t.getAttribute("name"))||void 0===i?void 0:i.replace(/[0-9]*$/,""))&&void 0!==n?n:t.tagName.charAt(0);let d=1;function s(t){return t.getAttribute("name")===a+d.toString()}for(;o.find(s);)d+=1;return a+d.toString()}(t,e);return n!==t.getAttribute("name")&&i.push({element:t,attributes:{name:n}}),i.push(...No(t,e,n)),i}function Lo(t){const e=[];e.push({node:t});const i=t.getAttribute("connectivityNode"),n=t.ownerDocument.querySelector(`ConnectivityNode[pathName="${i}"]`),o=Array.from(t.ownerDocument.querySelectorAll(`Terminal[connectivityNode="${i}"]`)).filter((e=>e!==t));if(n&&o.length&&o.some((t=>t.closest("Bay")))&&o.every((t=>t.closest("Bay")!==n.closest("Bay")))&&!Co(n.closest("Bay"))){const t=o.find((t=>t.closest("Bay"))).closest("Bay");t&&e.push(...To(n,t))}const r=null==n?void 0:n.querySelector(`Private[type="${wo}"]`),a=null==r?void 0:r.querySelector(`Vertex[*|uuid="${t.getAttributeNS(Eo,"uuid")}"]`),d=null==a?void 0:a.parentElement;if(!d)return e;e.push({node:d});const s=a===d.lastElementChild?d.firstElementChild:d.lastElementChild;return s&&e.push(...ko(s)),e}function Ro(t){const{pos:[e,i],rot:n}=$o(t);return{top:{close:[[e+.5,i],[e+1,i+.5],[e+.5,i+1],[e,i+.5]][n],far:[[e+.5,i-.5],[e+1.5,i+.5],[e+.5,i+1.5],[e-.5,i+.5]][n]},bottom:{close:[[e+.5,i+1],[e,i+.5],[e+.5,i],[e+1,i+.5]][n],far:[[e+.5,i+1.5],[e-.5,i+.5],[e+.5,i-.5],[e+1.5,i+.5]][n]}}}function Do(t){return new CustomEvent("oscd-sld-place",{bubbles:!0,composed:!0,detail:t})}function Oo(t){return new CustomEvent("oscd-sld-connect",{bubbles:!0,composed:!0,detail:t})}function Fo(t){return new CustomEvent("oscd-sld-rotate",{bubbles:!0,composed:!0,detail:t})}function zo(t){return new CustomEvent("oscd-sld-start-resize",{bubbles:!0,composed:!0,detail:t})}function Po(t){return new CustomEvent("oscd-sld-start-place",{bubbles:!0,composed:!0,detail:t})}function Ho(t){return new CustomEvent("oscd-sld-start-connect",{bubbles:!0,composed:!0,detail:t})}function Mo(t){return new CustomEvent("oscd-edit-wizard-request",{bubbles:!0,composed:!0,detail:{element:t}})}function Bo([t,e,i,n],[o,r,a,d]){return t<=o&&e<=r&&t+i>=o+a&&e+n>=r+d}function Vo(t,e,i,n,o){const{pos:[r,a],dim:[d,s]}=$o(t);return Bo([r,a,d,s],[e,i,n,o])}function Uo(t){let e=t.length-2;for(;e>0;){const[i,n]=t[e],[o,r]=t[e+1],[a,d]=t[e-1];(i===o&&n===r||i===o&&i===a||n===r&&n===d)&&t.splice(e,1),e-=1}}function qo(t){return"Bay"===t.tagName&&!Co(t)}const Go={ConductingEquipment:"Bay",Bay:"VoltageLevel",VoltageLevel:"Substation"},jo=new Set(["VTR","GEN","MOT","FAN","PMP","EFN","BAT","RRC","SAR","SMC","IFL"]);function Xo(t){t.preventDefault()}let Yo=class extends ct{constructor(){super(...arguments),this.editCount=-1,this.gridSize=32,this.nsp="esld",this.mouseX=0,this.mouseY=0,this.mouseX2=0,this.mouseY2=0,this.handleKeydown=({key:t})=>{"Escape"===t&&(this.menu=void 0)},this.handleClick=t=>{this.menu=void 0}}svgCoordinates(t,e){const i=new DOMPoint(t,e),{x:n,y:o}=i.matrixTransform(this.sld.getScreenCTM().inverse());return[n,o].map((t=>Math.max(0,t)))}canPlaceAt(t,e,i,n,o){if("Substation"===t.tagName)return!0;const r=Array.from(this.substation.querySelectorAll(t.tagName)).find((r=>r!==t&&function(t,e,i,n,o){const{pos:[r,a],dim:[d,s]}=$o(t);return function([t,e,i,n],[o,r,a,d]){return!(t>=o+a||o>=t+i||e>=r+d||r>=e+n)}([r,a,d,s],[e,i,n,o])}(r,e,i,n,o)&&!Co(r)));if(r&&!Co(t))return!1;return!!("VoltageLevel"===t.tagName?Vo(this.substation,e,i,n,o):Array.from(this.substation.querySelectorAll(Go[t.tagName])).find((t=>Vo(t,e,i,n,o))))}canResizeTo(t,e,i){const{pos:[n,o],dim:[r,a]}=$o(t);if(!this.canPlaceAt(t,n,o,e,i)&&this.canPlaceAt(t,n,o,r,a))return!1;return!Array.from(t.children).find((r=>{if(Go[r.tagName]!==t.tagName)return!1;const{pos:[a,d],dim:[s,l]}=$o(r);return!Bo([n,o,e,i],[a,d,s,l])}))}renderedLabelPosition(t){let{label:[e,i]}=$o(t);if(this.placing&&t.closest(this.placing.tagName)===this.placing){const{pos:[t,n]}=$o(this.placing);e+=this.mouseX-t,i+=this.mouseY-n}return this.placingLabel===t&&(e=this.mouseX2,i=this.mouseY2+.5),[e,i]}renderedPosition(t){let{pos:[e,i]}=$o(t);if(this.placing&&t.closest(this.placing.tagName)===this.placing){const{pos:[t,n]}=$o(this.placing);e+=this.mouseX-t,i+=this.mouseY-n}return[e,i]}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeydown),window.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeydown),window.removeEventListener("click",this.handleClick)}nearestOpenTerminal(t){if(!t)return;const e=t.querySelector('Terminal[name="T1"]'),i=t.querySelector('Terminal:not([name="T1"])'),n=jo.has(t.getAttribute("type"));if(e&&i)return;if(n&&(e||i))return;if(n)return"top";if(e)return"bottom";if(i)return"top";const[o,r]=[this.mouseX2,this.mouseY2].map((t=>t%1)),{rot:a}=$o(t);return 0===a&&.5===r||1===a&&0===o||2===a&&0===r||3===a&&.5===o?"bottom":"top"}groundTerminal(t,e){const i=t.closest("Bay"),n=[];let o=i.querySelector(':scope > ConnectivityNode[name="grounded"]'),r=null==o?void 0:o.getAttribute("pathName");r||(r=function(t,...e){const i=[];let n=t;for(;n.parentElement&&n.hasAttribute("name");)i.unshift(n.getAttribute("name")),n=n.parentElement;return function(...t){return t.join("/")}(...i,...e)}(t.closest("Bay"),"grounded"),o=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"ConnectivityNode"),o.setAttribute("name","grounded"),o.setAttribute("pathName",r),n.push({parent:i,node:o,reference:te(i,"ConnectivityNode")}));const a=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Terminal");a.setAttribute("name",e),a.setAttribute("cNodeName","grounded");const d=t.closest("Substation").getAttribute("name");d&&a.setAttribute("substationName",d);const s=t.closest("VoltageLevel").getAttribute("name");s&&a.setAttribute("voltageLevelName",s);const l=t.closest("Bay").getAttribute("name");l&&a.setAttribute("bayName",l),a.setAttribute("connectivityNode",r),n.push({parent:t,node:a,reference:te(t,"Terminal")}),this.dispatchEvent(St(n))}flipElement(t){const{flip:e}=$o(t);this.dispatchEvent(St({element:t,attributes:{[`${this.nsp}:flip`]:{namespaceURI:Eo,value:e?null:"true"}}}))}equipmentMenuItems(t){const e=[{content:U` +`,Xo={ConductingEquipment:"Bay",Bay:"VoltageLevel",VoltageLevel:"Substation"},Yo=new Set(["BAT","EFN","FAN","GEN","IFL","MOT","PMP","RRC","SAR","SMC","VTR"]);function Wo(t){return new CustomEvent("oscd-edit-wizard-request",{bubbles:!0,composed:!0,detail:{element:t}})}function Ko([t,e,i,n],[o,r,a,d]){return t<=o&&e<=r&&t+i>=o+a&&e+n>=r+d}function Zo(t,e,i,n,o){const{pos:[r,a],dim:[d,s]}=go(t);return Ko([r,a,d,s],[e,i,n,o])}function Qo(t){let e=t.length-2;for(;e>0;){const[i,n]=t[e],[o,r]=t[e+1],[a,d]=t[e-1];(i===o&&n===r||i===o&&i===a||n===r&&n===d)&&t.splice(e,1),e-=1}}function Jo(t){return"Bay"===t.tagName&&!fo(t)}function tr(t){t.preventDefault()}function er(t,e){const i=t.cloneNode(!0),n=new Set(Array.from(t.querySelectorAll("Terminal"))),o=new Set;n.forEach((e=>{const i=t.ownerDocument.querySelector(`ConnectivityNode[pathName="${e.getAttribute("connectivityNode")}"]`);i&&o.add(i)}));const r=new Set;return o.forEach((e=>{Array.from(t.ownerDocument.querySelectorAll(`Terminal[connectivityNode="${e.getAttribute("pathName")}"]`)).find((t=>!n.has(t)))&&r.add(e)})),r.forEach((e=>{var o;e.closest(t.tagName)===t&&(null===(o=i.querySelector(`ConnectivityNode[pathName="${e.getAttribute("pathName")}"]`))||void 0===o||o.remove()),n.forEach((t=>{var n;t.getAttribute("connectivityNode")===e.getAttribute("pathName")&&(null===(n=i.querySelector(`[*|uuid="${t.getAttributeNS(so,"uuid")}"]`))||void 0===n||n.remove())}))})),Array.from(i.querySelectorAll("Terminal")).forEach((t=>{const n=t.getAttributeNS(so,"uuid"),o=ho();Array.from(i.querySelectorAll(`Vertex[*|uuid="${n}"`)).forEach((t=>t.setAttributeNS(so,`${e}:uuid`,o))),t.setAttributeNS(so,`${e}:uuid`,o)})),i}let ir=class extends ct{constructor(){super(...arguments),this.editCount=-1,this.gridSize=32,this.nsp="esld",this.mouseX=0,this.mouseY=0,this.mouseX2=0,this.mouseY2=0,this.coordinatesRef=new ai,this.handleKeydown=({key:t})=>{"Escape"===t&&(this.menu=void 0)},this.handleClick=t=>{this.menu&&!t.composedPath().find((t=>"id"in t&&"sld-context-menu"===t.id))&&(t.stopImmediatePropagation(),this.menu=void 0)}}positionCoordinates(t){var e;const i=null===(e=this.coordinatesRef)||void 0===e?void 0:e.value;i&&(i.style.top=`${t.clientY}px`,i.style.left=`${t.clientX+16}px`)}openMenu(t,e){this.placing||this.resizing||this.placingLabel||this.connecting||(this.menu={element:t,left:e.clientX,top:e.clientY}),e.preventDefault()}svgCoordinates(t,e){const i=new DOMPoint(t,e),{x:n,y:o}=i.matrixTransform(this.sld.getScreenCTM().inverse());return[n,o].map((t=>Math.max(0,t)))}canPlaceAt(t,e,i,n,o){if("Substation"===t.tagName)return!0;const r=Array.from(this.substation.querySelectorAll(t.tagName)).find((r=>r!==t&&function(t,e,i,n,o){const{pos:[r,a],dim:[d,s]}=go(t);return function([t,e,i,n],[o,r,a,d]){return!(t>=o+a||o>=t+i||e>=r+d||r>=e+n)}([r,a,d,s],[e,i,n,o])}(r,e,i,n,o)&&!fo(r)));if(r&&!fo(t))return!1;return!!("VoltageLevel"===t.tagName?Zo(this.substation,e,i,n,o):Array.from(this.substation.querySelectorAll(Xo[t.tagName])).find((t=>Zo(t,e,i,n,o))))}canResizeTo(t,e,i){const{pos:[n,o],dim:[r,a]}=go(t);if(!this.canPlaceAt(t,n,o,e,i)&&this.canPlaceAt(t,n,o,r,a))return!1;return!Array.from(t.children).find((r=>{if(Xo[r.tagName]!==t.tagName)return!1;const{pos:[a,d],dim:[s,l]}=go(r);return!Ko([n,o,e,i],[a,d,s,l])}))}renderedLabelPosition(t){let{label:[e,i]}=go(t);if(this.placing&&t.closest(this.placing.tagName)===this.placing){const{pos:[t,n]}=go(this.placing);e+=this.mouseX-t,i+=this.mouseY-n}return this.placingLabel===t&&(e=this.mouseX2,i=this.mouseY2+.5),[e,i]}renderedPosition(t){let{pos:[e,i]}=go(t);if(this.placing&&t.closest(this.placing.tagName)===this.placing){const{pos:[t,n]}=go(this.placing);e+=this.mouseX-t,i+=this.mouseY-n}return[e,i]}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeydown),window.addEventListener("click",this.handleClick,!0),window.addEventListener("click",this.positionCoordinates)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeydown),window.removeEventListener("click",this.handleClick),window.removeEventListener("click",this.positionCoordinates)}nearestOpenTerminal(t){if(!t)return;const e=t.querySelector('Terminal[name="T1"]'),i=t.querySelector('Terminal:not([name="T1"])'),n=Yo.has(t.getAttribute("type"));if(e&&i)return;if(n&&(e||i))return;if(n)return"top";if(e)return"bottom";if(i)return"top";const[o,r]=[this.mouseX2,this.mouseY2].map((t=>t%1)),{rot:a}=go(t);return 0===a&&.5===r||1===a&&0===o||2===a&&0===r||3===a&&.5===o?"bottom":"top"}groundTerminal(t,e){const i=t.closest("Bay"),n=[];let o=i.querySelector(':scope > ConnectivityNode[name="grounded"]'),r=null==o?void 0:o.getAttribute("pathName");r||(r=function(t,...e){const i=[];let n=t;for(;n.parentElement&&n.hasAttribute("name");)i.unshift(n.getAttribute("name")),n=n.parentElement;return function(...t){return t.join("/")}(...i,...e)}(t.closest("Bay"),"grounded"),o=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"ConnectivityNode"),o.setAttribute("name","grounded"),o.setAttribute("pathName",r),n.push({parent:i,node:o,reference:te(i,"ConnectivityNode")}));const a=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Terminal");a.setAttribute("name",e),a.setAttribute("cNodeName","grounded");const d=t.closest("Substation").getAttribute("name");d&&a.setAttribute("substationName",d);const s=t.closest("VoltageLevel").getAttribute("name");s&&a.setAttribute("voltageLevelName",s);const l=t.closest("Bay").getAttribute("name");l&&a.setAttribute("bayName",l),a.setAttribute("connectivityNode",r),n.push({parent:t,node:a,reference:te(t,"Terminal")}),this.dispatchEvent(St(n))}flipElement(t){const{flip:e}=go(t);this.dispatchEvent(St({element:t,attributes:{[`${this.nsp}:flip`]:{namespaceURI:so,value:e?null:"true"}}}))}equipmentMenuItems(t){const e=[{content:U` Mirror flip `,handler:()=>this.flipElement(t)},{content:U` Rotate rotate_90_degrees_cw - `,handler:()=>{this.dispatchEvent(Fo(t))}},{content:U` + `,handler:()=>{this.dispatchEvent(Ao(t))}},{content:U` Move - ${ao} + ${To} - `,handler:()=>this.dispatchEvent(Po(t))},{content:U` + `,handler:()=>this.dispatchEvent($o(t))},{content:U` + Move Label + text_rotation_none + `,handler:()=>this.dispatchEvent(ko(t))},{content:U` Edit edit - `,handler:()=>this.dispatchEvent(Mo(t))},{content:U` + `,handler:()=>this.dispatchEvent(Wo(t))},{content:U` Delete delete - `,handler:()=>{const e=[];Array.from(t.querySelectorAll("Terminal")).forEach((t=>e.push(...Lo(t)))),e.push({node:t}),this.dispatchEvent(St(e))}}],{rot:i}=$o(t),n={connect:["north","east","south","west"],ground:["expand_less","chevron_right","expand_more","chevron_left"],disconnect:["arrow_drop_up","arrow_right","arrow_drop_down","arrow_left"]},o={connect:["Connect top","Connect right","Connect bottom","Connect left"],ground:["Ground top","Ground right","Ground bottom","Ground left"],disconnect:["Detach top","Detach right","Detach bottom","Detach left"]},r=(t,e)=>U` + `,handler:()=>{const e=[];Array.from(t.querySelectorAll("Terminal")).forEach((t=>e.push(..._o(t)))),e.push({node:t}),this.dispatchEvent(St(e))}}],{rot:i}=go(t),n={connect:["north","east","south","west"],ground:["expand_less","chevron_right","expand_more","chevron_left"],disconnect:["arrow_drop_up","arrow_right","arrow_drop_down","arrow_left"]},o={connect:["Connect top","Connect right","Connect bottom","Connect left"],ground:["Ground top","Ground right","Ground bottom","Ground left"],disconnect:["Detach top","Detach right","Detach bottom","Detach left"]},r=(t,e)=>U` ${((t,e)=>o[t][e?i%4:(i+2)%4])(t,e)} ${((t,e)=>n[t][e?i%4:(i+2)%4])(t,e)} - `,a=t.querySelector('Terminal[name="T1"]'),d=t.querySelector('Terminal:not([name="T1"])');return jo.has(t.getAttribute("type"))||(d?e.unshift({handler:()=>this.dispatchEvent(St(Lo(d))),content:r("disconnect",!1)}):e.unshift({handler:()=>this.dispatchEvent(Ho({equipment:t,terminal:"bottom"})),content:r("connect",!1)},{handler:()=>this.groundTerminal(t,"T2"),content:r("ground",!1)})),a?e.unshift({handler:()=>this.dispatchEvent(St(Lo(a))),content:r("disconnect",!0)}):e.unshift({handler:()=>this.dispatchEvent(Ho({equipment:t,terminal:"top"})),content:r("connect",!0)},{handler:()=>this.groundTerminal(t,"T1"),content:r("ground",!0)}),e}busBarMenuItems(t){return[{content:U` + `,a=t.querySelector('Terminal[name="T1"]'),d=t.querySelector('Terminal:not([name="T1"])');return Yo.has(t.getAttribute("type"))||(d?e.unshift({handler:()=>this.dispatchEvent(St(_o(d))),content:r("disconnect",!1)}):e.unshift({handler:()=>this.dispatchEvent(Io({equipment:t,terminal:"bottom"})),content:r("connect",!1)},{handler:()=>this.groundTerminal(t,"T2"),content:r("ground",!1)})),a?e.unshift({handler:()=>this.dispatchEvent(St(_o(a))),content:r("disconnect",!0)}):e.unshift({handler:()=>this.dispatchEvent(Io({equipment:t,terminal:"top"})),content:r("connect",!0)},{handler:()=>this.groundTerminal(t,"T1"),content:r("ground",!0)}),e}busBarMenuItems(t){return[{content:U` Resize - ${ro} + ${No} - `,handler:()=>this.dispatchEvent(zo(t))},{content:U` + `,handler:()=>this.dispatchEvent(Co(t))},{content:U` Move - ${ao} + ${To} - `,handler:()=>this.dispatchEvent(Po(t))},{content:U` + `,handler:()=>this.dispatchEvent($o(t))},{content:U` + Move Label + text_rotation_none + `,handler:()=>this.dispatchEvent(ko(t))},{content:U` Edit edit - `,handler:()=>this.dispatchEvent(Mo(t))},{content:U` + `,handler:()=>this.dispatchEvent(Wo(t))},{content:U` Delete delete - `,handler:()=>{const e=t.querySelector("ConnectivityNode");this.dispatchEvent(St([...Io(e),{node:t}]))}}]}containerMenuItems(t){return[{content:U` + `,handler:()=>{const e=t.querySelector("ConnectivityNode");this.dispatchEvent(St([...bo(e),{node:t}]))}}]}containerMenuItems(t){return[{content:U` Resize - ${ro} + ${No} - `,handler:()=>this.dispatchEvent(zo(t))},{content:U` + `,handler:()=>this.dispatchEvent(Co(t))},{content:U` Move - ${ao} + ${To} - `,handler:()=>this.dispatchEvent(Po(t))},{content:U` + `,handler:()=>this.dispatchEvent($o(t))},{content:U` + Move Label + text_rotation_none + `,handler:()=>this.dispatchEvent(ko(t))},{content:U` Edit edit - `,handler:()=>this.dispatchEvent(Mo(t))},{content:U` + `,handler:()=>this.dispatchEvent(Wo(t))},{content:U` Delete delete - `,handler:()=>{const e=[];Array.from(t.getElementsByTagName("ConnectivityNode")).forEach((i=>{Array.from(this.doc.querySelectorAll(`Terminal[connectivityNode="${i.getAttribute("pathName")}"]`)).find((e=>e.closest(t.tagName)!==t))&&e.push(...Io(i))})),Array.from(t.getElementsByTagName("Terminal")).forEach((i=>{const n=this.doc.querySelector(`ConnectivityNode[pathName="${i.getAttribute("connectivityNode")}"]`);n&&n.closest(t.tagName)!==t&&e.push(...Io(n))})),e.push({node:t}),this.dispatchEvent(St(e))}}]}renderMenu(){if(!this.menu)return U``;const{element:t}=this.menu;let e=[];return"ConductingEquipment"===t.tagName?e=this.equipmentMenuItems(t):"Bay"===t.tagName&&Co(t)?e=this.busBarMenuItems(t):"Bay"!==t.tagName&&"VoltageLevel"!==t.tagName||(e=this.containerMenuItems(t)),U` + `,handler:()=>{const e=[];Array.from(t.getElementsByTagName("ConnectivityNode")).forEach((i=>{Array.from(this.doc.querySelectorAll(`Terminal[connectivityNode="${i.getAttribute("pathName")}"]`)).find((e=>e.closest(t.tagName)!==t))&&e.push(...bo(i))})),Array.from(t.getElementsByTagName("Terminal")).forEach((i=>{const n=this.doc.querySelector(`ConnectivityNode[pathName="${i.getAttribute("connectivityNode")}"]`);n&&n.closest(t.tagName)!==t&&e.push(...bo(n))})),e.push({node:t}),this.dispatchEvent(St(e))}}]}renderMenu(){if(!this.menu)return U``;const{element:t}=this.menu;let e=[];return"ConductingEquipment"===t.tagName?e=this.equipmentMenuItems(t):"Bay"===t.tagName&&fo(t)?e=this.busBarMenuItems(t):"Bay"!==t.tagName&&"VoltageLevel"!==t.tagName||(e=this.containerMenuItems(t)),U` {if(!(t instanceof HTMLElement))return;await this.updateComplete;const{bottom:e,right:i}=t.getBoundingClientRect();e>window.innerHeight&&(t.style.removeProperty("top"),t.style.bottom="0px"),i>window.innerWidth&&(t.style.removeProperty("left"),t.style.right="0px")}))} + id="sld-context-menu" + style="position: fixed; top: ${this.menu.top}px; left: ${this.menu.left}px; background: var(--oscd-base3, white); margin: 0px; padding: 0px; box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); --mdc-list-vertical-padding: 0px; overflow-y: auto;" + ${si((async t=>{if(!(t instanceof HTMLElement))return;const e=this.parentElement.getRootNode().querySelector("nav").offsetHeight+8;await this.updateComplete;const{bottom:i,right:n}=t.getBoundingClientRect();i>window.innerHeight-e&&(t.style.removeProperty("top"),t.style.bottom=`${e}px`,t.style.maxHeight=`calc(100vh - ${e+68}px)`),n>window.innerWidth&&(t.style.removeProperty("left"),t.style.right="0px")}))} > {var i;null===(i=e[t])||void 0===i||i.handler(),this.menu=void 0}} > ${e.map((t=>t.content))}
  • - ${function(t){const e=t.getAttribute("name"),i=t.getAttribute("desc")||t.getAttribute("type");let n=bo(null);return"ConductingEquipment"===t.tagName?n=bo(t.getAttribute("type")):"Bay"===t.tagName&&Co(t)?n=U`horizontal_rule`:"Bay"===t.tagName?n=ho:"VoltageLevel"===t.tagName&&(n=po),U` + ${function(t){const e=t.getAttribute("name");let i=t.getAttribute("desc");const n=t.getAttribute("type");n&&(i=i?U`${n} — ${i}`:n);let o=Vo(null);return"ConductingEquipment"===t.tagName?o=Vo(t.getAttribute("type")):"Bay"===t.tagName&&fo(t)?o=U`horizontal_rule`:"Bay"===t.tagName?o=zo:"VoltageLevel"===t.tagName&&(o=Oo),U` ${e} - ${i?U`${i}`:j} - ${n} + ${i?U` + ${i} + `:j} + ${o} `}(t)}
    - `}render(){var t,e;const{dim:[i,n]}=$o(this.substation),o="VoltageLevel"===(null===(t=this.placing)||void 0===t?void 0:t.tagName)?q``:j;let r=q``;this.placing&&("VoltageLevel"===this.placing.tagName||qo(this.placing)?r=q`${this.renderContainer(this.placing,!0)}`:"ConductingEquipment"===this.placing.tagName?r=this.renderEquipment(this.placing,{preview:!0}):Co(this.placing)&&(r=this.renderBusBar(this.placing)));let a=q``;if(this.placing){const{dim:[t,e]}=$o(this.placing),i=!this.canPlaceAt(this.placing,this.mouseX,this.mouseY,t,e);a=q` - - - (${this.mouseX},${this.mouseY}) - - - `}let d=q``;if(this.resizing&&!Co(this.resizing)){const{pos:[t,e]}=$o(this.resizing),i=Math.max(1,this.mouseX-t+1),n=Math.max(1,this.mouseY-e+1),o=!this.canResizeTo(this.resizing,i,n);d=q` - - - (${i}×${n}) - - - `}const s=[];if(this.connecting){const{equipment:t,path:e,terminal:i}=this.connecting;let n=0;for(;n`),n+=1}const[[o,r],[a,d]]=e.slice(-2),l=o===a;let c=this.mouseX+.5,p=this.mouseY+.5,[m,h]=[c,p];const u=Array.from(this.substation.querySelectorAll("ConductingEquipment")).filter((e=>e!==t)).find((t=>{const{pos:[e,i]}=$o(t);return e===this.mouseX&&i===this.mouseY})),f=this.nearestOpenTerminal(u);if(u&&f){const{far:t,close:e}=Ro(u)[f];[c,p]=t,[m,h]=e}const g=l?a:c,b=l?p:d;s.push(q``,q``,q``),s.push(q`{e[e.length-1]=[g,b],e.push([c,p]),e.push([m,h]),Uo(e),this.requestUpdate(),u&&f&&this.dispatchEvent(Oo({equipment:t,terminal:i,path:e,connectTo:u,toTerminal:f}))}} />`)}const l=this.renderMenu();return U`
    + `}render(){var t,e,i;const{dim:[n,o]}=go(this.substation),r="VoltageLevel"===(null===(t=this.placing)||void 0===t?void 0:t.tagName)?q``:j,a=this.placingLabel?q`{const t=this.placingLabel,[e,i]=this.renderedLabelPosition(t);this.dispatchEvent(new CustomEvent("oscd-sld-place-label",{bubbles:!0,composed:!0,detail:{element:t,x:e,y:i}}))}} + />`:j;let d=q``;this.placing&&("VoltageLevel"===this.placing.tagName||Jo(this.placing)?d=q`${this.renderContainer(this.placing,!0)}`:"ConductingEquipment"===this.placing.tagName?d=this.renderEquipment(this.placing,{preview:!0}):fo(this.placing)&&(d=this.renderBusBar(this.placing)));let s=U``,l=!1,c=!0;if(this.placing){const{dim:[t,e]}=go(this.placing);c=!1,l=!this.canPlaceAt(this.placing,this.mouseX,this.mouseY,t,e),s=U`${this.mouseX},${this.mouseY}`}if(this.resizing&&!fo(this.resizing)){const{pos:[t,e]}=go(this.resizing),i=Math.max(1,this.mouseX-t+1),n=Math.max(1,this.mouseY-e+1);c=!1,l=!this.canResizeTo(this.resizing,i,n),s=U`${i}×${n}`}const p=U`
    + (${s}) +
    `,m=[];if((null===(e=this.connecting)||void 0===e?void 0:e.equipment.closest("Substation"))===this.substation){const{equipment:t,path:e,terminal:i}=this.connecting;let n=0;for(;n`),n+=1}const[[o,r],[a,d]]=e.slice(-2),s=o===a;let l=this.mouseX+.5,c=this.mouseY+.5,[p,h]=[l,c];const u=Array.from(this.substation.querySelectorAll("ConductingEquipment")).filter((e=>e!==t)).find((t=>{const{pos:[e,i]}=go(t);return e===this.mouseX&&i===this.mouseY})),f=this.nearestOpenTerminal(u);if(u&&f){const{far:t,close:e}=wo(u)[f];[l,c]=t,[p,h]=e}const g=s?a:l,b=s?c:d;m.push(q``,q``,q``),m.push(q`{e[e.length-1]=[g,b],e.push([l,c]),e.push([p,h]),Qo(e),this.requestUpdate(),u&&f&&this.dispatchEvent(So({equipment:t,terminal:i,path:e,connectTo:u,toTerminal:f}))}} />`)}const h=this.renderMenu();return U`

    ${this.substation.getAttribute("name")} this.resizeSubstationUI.show()} > - ${ro} + ${No}

    {const[e,i]=this.svgCoordinates(t.clientX,t.clientY);this.mouseX=Math.floor(e),this.mouseY=Math.floor(i),this.mouseX2=Math.floor(2*e)/2,this.mouseY2=Math.floor(2*i)/2}} + @mousemove=${t=>{const[e,i]=this.svgCoordinates(t.clientX,t.clientY);this.mouseX=Math.floor(e),this.mouseY=Math.floor(i),this.mouseX2=Math.floor(2*e)/2,this.mouseY2=Math.floor(2*i)/2,this.positionCoordinates(t)}} > - ${_o} + ${jo} - ${o} + ${r} ${Array.from(this.substation.children).filter((t=>"VoltageLevel"===t.tagName)).map((t=>q`${this.renderContainer(t)}`))} - ${s} - ${(null===(e=this.connecting)||void 0===e?void 0:e.equipment.closest("Substation"))===this.substation?Array.from(this.substation.querySelectorAll("ConductingEquipment")).map((t=>this.renderEquipment(t,{connect:!0}))):j} - ${Array.from(this.substation.querySelectorAll("ConnectivityNode")).filter((t=>!("grounded"===t.getAttribute("name")||this.placing&&t.closest(this.placing.tagName)===this.placing||Co(t.parentElement)))).map((t=>this.renderConnectivityNode(t)))} - ${Array.from(this.substation.querySelectorAll("ConnectivityNode")).filter((t=>"grounded"!==t.getAttribute("name")&&!(this.placing&&t.closest(this.placing.tagName)===this.placing)&&Co(t.parentElement))).map((t=>this.renderConnectivityNode(t)))} - ${r} ${a} ${d} - ${Array.from(this.substation.querySelectorAll("VoltageLevel, Bay, ConductingEquipment")).map((t=>this.renderLabel(t)))} + ${m} + ${(null===(i=this.connecting)||void 0===i?void 0:i.equipment.closest("Substation"))===this.substation?Array.from(this.substation.querySelectorAll("ConductingEquipment")).map((t=>this.renderEquipment(t,{connect:!0}))):j} + ${Array.from(this.substation.querySelectorAll("ConnectivityNode")).filter((t=>!("grounded"===t.getAttribute("name")||this.placing&&t.closest(this.placing.tagName)===this.placing||fo(t.parentElement)))).map((t=>this.renderConnectivityNode(t)))} + ${Array.from(this.substation.querySelectorAll("ConnectivityNode")).filter((t=>"grounded"!==t.getAttribute("name")&&!(this.placing&&t.closest(this.placing.tagName)===this.placing)&&fo(t.parentElement))).map((t=>this.renderConnectivityNode(t)))} + ${Array.from(this.substation.querySelectorAll("VoltageLevel, Bay, ConductingEquipment")).filter((t=>!this.placing||t.closest(this.placing.tagName)!==this.placing)).map((t=>this.renderLabel(t)))} + ${a} ${d} - ${l} + ${h} ${p} {const{dim:[i,n]}=$o(this.substation);return e.valid&&!this.canResizeTo(this.substation,parseInt(t,10),n)?{valid:!1,rangeUnderflow:!0}:{}}} + .validityTransform=${(t,e)=>{const{dim:[i,n]}=go(this.substation);return e.valid&&!this.canResizeTo(this.substation,parseInt(t,10),n)?{valid:!1,rangeUnderflow:!0}:{}}} > {const{dim:[i,n]}=$o(this.substation);return e.valid&&!this.canResizeTo(this.substation,i,parseInt(t,10))?{valid:!1,rangeUnderflow:!0}:{}}} + .validityTransform=${(t,e)=>{const{dim:[i,n]}=go(this.substation);return e.valid&&!this.canResizeTo(this.substation,i,parseInt(t,10))?{valid:!1,rangeUnderflow:!0}:{}}} > {if(!Array.from(this.resizeSubstationUI.querySelectorAll("mwc-textfield")).every((t=>t.checkValidity())))return;const{dim:[t,e]}=$o(this.substation),[i,n]=[this.substationWidthUI,this.substationHeightUI].map((t=>{var e;return parseInt(null!==(e=t.value)&&void 0!==e?e:"1",10).toString()}));this.resizeSubstationUI.close(),i===t.toString()&&n===e.toString()||this.dispatchEvent(St({element:this.substation,attributes:{[`${this.nsp}:w`]:{namespaceURI:Eo,value:i},[`${this.nsp}:h`]:{namespaceURI:Eo,value:n}}}))}} + @click=${()=>{if(!Array.from(this.resizeSubstationUI.querySelectorAll("mwc-textfield")).every((t=>t.checkValidity())))return;const{dim:[t,e]}=go(this.substation),[i,n]=[this.substationWidthUI,this.substationHeightUI].map((t=>{var e;return parseInt(null!==(e=t.value)&&void 0!==e?e:"1",10).toString()}));this.resizeSubstationUI.close(),i===t.toString()&&n===e.toString()||this.dispatchEvent(St({element:this.substation,attributes:{[`${this.nsp}:w`]:{namespaceURI:so,value:i},[`${this.nsp}:h`]:{namespaceURI:so,value:n}}}))}} >resize cancel -
    `}renderLabel(t){const[e,i]=this.renderedLabelPosition(t),n=t.getAttribute("name"),o="ConductingEquipment"===t.tagName?.45:.6;let r="default",a=j;this.placingLabel===t?a=()=>this.dispatchEvent(new CustomEvent("oscd-sld-place-label",{bubbles:!0,composed:!0,detail:{element:t,x:e,y:i}})):this.placing||this.resizing||(r="move",a=()=>this.dispatchEvent(new CustomEvent("oscd-sld-start-place-label",{bubbles:!0,composed:!0,detail:t})));const d=se(t);return q` - - ${n} - `}renderContainer(t,e=!1){var i,n;const o="VoltageLevel"===t.tagName;if(this.placing===t&&!e)return q``;const[r,a]=this.renderedPosition(t);let d,{dim:[s,l]}=$o(t),c=!1;if(this.resizing===t&&(s=Math.max(1,this.mouseX-r+1),l=Math.max(1,this.mouseY-a+1),this.canResizeTo(t,s,l)?d=()=>{this.dispatchEvent(new CustomEvent("oscd-sld-resize",{bubbles:!0,composed:!0,detail:{w:s,h:l,element:t}}))}:c=!0),this.placing===t){let e;e=o?this.substation:Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel")).find((t=>Vo(t,r,a,s,l))),e&&this.canPlaceAt(t,r,a,s,l)?d=()=>{this.dispatchEvent(Do({x:r,y:a,element:t,parent:e}))}:c=!0}let p=q``,m=q``,h=q``,u=q``;return(this.resizing===t||o&&"Bay"===(null===(i=this.placing)||void 0===i?void 0:i.tagName)||!o&&"ConductingEquipment"===(null===(n=this.placing)||void 0===n?void 0:n.tagName))&&(h=q``),this.resizing&&Co(this.resizing)&&this.resizing.parentElement===t&&(u=q``),this.placing||this.resizing||this.connecting||(p=q` -this.dispatchEvent(Po(t))}> - - - ${ao} - - - `,m=q` -this.dispatchEvent(zo(t))}> - - - ${ro} - - - `),q` +
    `}renderLabel(t){const[e,i]=this.renderedLabelPosition(t),n=t.getAttribute("name"),o="ConductingEquipment"===t.tagName?.45:.6;let r="none",a=j;this.placing||this.resizing||this.connecting||this.placingLabel||(r="all",a=()=>this.dispatchEvent(ko(t)));const d=t.closest("Substation")===this.substation?se(t):j;return q` + {1===e.button&&(this.dispatchEvent(Wo(t)),e.preventDefault())}} + @click=${a} + @contextmenu=${e=>this.openMenu(t,e)} + pointer-events="${r}" fill="#000000" fill-opacity="0.83" + style="font: ${o}px sans-serif; cursor: default;"> + ${n} + + `}renderContainer(t,e=!1){var i,n;const o="VoltageLevel"===t.tagName;if(this.placing===t&&!e)return q``;const[r,a]=this.renderedPosition(t);let d,{dim:[s,l]}=go(t),c=!1;if(this.resizing===t&&(s=Math.max(1,this.mouseX-r+1),l=Math.max(1,this.mouseY-a+1),this.canResizeTo(t,s,l)?d=()=>{this.dispatchEvent(new CustomEvent("oscd-sld-resize",{bubbles:!0,composed:!0,detail:{w:s,h:l,element:t}}))}:c=!0),this.placing===t){let e;e=o?this.substation:Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel")).find((t=>Zo(t,r,a,s,l))),e&&this.canPlaceAt(t,r,a,s,l)?d=()=>{this.dispatchEvent(Eo({x:r,y:a,element:t,parent:e}))}:c=!0}let p=q``,m=q``,h=q``,u=q``;return(this.resizing===t||o&&"Bay"===(null===(i=this.placing)||void 0===i?void 0:i.tagName)||!o&&"ConductingEquipment"===(null===(n=this.placing)||void 0===n?void 0:n.tagName))&&(h=q``),this.resizing&&fo(this.resizing)&&this.resizing.parentElement===t&&(u=q``),this.placing||this.resizing||this.connecting||this.placingLabel||(p=q`this.dispatchEvent($o(e.shiftKey?er(t,this.nsp):t))} + x="${r}" y="${a}"> + + ${To} + `,m=q`this.dispatchEvent(Co(t))} + x="${s+r-1}" y="${l+a-1}"> + + ${No} + `),q` {e.getModifierState("Shift")||(this.menu={element:t,left:e.clientX,top:e.clientY},e.preventDefault())}} + @contextmenu=${e=>this.openMenu(t,e)} @click=${d||j} fill="white" stroke-dasharray="${o?j:"0.18"}" stroke="${c?"#BB1326":o?"#F5E214":"#12579B"}" /> ${p} - ${Array.from(t.children).filter(qo).map((t=>this.renderContainer(t)))} + ${Array.from(t.children).filter(Jo).map((t=>this.renderContainer(t)))} ${Array.from(t.children).filter((t=>"ConductingEquipment"===t.tagName)).map((t=>this.renderEquipment(t)))} ${e?Array.from(t.querySelectorAll("ConnectivityNode")).filter((t=>"grounded"!==t.getAttribute("name"))).map((t=>this.renderConnectivityNode(t))):j} + ${e?Array.from(t.querySelectorAll("Bay, ConductingEquipment")).concat(t).map((t=>this.renderLabel(t))):j} ${h} ${m} ${u} - `}renderEquipment(t,{preview:e=!1,connect:i=!1}={}){var n;if(this.placing===t&&!e)return q``;if((null===(n=this.connecting)||void 0===n?void 0:n.equipment.closest("Substation"))===this.substation&&!i)return q``;const[o,r]=this.renderedPosition(t),{flip:a,rot:d}=$o(t),s=90*d,l=t.getAttribute("type"),c=["CBR","CTR","VTR","DIS","IFL"].includes(l)?l:"ConductingEquipment";let p=()=>{this.dispatchEvent(Po(t))};if(this.placing===t){const e=Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel > Bay")).find((t=>Vo(t,o,r,1,1)));e&&this.canPlaceAt(t,o,r,1,1)&&(p=()=>{this.dispatchEvent(Do({x:o,y:r,element:t,parent:e}))})}const m=Array.from(t.children).filter((t=>"Terminal"===t.tagName)),h=m.find((t=>"T1"===t.getAttribute("name"))),u=m.find((t=>"T1"!==t.getAttribute("name"))),f=h||this.placing||this.resizing||this.connecting?j:q``}renderEquipment(t,{preview:e=!1,connect:i=!1}={}){var n;if(this.placing===t&&!e)return q``;if((null===(n=this.connecting)||void 0===n?void 0:n.equipment.closest("Substation"))===this.substation&&!i)return q``;const[o,r]=this.renderedPosition(t),{flip:a,rot:d}=go(t),s=90*d,l=t.getAttribute("type"),c=mo.has(l),p=po(l)?l:"ConductingEquipment",m=c?q` + ${Ho} + `:q``;let h=e=>{let i=t;e.shiftKey&&(i=er(t,this.nsp)),this.dispatchEvent($o(i))};if(this.placing===t){const e=Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel > Bay")).find((t=>Zo(t,o,r,1,1)));e&&this.canPlaceAt(t,o,r,1,1)&&(h=()=>{this.dispatchEvent(Eo({x:o,y:r,element:t,parent:e}))})}const u=Array.from(t.children).filter((t=>"Terminal"===t.tagName)),f=u.find((t=>"T1"===t.getAttribute("name"))),g=u.find((t=>"T1"!==t.getAttribute("name"))),b=f||this.placing||this.resizing||this.connecting?j:q`this.dispatchEvent(Ho({equipment:t,terminal:"top"}))} - @contextmenu=${e=>{e.getModifierState("Shift")||(e.preventDefault(),this.groundTerminal(t,"T1"))}} - />`,g=!this.connecting||this.connecting.equipment===t||this.connecting&&this.mouseX===o&&this.mouseY===r&&"top"===this.nearestOpenTerminal(t)||h?j:q``,b="grounded"===(null==h?void 0:h.getAttribute("cNodeName"))?q``:j,x=u||this.placing||this.resizing||this.connecting||jo.has(l)?j:q`this.dispatchEvent(Io({equipment:t,terminal:"top"}))} + @contextmenu=${e=>{e.preventDefault(),this.groundTerminal(t,"T1")}} + />`,x=!this.connecting||this.connecting.equipment===t||this.connecting&&this.mouseX===o&&this.mouseY===r&&"top"===this.nearestOpenTerminal(t)||f?j:q``,v="grounded"===(null==f?void 0:f.getAttribute("cNodeName"))?q``:j,y=g||this.placing||this.resizing||this.connecting||Yo.has(l)?j:q`this.dispatchEvent(Ho({equipment:t,terminal:"bottom"}))} - @contextmenu=${e=>{e.getModifierState("Shift")||(e.preventDefault(),this.groundTerminal(t,"T2"))}} - />`,v=!this.connecting||this.connecting.equipment===t||this.connecting&&this.mouseX===o&&this.mouseY===r&&"bottom"===this.nearestOpenTerminal(t)||u||jo.has(l)?j:q``,y="grounded"===(null==u?void 0:u.getAttribute("cNodeName"))?q``:j;return q`this.dispatchEvent(Io({equipment:t,terminal:"bottom"}))} + @contextmenu=${e=>{e.preventDefault(),this.groundTerminal(t,"T2")}} + />`,_=!this.connecting||this.connecting.equipment===t||this.connecting&&this.mouseX===o&&this.mouseY===r&&"bottom"===this.nearestOpenTerminal(t)||g||Yo.has(l)?j:q``,w="grounded"===(null==g?void 0:g.getAttribute("cNodeName"))?q``:j;return q` ${t.getAttribute("name")} - + ${m} + ${c?q``:j} {1===e.button&&(this.dispatchEvent(Fo(t)),e.preventDefault())}} - @contextmenu=${e=>{e.getModifierState("Shift")||(this.menu={element:t,left:e.clientX,top:e.clientY},e.preventDefault())}} + @mousedown=${tr} + @click=${h} + @auxclick=${e=>{1===e.button&&(this.dispatchEvent(Ao(t)),e.preventDefault())}} + @contextmenu=${e=>this.openMenu(t,e)} /> - ${f} - ${g} ${b} ${x} ${v} ${y} - `}renderBusBar(t){const[e,i]=this.renderedPosition(t),{dim:[n,o]}=$o(t);let r=q``;return this.placing===t&&(r=q` + ${e?this.renderLabel(t):j}`}renderBusBar(t){const[e,i]=this.renderedPosition(t),{dim:[n,o]}=go(t);let r=q``;return this.placing===t&&(r=q`{const r=Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel")).find((t=>Vo(t,e,i,n,o)));r&&this.dispatchEvent(Do({x:e,y:i,element:t,parent:r}))}} - />`),q` + @click=${()=>{const r=Array.from(this.substation.querySelectorAll(":root > Substation > VoltageLevel")).find((t=>Zo(t,e,i,n,o)));r&&this.dispatchEvent(Eo({x:e,y:i,element:t,parent:r}))}} + />`),q` ${t.getAttribute("name")} ${this.renderConnectivityNode(t.querySelector("ConnectivityNode"))} ${r} - `}renderConnectivityNode(t){const e=t.querySelector(`Private[type="${wo}"]`);if(!e)return j;const i=[],n=Object.entries(Array.from(e.querySelectorAll("Vertex")).map((t=>this.renderedPosition(t))).reduce(((t,e)=>{const i=t,n=JSON.stringify(e);return i[n]?i[n].count+=1:i[n]={val:e,count:1},i}),{})).filter((([t,{count:e}])=>e>2)).map((([t,{val:e}])=>e));n.forEach((([t,e])=>i.push(q``)));const o=[],r=Array.from(e.getElementsByTagNameNS(Eo,"Section")),a=t.closest("Bay");r.forEach((e=>{const n=Ao(e.getAttribute("bus")),d=Array.from(e.getElementsByTagNameNS(Eo,"Vertex")).map((t=>this.renderedPosition(t)));let s=0;for(;sthis.dispatchEvent(Po(a)),u=({button:t})=>{1===t&&this.dispatchEvent(zo(a))},f=t=>{t.getModifierState("Shift")||(this.menu={element:a,left:t.clientX,top:t.clientY},t.preventDefault())}),n&&this.resizing===a){if(e!==r.find((t=>Ao(t.getAttribute("bus")))))return;i.length=0;const{pos:[t,n],dim:[u,f]}=$o(a.parentElement),g=t+u-.5,b=n+f-.5;if(0===s){Math.max(this.mouseX-l,0)>Math.max(this.mouseY-c,0)?(p=Math.max(l,Math.min(g,this.mouseX+.5)),m=c):(m=Math.max(c,Math.min(b,this.mouseY+.5)),p=l),l===p&&c===m&&(p>=g?m+=1:p+=1)}h=()=>{this.dispatchEvent(Do({parent:e,element:e.getElementsByTagNameNS(Eo,"Vertex")[d.length-1],x:p,y:m}))},o.push(q``}renderConnectivityNode(t){const e=t.querySelector(`Private[type="${ao}"]`);if(!e)return j;const i=[],n=Object.entries(Array.from(e.querySelectorAll("Vertex")).map((t=>this.renderedPosition(t))).reduce(((t,e)=>{const i=t,n=JSON.stringify(e);return i[n]?i[n].count+=1:i[n]={val:e,count:1},i}),{})).filter((([t,{count:e}])=>e>2)).map((([t,{val:e}])=>e));n.forEach((([t,e])=>i.push(q``)));const o=[],r=Array.from(e.getElementsByTagNameNS(so,"Section")),a=t.closest("Bay");r.forEach((e=>{const n=uo(e.getAttribute("bus")),d=Array.from(e.getElementsByTagNameNS(so,"Vertex")).map((t=>this.renderedPosition(t)));let s=0;for(;sthis.dispatchEvent($o(a)),u=({button:t})=>{1===t&&this.dispatchEvent(Co(a))},f=t=>this.openMenu(a,t)),n&&this.resizing===a){if(e!==r.find((t=>uo(t.getAttribute("bus")))))return;i.length=0;const{pos:[t,n],dim:[u,f]}=go(a.parentElement),g=t+u-.5,b=n+f-.5;if(0===s){Math.max(this.mouseX-l,0)>Math.max(this.mouseY-c,0)?(p=Math.max(l,Math.min(g,this.mouseX+.5)),m=c):(m=Math.max(c,Math.min(b,this.mouseY+.5)),p=l),l===p&&c===m&&(p>=g?m+=1:p+=1)}h=()=>{this.dispatchEvent(Eo({parent:e,element:e.getElementsByTagNameNS(so,"Vertex")[d.length-1],x:p,y:m}))},o.push(q``)}this.connecting&&(h=()=>{const{equipment:e,path:i,terminal:n}=this.connecting;if(e.querySelector(`Terminal[connectivityNode="${t.getAttribute("pathName")}"]`))return;const[[o,r],[a,d]]=i.slice(-2),s=o===a,l=this.mouseX+.5,c=this.mouseY+.5,p=s?a:l,m=s?c:d;i[i.length-1]=[p,m],i.push([l,c]),Uo(i),this.dispatchEvent(Oo({equipment:e,terminal:n,path:i,connectTo:t}))}),o.push(q``)}this.connecting&&(h=()=>{const{equipment:e,path:i,terminal:n}=this.connecting;if(e.querySelector(`Terminal[connectivityNode="${t.getAttribute("pathName")}"]`))return;const[[o,r],[a,d]]=i.slice(-2),s=o===a,l=this.mouseX+.5,c=this.mouseY+.5,p=s?a:l,m=s?c:d;i[i.length-1]=[p,m],i.push([l,c]),Qo(i),this.dispatchEvent(So({equipment:e,terminal:n,path:i,connectTo:t}))}),o.push(q``),o.push(q``),[l,c].find((t=>Number.isInteger(t)))||o.push(q``),this.connecting&&![l,c].find((t=>Number.isInteger(t)))&&o.push(q``),[p,m].find((t=>Number.isInteger(t)))||o.push(q``),this.connecting&&![p,m].find((t=>Number.isInteger(t)))&&o.push(q``),s+=1}}));const d=t.parentElement.parentElement?se(t):j;return q` + @contextmenu=${f} @mousedown=${tr} + pointer-events="all" fill="none" />`),s+=1}}));const d=t.closest("Substation")===this.substation?se(t):j;return q` ${t.getAttribute("pathName")} ${i} ${o} - `}};function Wo(){const t=new Array(36);for(let e=0;e<36;e+=1)[8,13,18,23].includes(e)?t[e]="-":t[e]=Math.floor(16*Math.random());return t[14]=4,t[19]&=-5,t[19]|=8,t.map((t=>t.toString(16))).join("")}function Ko(t,e,[i,n],o){const r=t.parentElement,a=[],d=Array.from(t.getElementsByTagNameNS(Eo,"Vertex")),s=d.find((t=>t.getAttributeNS(Eo,"x")===i.toString()&&t.getAttributeNS(Eo,"y")===n.toString()));if(s===d[0]||s===d[d.length-1])return[];const l=t.cloneNode(!0);Array.from(l.getElementsByTagNameNS(Eo,"Vertex")).slice(0,e+1).forEach((t=>t.remove()));const c=d[e].cloneNode();if(c.setAttributeNS(Eo,`${o}:x`,i.toString()),c.setAttributeNS(Eo,`${o}:y`,n.toString()),c.removeAttributeNS(Eo,"uuid"),l.prepend(c),a.push({node:l,parent:r,reference:t.nextElementSibling}),d.slice(e+1).forEach((t=>a.push({node:t}))),!s){const e=c.cloneNode();a.push({node:e,parent:t,reference:null})}return a}Yo.styles=c` + `}};function nr(t,e,[i,n],o){const r=t.parentElement,a=[],d=Array.from(t.getElementsByTagNameNS(so,"Vertex")),s=d.find((t=>t.getAttributeNS(so,"x")===i.toString()&&t.getAttributeNS(so,"y")===n.toString()));if(s===d[0]||s===d[d.length-1])return[];const l=t.cloneNode(!0);Array.from(l.getElementsByTagNameNS(so,"Vertex")).slice(0,e+1).forEach((t=>t.remove()));const c=d[e].cloneNode();if(c.setAttributeNS(so,`${o}:x`,i.toString()),c.setAttributeNS(so,`${o}:y`,n.toString()),c.removeAttributeNS(so,"uuid"),l.prepend(c),a.push({node:l,parent:r,reference:t.nextElementSibling}),d.slice(e+1).forEach((t=>a.push({node:t}))),!s){const e=c.cloneNode();a.push({node:e,parent:t,reference:null})}return a}ir.styles=c` h2 { font-family: Roboto; font-weight: 300; @@ -1353,7 +1570,31 @@ const no=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm --mdc-icon-button-size: 28px; --mdc-icon-size: 24px; } - `,n([ft()],Yo.prototype,"doc",void 0),n([ft()],Yo.prototype,"substation",void 0),n([ft()],Yo.prototype,"editCount",void 0),n([ft()],Yo.prototype,"gridSize",void 0),n([ft()],Yo.prototype,"nsp",void 0),n([ft()],Yo.prototype,"resizing",void 0),n([ft()],Yo.prototype,"placing",void 0),n([ft()],Yo.prototype,"placingLabel",void 0),n([ft()],Yo.prototype,"connecting",void 0),n([vt("#resizeSubstationUI")],Yo.prototype,"resizeSubstationUI",void 0),n([vt("#substationWidthUI")],Yo.prototype,"substationWidthUI",void 0),n([vt("#substationHeightUI")],Yo.prototype,"substationHeightUI",void 0),n([vt("svg#sld")],Yo.prototype,"sld",void 0),n([gt()],Yo.prototype,"mouseX",void 0),n([gt()],Yo.prototype,"mouseY",void 0),n([gt()],Yo.prototype,"mouseX2",void 0),n([gt()],Yo.prototype,"mouseY2",void 0),n([gt()],Yo.prototype,"menu",void 0),Yo=n([mt("sld-editor")],Yo);class Zo extends ct{constructor(){super(...arguments),this.editCount=-1,this.gridSize=32,this.nsp="esld",this.templateElements={},this.handleKeydown=({key:t})=>{"Escape"===t&&this.reset()}}zoomIn(t=4){this.gridSize+=t}zoomOut(t=4){this.gridSize-=t,this.gridSize<4&&(this.gridSize=4)}startResizing(t){this.reset(),this.resizing=t}startPlacing(t){this.reset(),this.placing=t}startPlacingLabel(t){this.reset(),this.placingLabel=t}startConnecting({equipment:t,terminal:e}){this.reset();const{close:i,far:n}=Ro(t)[e];t&&(this.connecting={equipment:t,path:[i,n],terminal:e})}reset(){this.resizing=void 0,this.placing=void 0,this.placingLabel=void 0,this.connecting=void 0}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeydown)}updated(t){if(!t.has("doc"))return;const e=this.doc.documentElement.lookupPrefix(Eo);e?this.nsp=e:(this.doc.documentElement.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:esld",Eo),this.nsp="esld"),["Substation","VoltageLevel","Bay","ConductingEquipment"].forEach((t=>{this.templateElements[t]=this.doc.createElementNS(this.doc.documentElement.namespaceURI,t)})),this.templateElements.BusBar=function(t,e){const i=t.createElementNS(t.documentElement.namespaceURI,"Bay");i.setAttribute("name","BB1"),i.setAttributeNS(Eo,`${e}:w`,"2");const n=t.createElementNS(t.documentElement.namespaceURI,"ConnectivityNode");n.setAttribute("name","L");const o=t.createElementNS(t.documentElement.namespaceURI,"Private");o.setAttribute("type",wo);const r=t.createElementNS(Eo,`${e}:Section`);r.setAttribute("bus","true");const a=t.createElementNS(Eo,`${e}:Vertex`);a.setAttributeNS(Eo,`${e}:x`,"0.5"),a.setAttributeNS(Eo,`${e}:y`,"0.5"),r.appendChild(a);const d=t.createElementNS(Eo,`${e}:Vertex`);return d.setAttributeNS(Eo,`${e}:x`,"1.5"),d.setAttributeNS(Eo,`${e}:y`,"0.5"),r.appendChild(d),o.appendChild(r),n.appendChild(o),i.appendChild(n),i}(this.doc,this.nsp)}rotateElement(t){const{rot:e}=$o(t),i=[{element:t,attributes:{[`${this.nsp}:rot`]:{namespaceURI:Eo,value:((e+1)%4).toString()}}}];"ConductingEquipment"===t.tagName&&Array.from(t.getElementsByTagName("Terminal")).filter((t=>"grounded"!==t.getAttribute("cNodeName"))).forEach((t=>i.push(...Lo(t)))),this.dispatchEvent(St(i))}placeLabel(t,e,i){this.dispatchEvent(St({element:t,attributes:{lx:{namespaceURI:Eo,value:e.toString()},ly:{namespaceURI:Eo,value:i.toString()}}})),this.reset()}placeElement(t,e,i,n){const o=[];t.parentElement!==e&&o.push(...To(t,e));const{pos:[r,a],label:[d,s]}=$o(t),l=i-r,c=n-a;if("Vertex"!==t.localName&&o.push({element:t,attributes:{x:{namespaceURI:Eo,value:i.toString()},y:{namespaceURI:Eo,value:n.toString()},lx:{namespaceURI:Eo,value:(d+l).toString()},ly:{namespaceURI:Eo,value:(s+c).toString()}}}),Array.from(t.querySelectorAll("Bay, ConductingEquipment, Vertex")).forEach((t=>{const{pos:[e,i],label:[n,r]}=$o(t);o.push({element:t,attributes:{x:{namespaceURI:Eo,value:(e+l).toString()},y:{namespaceURI:Eo,value:(i+c).toString()},lx:{namespaceURI:Eo,value:(n+l).toString()},ly:{namespaceURI:Eo,value:(r+c).toString()}}})})),"ConductingEquipment"===t.tagName?Array.from(t.getElementsByTagName("Terminal")).filter((t=>"grounded"!==t.getAttribute("cNodeName"))).forEach((t=>o.push(...Lo(t)))):(Array.from(t.getElementsByTagName("ConnectivityNode")).forEach((e=>{Array.from(this.doc.querySelectorAll(`Terminal[connectivityNode="${e.getAttribute("pathName")}"]`)).find((e=>e.closest(t.tagName)!==t))&&o.push(...Io(e))})),Array.from(t.getElementsByTagName("Terminal")).forEach((e=>{const i=this.doc.querySelector(`ConnectivityNode[pathName="${e.getAttribute("connectivityNode")}"]`);i&&i.closest(t.tagName)!==t&&o.push(...Io(i))}))),"Vertex"===t.localName){const e=t.closest("Bay"),r=Array.from(e.querySelectorAll("Section[bus]")),a=r[0],d=a.querySelector("Vertex"),s=r[r.length-1].querySelector("Vertex:last-of-type"),{pos:[l,c]}=$o(d),p=i-l+1,m=n-c+1;Co(e)&&(o.push(...Io(a.closest("ConnectivityNode"))),o.push({element:s,attributes:{x:{namespaceURI:Eo,value:i.toString()},y:{namespaceURI:Eo,value:n.toString()}}}),o.push({element:e,attributes:{w:{namespaceURI:Eo,value:p.toString()},h:{namespaceURI:Eo,value:m.toString()}}}))}this.dispatchEvent(St(o)),!["Bay","VoltageLevel"].includes(t.tagName)||t.hasAttributeNS(Eo,"w")&&t.hasAttributeNS(Eo,"h")?this.reset():this.startResizing(t)}connectEquipment({equipment:t,terminal:e,connectTo:i,toTerminal:n,path:o}){var r,a;const d=[];let s,l,c,p;if("ConnectivityNode"!==i.tagName){s=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"ConnectivityNode"),s.setAttribute("name","L1");const e=t.closest("Bay");d.push(...To(s,e)),l=d.find((t=>"attributes"in t&&"pathName"in t.attributes)).attributes.pathName,c=null!==(a=null===(r=d.find((t=>"attributes"in t&&"name"in t.attributes)))||void 0===r?void 0:r.attributes.name)&&void 0!==a?a:s.getAttribute("name"),p=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Private"),p.setAttribute("type",wo),d.push({parent:s,node:p,reference:te(s,"Private")})}else s=i,l=s.getAttribute("pathName"),c=s.getAttribute("name"),p=s.querySelector(`Private[type="${wo}"]`);const m=this.doc.createElementNS(Eo,`${this.nsp}:Section`);d.push({parent:p,node:m,reference:null});const h=Wo(),u=Wo();if(o.forEach((([t,e],n)=>{const r=this.doc.createElementNS(Eo,`${this.nsp}:Vertex`);r.setAttributeNS(Eo,`${this.nsp}:x`,t.toString()),r.setAttributeNS(Eo,`${this.nsp}:y`,e.toString()),0===n?r.setAttributeNS(Eo,`${this.nsp}:uuid`,h):n===o.length-1&&"ConnectivityNode"!==i.tagName&&r.setAttributeNS(Eo,`${this.nsp}:uuid`,u),d.push({parent:m,node:r,reference:null})})),"ConnectivityNode"===i.tagName){const[t,e]=o[o.length-1];Array.from(p.getElementsByTagNameNS(Eo,"Section")).find((i=>{const n=Array.from(i.getElementsByTagNameNS(Eo,"Vertex")).map((t=>$o(t).pos));for(let o=0;o + + .hidden { + display: none; + } + svg:not(:hover) ~ .coordinates { + display: none; + } + .coordinates { + position: fixed; + pointer-events: none; + font-size: 16px; + font-family: 'Roboto', sans-serif; + padding: 8px; + border-radius: 16px; + background: #fffd; + color: rgb(0, 0, 0 / 0.83); + } + .coordinates.invalid { + color: #bb1326; + } + + * { + user-select: none; + } + `,n([ft()],ir.prototype,"doc",void 0),n([ft()],ir.prototype,"substation",void 0),n([ft()],ir.prototype,"editCount",void 0),n([ft()],ir.prototype,"gridSize",void 0),n([ft()],ir.prototype,"nsp",void 0),n([ft()],ir.prototype,"resizing",void 0),n([ft()],ir.prototype,"placing",void 0),n([ft()],ir.prototype,"placingLabel",void 0),n([ft()],ir.prototype,"connecting",void 0),n([vt("#resizeSubstationUI")],ir.prototype,"resizeSubstationUI",void 0),n([vt("#substationWidthUI")],ir.prototype,"substationWidthUI",void 0),n([vt("#substationHeightUI")],ir.prototype,"substationHeightUI",void 0),n([vt("svg#sld")],ir.prototype,"sld",void 0),n([gt()],ir.prototype,"mouseX",void 0),n([gt()],ir.prototype,"mouseY",void 0),n([gt()],ir.prototype,"mouseX2",void 0),n([gt()],ir.prototype,"mouseY2",void 0),n([gt()],ir.prototype,"menu",void 0),ir=n([mt("sld-editor")],ir);class or extends ct{constructor(){super(...arguments),this._editCount=-1,this.gridSize=32,this.nsp="esld",this.templateElements={},this.handleKeydown=({key:t})=>{"Escape"===t&&this.reset()}}get editCount(){return this._editCount}set editCount(t){var e,i;this.connecting=void 0,(null===(e=this.resizing)||void 0===e?void 0:e.parentElement)||(this.resizing=void 0),(null===(i=this.placingLabel)||void 0===i?void 0:i.parentElement)||(this.placingLabel=void 0),this._editCount=t}zoomIn(t=4){this.gridSize+=t}zoomOut(t=4){this.gridSize-=t,this.gridSize<4&&(this.gridSize=4)}startResizing(t){this.reset(),this.resizing=t}startPlacing(t){this.reset(),this.placing=t}startPlacingLabel(t){this.reset(),this.placingLabel=t}startConnecting({equipment:t,terminal:e}){this.reset();const{close:i,far:n}=wo(t)[e];t&&(this.connecting={equipment:t,path:[i,n],terminal:e})}reset(){this.resizing=void 0,this.placing=void 0,this.placingLabel=void 0,this.connecting=void 0}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeydown)}updated(t){if(!t.has("doc"))return;const e=this.doc.documentElement.lookupPrefix(so);e?this.nsp=e:(this.doc.documentElement.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:esld",so),this.nsp="esld"),["Substation","VoltageLevel","Bay","ConductingEquipment"].forEach((t=>{this.templateElements[t]=this.doc.createElementNS(this.doc.documentElement.namespaceURI,t)})),this.templateElements.BusBar=function(t,e){const i=t.createElementNS(t.documentElement.namespaceURI,"Bay");i.setAttribute("name","BB1"),i.setAttributeNS(so,`${e}:w`,"2");const n=t.createElementNS(t.documentElement.namespaceURI,"ConnectivityNode");n.setAttribute("name","L");const o=t.createElementNS(t.documentElement.namespaceURI,"Private");o.setAttribute("type",ao);const r=t.createElementNS(so,`${e}:Section`);r.setAttribute("bus","true");const a=t.createElementNS(so,`${e}:Vertex`);a.setAttributeNS(so,`${e}:x`,"0.5"),a.setAttributeNS(so,`${e}:y`,"0.5"),r.appendChild(a);const d=t.createElementNS(so,`${e}:Vertex`);return d.setAttributeNS(so,`${e}:x`,"1.5"),d.setAttributeNS(so,`${e}:y`,"0.5"),r.appendChild(d),o.appendChild(r),n.appendChild(o),i.appendChild(n),i}(this.doc,this.nsp)}rotateElement(t){const{rot:e}=go(t),i=[{element:t,attributes:{[`${this.nsp}:rot`]:{namespaceURI:so,value:((e+1)%4).toString()}}}];"ConductingEquipment"===t.tagName&&Array.from(t.getElementsByTagName("Terminal")).filter((t=>"grounded"!==t.getAttribute("cNodeName"))).forEach((t=>i.push(..._o(t)))),this.dispatchEvent(St(i))}placeLabel(t,e,i){this.dispatchEvent(St({element:t,attributes:{lx:{namespaceURI:so,value:e.toString()},ly:{namespaceURI:so,value:i.toString()}}})),this.reset()}placeElement(t,e,i,n){const o=[];t.parentElement!==e&&o.push(...yo(t,e));const{pos:[r,a],label:[d,s],rot:l}=go(t),c=i-r,p=n-a;if("Vertex"!==t.localName){let e=d,r=s;"ConductingEquipment"!==t.tagName||t.hasAttributeNS(so,"lx")||l%2!=0||(e+=1,r+=1),o.push({element:t,attributes:{x:{namespaceURI:so,value:i.toString()},y:{namespaceURI:so,value:n.toString()},lx:{namespaceURI:so,value:(e+c).toString()},ly:{namespaceURI:so,value:(r+p).toString()}}})}if(Array.from(t.querySelectorAll("Bay, ConductingEquipment, Vertex")).forEach((t=>{const{pos:[e,i],label:[n,r]}=go(t),a={x:{namespaceURI:so,value:(e+c).toString()},y:{namespaceURI:so,value:(i+p).toString()}};"Vertex"!==t.localName&&(a.lx={namespaceURI:so,value:(n+c).toString()},a.ly={namespaceURI:so,value:(r+p).toString()}),o.push({element:t,attributes:a})})),"ConductingEquipment"===t.tagName?Array.from(t.getElementsByTagName("Terminal")).filter((t=>"grounded"!==t.getAttribute("cNodeName"))).forEach((t=>o.push(..._o(t)))):t.getRootNode()===this.doc&&(Array.from(t.getElementsByTagName("ConnectivityNode")).forEach((e=>{Array.from(this.doc.querySelectorAll(`Terminal[connectivityNode="${e.getAttribute("pathName")}"]`)).find((e=>e.closest(t.tagName)!==t))&&o.push(...bo(e))})),Array.from(t.getElementsByTagName("Terminal")).forEach((e=>{const i=this.doc.querySelector(`ConnectivityNode[pathName="${e.getAttribute("connectivityNode")}"]`);i&&i.closest(t.tagName)!==t&&o.push(...bo(i))}))),"Vertex"===t.localName){const e=t.closest("Bay"),r=Array.from(e.querySelectorAll("Section[bus]")),a=r[0],d=a.querySelector("Vertex"),s=r[r.length-1].querySelector("Vertex:last-of-type"),{pos:[l,c]}=go(d),p=i-l+1,m=n-c+1;fo(e)&&(o.push(...bo(a.closest("ConnectivityNode"))),o.push({element:s,attributes:{x:{namespaceURI:so,value:i.toString()},y:{namespaceURI:so,value:n.toString()}}}),o.push({element:e,attributes:{w:{namespaceURI:so,value:p.toString()},h:{namespaceURI:so,value:m.toString()}}}))}this.dispatchEvent(St(o)),!["Bay","VoltageLevel"].includes(t.tagName)||t.hasAttributeNS(so,"w")&&t.hasAttributeNS(so,"h")?this.reset():this.startResizing(t)}connectEquipment({equipment:t,terminal:e,connectTo:i,toTerminal:n,path:o}){var r,a;const d=[];let s,l,c,p;if("ConnectivityNode"!==i.tagName){s=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"ConnectivityNode"),s.setAttribute("name","L1");const e=t.closest("Bay");d.push(...yo(s,e)),l=d.find((t=>"attributes"in t&&"pathName"in t.attributes)).attributes.pathName,c=null!==(a=null===(r=d.find((t=>"attributes"in t&&"name"in t.attributes)))||void 0===r?void 0:r.attributes.name)&&void 0!==a?a:s.getAttribute("name"),p=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Private"),p.setAttribute("type",ao),d.push({parent:s,node:p,reference:te(s,"Private")})}else s=i,l=s.getAttribute("pathName"),c=s.getAttribute("name"),p=s.querySelector(`Private[type="${ao}"]`);const m=this.doc.createElementNS(so,`${this.nsp}:Section`);d.push({parent:p,node:m,reference:null});const h=ho(),u=ho();if(o.forEach((([t,e],n)=>{const r=this.doc.createElementNS(so,`${this.nsp}:Vertex`);r.setAttributeNS(so,`${this.nsp}:x`,t.toString()),r.setAttributeNS(so,`${this.nsp}:y`,e.toString()),0===n?r.setAttributeNS(so,`${this.nsp}:uuid`,h):n===o.length-1&&"ConnectivityNode"!==i.tagName&&r.setAttributeNS(so,`${this.nsp}:uuid`,u),d.push({parent:m,node:r,reference:null})})),"ConnectivityNode"===i.tagName){const[t,e]=o[o.length-1];Array.from(p.getElementsByTagNameNS(so,"Section")).find((i=>{const n=Array.from(i.getElementsByTagNameNS(so,"Vertex")).map((t=>go(t).pos));for(let o=0;o ${Array.from(this.doc.querySelectorAll(":root > Substation")).map((t=>U`{this.startPlacing(t)}} @oscd-sld-start-place-label=${({detail:t})=>{this.startPlacingLabel(t)}} @oscd-sld-start-connect=${({detail:t})=>{this.startConnecting(t)}} - @oscd-sld-resize=${({detail:{element:t,w:e,h:i}})=>{this.dispatchEvent(St({element:t,attributes:{w:{namespaceURI:Eo,value:e.toString()},h:{namespaceURI:Eo,value:i.toString()}}})),this.reset()}} + @oscd-sld-resize=${({detail:{element:t,w:e,h:i}})=>{this.dispatchEvent(St({element:t,attributes:{w:{namespaceURI:so,value:e.toString()},h:{namespaceURI:so,value:i.toString()}}})),this.reset()}} @oscd-sld-place=${({detail:{element:t,parent:e,x:i,y:n}})=>this.placeElement(t,e,i,n)} @oscd-sld-place-label=${({detail:{element:t,x:e,y:i}})=>this.placeLabel(t,e,i)} @oscd-sld-connect=${({detail:t})=>this.connectEquipment(t)} @oscd-sld-rotate=${({detail:t})=>this.rotateElement(t)} >`))} - `:U`

    Please open an SCL document

    `}insertSubstation(){const t=this.doc.documentElement,e=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Substation"),i=te(t,"Substation");let n=1;for(;this.doc.querySelector(`:root > Substation[name="S${n}"]`);)n+=1;e.setAttribute("name",`S${n}`),e.setAttributeNS(Eo,`${this.nsp}:w`,"50"),e.setAttributeNS(Eo,`${this.nsp}:h`,"25"),this.dispatchEvent(St({parent:t,node:e,reference:i}))}}Zo.styles=c` + `:U`

    Please open an SCL document

    `}insertSubstation(){const t=this.doc.documentElement,e=this.doc.createElementNS(this.doc.documentElement.namespaceURI,"Substation"),i=te(t,"Substation");let n=1;for(;this.doc.querySelector(`:root > Substation[name="S${n}"]`);)n+=1;e.setAttribute("name",`S${n}`),e.setAttributeNS(so,`${this.nsp}:w`,"50"),e.setAttributeNS(so,`${this.nsp}:h`,"25"),this.dispatchEvent(St({parent:t,node:e,reference:i}))}}or.styles=c` main { padding: 16px; } @@ -1447,9 +1689,12 @@ const no=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm } nav { + user-select: none; position: fixed; bottom: 4px; left: 4px; + background: #fffd; + border-radius: 24px; } - `,n([ft()],Zo.prototype,"doc",void 0),n([ft()],Zo.prototype,"editCount",void 0),n([gt()],Zo.prototype,"gridSize",void 0),n([gt()],Zo.prototype,"nsp",void 0),n([gt()],Zo.prototype,"templateElements",void 0),n([gt()],Zo.prototype,"resizing",void 0),n([gt()],Zo.prototype,"placing",void 0),n([gt()],Zo.prototype,"placingLabel",void 0),n([gt()],Zo.prototype,"connecting",void 0);export{Zo as default}; + `,n([ft()],or.prototype,"doc",void 0),n([ft()],or.prototype,"editCount",null),n([gt()],or.prototype,"_editCount",void 0),n([gt()],or.prototype,"gridSize",void 0),n([gt()],or.prototype,"nsp",void 0),n([gt()],or.prototype,"templateElements",void 0),n([gt()],or.prototype,"resizing",void 0),n([gt()],or.prototype,"placing",void 0),n([gt()],or.prototype,"placingLabel",void 0),n([gt()],or.prototype,"connecting",void 0);export{or as default}; //# sourceMappingURL=oscd-designer.js.map diff --git a/plugins/oscd-designer/oscd-designer.js.map b/plugins/oscd-designer/oscd-designer.js.map index ce0cdfb..ef90b82 100644 --- a/plugins/oscd-designer/oscd-designer.js.map +++ b/plugins/oscd-designer/oscd-designer.js.map @@ -1 +1 @@ -{"version":3,"file":"oscd-designer.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/event-options.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/query-async.js","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js","../node_modules/@openscd/open-scd-core/dist/foundation/edit-event.js","../node_modules/@openscd/oscd-scl/dist/utils/tags.js","../node_modules/@openscd/oscd-scl/dist/utils/identity.js","../node_modules/@material/mwc-icon/mwc-icon-host.css.js","../node_modules/@material/mwc-icon/mwc-icon.js","../node_modules/@material/dom/ponyfill.js","../node_modules/@material/mwc-base/utils.js","../node_modules/@material/mwc-base/base-element.js","../node_modules/@material/base/foundation.js","../node_modules/@material/ripple/constants.js","../node_modules/@material/ripple/foundation.js","../node_modules/@material/ripple/util.js","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/class-map.js","../node_modules/lit-html/directives/style-map.js","../node_modules/@material/mwc-ripple/mwc-ripple-base.js","../node_modules/@material/mwc-ripple/mwc-ripple.css.js","../node_modules/@material/mwc-ripple/mwc-ripple.js","../node_modules/@material/mwc-base/aria-property.js","../node_modules/@material/mwc-ripple/ripple-handlers.js","../node_modules/lit-html/directives/if-defined.js","../node_modules/@material/mwc-button/mwc-button-base.js","../node_modules/@material/mwc-button/styles.css.js","../node_modules/@material/mwc-button/mwc-button.js","../node_modules/@material/mwc-fab/mwc-fab-base.js","../node_modules/@material/mwc-fab/mwc-fab.css.js","../node_modules/@material/mwc-fab/mwc-fab.js","../node_modules/@material/mwc-icon-button/mwc-icon-button-base.js","../node_modules/@material/mwc-icon-button/mwc-icon-button.css.js","../node_modules/@material/mwc-icon-button/mwc-icon-button.js","../node_modules/lit-html/directive-helpers.js","../node_modules/lit-html/async-directive.js","../node_modules/lit-html/directives/ref.js","../node_modules/blocking-elements/dist/blocking-elements.js","../node_modules/wicg-inert/dist/inert.esm.js","../node_modules/@material/dialog/constants.js","../node_modules/@material/dialog/foundation.js","../node_modules/@material/animation/animationframe.js","../node_modules/@material/dom/events.js","../node_modules/@material/mwc-base/observer.js","../node_modules/@material/mwc-dialog/mwc-dialog-base.js","../node_modules/@material/mwc-dialog/mwc-dialog.css.js","../node_modules/@material/mwc-dialog/mwc-dialog.js","../node_modules/@material/mwc-list/mwc-list-item-base.js","../node_modules/@material/mwc-list/mwc-list-item.css.js","../node_modules/@material/mwc-list/mwc-list-item.js","../node_modules/@material/dom/keyboard.js","../node_modules/@material/list/constants.js","../node_modules/@material/mwc-list/mwc-list-foundation.js","../node_modules/@material/mwc-list/mwc-list-base.js","../node_modules/@material/mwc-list/mwc-list.css.js","../node_modules/@material/mwc-list/mwc-list.js","../node_modules/@material/notched-outline/constants.js","../node_modules/@material/notched-outline/foundation.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline-base.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline.css.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline.js","../node_modules/@material/mwc-base/form-element.js","../node_modules/@material/floating-label/constants.js","../node_modules/@material/floating-label/foundation.js","../node_modules/@material/mwc-floating-label/mwc-floating-label-directive.js","../node_modules/@material/line-ripple/constants.js","../node_modules/@material/line-ripple/foundation.js","../node_modules/@material/mwc-line-ripple/mwc-line-ripple-directive.js","../node_modules/@material/textfield/constants.js","../node_modules/@material/textfield/foundation.js","../node_modules/lit-html/directives/live.js","../node_modules/@material/mwc-textfield/mwc-textfield-base.js","../node_modules/@material/mwc-textfield/mwc-textfield.css.js","../node_modules/@material/mwc-textfield/mwc-textfield.js","../../icons.ts","../../util.ts","../../sld-editor.ts","../../oscd-designer.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement(\"style\"),o=t.litNonce;void 0!==o&&n.setAttribute(\"nonce\",o),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window,r=e.trustedTypes,h=r?r.emptyScript:\"\",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n,reflect:!1,hasChanged:a},d=\"finalized\";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:\"open\"},null==o||o({ReactiveElement:u}),(null!==(s=e.reactiveElementVersions)&&void 0!==s?s:e.reactiveElementVersions=[]).push(\"1.6.3\");export{u as ReactiveElement,n as defaultConverter,a as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,u=()=>r.createComment(\"\"),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?\"\":\"\",u=f;for(let i=0;i\"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w)}return[P(t,r+(t[s]||\"\")+(2===i?\"\":\"\")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{j as _$LH,x as html,T as noChange,A as nothing,D as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.3.3\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=e=>n=>\"function\"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return{kind:t,elements:s,finisher(n){customElements.define(e,n)}}})(e,n);export{e as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}},e=(i,e,n)=>{e.constructor.createProperty(n,i)};function n(n){return(t,o)=>void 0!==o?e(n,t,o):i(n,t)}export{n as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:\"method\",placement:\"prototype\",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:\"method\",placement:\"prototype\",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};\n//# sourceMappingURL=base.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({finisher:(r,t)=>{Object.assign(r.prototype[t],e)}})}export{e as eventOptions};\n//# sourceMappingURL=event-options.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n=\"symbol\"==typeof o?Symbol():\"__\"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};\n//# sourceMappingURL=query.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction e(e){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}export{e as queryAsync};\n//# sourceMappingURL=query-async.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import{decorateProperty as e}from\"./base.js\";import{queryAssignedElements as t}from\"./query-assigned-elements.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o,n,r){let l,s=o;return\"object\"==typeof o?(s=o.slot,l=o):l={flatten:n},r?t({slot:s,flatten:n,selector:r}):e({descriptor:e=>({get(){var e,t;const o=\"slot\"+(s?`[name=${s}]`:\":not([name])\"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes};\n//# sourceMappingURL=query-assigned-nodes.js.map\n","export function isComplex(edit) {\n return edit instanceof Array;\n}\nexport function isInsert(edit) {\n return edit.parent !== undefined;\n}\nexport function isNamespaced(value) {\n return value !== null && typeof value !== 'string';\n}\nexport function isUpdate(edit) {\n return edit.element !== undefined;\n}\nexport function isRemove(edit) {\n return (edit.parent === undefined && edit.node !== undefined);\n}\nexport function newEditEvent(edit) {\n return new CustomEvent('oscd-edit', {\n composed: true,\n bubbles: true,\n detail: edit,\n });\n}\n/** EDIT HANDLING */\nfunction localAttributeName(attribute) {\n return attribute.includes(':') ? attribute.split(':', 2)[1] : attribute;\n}\nfunction handleInsert({ parent, node, reference, }) {\n try {\n const { parentNode, nextSibling } = node;\n parent.insertBefore(node, reference);\n if (parentNode)\n return {\n node,\n parent: parentNode,\n reference: nextSibling,\n };\n return { node };\n }\n catch (e) {\n // do nothing if insert doesn't work on these nodes\n return [];\n }\n}\nfunction handleUpdate({ element, attributes }) {\n const oldAttributes = { ...attributes };\n Object.entries(attributes)\n .reverse()\n .forEach(([name, value]) => {\n var _a;\n let oldAttribute;\n if (isNamespaced(value))\n oldAttribute = {\n value: element.getAttributeNS(value.namespaceURI, localAttributeName(name)),\n namespaceURI: value.namespaceURI,\n };\n else\n oldAttribute = ((_a = element.getAttributeNode(name)) === null || _a === void 0 ? void 0 : _a.namespaceURI)\n ? {\n value: element.getAttribute(name),\n namespaceURI: element.getAttributeNode(name).namespaceURI,\n }\n : element.getAttribute(name);\n oldAttributes[name] = oldAttribute;\n });\n for (const entry of Object.entries(attributes)) {\n try {\n const [attribute, value] = entry;\n if (isNamespaced(value)) {\n if (value.value === null)\n element.removeAttributeNS(value.namespaceURI, localAttributeName(attribute));\n else\n element.setAttributeNS(value.namespaceURI, attribute, value.value);\n }\n else if (value === null)\n element.removeAttribute(attribute);\n else\n element.setAttribute(attribute, value);\n }\n catch (e) {\n // do nothing if update doesn't work on this attribute\n delete oldAttributes[entry[0]];\n }\n }\n return {\n element,\n attributes: oldAttributes,\n };\n}\nfunction handleRemove({ node }) {\n var _a;\n const { parentNode: parent, nextSibling: reference } = node;\n (_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);\n if (parent)\n return {\n node,\n parent,\n reference,\n };\n return [];\n}\nexport function handleEdit(edit) {\n if (isInsert(edit))\n return handleInsert(edit);\n if (isUpdate(edit))\n return handleUpdate(edit);\n if (isRemove(edit))\n return handleRemove(edit);\n if (isComplex(edit))\n return edit.map(handleEdit).reverse();\n return [];\n}\n//# sourceMappingURL=edit-event.js.map","const tAbstractConductingEquipment = [\n 'TransformerWinding',\n 'ConductingEquipment',\n];\nconst tEquipment = [\n 'GeneralEquipment',\n 'PowerTransformer',\n ...tAbstractConductingEquipment,\n];\nconst tEquipmentContainer = ['Substation', 'VoltageLevel', 'Bay'];\nconst tGeneralEquipmentContainer = ['Process', 'Line'];\nconst tAbstractEqFuncSubFunc = ['EqSubFunction', 'EqFunction'];\nconst tPowerSystemResource = [\n 'SubFunction',\n 'Function',\n 'TapChanger',\n 'SubEquipment',\n ...tEquipment,\n ...tEquipmentContainer,\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n];\nconst tLNodeContainer = ['ConnectivityNode', ...tPowerSystemResource];\nconst tCertificate = ['GOOSESecurity', 'SMVSecurity'];\nconst tNaming = ['SubNetwork', ...tCertificate, ...tLNodeContainer];\nconst tAbstractDataAttribute = ['BDA', 'DA'];\nconst tControlWithIEDName = ['SampledValueControl', 'GSEControl'];\nconst tControlWithTriggerOpt = ['LogControl', 'ReportControl'];\nconst tControl = [...tControlWithIEDName, ...tControlWithTriggerOpt];\nconst tControlBlock = ['GSE', 'SMV'];\nconst tUnNaming = [\n 'ConnectedAP',\n 'PhysConn',\n 'SDO',\n 'DO',\n 'DAI',\n 'SDI',\n 'DOI',\n 'Inputs',\n 'RptEnabled',\n 'Server',\n 'ServerAt',\n 'SettingControl',\n 'Communication',\n 'Log',\n 'LDevice',\n 'DataSet',\n 'AccessPoint',\n 'IED',\n 'NeutralPoint',\n ...tControl,\n ...tControlBlock,\n ...tAbstractDataAttribute,\n];\nconst tAnyLN = ['LN0', 'LN'];\nconst tAnyContentFromOtherNamespace = [\n 'Text',\n 'Private',\n 'Hitem',\n 'AccessControl',\n];\nconst tCert = ['Subject', 'IssuerName'];\nconst tDurationInMilliSec = ['MinTime', 'MaxTime'];\nconst tIDNaming = ['LNodeType', 'DOType', 'DAType', 'EnumType'];\nconst tServiceYesNo = [\n 'FileHandling',\n 'TimeSyncProt',\n 'CommProt',\n 'SGEdit',\n 'ConfSG',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'GetCBValues',\n 'GSEDir',\n 'ConfLdName',\n];\nconst tServiceWithMaxAndMaxAttributes = ['DynDataSet', 'ConfDataSet'];\nconst tServiceWithMax = [\n 'GSSE',\n 'GOOSE',\n 'ConfReportControl',\n 'SMVsc',\n ...tServiceWithMaxAndMaxAttributes,\n];\nconst tServiceWithMaxNonZero = ['ConfLogControl', 'ConfSigRef'];\nconst tServiceSettings = [\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n];\nconst tBaseElement = ['SCL', ...tNaming, ...tUnNaming, ...tIDNaming];\nconst sCLTags = [\n ...tBaseElement,\n ...tAnyContentFromOtherNamespace,\n 'Header',\n 'LNode',\n 'Val',\n 'Voltage',\n 'Services',\n ...tCert,\n ...tDurationInMilliSec,\n 'Association',\n 'FCDA',\n 'ClientLN',\n 'IEDName',\n 'ExtRef',\n 'Protocol',\n ...tAnyLN,\n ...tServiceYesNo,\n 'DynAssociation',\n 'SettingGroups',\n ...tServiceWithMax,\n ...tServiceWithMaxNonZero,\n ...tServiceSettings,\n 'ConfLNs',\n 'ClientServices',\n 'SupSubscription',\n 'ValueHandling',\n 'RedProt',\n 'McSecurity',\n 'KDC',\n 'Address',\n 'P',\n 'ProtNs',\n 'EnumVal',\n 'Terminal',\n 'BitRate',\n 'Authentication',\n 'DataTypeTemplates',\n 'History',\n 'OptFields',\n 'SmvOpts',\n 'TrgOps',\n 'SamplesPerSec',\n 'SmpRate',\n 'SecPerSamples',\n];\nconst tBaseNameSequence = ['Text', 'Private'];\nconst tNamingSequence = [...tBaseNameSequence];\nconst tUnNamingSequence = [...tBaseNameSequence];\nconst tIDNamingSequence = [...tBaseNameSequence];\nconst tAbstractDataAttributeSequence = [...tUnNamingSequence, 'Val'];\nconst tLNodeContainerSequence = [...tNamingSequence, 'LNode'];\nconst tPowerSystemResourceSequence = [...tLNodeContainerSequence];\nconst tEquipmentSequence = [...tPowerSystemResourceSequence];\nconst tEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'PowerTransformer',\n 'GeneralEquipment',\n];\nconst tAbstractConductingEquipmentSequence = [\n ...tEquipmentSequence,\n 'Terminal',\n];\nconst tControlBlockSequence = [...tUnNamingSequence, 'Address'];\nconst tControlSequence = [...tNamingSequence];\nconst tControlWithIEDNameSequence = [...tControlSequence, 'IEDName'];\nconst tAnyLNSequence = [\n ...tUnNamingSequence,\n 'DataSet',\n 'ReportControl',\n 'LogControl',\n 'DOI',\n 'Inputs',\n 'Log',\n];\nconst tGeneralEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'Function',\n];\nconst tControlWithTriggerOptSequence = [...tControlSequence, 'TrgOps'];\nconst tAbstractEqFuncSubFuncSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'EqSubFunction',\n];\nconst tags = {\n AccessControl: {\n parents: ['LDevice'],\n children: [],\n },\n AccessPoint: {\n parents: ['IED'],\n children: [\n ...tNamingSequence,\n 'Server',\n 'LN',\n 'ServerAt',\n 'Services',\n 'GOOSESecurity',\n 'SMVSecurity',\n ],\n },\n Address: {\n parents: ['ConnectedAP', 'GSE', 'SMV'],\n children: ['P'],\n },\n Association: {\n parents: ['Server'],\n children: [],\n },\n Authentication: {\n parents: ['Server'],\n children: [],\n },\n BDA: {\n parents: ['DAType'],\n children: [...tAbstractDataAttributeSequence],\n },\n BitRate: {\n parents: ['SubNetwork'],\n children: [],\n },\n Bay: {\n parents: ['VoltageLevel'],\n children: [\n ...tEquipmentContainerSequence,\n 'ConductingEquipment',\n 'ConnectivityNode',\n 'Function',\n ],\n },\n ClientLN: {\n parents: ['RptEnabled'],\n children: [],\n },\n ClientServices: {\n parents: ['Services'],\n children: ['TimeSyncProt', 'McSecurity'],\n },\n CommProt: {\n parents: ['Services'],\n children: [],\n },\n Communication: {\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'SubNetwork'],\n },\n ConductingEquipment: {\n parents: ['Process', 'Line', 'SubFunction', 'Function', 'Bay'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n ConfDataSet: {\n parents: ['Services'],\n children: [],\n },\n ConfLdName: {\n parents: ['Services'],\n children: [],\n },\n ConfLNs: {\n parents: ['Services'],\n children: [],\n },\n ConfLogControl: {\n parents: ['Services'],\n children: [],\n },\n ConfReportControl: {\n parents: ['Services'],\n children: [],\n },\n ConfSG: {\n parents: ['SettingGroups'],\n children: [],\n },\n ConfSigRef: {\n parents: ['Services'],\n children: [],\n },\n ConnectedAP: {\n parents: ['SubNetwork'],\n children: [...tUnNamingSequence, 'Address', 'GSE', 'SMV', 'PhysConn'],\n },\n ConnectivityNode: {\n parents: ['Bay', 'Line'],\n children: [...tLNodeContainerSequence],\n },\n DA: {\n parents: ['DOType'],\n children: [...tAbstractDataAttributeSequence],\n },\n DAI: {\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'Val'],\n },\n DAType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'BDA', 'ProtNs'],\n },\n DO: {\n parents: ['LNodeType'],\n children: [...tUnNamingSequence],\n },\n DOI: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n DOType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'SDO', 'DA'],\n },\n DataObjectDirectory: {\n parents: ['Services'],\n children: [],\n },\n DataSet: {\n parents: [...tAnyLN],\n children: [...tNamingSequence, 'FCDA'],\n },\n DataSetDirectory: {\n parents: ['Services'],\n children: [],\n },\n DataTypeTemplates: {\n parents: ['SCL'],\n children: ['LNodeType', 'DOType', 'DAType', 'EnumType'],\n },\n DynAssociation: {\n parents: ['Services'],\n children: [],\n },\n DynDataSet: {\n parents: ['Services'],\n children: [],\n },\n EnumType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'EnumVal'],\n },\n EnumVal: {\n parents: ['EnumType'],\n children: [],\n },\n EqFunction: {\n parents: [\n 'GeneralEquipment',\n 'TapChanger',\n 'TransformerWinding',\n 'PowerTransformer',\n 'SubEquipment',\n 'ConductingEquipment',\n ],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n EqSubFunction: {\n parents: ['EqSubFunction', 'EqFunction'],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n ExtRef: {\n parents: ['Inputs'],\n children: [],\n },\n FCDA: {\n parents: ['DataSet'],\n children: [],\n },\n FileHandling: {\n parents: ['Services'],\n children: [],\n },\n Function: {\n parents: ['Bay', 'VoltageLevel', 'Substation', 'Process', 'Line'],\n children: [\n ...tPowerSystemResourceSequence,\n 'SubFunction',\n 'GeneralEquipment',\n 'ConductingEquipment',\n ],\n },\n GeneralEquipment: {\n parents: [\n 'SubFunction',\n 'Function',\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n ...tEquipmentContainer,\n ],\n children: [...tEquipmentSequence, 'EqFunction'],\n },\n GetCBValues: {\n parents: ['Services'],\n children: [],\n },\n GetDataObjectDefinition: {\n parents: ['Services'],\n children: [],\n },\n GetDataSetValue: {\n parents: ['Services'],\n children: [],\n },\n GetDirectory: {\n parents: ['Services'],\n children: [],\n },\n GOOSE: {\n parents: ['Services'],\n children: [],\n },\n GOOSESecurity: {\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n GSE: {\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence, 'MinTime', 'MaxTime'],\n },\n GSEDir: {\n parents: ['Services'],\n children: [],\n },\n GSEControl: {\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'Protocol'],\n },\n GSESettings: {\n parents: ['Services'],\n children: [],\n },\n GSSE: {\n parents: ['Services'],\n children: [],\n },\n Header: {\n parents: ['SCL'],\n children: ['Text', 'History'],\n },\n History: {\n parents: ['Header'],\n children: ['Hitem'],\n },\n Hitem: {\n parents: ['History'],\n children: [],\n },\n IED: {\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'Services', 'AccessPoint', 'KDC'],\n },\n IEDName: {\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n Inputs: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'ExtRef'],\n },\n IssuerName: {\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n KDC: {\n parents: ['IED'],\n children: [],\n },\n LDevice: {\n parents: ['Server'],\n children: [...tUnNamingSequence, 'LN0', 'LN', 'AccessControl'],\n },\n LN: {\n parents: ['AccessPoint', 'LDevice'],\n children: [...tAnyLNSequence],\n },\n LN0: {\n parents: ['LDevice'],\n children: [\n ...tAnyLNSequence,\n 'GSEControl',\n 'SampledValueControl',\n 'SettingControl',\n ],\n },\n LNode: {\n parents: [...tLNodeContainer],\n children: [...tUnNamingSequence],\n },\n LNodeType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'DO'],\n },\n Line: {\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'Voltage',\n 'ConductingEquipment',\n ],\n },\n Log: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence],\n },\n LogControl: {\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence],\n },\n LogSettings: {\n parents: ['Services'],\n children: [],\n },\n MaxTime: {\n parents: ['GSE'],\n children: [],\n },\n McSecurity: {\n parents: ['GSESettings', 'SMVSettings', 'ClientServices'],\n children: [],\n },\n MinTime: {\n parents: ['GSE'],\n children: [],\n },\n NeutralPoint: {\n parents: ['TransformerWinding'],\n children: [...tUnNamingSequence],\n },\n OptFields: {\n parents: ['ReportControl'],\n children: [],\n },\n P: {\n parents: ['Address', 'PhysConn'],\n children: [],\n },\n PhysConn: {\n parents: ['ConnectedAP'],\n children: [...tUnNamingSequence, 'P'],\n },\n PowerTransformer: {\n parents: [...tEquipmentContainer],\n children: [\n ...tEquipmentSequence,\n 'TransformerWinding',\n 'SubEquipment',\n 'EqFunction',\n ],\n },\n Private: {\n parents: [],\n children: [],\n },\n Process: {\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'ConductingEquipment',\n 'Substation',\n 'Line',\n 'Process',\n ],\n },\n ProtNs: {\n parents: ['DAType', 'DA'],\n children: [],\n },\n Protocol: {\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n ReadWrite: {\n parents: ['Services'],\n children: [],\n },\n RedProt: {\n parents: ['Services'],\n children: [],\n },\n ReportControl: {\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence, 'OptFields', 'RptEnabled'],\n },\n ReportSettings: {\n parents: ['Services'],\n children: [],\n },\n RptEnabled: {\n parents: ['ReportControl'],\n children: [...tUnNamingSequence, 'ClientLN'],\n },\n SamplesPerSec: {\n parents: ['SMVSettings'],\n children: [],\n },\n SampledValueControl: {\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'SmvOpts'],\n },\n SecPerSamples: {\n parents: ['SMVSettings'],\n children: [],\n },\n SCL: {\n parents: [],\n children: [\n ...tBaseNameSequence,\n 'Header',\n 'Substation',\n 'Communication',\n 'IED',\n 'DataTypeTemplates',\n 'Line',\n 'Process',\n ],\n },\n SDI: {\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n SDO: {\n parents: ['DOType'],\n children: [...tNamingSequence],\n },\n Server: {\n parents: ['AccessPoint'],\n children: [\n ...tUnNamingSequence,\n 'Authentication',\n 'LDevice',\n 'Association',\n ],\n },\n ServerAt: {\n parents: ['AccessPoint'],\n children: [...tUnNamingSequence],\n },\n Services: {\n parents: ['IED', 'AccessPoint'],\n children: [\n 'DynAssociation',\n 'SettingGroups',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ConfDataSet',\n 'DynDataSet',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'ConfReportControl',\n 'GetCBValues',\n 'ConfLogControl',\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n 'GSEDir',\n 'GOOSE',\n 'GSSE',\n 'SMVsc',\n 'FileHandling',\n 'ConfLNs',\n 'ClientServices',\n 'ConfLdName',\n 'SupSubscription',\n 'ConfSigRef',\n 'ValueHandling',\n 'RedProt',\n 'TimeSyncProt',\n 'CommProt',\n ],\n },\n SetDataSetValue: {\n parents: ['Services'],\n children: [],\n },\n SettingControl: {\n parents: ['LN0'],\n children: [...tUnNamingSequence],\n },\n SettingGroups: {\n parents: ['Services'],\n children: ['SGEdit', 'ConfSG'],\n },\n SGEdit: {\n parents: ['SettingGroups'],\n children: [],\n },\n SmpRate: {\n parents: ['SMVSettings'],\n children: [],\n },\n SMV: {\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence],\n },\n SmvOpts: {\n parents: ['SampledValueControl'],\n children: [],\n },\n SMVsc: {\n parents: ['Services'],\n children: [],\n },\n SMVSecurity: {\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n SMVSettings: {\n parents: ['Services'],\n children: ['SmpRate', 'SamplesPerSec', 'SecPerSamples', 'McSecurity'],\n },\n SubEquipment: {\n parents: [\n 'TapChanger',\n 'PowerTransformer',\n 'ConductingEquipment',\n 'TransformerWinding',\n ...tAbstractConductingEquipment,\n ],\n children: [...tPowerSystemResourceSequence, 'EqFunction'],\n },\n SubFunction: {\n parents: ['SubFunction', 'Function'],\n children: [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'ConductingEquipment',\n 'SubFunction',\n ],\n },\n SubNetwork: {\n parents: ['Communication'],\n children: [...tNamingSequence, 'BitRate', 'ConnectedAP'],\n },\n Subject: {\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n Substation: {\n parents: ['SCL'],\n children: [...tEquipmentContainerSequence, 'VoltageLevel', 'Function'],\n },\n SupSubscription: {\n parents: ['Services'],\n children: [],\n },\n TapChanger: {\n parents: ['TransformerWinding'],\n children: [...tPowerSystemResourceSequence, 'SubEquipment', 'EqFunction'],\n },\n Terminal: {\n parents: [...tEquipment],\n children: [...tUnNamingSequence],\n },\n Text: {\n parents: sCLTags.filter(tag => tag !== 'Text' && tag !== 'Private'),\n children: [],\n },\n TimerActivatedControl: {\n parents: ['Services'],\n children: [],\n },\n TimeSyncProt: {\n parents: ['Services', 'ClientServices'],\n children: [],\n },\n TransformerWinding: {\n parents: ['PowerTransformer'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'TapChanger',\n 'NeutralPoint',\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n TrgOps: {\n parents: ['ReportControl'],\n children: [],\n },\n Val: {\n parents: ['DAI', 'DA', 'BDA'],\n children: [],\n },\n ValueHandling: {\n parents: ['Services'],\n children: [],\n },\n Voltage: {\n parents: ['VoltageLevel'],\n children: [],\n },\n VoltageLevel: {\n parents: ['Substation'],\n children: [...tEquipmentContainerSequence, 'Voltage', 'Bay', 'Function'],\n },\n};\nconst tagSet = new Set(sCLTags);\nexport function isSCLTag(tag) {\n return tagSet.has(tag);\n}\n/** @returns parent `tagName` s for SCL (2007B4) element tag */\n/** export function parentTags(tagName: string): string[] {\n if (!isSCLTag(tagName)) return [];\n\n return tags[tagName].parents;\n} */\n/** @returns child `tagName`s for SCL (2007B4) element tag */\n/** export function childTags(tagName: string): string[] {\n if (!isSCLTag(tagName)) return [];\n\n return tags[tagName].children;\n} */\n/** @returns Reference for new [[`tag`]] child within [[`parent`]] or `null` */\nexport function getReference(parent, tag) {\n if (!isSCLTag(tag))\n return null;\n const parentTag = parent.tagName;\n const children = Array.from(parent.children);\n if (parentTag === 'Services' ||\n parentTag === 'SettingGroups' ||\n !isSCLTag(parentTag))\n return children.find(child => child.tagName === tag) ?? null;\n const sequence = tags[parentTag].children;\n let index = sequence.findIndex(element => element === tag);\n if (index < 0)\n return null;\n let nextSibling;\n while (index < sequence.length && !nextSibling) {\n // eslint-disable-next-line no-loop-func\n nextSibling = children.find(child => child.tagName === sequence[index]);\n index += 1;\n }\n return nextSibling ?? null;\n}\n//# sourceMappingURL=tags.js.map","/* eslint-disable no-use-before-define */\nimport { isSCLTag } from './tags.js';\nfunction hitemIdentity(e) {\n return `${e.getAttribute('version')}\\t${e.getAttribute('revision')}`;\n}\nfunction terminalIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('connectivityNode')}`;\n}\nfunction lNodeIdentity(e) {\n const [iedName, ldInst, prefix, lnClass, lnInst, lnType] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n if (iedName === 'None')\n return `${identity(e.parentElement)}>(${lnClass} ${lnType})`;\n return `${iedName} ${ldInst || '(Client)'}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}`;\n}\nfunction kDCIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('iedName')} ${e.getAttribute('apName')}`;\n}\nfunction associationIdentity(e) {\n const [iedName, ldInst, prefix, lnClass, lnInst] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}`;\n}\nfunction lDeviceIdentity(e) {\n return `${identity(e.closest('IED'))}>>${e.getAttribute('inst')}`;\n}\nfunction iEDNameIdentity(e) {\n const iedName = e.textContent;\n const [apRef, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef || ''} ${ldInst || ''}/${prefix ?? ''} ${lnClass ?? ''} ${lnInst ?? ''}`;\n}\nfunction fCDAIdentity(e) {\n const [ldInst, prefix, lnClass, lnInst, doName, daName, fc, ix] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'fc',\n 'ix',\n ].map(name => e.getAttribute(name));\n const dataPath = `${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}.${doName} ${daName || ''}`;\n return `${identity(e.parentElement)}>${dataPath} (${fc}${ix ? ` [${ix}]` : ''})`;\n}\nfunction extRefIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const parentIdentity = identity(e.parentElement);\n const iedName = e.getAttribute('iedName');\n const intAddr = e.getAttribute('intAddr');\n const intAddrIndex = Array.from(e.parentElement.querySelectorAll(`ExtRef[intAddr=\"${intAddr}\"]`)).indexOf(e);\n if (!iedName)\n return `${parentIdentity}>${intAddr}[${intAddrIndex}]`;\n const [ldInst, prefix, lnClass, lnInst, doName, daName, serviceType, srcLDInst, srcPrefix, srcLNClass, srcLNInst, srcCBName,] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'serviceType',\n 'srcLDInst',\n 'srcPrefix',\n 'srcLNClass',\n 'srcLNInst',\n 'srcCBName',\n ].map(name => e.getAttribute(name));\n const cbPath = srcCBName\n ? `${serviceType}:${srcCBName} ${srcLDInst ?? ''}/${srcPrefix ?? ''} ${srcLNClass ?? ''} ${srcLNInst ?? ''}`\n : '';\n const dataPath = `${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''} ${doName} ${daName || ''}`;\n return `${parentIdentity}>${cbPath ? `${cbPath} ` : ''}${dataPath}${\n // eslint-disable-next-line no-useless-concat\n intAddr ? '@' + `${intAddr}` : ''}`;\n}\nfunction lNIdentity(e) {\n const [prefix, lnClass, inst] = ['prefix', 'lnClass', 'inst'].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${prefix ?? ''} ${lnClass} ${inst}`;\n}\nfunction clientLNIdentity(e) {\n const [apRef, iedName, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef || ''} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst}`;\n}\nfunction ixNamingIdentity(e) {\n const [name, ix] = ['name', 'ix'].map(naming => e.getAttribute(naming));\n return `${identity(e.parentElement)}>${name}${ix ? `[${ix}]` : ''}`;\n}\nfunction valIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const sGroup = e.getAttribute('sGroup');\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('sGroup') === sGroup)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${sGroup ? `${sGroup}.` : ''} ${index}`;\n}\nfunction connectedAPIdentity(e) {\n const [iedName, apName] = ['iedName', 'apName'].map(name => e.getAttribute(name));\n return `${iedName} ${apName}`;\n}\nfunction controlBlockIdentity(e) {\n const [ldInst, cbName] = ['ldInst', 'cbName'].map(name => e.getAttribute(name));\n return `${ldInst} ${cbName}`;\n}\nfunction physConnIdentity(e) {\n if (!e.parentElement)\n return NaN;\n if (!e.parentElement.querySelector('PhysConn[type=\"RedConn\"]'))\n return NaN;\n const pcType = e.getAttribute('type');\n if (e.parentElement.children.length > 1 &&\n pcType !== 'Connection' &&\n pcType !== 'RedConn')\n return NaN;\n return `${identity(e.parentElement)}>${pcType}`;\n}\nfunction pIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const eParent = e.parentElement;\n const eType = e.getAttribute('type');\n if (eParent.tagName === 'PhysConn')\n return `${identity(e.parentElement)}>${eType}`;\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('type') === eType)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${eType} [${index}]`;\n}\nfunction enumValIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('ord')}`;\n}\nfunction protNsIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('type') || '8-MMS'}\\t${e.textContent}`;\n}\nfunction sCLIdentity() {\n return '';\n}\nfunction namingIdentity(e) {\n return e.parentElement.tagName === 'SCL'\n ? e.getAttribute('name')\n : `${identity(e.parentElement)}>${e.getAttribute('name')}`;\n}\nfunction singletonIdentity(e) {\n return identity(e.parentElement).toString();\n}\nfunction idNamingIdentity(e) {\n return `#${e.id}`;\n}\nconst tags = {\n AccessControl: {\n identity: singletonIdentity,\n },\n AccessPoint: {\n identity: namingIdentity,\n },\n Address: {\n identity: singletonIdentity,\n },\n Association: {\n identity: associationIdentity,\n },\n Authentication: {\n identity: singletonIdentity,\n },\n BDA: {\n identity: namingIdentity,\n },\n BitRate: {\n identity: singletonIdentity,\n },\n Bay: {\n identity: namingIdentity,\n },\n ClientLN: {\n identity: clientLNIdentity,\n },\n ClientServices: {\n identity: singletonIdentity,\n },\n CommProt: {\n identity: singletonIdentity,\n },\n Communication: {\n identity: singletonIdentity,\n },\n ConductingEquipment: {\n identity: namingIdentity,\n },\n ConfDataSet: {\n identity: singletonIdentity,\n },\n ConfLdName: {\n identity: singletonIdentity,\n },\n ConfLNs: {\n identity: singletonIdentity,\n },\n ConfLogControl: {\n identity: singletonIdentity,\n },\n ConfReportControl: {\n identity: singletonIdentity,\n },\n ConfSG: {\n identity: singletonIdentity,\n },\n ConfSigRef: {\n identity: singletonIdentity,\n },\n ConnectedAP: {\n identity: connectedAPIdentity,\n },\n ConnectivityNode: {\n identity: namingIdentity,\n },\n DA: {\n identity: namingIdentity,\n },\n DAI: {\n identity: ixNamingIdentity,\n },\n DAType: {\n identity: idNamingIdentity,\n },\n DO: {\n identity: namingIdentity,\n },\n DOI: {\n identity: namingIdentity,\n },\n DOType: {\n identity: idNamingIdentity,\n },\n DataObjectDirectory: {\n identity: singletonIdentity,\n },\n DataSet: {\n identity: namingIdentity,\n },\n DataSetDirectory: {\n identity: singletonIdentity,\n },\n DataTypeTemplates: {\n identity: singletonIdentity,\n },\n DynAssociation: {\n identity: singletonIdentity,\n },\n DynDataSet: {\n identity: singletonIdentity,\n },\n EnumType: {\n identity: idNamingIdentity,\n },\n EnumVal: {\n identity: enumValIdentity,\n },\n EqFunction: {\n identity: namingIdentity,\n },\n EqSubFunction: {\n identity: namingIdentity,\n },\n ExtRef: {\n identity: extRefIdentity,\n },\n FCDA: {\n identity: fCDAIdentity,\n },\n FileHandling: {\n identity: singletonIdentity,\n },\n Function: {\n identity: namingIdentity,\n },\n GeneralEquipment: {\n identity: namingIdentity,\n },\n GetCBValues: {\n identity: singletonIdentity,\n },\n GetDataObjectDefinition: {\n identity: singletonIdentity,\n },\n GetDataSetValue: {\n identity: singletonIdentity,\n },\n GetDirectory: {\n identity: singletonIdentity,\n },\n GOOSE: {\n identity: singletonIdentity,\n },\n GOOSESecurity: {\n identity: namingIdentity,\n },\n GSE: {\n identity: controlBlockIdentity,\n },\n GSEDir: {\n identity: singletonIdentity,\n },\n GSEControl: {\n identity: namingIdentity,\n },\n GSESettings: {\n identity: singletonIdentity,\n },\n GSSE: {\n identity: singletonIdentity,\n },\n Header: {\n identity: singletonIdentity,\n },\n History: {\n identity: singletonIdentity,\n },\n Hitem: {\n identity: hitemIdentity,\n },\n IED: {\n identity: namingIdentity,\n },\n IEDName: {\n identity: iEDNameIdentity,\n },\n Inputs: {\n identity: singletonIdentity,\n },\n IssuerName: {\n identity: singletonIdentity,\n },\n KDC: {\n identity: kDCIdentity,\n },\n LDevice: {\n identity: lDeviceIdentity,\n },\n LN: {\n identity: lNIdentity,\n },\n LN0: {\n identity: singletonIdentity,\n },\n LNode: {\n identity: lNodeIdentity,\n },\n LNodeType: {\n identity: idNamingIdentity,\n },\n Line: {\n identity: namingIdentity,\n },\n Log: {\n identity: namingIdentity,\n },\n LogControl: {\n identity: namingIdentity,\n },\n LogSettings: {\n identity: singletonIdentity,\n },\n MaxTime: {\n identity: singletonIdentity,\n },\n McSecurity: {\n identity: singletonIdentity,\n },\n MinTime: {\n identity: singletonIdentity,\n },\n NeutralPoint: {\n identity: terminalIdentity,\n },\n OptFields: {\n identity: singletonIdentity,\n },\n P: {\n identity: pIdentity,\n },\n PhysConn: {\n identity: physConnIdentity,\n },\n PowerTransformer: {\n identity: namingIdentity,\n },\n Private: {\n identity: () => NaN,\n },\n Process: {\n identity: namingIdentity,\n },\n ProtNs: {\n identity: protNsIdentity,\n },\n Protocol: {\n identity: singletonIdentity,\n },\n ReadWrite: {\n identity: singletonIdentity,\n },\n RedProt: {\n identity: singletonIdentity,\n },\n ReportControl: {\n identity: namingIdentity,\n },\n ReportSettings: {\n identity: singletonIdentity,\n },\n RptEnabled: {\n identity: singletonIdentity,\n },\n SamplesPerSec: {\n identity: singletonIdentity,\n },\n SampledValueControl: {\n identity: namingIdentity,\n },\n SecPerSamples: {\n identity: singletonIdentity,\n },\n SCL: {\n identity: sCLIdentity,\n },\n SDI: {\n identity: ixNamingIdentity,\n },\n SDO: {\n identity: namingIdentity,\n },\n Server: {\n identity: singletonIdentity,\n },\n ServerAt: {\n identity: singletonIdentity,\n },\n Services: {\n identity: singletonIdentity,\n },\n SetDataSetValue: {\n identity: singletonIdentity,\n },\n SettingControl: {\n identity: singletonIdentity,\n },\n SettingGroups: {\n identity: singletonIdentity,\n },\n SGEdit: {\n identity: singletonIdentity,\n },\n SmpRate: {\n identity: singletonIdentity,\n },\n SMV: {\n identity: controlBlockIdentity,\n },\n SmvOpts: {\n identity: singletonIdentity,\n },\n SMVsc: {\n identity: singletonIdentity,\n },\n SMVSecurity: {\n identity: namingIdentity,\n },\n SMVSettings: {\n identity: singletonIdentity,\n },\n SubEquipment: {\n identity: namingIdentity,\n },\n SubFunction: {\n identity: namingIdentity,\n },\n SubNetwork: {\n identity: namingIdentity,\n },\n Subject: {\n identity: singletonIdentity,\n },\n Substation: {\n identity: namingIdentity,\n },\n SupSubscription: {\n identity: singletonIdentity,\n },\n TapChanger: {\n identity: namingIdentity,\n },\n Terminal: {\n identity: terminalIdentity,\n },\n Text: {\n identity: singletonIdentity,\n },\n TimerActivatedControl: {\n identity: singletonIdentity,\n },\n TimeSyncProt: {\n identity: singletonIdentity,\n },\n TransformerWinding: {\n identity: namingIdentity,\n },\n TrgOps: {\n identity: singletonIdentity,\n },\n Val: {\n identity: valIdentity,\n },\n ValueHandling: {\n identity: singletonIdentity,\n },\n Voltage: {\n identity: singletonIdentity,\n },\n VoltageLevel: {\n identity: namingIdentity,\n },\n};\n/** @returns Identity string for a valid SCL element or NaN */\nexport function identity(e) {\n if (e === null)\n return NaN;\n if (e.closest('Private'))\n return NaN;\n const tag = e.tagName;\n if (isSCLTag(tag))\n return tags[tag].identity(e);\n return NaN;\n}\n//# sourceMappingURL=identity.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}`;\n//# sourceMappingURL=mwc-icon-host.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './mwc-icon-host.css.js';\n/** @soyCompatible */\nlet Icon = class Icon extends LitElement {\n /** @soyTemplate */\n render() {\n return html ``;\n }\n};\nIcon.styles = [styles];\nIcon = __decorate([\n customElement('mwc-icon')\n], Icon);\nexport { Icon };\n//# sourceMappingURL=mwc-icon.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\nexport function closest(element, selector) {\n if (element.closest) {\n return element.closest(selector);\n }\n var el = element;\n while (el) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentElement;\n }\n return null;\n}\nexport function matches(element, selector) {\n var nativeMatches = element.matches\n || element.webkitMatchesSelector\n || element.msMatchesSelector;\n return nativeMatches.call(element, selector);\n}\n/**\n * Used to compute the estimated scroll width of elements. When an element is\n * hidden due to display: none; being applied to a parent element, the width is\n * returned as 0. However, the element will have a true width once no longer\n * inside a display: none context. This method computes an estimated width when\n * the element is hidden or returns the true width when the element is visble.\n * @param {Element} element the element whose width to estimate\n */\nexport function estimateScrollWidth(element) {\n // Check the offsetParent. If the element inherits display: none from any\n // parent, the offsetParent property will be null (see\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).\n // This check ensures we only clone the node when necessary.\n var htmlEl = element;\n if (htmlEl.offsetParent !== null) {\n return htmlEl.scrollWidth;\n }\n var clone = htmlEl.cloneNode(true);\n clone.style.setProperty('position', 'absolute');\n clone.style.setProperty('transform', 'translate(-9999px, -9999px)');\n document.documentElement.appendChild(clone);\n var scrollWidth = clone.scrollWidth;\n document.documentElement.removeChild(clone);\n return scrollWidth;\n}\n//# sourceMappingURL=ponyfill.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\n/**\n * Determines whether a node is an element.\n *\n * @param node Node to check\n */\nexport const isNodeElement = (node) => {\n return node.nodeType === Node.ELEMENT_NODE;\n};\nexport function addHasRemoveClass(element) {\n return {\n addClass: (className) => {\n element.classList.add(className);\n },\n removeClass: (className) => {\n element.classList.remove(className);\n },\n hasClass: (className) => element.classList.contains(className),\n };\n}\nlet supportsPassive = false;\nconst fn = () => { };\nconst optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n};\ndocument.addEventListener('x', fn, optionsBlock);\ndocument.removeEventListener('x', fn);\n/**\n * Do event listeners suport the `passive` option?\n */\nexport const supportsPassiveEventListener = supportsPassive;\nexport const deepActiveElementPath = (doc = window.document) => {\n let activeElement = doc.activeElement;\n const path = [];\n if (!activeElement) {\n return path;\n }\n while (activeElement) {\n path.push(activeElement);\n if (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n else {\n break;\n }\n }\n return path;\n};\nexport const doesElementContainFocus = (element) => {\n const activePath = deepActiveElementPath();\n if (!activePath.length) {\n return false;\n }\n const deepActiveElement = activePath[activePath.length - 1];\n const focusEv = new Event('check-if-focused', { bubbles: true, composed: true });\n let composedPath = [];\n const listener = (ev) => {\n composedPath = ev.composedPath();\n };\n document.body.addEventListener('check-if-focused', listener);\n deepActiveElement.dispatchEvent(focusEv);\n document.body.removeEventListener('check-if-focused', listener);\n return composedPath.indexOf(element) !== -1;\n};\n//# sourceMappingURL=utils.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { LitElement } from 'lit';\nexport { addHasRemoveClass } from './utils.js';\n/** @soyCompatible */\nexport class BaseElement extends LitElement {\n click() {\n if (this.mdcRoot) {\n this.mdcRoot.focus();\n this.mdcRoot.click();\n return;\n }\n super.click();\n }\n /**\n * Create and attach the MDC Foundation to the instance\n */\n createFoundation() {\n if (this.mdcFoundation !== undefined) {\n this.mdcFoundation.destroy();\n }\n if (this.mdcFoundationClass) {\n this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());\n this.mdcFoundation.init();\n }\n }\n firstUpdated() {\n this.createFoundation();\n }\n}\n//# sourceMappingURL=base-element.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar MDCFoundation = /** @class */ (function () {\n function MDCFoundation(adapter) {\n if (adapter === void 0) { adapter = {}; }\n this.adapter = adapter;\n }\n Object.defineProperty(MDCFoundation, \"cssClasses\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports every\n // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"strings\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"numbers\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"defaultAdapter\", {\n get: function () {\n // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n // validation.\n return {};\n },\n enumerable: false,\n configurable: true\n });\n MDCFoundation.prototype.init = function () {\n // Subclasses should override this method to perform initialization routines (registering events, etc.)\n };\n MDCFoundation.prototype.destroy = function () {\n // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n };\n return MDCFoundation;\n}());\nexport { MDCFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n // Ripple is a special case where the \"root\" component is really a \"mixin\" of sorts,\n // given that it's an 'upgrade' to an existing component. That being said it is the root\n // CSS class that all other CSS classes derive from.\n BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',\n FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',\n ROOT: 'mdc-ripple-upgraded',\n UNBOUNDED: 'mdc-ripple-upgraded--unbounded',\n};\nexport var strings = {\n VAR_FG_SCALE: '--mdc-ripple-fg-scale',\n VAR_FG_SIZE: '--mdc-ripple-fg-size',\n VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',\n VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',\n VAR_LEFT: '--mdc-ripple-left',\n VAR_TOP: '--mdc-ripple-top',\n};\nexport var numbers = {\n DEACTIVATION_TIMEOUT_MS: 225,\n FG_DEACTIVATION_MS: 150,\n INITIAL_ORIGIN_SCALE: 0.6,\n PADDING: 10,\n TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nimport { getNormalizedEventCoords } from './util';\n// Activation events registered on the root element of each instance for activation\nvar ACTIVATION_EVENT_TYPES = [\n 'touchstart', 'pointerdown', 'mousedown', 'keydown',\n];\n// Deactivation events registered on documentElement when a pointer-related down event occurs\nvar POINTER_DEACTIVATION_EVENT_TYPES = [\n 'touchend', 'pointerup', 'mouseup', 'contextmenu',\n];\n// simultaneous nested activations\nvar activatedTargets = [];\nvar MDCRippleFoundation = /** @class */ (function (_super) {\n __extends(MDCRippleFoundation, _super);\n function MDCRippleFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this;\n _this.activationAnimationHasEnded = false;\n _this.activationTimer = 0;\n _this.fgDeactivationRemovalTimer = 0;\n _this.fgScale = '0';\n _this.frame = { width: 0, height: 0 };\n _this.initialSize = 0;\n _this.layoutFrame = 0;\n _this.maxRadius = 0;\n _this.unboundedCoords = { left: 0, top: 0 };\n _this.activationState = _this.defaultActivationState();\n _this.activationTimerCallback = function () {\n _this.activationAnimationHasEnded = true;\n _this.runDeactivationUXLogicIfReady();\n };\n _this.activateHandler = function (e) {\n _this.activateImpl(e);\n };\n _this.deactivateHandler = function () {\n _this.deactivateImpl();\n };\n _this.focusHandler = function () {\n _this.handleFocus();\n };\n _this.blurHandler = function () {\n _this.handleBlur();\n };\n _this.resizeHandler = function () {\n _this.layout();\n };\n return _this;\n }\n Object.defineProperty(MDCRippleFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n browserSupportsCssVars: function () { return true; },\n computeBoundingRect: function () {\n return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });\n },\n containsEventTarget: function () { return true; },\n deregisterDocumentInteractionHandler: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n deregisterResizeHandler: function () { return undefined; },\n getWindowPageOffset: function () { return ({ x: 0, y: 0 }); },\n isSurfaceActive: function () { return true; },\n isSurfaceDisabled: function () { return true; },\n isUnbounded: function () { return true; },\n registerDocumentInteractionHandler: function () { return undefined; },\n registerInteractionHandler: function () { return undefined; },\n registerResizeHandler: function () { return undefined; },\n removeClass: function () { return undefined; },\n updateCssVariable: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCRippleFoundation.prototype.init = function () {\n var _this = this;\n var supportsPressRipple = this.supportsPressRipple();\n this.registerRootHandlers(supportsPressRipple);\n if (supportsPressRipple) {\n var _a = MDCRippleFoundation.cssClasses, ROOT_1 = _a.ROOT, UNBOUNDED_1 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter.addClass(ROOT_1);\n if (_this.adapter.isUnbounded()) {\n _this.adapter.addClass(UNBOUNDED_1);\n // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple\n _this.layoutInternal();\n }\n });\n }\n };\n MDCRippleFoundation.prototype.destroy = function () {\n var _this = this;\n if (this.supportsPressRipple()) {\n if (this.activationTimer) {\n clearTimeout(this.activationTimer);\n this.activationTimer = 0;\n this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);\n }\n if (this.fgDeactivationRemovalTimer) {\n clearTimeout(this.fgDeactivationRemovalTimer);\n this.fgDeactivationRemovalTimer = 0;\n this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);\n }\n var _a = MDCRippleFoundation.cssClasses, ROOT_2 = _a.ROOT, UNBOUNDED_2 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter.removeClass(ROOT_2);\n _this.adapter.removeClass(UNBOUNDED_2);\n _this.removeCssVars();\n });\n }\n this.deregisterRootHandlers();\n this.deregisterDeactivationHandlers();\n };\n /**\n * @param evt Optional event containing position information.\n */\n MDCRippleFoundation.prototype.activate = function (evt) {\n this.activateImpl(evt);\n };\n MDCRippleFoundation.prototype.deactivate = function () {\n this.deactivateImpl();\n };\n MDCRippleFoundation.prototype.layout = function () {\n var _this = this;\n if (this.layoutFrame) {\n cancelAnimationFrame(this.layoutFrame);\n }\n this.layoutFrame = requestAnimationFrame(function () {\n _this.layoutInternal();\n _this.layoutFrame = 0;\n });\n };\n MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {\n var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;\n if (unbounded) {\n this.adapter.addClass(UNBOUNDED);\n }\n else {\n this.adapter.removeClass(UNBOUNDED);\n }\n };\n MDCRippleFoundation.prototype.handleFocus = function () {\n var _this = this;\n requestAnimationFrame(function () { return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });\n };\n MDCRippleFoundation.prototype.handleBlur = function () {\n var _this = this;\n requestAnimationFrame(function () { return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });\n };\n /**\n * We compute this property so that we are not querying information about the client\n * until the point in time where the foundation requests it. This prevents scenarios where\n * client-side feature-detection may happen too early, such as when components are rendered on the server\n * and then initialized at mount time on the client.\n */\n MDCRippleFoundation.prototype.supportsPressRipple = function () {\n return this.adapter.browserSupportsCssVars();\n };\n MDCRippleFoundation.prototype.defaultActivationState = function () {\n return {\n activationEvent: undefined,\n hasDeactivationUXRun: false,\n isActivated: false,\n isProgrammatic: false,\n wasActivatedByPointer: false,\n wasElementMadeActive: false,\n };\n };\n /**\n * supportsPressRipple Passed from init to save a redundant function call\n */\n MDCRippleFoundation.prototype.registerRootHandlers = function (supportsPressRipple) {\n var e_1, _a;\n if (supportsPressRipple) {\n try {\n for (var ACTIVATION_EVENT_TYPES_1 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next(); !ACTIVATION_EVENT_TYPES_1_1.done; ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next()) {\n var evtType = ACTIVATION_EVENT_TYPES_1_1.value;\n this.adapter.registerInteractionHandler(evtType, this.activateHandler);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (ACTIVATION_EVENT_TYPES_1_1 && !ACTIVATION_EVENT_TYPES_1_1.done && (_a = ACTIVATION_EVENT_TYPES_1.return)) _a.call(ACTIVATION_EVENT_TYPES_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.adapter.isUnbounded()) {\n this.adapter.registerResizeHandler(this.resizeHandler);\n }\n }\n this.adapter.registerInteractionHandler('focus', this.focusHandler);\n this.adapter.registerInteractionHandler('blur', this.blurHandler);\n };\n MDCRippleFoundation.prototype.registerDeactivationHandlers = function (evt) {\n var e_2, _a;\n if (evt.type === 'keydown') {\n this.adapter.registerInteractionHandler('keyup', this.deactivateHandler);\n }\n else {\n try {\n for (var POINTER_DEACTIVATION_EVENT_TYPES_1 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next(); !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done; POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next()) {\n var evtType = POINTER_DEACTIVATION_EVENT_TYPES_1_1.value;\n this.adapter.registerDocumentInteractionHandler(evtType, this.deactivateHandler);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (POINTER_DEACTIVATION_EVENT_TYPES_1_1 && !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_1.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n };\n MDCRippleFoundation.prototype.deregisterRootHandlers = function () {\n var e_3, _a;\n try {\n for (var ACTIVATION_EVENT_TYPES_2 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next(); !ACTIVATION_EVENT_TYPES_2_1.done; ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next()) {\n var evtType = ACTIVATION_EVENT_TYPES_2_1.value;\n this.adapter.deregisterInteractionHandler(evtType, this.activateHandler);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (ACTIVATION_EVENT_TYPES_2_1 && !ACTIVATION_EVENT_TYPES_2_1.done && (_a = ACTIVATION_EVENT_TYPES_2.return)) _a.call(ACTIVATION_EVENT_TYPES_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n this.adapter.deregisterInteractionHandler('focus', this.focusHandler);\n this.adapter.deregisterInteractionHandler('blur', this.blurHandler);\n if (this.adapter.isUnbounded()) {\n this.adapter.deregisterResizeHandler(this.resizeHandler);\n }\n };\n MDCRippleFoundation.prototype.deregisterDeactivationHandlers = function () {\n var e_4, _a;\n this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler);\n try {\n for (var POINTER_DEACTIVATION_EVENT_TYPES_2 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next(); !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done; POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next()) {\n var evtType = POINTER_DEACTIVATION_EVENT_TYPES_2_1.value;\n this.adapter.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (POINTER_DEACTIVATION_EVENT_TYPES_2_1 && !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_2.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n };\n MDCRippleFoundation.prototype.removeCssVars = function () {\n var _this = this;\n var rippleStrings = MDCRippleFoundation.strings;\n var keys = Object.keys(rippleStrings);\n keys.forEach(function (key) {\n if (key.indexOf('VAR_') === 0) {\n _this.adapter.updateCssVariable(rippleStrings[key], null);\n }\n });\n };\n MDCRippleFoundation.prototype.activateImpl = function (evt) {\n var _this = this;\n if (this.adapter.isSurfaceDisabled()) {\n return;\n }\n var activationState = this.activationState;\n if (activationState.isActivated) {\n return;\n }\n // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction\n var previousActivationEvent = this.previousActivationEvent;\n var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;\n if (isSameInteraction) {\n return;\n }\n activationState.isActivated = true;\n activationState.isProgrammatic = evt === undefined;\n activationState.activationEvent = evt;\n activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');\n var hasActivatedChild = evt !== undefined &&\n activatedTargets.length > 0 &&\n activatedTargets.some(function (target) { return _this.adapter.containsEventTarget(target); });\n if (hasActivatedChild) {\n // Immediately reset activation state, while preserving logic that prevents touch follow-on events\n this.resetActivationState();\n return;\n }\n if (evt !== undefined) {\n activatedTargets.push(evt.target);\n this.registerDeactivationHandlers(evt);\n }\n activationState.wasElementMadeActive = this.checkElementMadeActive(evt);\n if (activationState.wasElementMadeActive) {\n this.animateActivation();\n }\n requestAnimationFrame(function () {\n // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples\n activatedTargets = [];\n if (!activationState.wasElementMadeActive\n && evt !== undefined\n && (evt.key === ' ' || evt.keyCode === 32)) {\n // If space was pressed, try again within an rAF call to detect :active, because different UAs report\n // active states inconsistently when they're called within event handling code:\n // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741\n // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS\n // variable is set within a rAF callback for a submit button interaction (#2241).\n activationState.wasElementMadeActive = _this.checkElementMadeActive(evt);\n if (activationState.wasElementMadeActive) {\n _this.animateActivation();\n }\n }\n if (!activationState.wasElementMadeActive) {\n // Reset activation state immediately if element was not made active.\n _this.activationState = _this.defaultActivationState();\n }\n });\n };\n MDCRippleFoundation.prototype.checkElementMadeActive = function (evt) {\n return (evt !== undefined && evt.type === 'keydown') ?\n this.adapter.isSurfaceActive() :\n true;\n };\n MDCRippleFoundation.prototype.animateActivation = function () {\n var _this = this;\n var _a = MDCRippleFoundation.strings, VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;\n var _b = MDCRippleFoundation.cssClasses, FG_DEACTIVATION = _b.FG_DEACTIVATION, FG_ACTIVATION = _b.FG_ACTIVATION;\n var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;\n this.layoutInternal();\n var translateStart = '';\n var translateEnd = '';\n if (!this.adapter.isUnbounded()) {\n var _c = this.getFgTranslationCoordinates(), startPoint = _c.startPoint, endPoint = _c.endPoint;\n translateStart = startPoint.x + \"px, \" + startPoint.y + \"px\";\n translateEnd = endPoint.x + \"px, \" + endPoint.y + \"px\";\n }\n this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);\n this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);\n // Cancel any ongoing activation/deactivation animations\n clearTimeout(this.activationTimer);\n clearTimeout(this.fgDeactivationRemovalTimer);\n this.rmBoundedActivationClasses();\n this.adapter.removeClass(FG_DEACTIVATION);\n // Force layout in order to re-trigger the animation.\n this.adapter.computeBoundingRect();\n this.adapter.addClass(FG_ACTIVATION);\n this.activationTimer = setTimeout(function () {\n _this.activationTimerCallback();\n }, DEACTIVATION_TIMEOUT_MS);\n };\n MDCRippleFoundation.prototype.getFgTranslationCoordinates = function () {\n var _a = this.activationState, activationEvent = _a.activationEvent, wasActivatedByPointer = _a.wasActivatedByPointer;\n var startPoint;\n if (wasActivatedByPointer) {\n startPoint = getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect());\n }\n else {\n startPoint = {\n x: this.frame.width / 2,\n y: this.frame.height / 2,\n };\n }\n // Center the element around the start point.\n startPoint = {\n x: startPoint.x - (this.initialSize / 2),\n y: startPoint.y - (this.initialSize / 2),\n };\n var endPoint = {\n x: (this.frame.width / 2) - (this.initialSize / 2),\n y: (this.frame.height / 2) - (this.initialSize / 2),\n };\n return { startPoint: startPoint, endPoint: endPoint };\n };\n MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady = function () {\n var _this = this;\n // This method is called both when a pointing device is released, and when the activation animation ends.\n // The deactivation animation should only run after both of those occur.\n var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;\n var _a = this.activationState, hasDeactivationUXRun = _a.hasDeactivationUXRun, isActivated = _a.isActivated;\n var activationHasEnded = hasDeactivationUXRun || !isActivated;\n if (activationHasEnded && this.activationAnimationHasEnded) {\n this.rmBoundedActivationClasses();\n this.adapter.addClass(FG_DEACTIVATION);\n this.fgDeactivationRemovalTimer = setTimeout(function () {\n _this.adapter.removeClass(FG_DEACTIVATION);\n }, numbers.FG_DEACTIVATION_MS);\n }\n };\n MDCRippleFoundation.prototype.rmBoundedActivationClasses = function () {\n var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;\n this.adapter.removeClass(FG_ACTIVATION);\n this.activationAnimationHasEnded = false;\n this.adapter.computeBoundingRect();\n };\n MDCRippleFoundation.prototype.resetActivationState = function () {\n var _this = this;\n this.previousActivationEvent = this.activationState.activationEvent;\n this.activationState = this.defaultActivationState();\n // Touch devices may fire additional events for the same interaction within a short time.\n // Store the previous event until it's safe to assume that subsequent events are for new interactions.\n setTimeout(function () { return _this.previousActivationEvent = undefined; }, MDCRippleFoundation.numbers.TAP_DELAY_MS);\n };\n MDCRippleFoundation.prototype.deactivateImpl = function () {\n var _this = this;\n var activationState = this.activationState;\n // This can happen in scenarios such as when you have a keyup event that blurs the element.\n if (!activationState.isActivated) {\n return;\n }\n var state = __assign({}, activationState);\n if (activationState.isProgrammatic) {\n requestAnimationFrame(function () {\n _this.animateDeactivation(state);\n });\n this.resetActivationState();\n }\n else {\n this.deregisterDeactivationHandlers();\n requestAnimationFrame(function () {\n _this.activationState.hasDeactivationUXRun = true;\n _this.animateDeactivation(state);\n _this.resetActivationState();\n });\n }\n };\n MDCRippleFoundation.prototype.animateDeactivation = function (_a) {\n var wasActivatedByPointer = _a.wasActivatedByPointer, wasElementMadeActive = _a.wasElementMadeActive;\n if (wasActivatedByPointer || wasElementMadeActive) {\n this.runDeactivationUXLogicIfReady();\n }\n };\n MDCRippleFoundation.prototype.layoutInternal = function () {\n var _this = this;\n this.frame = this.adapter.computeBoundingRect();\n var maxDim = Math.max(this.frame.height, this.frame.width);\n // Surface diameter is treated differently for unbounded vs. bounded ripples.\n // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately\n // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically\n // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter\n // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via\n // `overflow: hidden`.\n var getBoundedRadius = function () {\n var hypotenuse = Math.sqrt(Math.pow(_this.frame.width, 2) + Math.pow(_this.frame.height, 2));\n return hypotenuse + MDCRippleFoundation.numbers.PADDING;\n };\n this.maxRadius = this.adapter.isUnbounded() ? maxDim : getBoundedRadius();\n // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform\n var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);\n // Unbounded ripple size should always be even number to equally center align.\n if (this.adapter.isUnbounded() && initialSize % 2 !== 0) {\n this.initialSize = initialSize - 1;\n }\n else {\n this.initialSize = initialSize;\n }\n this.fgScale = \"\" + this.maxRadius / this.initialSize;\n this.updateLayoutCssVars();\n };\n MDCRippleFoundation.prototype.updateLayoutCssVars = function () {\n var _a = MDCRippleFoundation.strings, VAR_FG_SIZE = _a.VAR_FG_SIZE, VAR_LEFT = _a.VAR_LEFT, VAR_TOP = _a.VAR_TOP, VAR_FG_SCALE = _a.VAR_FG_SCALE;\n this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize + \"px\");\n this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale);\n if (this.adapter.isUnbounded()) {\n this.unboundedCoords = {\n left: Math.round((this.frame.width / 2) - (this.initialSize / 2)),\n top: Math.round((this.frame.height / 2) - (this.initialSize / 2)),\n };\n this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords.left + \"px\");\n this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords.top + \"px\");\n }\n };\n return MDCRippleFoundation;\n}(MDCFoundation));\nexport { MDCRippleFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCRippleFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * Stores result from supportsCssVariables to avoid redundant processing to\n * detect CSS custom variable support.\n */\nvar supportsCssVariables_;\nexport function supportsCssVariables(windowObj, forceRefresh) {\n if (forceRefresh === void 0) { forceRefresh = false; }\n var CSS = windowObj.CSS;\n var supportsCssVars = supportsCssVariables_;\n if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {\n return supportsCssVariables_;\n }\n var supportsFunctionPresent = CSS && typeof CSS.supports === 'function';\n if (!supportsFunctionPresent) {\n return false;\n }\n var explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');\n // See: https://bugs.webkit.org/show_bug.cgi?id=154669\n // See: README section on Safari\n var weAreFeatureDetectingSafari10plus = (CSS.supports('(--css-vars: yes)') &&\n CSS.supports('color', '#00000000'));\n supportsCssVars =\n explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus;\n if (!forceRefresh) {\n supportsCssVariables_ = supportsCssVars;\n }\n return supportsCssVars;\n}\nexport function getNormalizedEventCoords(evt, pageOffset, clientRect) {\n if (!evt) {\n return { x: 0, y: 0 };\n }\n var x = pageOffset.x, y = pageOffset.y;\n var documentX = x + clientRect.left;\n var documentY = y + clientRect.top;\n var normalizedX;\n var normalizedY;\n // Determine touch point relative to the ripple container.\n if (evt.type === 'touchstart') {\n var touchEvent = evt;\n normalizedX = touchEvent.changedTouches[0].pageX - documentX;\n normalizedY = touchEvent.changedTouches[0].pageY - documentY;\n }\n else {\n var mouseEvent = evt;\n normalizedX = mouseEvent.pageX - documentX;\n normalizedY = mouseEvent.pageY - documentY;\n }\n return { x: normalizedX, y: normalizedY };\n}\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as i,Directive as s,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((i=>t[i])).join(\" \")+\" \"}update(i,[s]){var r,o;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as e,Directive as r,PartType as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const i=\"important\",n=\" !\"+i,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||\"style\"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes(\"-\")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,\"-$&\").toLowerCase()}:${s};`}),\"\")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ht){this.ht=new Set;for(const t in r)this.ht.add(t);return this.render(r)}this.ht.forEach((t=>{null==r[t]&&(this.ht.delete(t),t.includes(\"-\")?s.removeProperty(t):s[t]=\"\")}));for(const t in r){const e=r[t];if(null!=e){this.ht.add(t);const r=\"string\"==typeof e&&e.endsWith(n);t.includes(\"-\")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:\"\"):s[t]=e}}return t}});export{o as styleMap};\n//# sourceMappingURL=style-map.js.map\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { matches } from '@material/dom/ponyfill.js';\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport MDCRippleFoundation from '@material/ripple/foundation.js';\nimport { html } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n/** @soyCompatible */\nexport class RippleBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.primary = false;\n this.accent = false;\n this.unbounded = false;\n this.disabled = false;\n this.activated = false;\n this.selected = false;\n this.internalUseStateLayerCustomProperties = false;\n this.hovering = false;\n this.bgFocused = false;\n this.fgActivation = false;\n this.fgDeactivation = false;\n this.fgScale = '';\n this.fgSize = '';\n this.translateStart = '';\n this.translateEnd = '';\n this.leftPos = '';\n this.topPos = '';\n this.mdcFoundationClass = MDCRippleFoundation;\n }\n get isActive() {\n return matches(this.parentElement || this, ':active');\n }\n createAdapter() {\n return {\n browserSupportsCssVars: () => true,\n isUnbounded: () => this.unbounded,\n isSurfaceActive: () => this.isActive,\n isSurfaceDisabled: () => this.disabled,\n addClass: (className) => {\n switch (className) {\n case 'mdc-ripple-upgraded--background-focused':\n this.bgFocused = true;\n break;\n case 'mdc-ripple-upgraded--foreground-activation':\n this.fgActivation = true;\n break;\n case 'mdc-ripple-upgraded--foreground-deactivation':\n this.fgDeactivation = true;\n break;\n default:\n break;\n }\n },\n removeClass: (className) => {\n switch (className) {\n case 'mdc-ripple-upgraded--background-focused':\n this.bgFocused = false;\n break;\n case 'mdc-ripple-upgraded--foreground-activation':\n this.fgActivation = false;\n break;\n case 'mdc-ripple-upgraded--foreground-deactivation':\n this.fgDeactivation = false;\n break;\n default:\n break;\n }\n },\n containsEventTarget: () => true,\n registerInteractionHandler: () => undefined,\n deregisterInteractionHandler: () => undefined,\n registerDocumentInteractionHandler: () => undefined,\n deregisterDocumentInteractionHandler: () => undefined,\n registerResizeHandler: () => undefined,\n deregisterResizeHandler: () => undefined,\n updateCssVariable: (varName, value) => {\n switch (varName) {\n case '--mdc-ripple-fg-scale':\n this.fgScale = value;\n break;\n case '--mdc-ripple-fg-size':\n this.fgSize = value;\n break;\n case '--mdc-ripple-fg-translate-end':\n this.translateEnd = value;\n break;\n case '--mdc-ripple-fg-translate-start':\n this.translateStart = value;\n break;\n case '--mdc-ripple-left':\n this.leftPos = value;\n break;\n case '--mdc-ripple-top':\n this.topPos = value;\n break;\n default:\n break;\n }\n },\n computeBoundingRect: () => (this.parentElement || this).getBoundingClientRect(),\n getWindowPageOffset: () => ({ x: window.pageXOffset, y: window.pageYOffset }),\n };\n }\n startPress(ev) {\n this.waitForFoundation(() => {\n this.mdcFoundation.activate(ev);\n });\n }\n endPress() {\n this.waitForFoundation(() => {\n this.mdcFoundation.deactivate();\n });\n }\n startFocus() {\n this.waitForFoundation(() => {\n this.mdcFoundation.handleFocus();\n });\n }\n endFocus() {\n this.waitForFoundation(() => {\n this.mdcFoundation.handleBlur();\n });\n }\n startHover() {\n this.hovering = true;\n }\n endHover() {\n this.hovering = false;\n }\n /**\n * Wait for the MDCFoundation to be created by `firstUpdated`\n */\n waitForFoundation(fn) {\n if (this.mdcFoundation) {\n fn();\n }\n else {\n this.updateComplete.then(fn);\n }\n }\n update(changedProperties) {\n if (changedProperties.has('disabled')) {\n // stop hovering when ripple is disabled to prevent a stuck \"hover\" state\n // When re-enabled, the outer component will get a `mouseenter` event on\n // the first movement, which will call `startHover()`\n if (this.disabled) {\n this.endHover();\n }\n }\n super.update(changedProperties);\n }\n /** @soyTemplate */\n render() {\n const shouldActivateInPrimary = this.activated && (this.primary || !this.accent);\n const shouldSelectInPrimary = this.selected && (this.primary || !this.accent);\n /** @classMap */\n const classes = {\n 'mdc-ripple-surface--accent': this.accent,\n 'mdc-ripple-surface--primary--activated': shouldActivateInPrimary,\n 'mdc-ripple-surface--accent--activated': this.accent && this.activated,\n 'mdc-ripple-surface--primary--selected': shouldSelectInPrimary,\n 'mdc-ripple-surface--accent--selected': this.accent && this.selected,\n 'mdc-ripple-surface--disabled': this.disabled,\n 'mdc-ripple-surface--hover': this.hovering,\n 'mdc-ripple-surface--primary': this.primary,\n 'mdc-ripple-surface--selected': this.selected,\n 'mdc-ripple-upgraded--background-focused': this.bgFocused,\n 'mdc-ripple-upgraded--foreground-activation': this.fgActivation,\n 'mdc-ripple-upgraded--foreground-deactivation': this.fgDeactivation,\n 'mdc-ripple-upgraded--unbounded': this.unbounded,\n 'mdc-ripple-surface--internal-use-state-layer-custom-properties': this.internalUseStateLayerCustomProperties,\n };\n return html `\n
    `;\n }\n}\n__decorate([\n query('.mdc-ripple-surface')\n], RippleBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"primary\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"accent\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"unbounded\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"activated\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"internalUseStateLayerCustomProperties\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"hovering\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"bgFocused\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgActivation\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgDeactivation\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgScale\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgSize\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"translateStart\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"translateEnd\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"leftPos\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"topPos\", void 0);\n//# sourceMappingURL=mwc-ripple-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`;\n//# sourceMappingURL=mwc-ripple.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { RippleBase } from './mwc-ripple-base.js';\nimport { styles } from './mwc-ripple.css.js';\n/** @soyCompatible */\nlet Ripple = class Ripple extends RippleBase {\n};\nRipple.styles = [styles];\nRipple = __decorate([\n customElement('mwc-ripple')\n], Ripple);\nexport { Ripple };\n//# sourceMappingURL=mwc-ripple.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * TypeScript version of the decorator\n * @see https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators\n */\nfunction tsDecorator(prototype, name, descriptor) {\n const constructor = prototype.constructor;\n if (!descriptor) {\n /**\n * lit uses internal properties with two leading underscores to\n * provide storage for accessors\n */\n const litInternalPropertyKey = `__${name}`;\n descriptor =\n constructor.getPropertyDescriptor(name, litInternalPropertyKey);\n if (!descriptor) {\n throw new Error('@ariaProperty must be used after a @property decorator');\n }\n }\n // descriptor must exist at this point, reassign so typescript understands\n const propDescriptor = descriptor;\n let attribute = '';\n if (!propDescriptor.set) {\n throw new Error(`@ariaProperty requires a setter for ${name}`);\n }\n // TODO(b/202853219): Remove this check when internal tooling is\n // compatible\n // tslint:disable-next-line:no-any bail if applied to internal generated class\n if (prototype.dispatchWizEvent) {\n return descriptor;\n }\n const wrappedDescriptor = {\n configurable: true,\n enumerable: true,\n set(value) {\n if (attribute === '') {\n const options = constructor.getPropertyOptions(name);\n // if attribute is not a string, use `name` instead\n attribute =\n typeof options.attribute === 'string' ? options.attribute : name;\n }\n if (this.hasAttribute(attribute)) {\n this.removeAttribute(attribute);\n }\n propDescriptor.set.call(this, value);\n }\n };\n if (propDescriptor.get) {\n wrappedDescriptor.get = function () {\n return propDescriptor.get.call(this);\n };\n }\n return wrappedDescriptor;\n}\n/**\n * A property decorator proxies an aria attribute to an internal node\n *\n * This decorator is only intended for use with ARIA attributes, such as `role`\n * and `aria-label` due to screenreader needs.\n *\n * Upon first render, `@ariaProperty` will remove the attribute from the host\n * element to prevent screenreaders from reading the host instead of the\n * internal node.\n *\n * This decorator should only be used for non-Symbol public fields decorated\n * with `@property`, or on a setter with an optional getter.\n *\n * @example\n * ```ts\n * class MyElement {\n * @ariaProperty\n * @property({ type: String, attribute: 'aria-label' })\n * ariaLabel!: string;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function ariaProperty(protoOrDescriptor, name, \n// tslint:disable-next-line:no-any any is required as a return type from decorators\ndescriptor) {\n if (name !== undefined) {\n return tsDecorator(protoOrDescriptor, name, descriptor);\n }\n else {\n throw new Error('@ariaProperty only supports TypeScript Decorators');\n }\n}\n//# sourceMappingURL=aria-property.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Class that encapsulates the events handlers for `mwc-ripple`\n *\n *\n * Example:\n * ```\n * class XFoo extends LitElement {\n * async getRipple() {\n * this.renderRipple = true;\n * await this.updateComplete;\n * return this.renderRoot.querySelector('mwc-ripple');\n * }\n * rippleHandlers = new RippleHandlers(() => this.getRipple());\n *\n * render() {\n * return html`\n *
    \n * ${this.renderRipple ? html`` : ''}\n * `;\n * }\n * }\n * ```\n */\nexport class RippleHandlers {\n constructor(\n /** Function that returns a `mwc-ripple` */\n rippleFn) {\n this.startPress = (ev) => {\n rippleFn().then((r) => {\n r && r.startPress(ev);\n });\n };\n this.endPress = () => {\n rippleFn().then((r) => {\n r && r.endPress();\n });\n };\n this.startFocus = () => {\n rippleFn().then((r) => {\n r && r.startFocus();\n });\n };\n this.endFocus = () => {\n rippleFn().then((r) => {\n r && r.endFocus();\n });\n };\n this.startHover = () => {\n rippleFn().then((r) => {\n r && r.startHover();\n });\n };\n this.endHover = () => {\n rippleFn().then((r) => {\n r && r.endHover();\n });\n };\n }\n}\n//# sourceMappingURL=ripple-handlers.js.map","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=l=>null!=l?l:t;export{l as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-icon/mwc-icon.js';\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { ariaProperty } from '@material/mwc-base/aria-property.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, query, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n/** @soyCompatible */\nexport class ButtonBase extends LitElement {\n constructor() {\n super(...arguments);\n this.raised = false;\n this.unelevated = false;\n this.outlined = false;\n this.dense = false;\n this.disabled = false;\n this.trailingIcon = false;\n this.fullwidth = false;\n this.icon = '';\n this.label = '';\n this.expandContent = false;\n this.shouldRenderRipple = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /** @soyTemplate */\n renderOverlay() {\n return html ``;\n }\n /** @soyTemplate */\n renderRipple() {\n const filled = this.raised || this.unelevated;\n return this.shouldRenderRipple ?\n html `` :\n '';\n }\n focus() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.startFocus();\n buttonElement.focus();\n }\n }\n blur() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.endFocus();\n buttonElement.blur();\n }\n }\n /** @soyTemplate */\n getRenderClasses() {\n return {\n 'mdc-button--raised': this.raised,\n 'mdc-button--unelevated': this.unelevated,\n 'mdc-button--outlined': this.outlined,\n 'mdc-button--dense': this.dense,\n };\n }\n /**\n * @soyTemplate\n * @soyAttributes buttonAttributes: #button\n * @soyClasses buttonClasses: #button\n */\n render() {\n return html `\n \n ${this.renderOverlay()}\n ${this.renderRipple()}\n \n \n ${this.icon && !this.trailingIcon ? this.renderIcon() : ''}\n \n \n ${this.label}\n \n \n \n \n \n ${this.icon && this.trailingIcon ? this.renderIcon() : ''}\n \n \n `;\n }\n /** @soyTemplate */\n renderIcon() {\n return html `\n \n ${this.icon}\n `;\n }\n handleRippleActivate(evt) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.rippleHandlers.startPress(evt);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\nButtonBase.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-haspopup' })\n], ButtonBase.prototype, \"ariaHasPopup\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"raised\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"unelevated\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"outlined\", void 0);\n__decorate([\n property({ type: Boolean })\n], ButtonBase.prototype, \"dense\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean, attribute: 'trailingicon' })\n], ButtonBase.prototype, \"trailingIcon\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"fullwidth\", void 0);\n__decorate([\n property({ type: String })\n], ButtonBase.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], ButtonBase.prototype, \"label\", void 0);\n__decorate([\n property({ type: Boolean })\n], ButtonBase.prototype, \"expandContent\", void 0);\n__decorate([\n query('#button')\n], ButtonBase.prototype, \"buttonElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], ButtonBase.prototype, \"ripple\", void 0);\n__decorate([\n state()\n], ButtonBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], ButtonBase.prototype, \"handleRippleActivate\", null);\n//# sourceMappingURL=mwc-button-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:transparent}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{display:none}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px );display:block}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{border-color:CanvasText}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}.mdc-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised,.mdc-button--unelevated{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{background-color:rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--raised .mdc-button__ripple,.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px);padding:0 15px 0 15px;border-width:1px}.mdc-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button--outlined:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined:disabled{border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:1px}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);width:calc(100% + 2 * 1px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--raised:hover,.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12)}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0,0,0,.12)}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent;vertical-align:top}:host([fullwidth]){width:100%}:host([raised]),:host([unelevated]){--mdc-ripple-color:#fff;--mdc-ripple-focus-opacity:0.24;--mdc-ripple-hover-opacity:0.08;--mdc-ripple-press-opacity:0.24}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon,.leading-icon ::slotted(*),.leading-icon .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .leading-icon ::slotted(*),[dir=rtl] .leading-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl],.leading-icon ::slotted(*[dir=rtl]),.leading-icon .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}.slot-container{display:inline-flex;align-items:center;justify-content:center}.slot-container.flex{flex:auto}.mdc-button{flex:auto;overflow:hidden;padding-left:8px;padding-left:var(--mdc-button-horizontal-padding, 8px);padding-right:8px;padding-right:var(--mdc-button-horizontal-padding, 8px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-focus, var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)))}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-active, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-disabled, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised,.mdc-button--unelevated{padding-left:16px;padding-left:var(--mdc-button-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mdc-button-horizontal-padding, 16px)}.mdc-button--outlined{border-width:1px;border-width:var(--mdc-button-outline-width, 1px);padding-left:calc(16px - 1px);padding-left:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px));padding-right:calc(16px - 1px);padding-right:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined .ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-button-outline-width, 1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-button-outline-width, 1px));right:initial;right:initial;border-width:1px;border-width:var(--mdc-button-outline-width, 1px);border-style:solid;border-color:transparent}[dir=rtl] .mdc-button--outlined .ripple,.mdc-button--outlined .ripple[dir=rtl]{left:initial;left:initial;right:calc(-1 * 1px);right:calc(-1 * var(--mdc-button-outline-width, 1px))}.mdc-button--dense{height:28px;margin-top:0;margin-bottom:0}.mdc-button--dense .mdc-button__touch{height:100%}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-button{color:rgba(0, 0, 0, 0.38);color:var(--mdc-button-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-button--raised,:host([disabled]) .mdc-button--unelevated{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-button-disabled-fill-color, rgba(0, 0, 0, 0.12))}:host([disabled]) .mdc-button--outlined{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}`;\n//# sourceMappingURL=styles.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ButtonBase } from './mwc-button-base.js';\nimport { styles } from './styles.css.js';\n/** @soyCompatible */\nlet Button = class Button extends ButtonBase {\n};\nButton.styles = [styles];\nButton = __decorate([\n customElement('mwc-button')\n], Button);\nexport { Button };\n//# sourceMappingURL=mwc-button.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n/**\n * Fab Base class logic and template definition\n * @soyCompatible\n */\nexport class FabBase extends LitElement {\n constructor() {\n super(...arguments);\n this.mini = false;\n this.exited = false;\n this.disabled = false;\n this.extended = false;\n this.showIconAtEnd = false;\n this.reducedTouchTarget = false;\n this.icon = '';\n this.label = '';\n this.shouldRenderRipple = false;\n this.useStateLayerCustomProperties = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /**\n * @soyTemplate\n * @soyClasses fabClasses: .mdc-fab\n */\n render() {\n const hasTouchTarget = this.mini && !this.reducedTouchTarget;\n /** @classMap */\n const classes = {\n 'mdc-fab--mini': this.mini,\n 'mdc-fab--touch': hasTouchTarget,\n 'mdc-fab--exited': this.exited,\n 'mdc-fab--extended': this.extended,\n 'icon-end': this.showIconAtEnd,\n };\n const ariaLabel = this.label ? this.label : this.icon;\n /*\n * Some internal styling is sensitive to whitespace in this template, take\n * care when modifying it.\n */\n return html `${this.renderBeforeRipple()}${this.renderRipple()}${this.showIconAtEnd ? this.renderLabel() : ''}${this.icon}${!this.showIconAtEnd ? this.renderLabel() : ''}${this.renderTouchTarget()}`;\n }\n /** @soyTemplate */\n renderIcon() {\n // TODO(b/191914389): reimplement once Wit issue is resolved\n return html ``;\n }\n /** @soyTemplate */\n renderTouchTarget() {\n const hasTouchTarget = this.mini && !this.reducedTouchTarget;\n return html `${hasTouchTarget ? html `
    ` : ''}`;\n }\n /** @soyTemplate */\n renderLabel() {\n const showLabel = this.label !== '' && this.extended;\n return html `${showLabel ? html `${this.label}` :\n ''}`;\n }\n /** @soyTemplate */\n renderBeforeRipple() {\n return html ``;\n }\n /** @soyTemplate */\n renderRipple() {\n return this.shouldRenderRipple ? html `` :\n '';\n }\n handleRippleActivate(event) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.handleRippleStartPress(event);\n }\n handleRippleStartPress(event) {\n this.rippleHandlers.startPress(event);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\nFabBase.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n queryAsync('mwc-ripple')\n], FabBase.prototype, \"ripple\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"mini\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"exited\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"extended\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"showIconAtEnd\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"reducedTouchTarget\", void 0);\n__decorate([\n property()\n], FabBase.prototype, \"icon\", void 0);\n__decorate([\n property()\n], FabBase.prototype, \"label\", void 0);\n__decorate([\n state()\n], FabBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n state()\n], FabBase.prototype, \"useStateLayerCustomProperties\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], FabBase.prototype, \"handleRippleStartPress\", null);\n//# sourceMappingURL=mwc-fab-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host .mdc-fab .material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}:host{outline:none;--mdc-ripple-color: currentcolor;user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;-webkit-tap-highlight-color:transparent;display:inline-flex;outline:none;user-select:none}:host .mdc-touch-target-wrapper{display:inline}:host .mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}:host .mdc-fab,:host .mdc-fab:not(:disabled) .mdc-fab__icon,:host .mdc-fab:not(:disabled) .mdc-fab__label,:host .mdc-fab:disabled .mdc-fab__icon,:host .mdc-fab:disabled .mdc-fab__label{color:#fff;color:var(--mdc-theme-on-secondary, #fff)}:host .mdc-fab:not(.mdc-fab--extended){border-radius:50%}:host .mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab .mdc-fab__icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}:host .mdc-fab--extended.mdc-fab--exited .mdc-fab__icon ::slotted(*){transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:0px;padding-right:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:0px;padding-left:max(0px, var(--mdc-fab-focus-outline-width, 0px));box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12))}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-color:initial;border-color:var(--mdc-fab-focus-outline-color, initial)}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:0px;padding-right:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:0px;padding-left:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab:hover,:host .mdc-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}:host .mdc-fab:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12))}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__icon{width:24px;width:var(--mdc-icon-size, 24px);height:24px;height:var(--mdc-icon-size, 24px);font-size:24px;font-size:var(--mdc-icon-size, 24px);transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform;display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab.mdc-fab--extended{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:20px;padding-right:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:20px;padding-left:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px))}:host .mdc-fab.mdc-fab--extended:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab.mdc-fab--extended:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:20px;padding-right:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:20px;padding-left:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon{margin-left:12px;margin-left:var(--mdc-fab-extended-icon-padding, 12px);margin-right:calc(12px - 20px);margin-right:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px))}[dir=rtl] :host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon,:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-left:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px));margin-right:12px;margin-right:var(--mdc-fab-extended-icon-padding, 12px)}`;\n//# sourceMappingURL=mwc-fab.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { FabBase } from './mwc-fab-base.js';\nimport { styles } from './mwc-fab.css.js';\n/** @soyCompatible */\nlet Fab = class Fab extends FabBase {\n};\nFab.styles = [styles];\nFab = __decorate([\n customElement('mwc-fab')\n], Fab);\nexport { Fab };\n//# sourceMappingURL=mwc-fab.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { ariaProperty } from '@material/mwc-base/aria-property.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, query, queryAsync, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n/** @soyCompatible */\nexport class IconButtonBase extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.icon = '';\n this.shouldRenderRipple = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /** @soyTemplate */\n renderRipple() {\n return this.shouldRenderRipple ? html `\n \n ` :\n '';\n }\n focus() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.startFocus();\n buttonElement.focus();\n }\n }\n blur() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.endFocus();\n buttonElement.blur();\n }\n }\n /** @soyTemplate */\n render() {\n return html `${this.renderRipple()}\n ${this.icon ? html `${this.icon}` : ''}\n \n `;\n }\n handleRippleMouseDown(event) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.rippleHandlers.startPress(event);\n }\n handleRippleTouchStart(event) {\n this.rippleHandlers.startPress(event);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\n__decorate([\n property({ type: Boolean, reflect: true })\n], IconButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], IconButtonBase.prototype, \"icon\", void 0);\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-label' })\n], IconButtonBase.prototype, \"ariaLabel\", void 0);\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-haspopup' })\n], IconButtonBase.prototype, \"ariaHasPopup\", void 0);\n__decorate([\n query('button')\n], IconButtonBase.prototype, \"buttonElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], IconButtonBase.prototype, \"ripple\", void 0);\n__decorate([\n state()\n], IconButtonBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], IconButtonBase.prototype, \"handleRippleMouseDown\", null);\n__decorate([\n eventOptions({ passive: true })\n], IconButtonBase.prototype, \"handleRippleTouchStart\", null);\n//# sourceMappingURL=mwc-icon-button-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;\n//# sourceMappingURL=mwc-icon-button.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { IconButtonBase } from './mwc-icon-button-base.js';\nimport { styles } from './mwc-icon-button.css.js';\n/** @soyCompatible */\nlet IconButton = class IconButton extends IconButtonBase {\n};\nIconButton.styles = [styles];\nIconButton = __decorate([\n customElement('mwc-icon-button')\n], IconButton);\nexport { IconButton };\n//# sourceMappingURL=mwc-icon-button.js.map","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:l}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},t=(o,l)=>void 0===l?void 0!==(null==o?void 0:o._$litType$):(null==o?void 0:o._$litType$)===l,v=o=>{var l;return null!=(null===(l=null==o?void 0:o._$litType$)||void 0===l?void 0:l.h)},d=o=>void 0!==(null==o?void 0:o._$litDirective$),u=o=>null==o?void 0:o._$litDirective$,e=o=>void 0===o.strings,r=()=>document.createComment(\"\"),c=(o,i,n)=>{var t;const v=o._$AA.parentNode,d=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=v.insertBefore(r(),d),t=v.insertBefore(r(),d);n=new l(i,t,o,o.options)}else{const l=n._$AB.nextSibling,i=n._$AM,u=i!==o;if(u){let l;null===(t=n._$AQ)||void 0===t||t.call(n,o),n._$AM=o,void 0!==n._$AP&&(l=o._$AU)!==i._$AU&&n._$AP(l)}if(l!==d||u){let o=n._$AA;for(;o!==l;){const l=o.nextSibling;v.insertBefore(o,d),o=l}}}return n},f=(o,l,i=o)=>(o._$AI(l,i),o),s={},a=(o,l=s)=>o._$AH=l,m=o=>o._$AH,p=o=>{var l;null===(l=o._$AP)||void 0===l||l.call(o,!1,!0);let i=o._$AA;const n=o._$AB.nextSibling;for(;i!==n;){const o=i.nextSibling;i.remove(),i=o}},h=o=>{o._$AR()};export{n as TemplateResultType,h as clearPart,m as getCommittedValue,u as getDirectiveClass,c as insertPart,v as isCompiledTemplateResult,d as isDirectiveResult,i as isPrimitive,e as isSingleExpression,t as isTemplateResult,p as removePart,f as setChildPartValue,a as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{var e,o;const r=i._$AN;if(void 0===r)return!1;for(const i of r)null===(o=(e=i)._$AO)||void 0===o||o.call(e,t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===(null==e?void 0:e.size))},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),l(t)}};function n(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function h(i,t=!1,e=0){const r=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(r))for(let i=e;i{var t,s,o,r;i.type==e.CHILD&&(null!==(t=(o=i)._$AP)&&void 0!==t||(o._$AP=h),null!==(s=(r=i)._$AQ)&&void 0!==s||(r._$AQ=n))};class c extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?null===(e=this.reconnected)||void 0===e||e.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{c as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as i}from\"../lit-html.js\";import{AsyncDirective as t}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.dt=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if(\"function\"==typeof this.G){const s=null!==(t=this.dt)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.dt,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,t,s;return\"function\"==typeof this.G?null===(t=h.get(null!==(i=this.dt)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","/**\n * @license\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n(() => {\n var _a, _b, _c;\n /* Symbols for private properties */\n const _blockingElements = Symbol();\n const _alreadyInertElements = Symbol();\n const _topElParents = Symbol();\n const _siblingsToRestore = Symbol();\n const _parentMO = Symbol();\n /* Symbols for private static methods */\n const _topChanged = Symbol();\n const _swapInertedSibling = Symbol();\n const _inertSiblings = Symbol();\n const _restoreInertedSiblings = Symbol();\n const _getParents = Symbol();\n const _getDistributedChildren = Symbol();\n const _isInertable = Symbol();\n const _handleMutations = Symbol();\n class BlockingElementsImpl {\n constructor() {\n /**\n * The blocking elements.\n */\n this[_a] = [];\n /**\n * Used to keep track of the parents of the top element, from the element\n * itself up to body. When top changes, the old top might have been removed\n * from the document, so we need to memoize the inerted parents' siblings\n * in order to restore their inerteness when top changes.\n */\n this[_b] = [];\n /**\n * Elements that are already inert before the first blocking element is\n * pushed.\n */\n this[_c] = new Set();\n }\n destructor() {\n // Restore original inertness.\n this[_restoreInertedSiblings](this[_topElParents]);\n // Note we don't want to make these properties nullable on the class,\n // since then we'd need non-null casts in many places. Calling a method on\n // a BlockingElements instance after calling destructor will result in an\n // exception.\n const nullable = this;\n nullable[_blockingElements] = null;\n nullable[_topElParents] = null;\n nullable[_alreadyInertElements] = null;\n }\n get top() {\n const elems = this[_blockingElements];\n return elems[elems.length - 1] || null;\n }\n push(element) {\n if (!element || element === this.top) {\n return;\n }\n // Remove it from the stack, we'll bring it to the top.\n this.remove(element);\n this[_topChanged](element);\n this[_blockingElements].push(element);\n }\n remove(element) {\n const i = this[_blockingElements].indexOf(element);\n if (i === -1) {\n return false;\n }\n this[_blockingElements].splice(i, 1);\n // Top changed only if the removed element was the top element.\n if (i === this[_blockingElements].length) {\n this[_topChanged](this.top);\n }\n return true;\n }\n pop() {\n const top = this.top;\n top && this.remove(top);\n return top;\n }\n has(element) {\n return this[_blockingElements].indexOf(element) !== -1;\n }\n /**\n * Sets `inert` to all document elements except the new top element, its\n * parents, and its distributed content.\n */\n [(_a = _blockingElements, _b = _topElParents, _c = _alreadyInertElements, _topChanged)](newTop) {\n const toKeepInert = this[_alreadyInertElements];\n const oldParents = this[_topElParents];\n // No new top, reset old top if any.\n if (!newTop) {\n this[_restoreInertedSiblings](oldParents);\n toKeepInert.clear();\n this[_topElParents] = [];\n return;\n }\n const newParents = this[_getParents](newTop);\n // New top is not contained in the main document!\n if (newParents[newParents.length - 1].parentNode !== document.body) {\n throw Error('Non-connected element cannot be a blocking element');\n }\n // Cast here because we know we'll call _inertSiblings on newParents\n // below.\n this[_topElParents] = newParents;\n const toSkip = this[_getDistributedChildren](newTop);\n // No previous top element.\n if (!oldParents.length) {\n this[_inertSiblings](newParents, toSkip, toKeepInert);\n return;\n }\n let i = oldParents.length - 1;\n let j = newParents.length - 1;\n // Find common parent. Index 0 is the element itself (so stop before it).\n while (i > 0 && j > 0 && oldParents[i] === newParents[j]) {\n i--;\n j--;\n }\n // If up the parents tree there are 2 elements that are siblings, swap\n // the inerted sibling.\n if (oldParents[i] !== newParents[j]) {\n this[_swapInertedSibling](oldParents[i], newParents[j]);\n }\n // Restore old parents siblings inertness.\n i > 0 && this[_restoreInertedSiblings](oldParents.slice(0, i));\n // Make new parents siblings inert.\n j > 0 && this[_inertSiblings](newParents.slice(0, j), toSkip, null);\n }\n /**\n * Swaps inertness between two sibling elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_swapInertedSibling](oldInert, newInert) {\n const siblingsToRestore = oldInert[_siblingsToRestore];\n // oldInert is not contained in siblings to restore, so we have to check\n // if it's inertable and if already inert.\n if (this[_isInertable](oldInert) && !oldInert.inert) {\n oldInert.inert = true;\n siblingsToRestore.add(oldInert);\n }\n // If newInert was already between the siblings to restore, it means it is\n // inertable and must be restored.\n if (siblingsToRestore.has(newInert)) {\n newInert.inert = false;\n siblingsToRestore.delete(newInert);\n }\n newInert[_parentMO] = oldInert[_parentMO];\n newInert[_siblingsToRestore] = siblingsToRestore;\n oldInert[_parentMO] = undefined;\n oldInert[_siblingsToRestore] = undefined;\n }\n /**\n * Restores original inertness to the siblings of the elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_restoreInertedSiblings](elements) {\n for (const element of elements) {\n const mo = element[_parentMO];\n mo.disconnect();\n element[_parentMO] = undefined;\n const siblings = element[_siblingsToRestore];\n for (const sibling of siblings) {\n sibling.inert = false;\n }\n element[_siblingsToRestore] = undefined;\n }\n }\n /**\n * Inerts the siblings of the elements except the elements to skip. Stores\n * the inerted siblings into the element's symbol `_siblingsToRestore`.\n * Pass `toKeepInert` to collect the already inert elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_inertSiblings](elements, toSkip, toKeepInert) {\n for (const element of elements) {\n // Assume element is not a Document, so it must have a parentNode.\n const parent = element.parentNode;\n const children = parent.children;\n const inertedSiblings = new Set();\n for (let j = 0; j < children.length; j++) {\n const sibling = children[j];\n // Skip the input element, if not inertable or to be skipped.\n if (sibling === element || !this[_isInertable](sibling) ||\n (toSkip && toSkip.has(sibling))) {\n continue;\n }\n // Should be collected since already inerted.\n if (toKeepInert && sibling.inert) {\n toKeepInert.add(sibling);\n }\n else {\n sibling.inert = true;\n inertedSiblings.add(sibling);\n }\n }\n // Store the siblings that were inerted.\n element[_siblingsToRestore] = inertedSiblings;\n // Observe only immediate children mutations on the parent.\n const mo = new MutationObserver(this[_handleMutations].bind(this));\n element[_parentMO] = mo;\n let parentToObserve = parent;\n // If we're using the ShadyDOM polyfill, then our parent could be a\n // shady root, which is an object that acts like a ShadowRoot, but isn't\n // actually a node in the real DOM. Observe the real DOM parent instead.\n const maybeShadyRoot = parentToObserve;\n if (maybeShadyRoot.__shady && maybeShadyRoot.host) {\n parentToObserve = maybeShadyRoot.host;\n }\n mo.observe(parentToObserve, {\n childList: true,\n });\n }\n }\n /**\n * Handles newly added/removed nodes by toggling their inertness.\n * It also checks if the current top Blocking Element has been removed,\n * notifying and removing it.\n */\n [_handleMutations](mutations) {\n const parents = this[_topElParents];\n const toKeepInert = this[_alreadyInertElements];\n for (const mutation of mutations) {\n // If the target is a shadowRoot, get its host as we skip shadowRoots when\n // computing _topElParents.\n const target = mutation.target.host || mutation.target;\n const idx = target === document.body ?\n parents.length :\n parents.indexOf(target);\n const inertedChild = parents[idx - 1];\n const inertedSiblings = inertedChild[_siblingsToRestore];\n // To restore.\n for (let i = 0; i < mutation.removedNodes.length; i++) {\n const sibling = mutation.removedNodes[i];\n if (sibling === inertedChild) {\n console.info('Detected removal of the top Blocking Element.');\n this.pop();\n return;\n }\n if (inertedSiblings.has(sibling)) {\n sibling.inert = false;\n inertedSiblings.delete(sibling);\n }\n }\n // To inert.\n for (let i = 0; i < mutation.addedNodes.length; i++) {\n const sibling = mutation.addedNodes[i];\n if (!this[_isInertable](sibling)) {\n continue;\n }\n if (toKeepInert && sibling.inert) {\n toKeepInert.add(sibling);\n }\n else {\n sibling.inert = true;\n inertedSiblings.add(sibling);\n }\n }\n }\n }\n /**\n * Returns if the element is inertable.\n */\n [_isInertable](element) {\n return false === /^(style|template|script)$/.test(element.localName);\n }\n /**\n * Returns the list of newParents of an element, starting from element\n * (included) up to `document.body` (excluded).\n */\n [_getParents](element) {\n const parents = [];\n let current = element;\n // Stop to body.\n while (current && current !== document.body) {\n // Skip shadow roots.\n if (current.nodeType === Node.ELEMENT_NODE) {\n parents.push(current);\n }\n // ShadowDom v1\n if (current.assignedSlot) {\n // Collect slots from deepest slot to top.\n while (current = current.assignedSlot) {\n parents.push(current);\n }\n // Continue the search on the top slot.\n current = parents.pop();\n continue;\n }\n current = current.parentNode ||\n current.host;\n }\n return parents;\n }\n /**\n * Returns the distributed children of the element's shadow root.\n * Returns null if the element doesn't have a shadow root.\n */\n [_getDistributedChildren](element) {\n const shadowRoot = element.shadowRoot;\n if (!shadowRoot) {\n return null;\n }\n const result = new Set();\n let i;\n let j;\n let nodes;\n const slots = shadowRoot.querySelectorAll('slot');\n if (slots.length && slots[0].assignedNodes) {\n for (i = 0; i < slots.length; i++) {\n nodes = slots[i].assignedNodes({\n flatten: true,\n });\n for (j = 0; j < nodes.length; j++) {\n if (nodes[j].nodeType === Node.ELEMENT_NODE) {\n result.add(nodes[j]);\n }\n }\n }\n // No need to search for .\n }\n return result;\n }\n }\n document.$blockingElements =\n new BlockingElementsImpl();\n})();\n//# sourceMappingURL=blocking-elements.js.map","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n\n(function () {\n // Return early if we're not running inside of the browser.\n if (typeof window === 'undefined') {\n return;\n }\n\n // Convenience function for converting NodeLists.\n /** @type {typeof Array.prototype.slice} */\n var slice = Array.prototype.slice;\n\n /**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n\n /** @type {string} */\n var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');\n\n /**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n var InertRoot = function () {\n /**\n * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n _classCallCheck(this, InertRoot);\n\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n\n /** @type {!HTMLElement} */\n this._rootElement = rootElement;\n\n /**\n * @type {!Set}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n this._managedNodes = new Set();\n\n // Make the subtree hidden from assistive technology\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n this._rootElement.setAttribute('aria-hidden', 'true');\n\n // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n this._makeSubtreeUnfocusable(this._rootElement);\n\n // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n this._observer = new MutationObserver(this._onMutation.bind(this));\n this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });\n }\n\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n _createClass(InertRoot, [{\n key: 'destructor',\n value: function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this);\n\n // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n this._observer = /** @type {?} */null;\n this._rootElement = /** @type {?} */null;\n this._managedNodes = /** @type {?} */null;\n this._inertManager = /** @type {?} */null;\n }\n\n /**\n * @return {!Set} A copy of this InertRoot's managed nodes set.\n */\n\n }, {\n key: '_makeSubtreeUnfocusable',\n\n\n /**\n * @param {!Node} startNode\n */\n value: function _makeSubtreeUnfocusable(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._visitNode(node);\n });\n\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n var root = undefined;\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root = /** @type {!ShadowRoot} */node;\n break;\n }\n node = node.parentNode;\n }\n if (root) {\n activeElement = root.activeElement;\n }\n }\n if (startNode.contains(activeElement)) {\n activeElement.blur();\n // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n\n /**\n * @param {!Node} node\n */\n\n }, {\n key: '_visitNode',\n value: function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */node;\n\n // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_manageNode',\n value: function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n this._managedNodes.add(inertNode);\n }\n\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_unmanageNode',\n value: function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n if (inertNode) {\n this._managedNodes['delete'](inertNode);\n }\n }\n\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n\n }, {\n key: '_unmanageSubtree',\n value: function _unmanageSubtree(startNode) {\n var _this3 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this3._unmanageNode(node);\n });\n }\n\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!HTMLElement} node\n */\n\n }, {\n key: '_adoptInertRoot',\n value: function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node);\n\n // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_onMutation',\n value: function _onMutation(records, self) {\n records.forEach(function (record) {\n var target = /** @type {!HTMLElement} */record.target;\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this);\n\n // Un-manage removed nodes\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n var inertSubroot = this._inertManager.getInertRoot(target);\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n }\n }, {\n key: 'managedNodes',\n get: function get() {\n return new Set(this._managedNodes);\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'hasSavedAriaHidden',\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n\n /** @param {?string} ariaHidden */\n\n }, {\n key: 'savedAriaHidden',\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n }();\n\n /**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\n var InertNode = function () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n _classCallCheck(this, InertNode);\n\n /** @type {!Node} */\n this._node = node;\n\n /** @type {boolean} */\n this._overrodeFocusMethod = false;\n\n /**\n * @type {!Set} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n this._inertRoots = new Set([inertRoot]);\n\n /** @type {?number} */\n this._savedTabIndex = null;\n\n /** @type {boolean} */\n this._destroyed = false;\n\n // Save any prior tabindex info and make this node untabbable\n this.ensureUntabbable();\n }\n\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n _createClass(InertNode, [{\n key: 'destructor',\n value: function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */this._node;\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n }\n\n // Use `delete` to restore native focus method.\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n }\n\n // See note in InertRoot.destructor for why we cast these nulls to ANY.\n this._node = /** @type {?} */null;\n this._inertRoots = /** @type {?} */null;\n this._destroyed = true;\n }\n\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n\n }, {\n key: '_throwIfDestroyed',\n\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n value: function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'ensureUntabbable',\n\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n value: function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */this.node;\n if (matches.call(element, _focusableElementsString)) {\n if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n }\n element.setAttribute('tabindex', '-1');\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'addInertRoot',\n value: function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots.add(inertRoot);\n }\n\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'removeInertRoot',\n value: function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots['delete'](inertRoot);\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n }\n }, {\n key: 'destroyed',\n get: function get() {\n return (/** @type {!InertNode} */this._destroyed\n );\n }\n }, {\n key: 'hasSavedTabIndex',\n get: function get() {\n return this._savedTabIndex !== null;\n }\n\n /** @return {!Node} */\n\n }, {\n key: 'node',\n get: function get() {\n this._throwIfDestroyed();\n return this._node;\n }\n\n /** @param {?number} tabIndex */\n\n }, {\n key: 'savedTabIndex',\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n this._savedTabIndex = tabIndex;\n }\n\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n }();\n\n /**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\n var InertManager = function () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n _classCallCheck(this, InertManager);\n\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n\n /** @type {!Document} */\n this._document = document;\n\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._managedNodes = new Map();\n\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._inertRoots = new Map();\n\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n this._observer = new MutationObserver(this._watchForInert.bind(this));\n\n // Add inert style.\n addInertStyle(document.head || document.body || document.documentElement);\n\n // Wait for document to be loaded.\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!HTMLElement} root\n * @param {boolean} inert\n */\n\n\n _createClass(InertManager, [{\n key: 'setInert',\n value: function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n this._inertRoots.set(root, inertRoot);\n // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n _inertRoot.destructor();\n this._inertRoots['delete'](root);\n root.removeAttribute('inert');\n }\n }\n\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n\n }, {\n key: 'getInertRoot',\n value: function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n\n }, {\n key: 'register',\n value: function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n\n }, {\n key: 'deregister',\n value: function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n if (inertNode.destroyed) {\n this._managedNodes['delete'](node);\n }\n\n return inertNode;\n }\n\n /**\n * Callback used when document has finished loading.\n */\n\n }, {\n key: '_onDocumentLoaded',\n value: function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this);\n\n // Comment this out to use programmatic API only.\n this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });\n }\n\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_watchForInert',\n value: function _watchForInert(records, self) {\n var _this = this;\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n var target = /** @type {!HTMLElement} */record.target;\n var inert = target.hasAttribute('inert');\n _this.setInert(target, inert);\n break;\n }\n }, this);\n }\n }]);\n\n return InertManager;\n }();\n\n /**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\n function composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */node;\n if (callback) {\n callback(element);\n }\n\n // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the or elements. Descend straight into the\n // ShadowRoot.\n var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n }\n\n // If it is a element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'content') {\n var content = /** @type {!HTMLContentElement} */element;\n // Verifies if ShadowDom v0 is supported.\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n return;\n }\n\n // If it is a element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'slot') {\n var slot = /** @type {!HTMLSlotElement} */element;\n // Verify if ShadowDom v1 is supported.\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n return;\n }\n }\n\n // If it is neither the parent of a ShadowRoot, a element, a \n // element, nor a element recurse normally.\n var child = node.firstChild;\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n }\n\n /**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n function addInertStyle(node) {\n if (node.querySelector('style#inert-style, link#inert-style')) {\n return;\n }\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + ' user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n }\n\n if (!HTMLElement.prototype.hasOwnProperty('inert')) {\n /** @type {!InertManager} */\n var inertManager = new InertManager(document);\n\n Object.defineProperty(HTMLElement.prototype, 'inert', {\n enumerable: true,\n /** @this {!HTMLElement} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n /** @this {!HTMLElement} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n }\n})();\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n CLOSING: 'mdc-dialog--closing',\n OPEN: 'mdc-dialog--open',\n OPENING: 'mdc-dialog--opening',\n SCROLLABLE: 'mdc-dialog--scrollable',\n SCROLL_LOCK: 'mdc-dialog-scroll-lock',\n STACKED: 'mdc-dialog--stacked',\n FULLSCREEN: 'mdc-dialog--fullscreen',\n // Class for showing a scroll divider on full-screen dialog header element.\n // Should only be displayed on scrollable content, when the dialog content is\n // scrolled \"underneath\" the header.\n SCROLL_DIVIDER_HEADER: 'mdc-dialog-scroll-divider-header',\n // Class for showing a scroll divider on a full-screen dialog footer element.\n // Should only be displayed on scrolalble content, when the dialog content is\n // obscured \"underneath\" the footer.\n SCROLL_DIVIDER_FOOTER: 'mdc-dialog-scroll-divider-footer',\n // The \"surface scrim\" is a scrim covering only the surface of a dialog. This\n // is used in situations where a confirmation dialog is shown over an already\n // opened full-screen dialog. On larger screen-sizes, the full-screen dialog\n // is sized as a modal and so in these situations we display a \"surface scrim\"\n // to prevent a \"double scrim\" (where the scrim from the secondary\n // confirmation dialog would overlap with the scrim from the full-screen\n // dialog).\n SURFACE_SCRIM_SHOWN: 'mdc-dialog__surface-scrim--shown',\n // \"Showing\" animating class for the surface-scrim.\n SURFACE_SCRIM_SHOWING: 'mdc-dialog__surface-scrim--showing',\n // \"Hiding\" animating class for the surface-scrim.\n SURFACE_SCRIM_HIDING: 'mdc-dialog__surface-scrim--hiding',\n // Class to hide a dialog's scrim (used in conjunction with a surface-scrim).\n // Note that we only hide the original scrim rather than removing it entirely\n // to prevent interactions with the content behind this scrim, and to capture\n // scrim clicks.\n SCRIM_HIDDEN: 'mdc-dialog__scrim--hidden',\n};\nexport var strings = {\n ACTION_ATTRIBUTE: 'data-mdc-dialog-action',\n BUTTON_DEFAULT_ATTRIBUTE: 'data-mdc-dialog-button-default',\n BUTTON_SELECTOR: '.mdc-dialog__button',\n CLOSED_EVENT: 'MDCDialog:closed',\n CLOSE_ACTION: 'close',\n CLOSING_EVENT: 'MDCDialog:closing',\n CONTAINER_SELECTOR: '.mdc-dialog__container',\n CONTENT_SELECTOR: '.mdc-dialog__content',\n DESTROY_ACTION: 'destroy',\n INITIAL_FOCUS_ATTRIBUTE: 'data-mdc-dialog-initial-focus',\n OPENED_EVENT: 'MDCDialog:opened',\n OPENING_EVENT: 'MDCDialog:opening',\n SCRIM_SELECTOR: '.mdc-dialog__scrim',\n SUPPRESS_DEFAULT_PRESS_SELECTOR: [\n 'textarea',\n '.mdc-menu .mdc-list-item',\n '.mdc-menu .mdc-deprecated-list-item',\n ].join(', '),\n SURFACE_SELECTOR: '.mdc-dialog__surface',\n};\nexport var numbers = {\n DIALOG_ANIMATION_CLOSE_TIME_MS: 75,\n DIALOG_ANIMATION_OPEN_TIME_MS: 150,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { AnimationFrame } from '@material/animation/animationframe';\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar AnimationKeys;\n(function (AnimationKeys) {\n AnimationKeys[\"POLL_SCROLL_POS\"] = \"poll_scroll_position\";\n AnimationKeys[\"POLL_LAYOUT_CHANGE\"] = \"poll_layout_change\";\n})(AnimationKeys || (AnimationKeys = {}));\nvar MDCDialogFoundation = /** @class */ (function (_super) {\n __extends(MDCDialogFoundation, _super);\n function MDCDialogFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCDialogFoundation.defaultAdapter), adapter)) || this;\n _this.dialogOpen = false;\n _this.isFullscreen = false;\n _this.animationFrame = 0;\n _this.animationTimer = 0;\n _this.escapeKeyAction = strings.CLOSE_ACTION;\n _this.scrimClickAction = strings.CLOSE_ACTION;\n _this.autoStackButtons = true;\n _this.areButtonsStacked = false;\n _this.suppressDefaultPressSelector = strings.SUPPRESS_DEFAULT_PRESS_SELECTOR;\n _this.animFrame = new AnimationFrame();\n _this.contentScrollHandler = function () {\n _this.handleScrollEvent();\n };\n _this.windowResizeHandler = function () {\n _this.layout();\n };\n _this.windowOrientationChangeHandler = function () {\n _this.layout();\n };\n return _this;\n }\n Object.defineProperty(MDCDialogFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addBodyClass: function () { return undefined; },\n addClass: function () { return undefined; },\n areButtonsStacked: function () { return false; },\n clickDefaultButton: function () { return undefined; },\n eventTargetMatches: function () { return false; },\n getActionFromEvent: function () { return ''; },\n getInitialFocusEl: function () { return null; },\n hasClass: function () { return false; },\n isContentScrollable: function () { return false; },\n notifyClosed: function () { return undefined; },\n notifyClosing: function () { return undefined; },\n notifyOpened: function () { return undefined; },\n notifyOpening: function () { return undefined; },\n releaseFocus: function () { return undefined; },\n removeBodyClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n reverseButtons: function () { return undefined; },\n trapFocus: function () { return undefined; },\n registerContentEventHandler: function () { return undefined; },\n deregisterContentEventHandler: function () { return undefined; },\n isScrollableContentAtTop: function () { return false; },\n isScrollableContentAtBottom: function () { return false; },\n registerWindowEventHandler: function () { return undefined; },\n deregisterWindowEventHandler: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCDialogFoundation.prototype.init = function () {\n if (this.adapter.hasClass(cssClasses.STACKED)) {\n this.setAutoStackButtons(false);\n }\n this.isFullscreen = this.adapter.hasClass(cssClasses.FULLSCREEN);\n };\n MDCDialogFoundation.prototype.destroy = function () {\n if (this.animationTimer) {\n clearTimeout(this.animationTimer);\n this.handleAnimationTimerEnd();\n }\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n }\n this.animFrame.cancelAll();\n this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n };\n MDCDialogFoundation.prototype.open = function (dialogOptions) {\n var _this = this;\n this.dialogOpen = true;\n this.adapter.notifyOpening();\n this.adapter.addClass(cssClasses.OPENING);\n if (this.isFullscreen) {\n // A scroll event listener is registered even if the dialog is not\n // scrollable on open, since the window resize event, or orientation\n // change may make the dialog scrollable after it is opened.\n this.adapter.registerContentEventHandler('scroll', this.contentScrollHandler);\n }\n if (dialogOptions && dialogOptions.isAboveFullscreenDialog) {\n this.adapter.addClass(cssClasses.SCRIM_HIDDEN);\n }\n this.adapter.registerWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.registerWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n // Wait a frame once display is no longer \"none\", to establish basis for\n // animation\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(cssClasses.OPEN);\n _this.adapter.addBodyClass(cssClasses.SCROLL_LOCK);\n _this.layout();\n _this.animationTimer = setTimeout(function () {\n _this.handleAnimationTimerEnd();\n _this.adapter.trapFocus(_this.adapter.getInitialFocusEl());\n _this.adapter.notifyOpened();\n }, numbers.DIALOG_ANIMATION_OPEN_TIME_MS);\n });\n };\n MDCDialogFoundation.prototype.close = function (action) {\n var _this = this;\n if (action === void 0) { action = ''; }\n if (!this.dialogOpen) {\n // Avoid redundant close calls (and events), e.g. from keydown on elements\n // that inherently emit click\n return;\n }\n this.dialogOpen = false;\n this.adapter.notifyClosing(action);\n this.adapter.addClass(cssClasses.CLOSING);\n this.adapter.removeClass(cssClasses.OPEN);\n this.adapter.removeBodyClass(cssClasses.SCROLL_LOCK);\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n }\n this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(function () {\n _this.adapter.releaseFocus();\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyClosed(action);\n }, numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);\n };\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Shows the \"surface scrim\" displayed over the full-screen dialog.\n */\n MDCDialogFoundation.prototype.showSurfaceScrim = function () {\n var _this = this;\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWING);\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWN);\n });\n };\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Hides the \"surface scrim\" displayed over the full-screen dialog.\n */\n MDCDialogFoundation.prototype.hideSurfaceScrim = function () {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWN);\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_HIDING);\n };\n /**\n * Handles `transitionend` event triggered when surface scrim animation is\n * finished.\n */\n MDCDialogFoundation.prototype.handleSurfaceScrimTransitionEnd = function () {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_HIDING);\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWING);\n };\n MDCDialogFoundation.prototype.isOpen = function () {\n return this.dialogOpen;\n };\n MDCDialogFoundation.prototype.getEscapeKeyAction = function () {\n return this.escapeKeyAction;\n };\n MDCDialogFoundation.prototype.setEscapeKeyAction = function (action) {\n this.escapeKeyAction = action;\n };\n MDCDialogFoundation.prototype.getScrimClickAction = function () {\n return this.scrimClickAction;\n };\n MDCDialogFoundation.prototype.setScrimClickAction = function (action) {\n this.scrimClickAction = action;\n };\n MDCDialogFoundation.prototype.getAutoStackButtons = function () {\n return this.autoStackButtons;\n };\n MDCDialogFoundation.prototype.setAutoStackButtons = function (autoStack) {\n this.autoStackButtons = autoStack;\n };\n MDCDialogFoundation.prototype.getSuppressDefaultPressSelector = function () {\n return this.suppressDefaultPressSelector;\n };\n MDCDialogFoundation.prototype.setSuppressDefaultPressSelector = function (selector) {\n this.suppressDefaultPressSelector = selector;\n };\n MDCDialogFoundation.prototype.layout = function () {\n var _this = this;\n this.animFrame.request(AnimationKeys.POLL_LAYOUT_CHANGE, function () {\n _this.layoutInternal();\n });\n };\n /** Handles click on the dialog root element. */\n MDCDialogFoundation.prototype.handleClick = function (evt) {\n var isScrim = this.adapter.eventTargetMatches(evt.target, strings.SCRIM_SELECTOR);\n // Check for scrim click first since it doesn't require querying ancestors.\n if (isScrim && this.scrimClickAction !== '') {\n this.close(this.scrimClickAction);\n }\n else {\n var action = this.adapter.getActionFromEvent(evt);\n if (action) {\n this.close(action);\n }\n }\n };\n /** Handles keydown on the dialog root element. */\n MDCDialogFoundation.prototype.handleKeydown = function (evt) {\n var isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n if (!isEnter) {\n return;\n }\n var action = this.adapter.getActionFromEvent(evt);\n if (action) {\n // Action button callback is handled in `handleClick`,\n // since space/enter keydowns on buttons trigger click events.\n return;\n }\n // `composedPath` is used here, when available, to account for use cases\n // where a target meant to suppress the default press behaviour\n // may exist in a shadow root.\n // For example, a textarea inside a web component:\n // \n // \n // #shadow-root (open)\n // \n // #shadow-root (open)\n // \n // \n // \n // \n var target = evt.composedPath ? evt.composedPath()[0] : evt.target;\n var isDefault = this.suppressDefaultPressSelector ?\n !this.adapter.eventTargetMatches(target, this.suppressDefaultPressSelector) :\n true;\n if (isEnter && isDefault) {\n this.adapter.clickDefaultButton();\n }\n };\n /** Handles keydown on the document. */\n MDCDialogFoundation.prototype.handleDocumentKeydown = function (evt) {\n var isEscape = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscape && this.escapeKeyAction !== '') {\n this.close(this.escapeKeyAction);\n }\n };\n /**\n * Handles scroll event on the dialog's content element -- showing a scroll\n * divider on the header or footer based on the scroll position. This handler\n * should only be registered on full-screen dialogs with scrollable content.\n */\n MDCDialogFoundation.prototype.handleScrollEvent = function () {\n var _this = this;\n // Since scroll events can fire at a high rate, we throttle these events by\n // using requestAnimationFrame.\n this.animFrame.request(AnimationKeys.POLL_SCROLL_POS, function () {\n _this.toggleScrollDividerHeader();\n _this.toggleScrollDividerFooter();\n });\n };\n MDCDialogFoundation.prototype.layoutInternal = function () {\n if (this.autoStackButtons) {\n this.detectStackedButtons();\n }\n this.toggleScrollableClasses();\n };\n MDCDialogFoundation.prototype.handleAnimationTimerEnd = function () {\n this.animationTimer = 0;\n this.adapter.removeClass(cssClasses.OPENING);\n this.adapter.removeClass(cssClasses.CLOSING);\n };\n /**\n * Runs the given logic on the next animation frame, using setTimeout to\n * factor in Firefox reflow behavior.\n */\n MDCDialogFoundation.prototype.runNextAnimationFrame = function (callback) {\n var _this = this;\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(function () {\n _this.animationFrame = 0;\n clearTimeout(_this.animationTimer);\n _this.animationTimer = setTimeout(callback, 0);\n });\n };\n MDCDialogFoundation.prototype.detectStackedButtons = function () {\n // Remove the class first to let us measure the buttons' natural positions.\n this.adapter.removeClass(cssClasses.STACKED);\n var areButtonsStacked = this.adapter.areButtonsStacked();\n if (areButtonsStacked) {\n this.adapter.addClass(cssClasses.STACKED);\n }\n if (areButtonsStacked !== this.areButtonsStacked) {\n this.adapter.reverseButtons();\n this.areButtonsStacked = areButtonsStacked;\n }\n };\n MDCDialogFoundation.prototype.toggleScrollableClasses = function () {\n // Remove the class first to let us measure the natural height of the\n // content.\n this.adapter.removeClass(cssClasses.SCROLLABLE);\n if (this.adapter.isContentScrollable()) {\n this.adapter.addClass(cssClasses.SCROLLABLE);\n if (this.isFullscreen) {\n // If dialog is full-screen and scrollable, check if a scroll divider\n // should be shown.\n this.toggleScrollDividerHeader();\n this.toggleScrollDividerFooter();\n }\n }\n };\n MDCDialogFoundation.prototype.toggleScrollDividerHeader = function () {\n if (!this.adapter.isScrollableContentAtTop()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_HEADER);\n }\n else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_HEADER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_HEADER);\n }\n };\n MDCDialogFoundation.prototype.toggleScrollDividerFooter = function () {\n if (!this.adapter.isScrollableContentAtBottom()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n }\n else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_FOOTER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n }\n };\n return MDCDialogFoundation;\n}(MDCFoundation));\nexport { MDCDialogFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDialogFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * AnimationFrame provides a user-friendly abstraction around requesting\n * and canceling animation frames.\n */\nvar AnimationFrame = /** @class */ (function () {\n function AnimationFrame() {\n this.rafIDs = new Map();\n }\n /**\n * Requests an animation frame. Cancels any existing frame with the same key.\n * @param {string} key The key for this callback.\n * @param {FrameRequestCallback} callback The callback to be executed.\n */\n AnimationFrame.prototype.request = function (key, callback) {\n var _this = this;\n this.cancel(key);\n var frameID = requestAnimationFrame(function (frame) {\n _this.rafIDs.delete(key);\n // Callback must come *after* the key is deleted so that nested calls to\n // request with the same key are not deleted.\n callback(frame);\n });\n this.rafIDs.set(key, frameID);\n };\n /**\n * Cancels a queued callback with the given key.\n * @param {string} key The key for this callback.\n */\n AnimationFrame.prototype.cancel = function (key) {\n var rafID = this.rafIDs.get(key);\n if (rafID) {\n cancelAnimationFrame(rafID);\n this.rafIDs.delete(key);\n }\n };\n /**\n * Cancels all queued callback.\n */\n AnimationFrame.prototype.cancelAll = function () {\n var _this = this;\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach(function (_, key) {\n _this.cancel(key);\n });\n };\n /**\n * Returns the queue of unexecuted callback keys.\n */\n AnimationFrame.prototype.getQueue = function () {\n var queue = [];\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach(function (_, key) {\n queue.push(key);\n });\n return queue;\n };\n return AnimationFrame;\n}());\nexport { AnimationFrame };\n//# sourceMappingURL=animationframe.js.map","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nexport function applyPassive(globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n return supportsPassiveOption(globalObj) ?\n { passive: true } :\n false;\n}\nfunction supportsPassiveOption(globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n // See\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n var passiveSupported = false;\n try {\n var options = {\n // This function will be called when the browser\n // attempts to access the passive property.\n get passive() {\n passiveSupported = true;\n return false;\n }\n };\n var handler = function () { };\n globalObj.document.addEventListener('test', handler, options);\n globalObj.document.removeEventListener('test', handler, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n return passiveSupported;\n}\n//# sourceMappingURL=events.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Specifies an observer callback that is run when the decorated property\n * changes. The observer receives the current and old value as arguments.\n */\nexport const observer = (observer) => \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(proto, propName) => {\n // if we haven't wrapped `updated` in this class, do so\n if (!proto.constructor\n ._observers) {\n proto.constructor._observers = new Map();\n const userUpdated = proto.updated;\n proto.updated = function (changedProperties) {\n userUpdated.call(this, changedProperties);\n changedProperties.forEach((v, k) => {\n const observers = this.constructor\n ._observers;\n const observer = observers.get(k);\n if (observer !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n observer.call(this, this[k], v);\n }\n });\n };\n // clone any existing observers (superclasses)\n // eslint-disable-next-line no-prototype-builtins\n }\n else if (!proto.constructor.hasOwnProperty('_observers')) {\n const observers = proto.constructor._observers;\n proto.constructor._observers = new Map();\n observers.forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (v, k) => proto.constructor._observers.set(k, v));\n }\n // set this method\n proto.constructor._observers.set(propName, observer);\n};\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport 'blocking-elements';\nimport 'wicg-inert';\nimport { cssClasses } from '@material/dialog/constants.js';\nimport MDCDialogFoundation from '@material/dialog/foundation.js';\nimport { applyPassive } from '@material/dom/events.js';\nimport { closest, matches } from '@material/dom/ponyfill.js';\nimport { addHasRemoveClass, BaseElement } from '@material/mwc-base/base-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nconst blockingElements = document.$blockingElements;\nexport class DialogBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.hideActions = false;\n this.stacked = false;\n this.heading = '';\n this.scrimClickAction = 'close';\n this.escapeKeyAction = 'close';\n this.open = false;\n this.defaultAction = 'close';\n this.actionAttribute = 'dialogAction';\n this.initialFocusAttribute = 'dialogInitialFocus';\n this.initialSupressDefaultPressSelector = '';\n this.mdcFoundationClass = MDCDialogFoundation;\n this.boundHandleClick = null;\n this.boundHandleKeydown = null;\n this.boundHandleDocumentKeydown = null;\n }\n set suppressDefaultPressSelector(selector) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setSuppressDefaultPressSelector(selector);\n }\n else {\n this.initialSupressDefaultPressSelector = selector;\n }\n }\n /**\n * @export\n */\n get suppressDefaultPressSelector() {\n return this.mdcFoundation ?\n this.mdcFoundation.getSuppressDefaultPressSelector() :\n this.initialSupressDefaultPressSelector;\n }\n get primaryButton() {\n let assignedNodes = this.primarySlot.assignedNodes();\n assignedNodes = assignedNodes.filter((node) => node instanceof HTMLElement);\n const button = assignedNodes[0];\n return button ? button : null;\n }\n emitNotification(name, action) {\n const init = { detail: action ? { action } : {} };\n const ev = new CustomEvent(name, init);\n this.dispatchEvent(ev);\n }\n getInitialFocusEl() {\n const initFocusSelector = `[${this.initialFocusAttribute}]`;\n // only search light DOM. This typically handles all the cases\n const lightDomQs = this.querySelector(initFocusSelector);\n if (lightDomQs) {\n return lightDomQs;\n }\n // if not in light dom, search each flattened distributed node.\n const primarySlot = this.primarySlot;\n const primaryNodes = primarySlot.assignedNodes({ flatten: true });\n const primaryFocusElement = this.searchNodeTreesForAttribute(primaryNodes, this.initialFocusAttribute);\n if (primaryFocusElement) {\n return primaryFocusElement;\n }\n const secondarySlot = this.secondarySlot;\n const secondaryNodes = secondarySlot.assignedNodes({ flatten: true });\n const secondaryFocusElement = this.searchNodeTreesForAttribute(secondaryNodes, this.initialFocusAttribute);\n if (secondaryFocusElement) {\n return secondaryFocusElement;\n }\n const contentSlot = this.contentSlot;\n const contentNodes = contentSlot.assignedNodes({ flatten: true });\n const initFocusElement = this.searchNodeTreesForAttribute(contentNodes, this.initialFocusAttribute);\n return initFocusElement;\n }\n searchNodeTreesForAttribute(nodes, attribute) {\n for (const node of nodes) {\n if (!(node instanceof HTMLElement)) {\n continue;\n }\n if (node.hasAttribute(attribute)) {\n return node;\n }\n else {\n const selection = node.querySelector(`[${attribute}]`);\n if (selection) {\n return selection;\n }\n }\n }\n return null;\n }\n createAdapter() {\n return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { addBodyClass: () => document.body.style.overflow = 'hidden', removeBodyClass: () => document.body.style.overflow = '', areButtonsStacked: () => this.stacked, clickDefaultButton: () => {\n const primary = this.primaryButton;\n if (primary) {\n primary.click();\n }\n }, eventTargetMatches: (target, selector) => target ? matches(target, selector) : false, getActionFromEvent: (e) => {\n if (!e.target) {\n return '';\n }\n const element = closest(e.target, `[${this.actionAttribute}]`);\n const action = element && element.getAttribute(this.actionAttribute);\n return action;\n }, getInitialFocusEl: () => {\n return this.getInitialFocusEl();\n }, isContentScrollable: () => {\n const el = this.contentElement;\n return el ? el.scrollHeight > el.offsetHeight : false;\n }, notifyClosed: (action) => this.emitNotification('closed', action), notifyClosing: (action) => {\n if (!this.closingDueToDisconnect) {\n // Don't set our open state to closed just because we were\n // disconnected. That way if we get reconnected, we'll know to\n // re-open.\n this.open = false;\n }\n this.emitNotification('closing', action);\n }, notifyOpened: () => this.emitNotification('opened'), notifyOpening: () => {\n this.open = true;\n this.emitNotification('opening');\n }, reverseButtons: () => { }, releaseFocus: () => {\n blockingElements.remove(this);\n }, trapFocus: (el) => {\n if (!this.isConnected) {\n // this is the case where it is opened and closed and then removed\n // from DOM before the animation has completed. Blocking Elements will\n // throw if this is the case\n return;\n }\n blockingElements.push(this);\n if (el) {\n el.focus();\n }\n }, registerContentEventHandler: (evtType, handler) => {\n const el = this.contentElement;\n el.addEventListener(evtType, handler);\n }, deregisterContentEventHandler: (evtType, handler) => {\n const el = this.contentElement;\n el.removeEventListener(evtType, handler);\n }, isScrollableContentAtTop: () => {\n const el = this.contentElement;\n return el ? el.scrollTop === 0 : false;\n }, isScrollableContentAtBottom: () => {\n const el = this.contentElement;\n return el ?\n Math.ceil(el.scrollHeight - el.scrollTop) === el.clientHeight :\n false;\n }, registerWindowEventHandler: (evtType, handler) => {\n window.addEventListener(evtType, handler, applyPassive());\n }, deregisterWindowEventHandler: (evtType, handler) => {\n window.removeEventListener(evtType, handler, applyPassive());\n } });\n }\n render() {\n const classes = {\n [cssClasses.STACKED]: this.stacked,\n };\n let heading = html ``;\n if (this.heading) {\n heading = this.renderHeading();\n }\n const actionsClasses = {\n 'mdc-dialog__actions': !this.hideActions,\n };\n return html `\n
    \n
    \n
    \n ${heading}\n
    \n \n
    \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    `;\n }\n renderHeading() {\n return html `\n

    ${this.heading}

    `;\n }\n firstUpdated() {\n super.firstUpdated();\n this.mdcFoundation.setAutoStackButtons(true);\n if (this.initialSupressDefaultPressSelector) {\n this.suppressDefaultPressSelector =\n this.initialSupressDefaultPressSelector;\n }\n else {\n this.suppressDefaultPressSelector = [\n this.suppressDefaultPressSelector, 'mwc-textarea',\n 'mwc-menu mwc-list-item', 'mwc-select mwc-list-item'\n ].join(', ');\n }\n this.boundHandleClick = this.mdcFoundation.handleClick.bind(this.mdcFoundation);\n this.boundHandleKeydown = this.mdcFoundation.handleKeydown.bind(this.mdcFoundation);\n this.boundHandleDocumentKeydown =\n this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation);\n }\n connectedCallback() {\n super.connectedCallback();\n if (this.open && this.mdcFoundation && !this.mdcFoundation.isOpen()) {\n // We probably got disconnected while we were still open. Re-open,\n // matching the behavior of native .\n this.setEventListeners();\n this.mdcFoundation.open();\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.open && this.mdcFoundation) {\n // If this dialog is opened and then disconnected, we want to close\n // the foundation, so that 1) any pending timers are cancelled\n // (in particular for trapFocus), and 2) if we reconnect, we can open\n // the foundation again to retrigger animations and focus.\n this.removeEventListeners();\n this.closingDueToDisconnect = true;\n this.mdcFoundation.close(this.currentAction || this.defaultAction);\n this.closingDueToDisconnect = false;\n this.currentAction = undefined;\n // When we close normally, the releaseFocus callback handles removing\n // ourselves from the blocking elements stack. However, that callback\n // happens on a delay, and when we are closing due to a disconnect we\n // need to remove ourselves before the blocking element polyfill's\n // mutation observer notices and logs a warning, since it's not valid to\n // be in the blocking elements stack while disconnected.\n blockingElements.remove(this);\n }\n }\n forceLayout() {\n this.mdcFoundation.layout();\n }\n focus() {\n const initialFocusEl = this.getInitialFocusEl();\n initialFocusEl && initialFocusEl.focus();\n }\n blur() {\n if (!this.shadowRoot) {\n return;\n }\n const activeEl = this.shadowRoot.activeElement;\n if (activeEl) {\n if (activeEl instanceof HTMLElement) {\n activeEl.blur();\n }\n }\n else {\n const root = this.getRootNode();\n const activeEl = root instanceof Document ? root.activeElement : null;\n if (activeEl instanceof HTMLElement) {\n activeEl.blur();\n }\n }\n }\n setEventListeners() {\n if (this.boundHandleClick) {\n this.mdcRoot.addEventListener('click', this.boundHandleClick);\n }\n if (this.boundHandleKeydown) {\n this.mdcRoot.addEventListener('keydown', this.boundHandleKeydown, applyPassive());\n }\n if (this.boundHandleDocumentKeydown) {\n document.addEventListener('keydown', this.boundHandleDocumentKeydown, applyPassive());\n }\n }\n removeEventListeners() {\n if (this.boundHandleClick) {\n this.mdcRoot.removeEventListener('click', this.boundHandleClick);\n }\n if (this.boundHandleKeydown) {\n this.mdcRoot.removeEventListener('keydown', this.boundHandleKeydown);\n }\n if (this.boundHandleDocumentKeydown) {\n document.removeEventListener('keydown', this.boundHandleDocumentKeydown);\n }\n }\n close() {\n this.open = false;\n }\n show() {\n this.open = true;\n }\n}\n__decorate([\n query('.mdc-dialog')\n], DialogBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n query('slot[name=\"primaryAction\"]')\n], DialogBase.prototype, \"primarySlot\", void 0);\n__decorate([\n query('slot[name=\"secondaryAction\"]')\n], DialogBase.prototype, \"secondarySlot\", void 0);\n__decorate([\n query('#contentSlot')\n], DialogBase.prototype, \"contentSlot\", void 0);\n__decorate([\n query('.mdc-dialog__content')\n], DialogBase.prototype, \"contentElement\", void 0);\n__decorate([\n query('.mdc-container')\n], DialogBase.prototype, \"conatinerElement\", void 0);\n__decorate([\n property({ type: Boolean })\n], DialogBase.prototype, \"hideActions\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function () {\n this.forceLayout();\n })\n], DialogBase.prototype, \"stacked\", void 0);\n__decorate([\n property({ type: String })\n], DialogBase.prototype, \"heading\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (newAction) {\n this.mdcFoundation.setScrimClickAction(newAction);\n })\n], DialogBase.prototype, \"scrimClickAction\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (newAction) {\n this.mdcFoundation.setEscapeKeyAction(newAction);\n })\n], DialogBase.prototype, \"escapeKeyAction\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (isOpen) {\n // Check isConnected because we could have been disconnected before first\n // update. If we're now closed, then we shouldn't start the MDC foundation\n // opening animation. If we're now closed, then we've already closed the\n // foundation in disconnectedCallback.\n if (this.mdcFoundation && this.isConnected) {\n if (isOpen) {\n this.setEventListeners();\n this.mdcFoundation.open();\n }\n else {\n this.removeEventListeners();\n this.mdcFoundation.close(this.currentAction || this.defaultAction);\n this.currentAction = undefined;\n }\n }\n })\n], DialogBase.prototype, \"open\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"defaultAction\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"actionAttribute\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"initialFocusAttribute\", void 0);\n//# sourceMappingURL=mwc-dialog-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}@media(min-width: 560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width, 560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32);background-color:var(--mdc-dialog-scrim-color, rgba(0, 0, 0, 0.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87);color:var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6);color:var(--mdc-dialog-content-ink-color, rgba(0, 0, 0, 0.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width, 280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height, calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){margin-left:0;margin-right:8px}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions *:not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}`;\n//# sourceMappingURL=mwc-dialog.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { DialogBase } from './mwc-dialog-base.js';\nimport { styles } from './mwc-dialog.css.js';\nlet Dialog = class Dialog extends DialogBase {\n};\nDialog.styles = [styles];\nDialog = __decorate([\n customElement('mwc-dialog')\n], Dialog);\nexport { Dialog };\n//# sourceMappingURL=mwc-dialog.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { property, query, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n/**\n * @fires request-selected {RequestSelectedDetail}\n * @fires list-item-rendered\n */\nexport class ListItemBase extends LitElement {\n constructor() {\n super(...arguments);\n this.value = '';\n this.group = null;\n this.tabindex = -1;\n this.disabled = false;\n this.twoline = false;\n this.activated = false;\n this.graphic = null;\n this.multipleGraphics = false;\n this.hasMeta = false;\n this.noninteractive = false;\n this.selected = false;\n this.shouldRenderRipple = false;\n this._managingList = null;\n this.boundOnClick = this.onClick.bind(this);\n this._firstChanged = true;\n this._skipPropRequest = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n this.listeners = [\n {\n target: this,\n eventNames: ['click'],\n cb: () => {\n this.onClick();\n },\n },\n {\n target: this,\n eventNames: ['mouseenter'],\n cb: this.rippleHandlers.startHover,\n },\n {\n target: this,\n eventNames: ['mouseleave'],\n cb: this.rippleHandlers.endHover,\n },\n {\n target: this,\n eventNames: ['focus'],\n cb: this.rippleHandlers.startFocus,\n },\n {\n target: this,\n eventNames: ['blur'],\n cb: this.rippleHandlers.endFocus,\n },\n {\n target: this,\n eventNames: ['mousedown', 'touchstart'],\n cb: (e) => {\n const name = e.type;\n this.onDown(name === 'mousedown' ? 'mouseup' : 'touchend', e);\n },\n },\n ];\n }\n get text() {\n const textContent = this.textContent;\n return textContent ? textContent.trim() : '';\n }\n render() {\n const text = this.renderText();\n const graphic = this.graphic ? this.renderGraphic() : html ``;\n const meta = this.hasMeta ? this.renderMeta() : html ``;\n return html `\n ${this.renderRipple()}\n ${graphic}\n ${text}\n ${meta}`;\n }\n renderRipple() {\n if (this.shouldRenderRipple) {\n return html `\n \n `;\n }\n else if (this.activated) {\n return html `
    `;\n }\n else {\n return '';\n }\n }\n renderGraphic() {\n const graphicClasses = {\n multi: this.multipleGraphics,\n };\n return html `\n \n \n `;\n }\n renderMeta() {\n return html `\n \n \n `;\n }\n renderText() {\n const inner = this.twoline ? this.renderTwoline() : this.renderSingleLine();\n return html `\n \n ${inner}\n `;\n }\n renderSingleLine() {\n return html ``;\n }\n renderTwoline() {\n return html `\n \n \n \n \n \n \n `;\n }\n onClick() {\n this.fireRequestSelected(!this.selected, 'interaction');\n }\n onDown(upName, evt) {\n const onUp = () => {\n window.removeEventListener(upName, onUp);\n this.rippleHandlers.endPress();\n };\n window.addEventListener(upName, onUp);\n this.rippleHandlers.startPress(evt);\n }\n fireRequestSelected(selected, source) {\n if (this.noninteractive) {\n return;\n }\n const customEv = new CustomEvent('request-selected', { bubbles: true, composed: true, detail: { source, selected } });\n this.dispatchEvent(customEv);\n }\n connectedCallback() {\n super.connectedCallback();\n if (!this.noninteractive) {\n this.setAttribute('mwc-list-item', '');\n }\n for (const listener of this.listeners) {\n for (const eventName of listener.eventNames) {\n listener.target.addEventListener(eventName, listener.cb, { passive: true });\n }\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n for (const listener of this.listeners) {\n for (const eventName of listener.eventNames) {\n listener.target.removeEventListener(eventName, listener.cb);\n }\n }\n if (this._managingList) {\n this._managingList.debouncedLayout ?\n this._managingList.debouncedLayout(true) :\n this._managingList.layout(true);\n }\n }\n // composed flag, event fire through shadow root and up through composed tree\n firstUpdated() {\n const ev = new Event('list-item-rendered', { bubbles: true, composed: true });\n this.dispatchEvent(ev);\n }\n}\n__decorate([\n query('slot')\n], ListItemBase.prototype, \"slotElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], ListItemBase.prototype, \"ripple\", void 0);\n__decorate([\n property({ type: String })\n], ListItemBase.prototype, \"value\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ListItemBase.prototype, \"group\", void 0);\n__decorate([\n property({ type: Number, reflect: true })\n], ListItemBase.prototype, \"tabindex\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n if (value) {\n this.setAttribute('aria-disabled', 'true');\n }\n else {\n this.setAttribute('aria-disabled', 'false');\n }\n })\n], ListItemBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ListItemBase.prototype, \"twoline\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ListItemBase.prototype, \"activated\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ListItemBase.prototype, \"graphic\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"multipleGraphics\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"hasMeta\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n if (value) {\n this.removeAttribute('aria-checked');\n this.removeAttribute('mwc-list-item');\n this.selected = false;\n this.activated = false;\n this.tabIndex = -1;\n }\n else {\n this.setAttribute('mwc-list-item', '');\n }\n })\n], ListItemBase.prototype, \"noninteractive\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n const role = this.getAttribute('role');\n const isAriaSelectable = role === 'gridcell' || role === 'option' ||\n role === 'row' || role === 'tab';\n if (isAriaSelectable && value) {\n this.setAttribute('aria-selected', 'true');\n }\n else if (isAriaSelectable) {\n this.setAttribute('aria-selected', 'false');\n }\n if (this._firstChanged) {\n this._firstChanged = false;\n return;\n }\n if (this._skipPropRequest) {\n return;\n }\n this.fireRequestSelected(value, 'property');\n })\n], ListItemBase.prototype, \"selected\", void 0);\n__decorate([\n state()\n], ListItemBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n state()\n], ListItemBase.prototype, \"_managingList\", void 0);\n//# sourceMappingURL=mwc-list-item-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:\"\";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\"\";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;\n//# sourceMappingURL=mwc-list-item.css.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ListItemBase } from './mwc-list-item-base.js';\nimport { styles } from './mwc-list-item.css.js';\nlet ListItem = class ListItem extends ListItemBase {\n};\nListItem.styles = [styles];\nListItem = __decorate([\n customElement('mwc-list-item')\n], ListItem);\nexport { ListItem };\n//# sourceMappingURL=mwc-list-item.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * KEY provides normalized string values for keys.\n */\nexport var KEY = {\n UNKNOWN: 'Unknown',\n BACKSPACE: 'Backspace',\n ENTER: 'Enter',\n SPACEBAR: 'Spacebar',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n END: 'End',\n HOME: 'Home',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_UP: 'ArrowUp',\n ARROW_RIGHT: 'ArrowRight',\n ARROW_DOWN: 'ArrowDown',\n DELETE: 'Delete',\n ESCAPE: 'Escape',\n TAB: 'Tab',\n};\nvar normalizedKeys = new Set();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nnormalizedKeys.add(KEY.BACKSPACE);\nnormalizedKeys.add(KEY.ENTER);\nnormalizedKeys.add(KEY.SPACEBAR);\nnormalizedKeys.add(KEY.PAGE_UP);\nnormalizedKeys.add(KEY.PAGE_DOWN);\nnormalizedKeys.add(KEY.END);\nnormalizedKeys.add(KEY.HOME);\nnormalizedKeys.add(KEY.ARROW_LEFT);\nnormalizedKeys.add(KEY.ARROW_UP);\nnormalizedKeys.add(KEY.ARROW_RIGHT);\nnormalizedKeys.add(KEY.ARROW_DOWN);\nnormalizedKeys.add(KEY.DELETE);\nnormalizedKeys.add(KEY.ESCAPE);\nnormalizedKeys.add(KEY.TAB);\nvar KEY_CODE = {\n BACKSPACE: 8,\n ENTER: 13,\n SPACEBAR: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n DELETE: 46,\n ESCAPE: 27,\n TAB: 9,\n};\nvar mappedKeyCodes = new Map();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nmappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE);\nmappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER);\nmappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR);\nmappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP);\nmappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN);\nmappedKeyCodes.set(KEY_CODE.END, KEY.END);\nmappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME);\nmappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT);\nmappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP);\nmappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT);\nmappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN);\nmappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE);\nmappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE);\nmappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB);\nvar navigationKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this\n// by hand.\nnavigationKeys.add(KEY.PAGE_UP);\nnavigationKeys.add(KEY.PAGE_DOWN);\nnavigationKeys.add(KEY.END);\nnavigationKeys.add(KEY.HOME);\nnavigationKeys.add(KEY.ARROW_LEFT);\nnavigationKeys.add(KEY.ARROW_UP);\nnavigationKeys.add(KEY.ARROW_RIGHT);\nnavigationKeys.add(KEY.ARROW_DOWN);\n/**\n * normalizeKey returns the normalized string for a navigational action.\n */\nexport function normalizeKey(evt) {\n var key = evt.key;\n // If the event already has a normalized key, return it\n if (normalizedKeys.has(key)) {\n return key;\n }\n // tslint:disable-next-line:deprecation\n var mappedKey = mappedKeyCodes.get(evt.keyCode);\n if (mappedKey) {\n return mappedKey;\n }\n return KEY.UNKNOWN;\n}\n/**\n * isNavigationEvent returns whether the event is a navigation event\n */\nexport function isNavigationEvent(evt) {\n return navigationKeys.has(normalizeKey(evt));\n}\n//# sourceMappingURL=keyboard.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar _a, _b;\nvar cssClasses = {\n LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated',\n LIST_ITEM_CLASS: 'mdc-list-item',\n LIST_ITEM_DISABLED_CLASS: 'mdc-list-item--disabled',\n LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected',\n LIST_ITEM_TEXT_CLASS: 'mdc-list-item__text',\n LIST_ITEM_PRIMARY_TEXT_CLASS: 'mdc-list-item__primary-text',\n ROOT: 'mdc-list',\n};\nvar evolutionClassNameMap = (_a = {},\n _a[\"\" + cssClasses.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-list-item--activated',\n _a[\"\" + cssClasses.LIST_ITEM_CLASS] = 'mdc-list-item',\n _a[\"\" + cssClasses.LIST_ITEM_DISABLED_CLASS] = 'mdc-list-item--disabled',\n _a[\"\" + cssClasses.LIST_ITEM_SELECTED_CLASS] = 'mdc-list-item--selected',\n _a[\"\" + cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-list-item__primary-text',\n _a[\"\" + cssClasses.ROOT] = 'mdc-list',\n _a);\nvar deprecatedClassNameMap = (_b = {},\n _b[\"\" + cssClasses.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-deprecated-list-item--activated',\n _b[\"\" + cssClasses.LIST_ITEM_CLASS] = 'mdc-deprecated-list-item',\n _b[\"\" + cssClasses.LIST_ITEM_DISABLED_CLASS] = 'mdc-deprecated-list-item--disabled',\n _b[\"\" + cssClasses.LIST_ITEM_SELECTED_CLASS] = 'mdc-deprecated-list-item--selected',\n _b[\"\" + cssClasses.LIST_ITEM_TEXT_CLASS] = 'mdc-deprecated-list-item__text',\n _b[\"\" + cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-deprecated-list-item__primary-text',\n _b[\"\" + cssClasses.ROOT] = 'mdc-deprecated-list',\n _b);\nvar strings = {\n ACTION_EVENT: 'MDCList:action',\n SELECTION_CHANGE_EVENT: 'MDCList:selectionChange',\n ARIA_CHECKED: 'aria-checked',\n ARIA_CHECKED_CHECKBOX_SELECTOR: '[role=\"checkbox\"][aria-checked=\"true\"]',\n ARIA_CHECKED_RADIO_SELECTOR: '[role=\"radio\"][aria-checked=\"true\"]',\n ARIA_CURRENT: 'aria-current',\n ARIA_DISABLED: 'aria-disabled',\n ARIA_ORIENTATION: 'aria-orientation',\n ARIA_ORIENTATION_HORIZONTAL: 'horizontal',\n ARIA_ROLE_CHECKBOX_SELECTOR: '[role=\"checkbox\"]',\n ARIA_SELECTED: 'aria-selected',\n ARIA_INTERACTIVE_ROLES_SELECTOR: '[role=\"listbox\"], [role=\"menu\"]',\n ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable=\"true\"]',\n CHECKBOX_RADIO_SELECTOR: 'input[type=\"checkbox\"], input[type=\"radio\"]',\n CHECKBOX_SELECTOR: 'input[type=\"checkbox\"]',\n CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: \"\\n .\" + cssClasses.LIST_ITEM_CLASS + \" button:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" a,\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" button:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" a\\n \",\n DEPRECATED_SELECTOR: '.mdc-deprecated-list',\n FOCUSABLE_CHILD_ELEMENTS: \"\\n .\" + cssClasses.LIST_ITEM_CLASS + \" button:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" a,\\n .\" + cssClasses.LIST_ITEM_CLASS + \" input[type=\\\"radio\\\"]:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" input[type=\\\"checkbox\\\"]:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" button:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" a,\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" input[type=\\\"radio\\\"]:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" input[type=\\\"checkbox\\\"]:not(:disabled)\\n \",\n RADIO_SELECTOR: 'input[type=\"radio\"]',\n SELECTED_ITEM_SELECTOR: '[aria-selected=\"true\"], [aria-current=\"true\"]',\n};\nvar numbers = {\n UNSET_INDEX: -1,\n TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300\n};\nvar evolutionAttribute = 'evolution';\nexport { strings, cssClasses, numbers, deprecatedClassNameMap, evolutionAttribute, evolutionClassNameMap };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { MDCFoundation } from '@material/base/foundation.js';\nimport { normalizeKey } from '@material/dom/keyboard.js';\nimport { numbers, strings } from '@material/list/constants.js';\nconst integerSort = (a, b) => {\n return a - b;\n};\nconst findIndexDiff = (oldSet, newSet) => {\n const oldArr = Array.from(oldSet);\n const newArr = Array.from(newSet);\n const diff = { added: [], removed: [] };\n const oldSorted = oldArr.sort(integerSort);\n const newSorted = newArr.sort(integerSort);\n let i = 0;\n let j = 0;\n while (i < oldSorted.length || j < newSorted.length) {\n const oldVal = oldSorted[i];\n const newVal = newSorted[j];\n if (oldVal === newVal) {\n i++;\n j++;\n continue;\n }\n if (oldVal !== undefined && (newVal === undefined || oldVal < newVal)) {\n diff.removed.push(oldVal);\n i++;\n continue;\n }\n if (newVal !== undefined && (oldVal === undefined || newVal < oldVal)) {\n diff.added.push(newVal);\n j++;\n continue;\n }\n }\n return diff;\n};\nconst ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select'];\nexport function isIndexSet(selectedIndex) {\n return selectedIndex instanceof Set;\n}\nexport function isEventMulti(evt) {\n return isIndexSet(evt.detail.index);\n}\nexport const createSetFromIndex = (index) => {\n const entry = index === numbers.UNSET_INDEX ? new Set() : index;\n return isIndexSet(entry) ? new Set(entry) : new Set([entry]);\n};\nexport class MDCListFoundation extends MDCFoundation {\n constructor(adapter) {\n super(Object.assign(Object.assign({}, MDCListFoundation.defaultAdapter), adapter));\n this.isMulti_ = false;\n this.wrapFocus_ = false;\n this.isVertical_ = true;\n this.selectedIndex_ = numbers.UNSET_INDEX;\n this.focusedItemIndex_ = numbers.UNSET_INDEX;\n this.useActivatedClass_ = false;\n this.ariaCurrentAttrValue_ = null;\n }\n static get strings() {\n return strings;\n }\n static get numbers() {\n return numbers;\n }\n static get defaultAdapter() {\n return {\n focusItemAtIndex: () => undefined,\n getFocusedElementIndex: () => 0,\n getListItemCount: () => 0,\n isFocusInsideList: () => false,\n isRootFocused: () => false,\n notifyAction: () => undefined,\n notifySelected: () => undefined,\n getSelectedStateForElementIndex: () => false,\n setDisabledStateForElementIndex: () => undefined,\n getDisabledStateForElementIndex: () => false,\n setSelectedStateForElementIndex: () => undefined,\n setActivatedStateForElementIndex: () => undefined,\n setTabIndexForElementIndex: () => undefined,\n setAttributeForElementIndex: () => undefined,\n getAttributeForElementIndex: () => null,\n };\n }\n /**\n * Sets the private wrapFocus_ variable.\n */\n setWrapFocus(value) {\n this.wrapFocus_ = value;\n }\n /**\n * Sets the private wrapFocus_ variable.\n */\n setMulti(value) {\n this.isMulti_ = value;\n const currentIndex = this.selectedIndex_;\n if (value) {\n // number to set\n if (!isIndexSet(currentIndex)) {\n const isUnset = currentIndex === numbers.UNSET_INDEX;\n this.selectedIndex_ = isUnset ? new Set() : new Set([currentIndex]);\n }\n }\n else {\n // set to first sorted number in set\n if (isIndexSet(currentIndex)) {\n if (currentIndex.size) {\n const vals = Array.from(currentIndex).sort(integerSort);\n this.selectedIndex_ = vals[0];\n }\n else {\n this.selectedIndex_ = numbers.UNSET_INDEX;\n }\n }\n }\n }\n /**\n * Sets the isVertical_ private variable.\n */\n setVerticalOrientation(value) {\n this.isVertical_ = value;\n }\n /**\n * Sets the useActivatedClass_ private variable.\n */\n setUseActivatedClass(useActivated) {\n this.useActivatedClass_ = useActivated;\n }\n getSelectedIndex() {\n return this.selectedIndex_;\n }\n setSelectedIndex(index) {\n if (!this.isIndexValid_(index)) {\n return;\n }\n if (this.isMulti_) {\n this.setMultiSelectionAtIndex_(createSetFromIndex(index));\n }\n else {\n this.setSingleSelectionAtIndex_(index);\n }\n }\n /**\n * Focus in handler for the list items.\n */\n handleFocusIn(_, listItemIndex) {\n if (listItemIndex >= 0) {\n this.adapter.setTabIndexForElementIndex(listItemIndex, 0);\n }\n }\n /**\n * Focus out handler for the list items.\n */\n handleFocusOut(_, listItemIndex) {\n if (listItemIndex >= 0) {\n this.adapter.setTabIndexForElementIndex(listItemIndex, -1);\n }\n /**\n * Between Focusout & Focusin some browsers do not have focus on any\n * element. Setting a delay to wait till the focus is moved to next element.\n */\n setTimeout(() => {\n if (!this.adapter.isFocusInsideList()) {\n this.setTabindexToFirstSelectedItem_();\n }\n }, 0);\n }\n /**\n * Key handler for the list.\n */\n handleKeydown(event, isRootListItem, listItemIndex) {\n const isArrowLeft = normalizeKey(event) === 'ArrowLeft';\n const isArrowUp = normalizeKey(event) === 'ArrowUp';\n const isArrowRight = normalizeKey(event) === 'ArrowRight';\n const isArrowDown = normalizeKey(event) === 'ArrowDown';\n const isHome = normalizeKey(event) === 'Home';\n const isEnd = normalizeKey(event) === 'End';\n const isEnter = normalizeKey(event) === 'Enter';\n const isSpace = normalizeKey(event) === 'Spacebar';\n if (this.adapter.isRootFocused()) {\n if (isArrowUp || isEnd) {\n event.preventDefault();\n this.focusLastElement();\n }\n else if (isArrowDown || isHome) {\n event.preventDefault();\n this.focusFirstElement();\n }\n return;\n }\n let currentIndex = this.adapter.getFocusedElementIndex();\n if (currentIndex === -1) {\n currentIndex = listItemIndex;\n if (currentIndex < 0) {\n // If this event doesn't have a mdc-deprecated-list-item ancestor from\n // the current list (not from a sublist), return early.\n return;\n }\n }\n let nextIndex;\n if ((this.isVertical_ && isArrowDown) ||\n (!this.isVertical_ && isArrowRight)) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusNextElement(currentIndex);\n }\n else if ((this.isVertical_ && isArrowUp) || (!this.isVertical_ && isArrowLeft)) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusPrevElement(currentIndex);\n }\n else if (isHome) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusFirstElement();\n }\n else if (isEnd) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusLastElement();\n }\n else if (isEnter || isSpace) {\n if (isRootListItem) {\n // Return early if enter key is pressed on anchor element which triggers\n // synthetic MouseEvent event.\n const target = event.target;\n if (target && target.tagName === 'A' && isEnter) {\n return;\n }\n this.preventDefaultEvent(event);\n this.setSelectedIndexOnAction_(currentIndex, true);\n }\n }\n this.focusedItemIndex_ = currentIndex;\n if (nextIndex !== undefined) {\n this.setTabindexAtIndex_(nextIndex);\n this.focusedItemIndex_ = nextIndex;\n }\n }\n /**\n * Click handler for the list.\n */\n handleSingleSelection(index, isInteraction, force) {\n if (index === numbers.UNSET_INDEX) {\n return;\n }\n this.setSelectedIndexOnAction_(index, isInteraction, force);\n this.setTabindexAtIndex_(index);\n this.focusedItemIndex_ = index;\n }\n /**\n * Focuses the next element on the list.\n */\n focusNextElement(index) {\n const count = this.adapter.getListItemCount();\n let nextIndex = index + 1;\n if (nextIndex >= count) {\n if (this.wrapFocus_) {\n nextIndex = 0;\n }\n else {\n // Return early because last item is already focused.\n return index;\n }\n }\n this.adapter.focusItemAtIndex(nextIndex);\n return nextIndex;\n }\n /**\n * Focuses the previous element on the list.\n */\n focusPrevElement(index) {\n let prevIndex = index - 1;\n if (prevIndex < 0) {\n if (this.wrapFocus_) {\n prevIndex = this.adapter.getListItemCount() - 1;\n }\n else {\n // Return early because first item is already focused.\n return index;\n }\n }\n this.adapter.focusItemAtIndex(prevIndex);\n return prevIndex;\n }\n focusFirstElement() {\n this.adapter.focusItemAtIndex(0);\n return 0;\n }\n focusLastElement() {\n const lastIndex = this.adapter.getListItemCount() - 1;\n this.adapter.focusItemAtIndex(lastIndex);\n return lastIndex;\n }\n /**\n * @param itemIndex Index of the list item\n * @param isEnabled Sets the list item to enabled or disabled.\n */\n setEnabled(itemIndex, isEnabled) {\n if (!this.isIndexValid_(itemIndex)) {\n return;\n }\n this.adapter.setDisabledStateForElementIndex(itemIndex, !isEnabled);\n }\n /**\n * Ensures that preventDefault is only called if the containing element\n * doesn't consume the event, and it will cause an unintended scroll.\n */\n preventDefaultEvent(evt) {\n const target = evt.target;\n const tagName = `${target.tagName}`.toLowerCase();\n if (ELEMENTS_KEY_ALLOWED_IN.indexOf(tagName) === -1) {\n evt.preventDefault();\n }\n }\n setSingleSelectionAtIndex_(index, isInteraction = true) {\n if (this.selectedIndex_ === index) {\n return;\n }\n // unset previous\n if (this.selectedIndex_ !== numbers.UNSET_INDEX) {\n this.adapter.setSelectedStateForElementIndex(this.selectedIndex_, false);\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(this.selectedIndex_, false);\n }\n }\n // set new\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(index, true);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(index, true);\n }\n this.setAriaForSingleSelectionAtIndex_(index);\n this.selectedIndex_ = index;\n this.adapter.notifySelected(index);\n }\n setMultiSelectionAtIndex_(newIndex, isInteraction = true) {\n const oldIndex = createSetFromIndex(this.selectedIndex_);\n const diff = findIndexDiff(oldIndex, newIndex);\n if (!diff.removed.length && !diff.added.length) {\n return;\n }\n for (const removed of diff.removed) {\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(removed, false);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(removed, false);\n }\n }\n for (const added of diff.added) {\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(added, true);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(added, true);\n }\n }\n this.selectedIndex_ = newIndex;\n this.adapter.notifySelected(newIndex, diff);\n }\n /**\n * Sets aria attribute for single selection at given index.\n */\n setAriaForSingleSelectionAtIndex_(index) {\n // Detect the presence of aria-current and get the value only during list\n // initialization when it is in unset state.\n if (this.selectedIndex_ === numbers.UNSET_INDEX) {\n this.ariaCurrentAttrValue_ =\n this.adapter.getAttributeForElementIndex(index, strings.ARIA_CURRENT);\n }\n const isAriaCurrent = this.ariaCurrentAttrValue_ !== null;\n const ariaAttribute = isAriaCurrent ? strings.ARIA_CURRENT : strings.ARIA_SELECTED;\n if (this.selectedIndex_ !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(this.selectedIndex_, ariaAttribute, 'false');\n }\n const ariaAttributeValue = isAriaCurrent ? this.ariaCurrentAttrValue_ : 'true';\n this.adapter.setAttributeForElementIndex(index, ariaAttribute, ariaAttributeValue);\n }\n setTabindexAtIndex_(index) {\n if (this.focusedItemIndex_ === numbers.UNSET_INDEX && index !== 0) {\n // If no list item was selected set first list item's tabindex to -1.\n // Generally, tabindex is set to 0 on first list item of list that has no\n // preselected items.\n this.adapter.setTabIndexForElementIndex(0, -1);\n }\n else if (this.focusedItemIndex_ >= 0 && this.focusedItemIndex_ !== index) {\n this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_, -1);\n }\n this.adapter.setTabIndexForElementIndex(index, 0);\n }\n setTabindexToFirstSelectedItem_() {\n let targetIndex = 0;\n if (typeof this.selectedIndex_ === 'number' &&\n this.selectedIndex_ !== numbers.UNSET_INDEX) {\n targetIndex = this.selectedIndex_;\n }\n else if (isIndexSet(this.selectedIndex_) && this.selectedIndex_.size > 0) {\n targetIndex = Math.min(...this.selectedIndex_);\n }\n this.setTabindexAtIndex_(targetIndex);\n }\n isIndexValid_(index) {\n if (index instanceof Set) {\n if (!this.isMulti_) {\n throw new Error('MDCListFoundation: Array of index is only supported for checkbox based list');\n }\n if (index.size === 0) {\n return true;\n }\n else {\n let isOneInRange = false;\n for (const entry of index) {\n isOneInRange = this.isIndexInRange_(entry);\n if (isOneInRange) {\n break;\n }\n }\n return isOneInRange;\n }\n }\n else if (typeof index === 'number') {\n if (this.isMulti_) {\n throw new Error('MDCListFoundation: Expected array of index for checkbox based list but got number: ' +\n index);\n }\n return index === numbers.UNSET_INDEX || this.isIndexInRange_(index);\n }\n else {\n return false;\n }\n }\n isIndexInRange_(index) {\n const listSize = this.adapter.getListItemCount();\n return index >= 0 && index < listSize;\n }\n /**\n * Sets selected index on user action, toggles checkbox / radio based on\n * toggleCheckbox value. User interaction should not toggle list item(s) when\n * disabled.\n */\n setSelectedIndexOnAction_(index, isInteraction, force) {\n if (this.adapter.getDisabledStateForElementIndex(index)) {\n return;\n }\n let checkedIndex = index;\n if (this.isMulti_) {\n checkedIndex = new Set([index]);\n }\n if (!this.isIndexValid_(checkedIndex)) {\n return;\n }\n if (this.isMulti_) {\n this.toggleMultiAtIndex(index, force, isInteraction);\n }\n else {\n if (isInteraction || force) {\n this.setSingleSelectionAtIndex_(index, isInteraction);\n }\n else {\n const isDeselection = this.selectedIndex_ === index;\n if (isDeselection) {\n this.setSingleSelectionAtIndex_(numbers.UNSET_INDEX);\n }\n }\n }\n if (isInteraction) {\n this.adapter.notifyAction(index);\n }\n }\n toggleMultiAtIndex(index, force, isInteraction = true) {\n let newSelectionValue = false;\n if (force === undefined) {\n newSelectionValue = !this.adapter.getSelectedStateForElementIndex(index);\n }\n else {\n newSelectionValue = force;\n }\n const newSet = createSetFromIndex(this.selectedIndex_);\n if (newSelectionValue) {\n newSet.add(index);\n }\n else {\n newSet.delete(index);\n }\n this.setMultiSelectionAtIndex_(newSet, isInteraction);\n }\n}\n// tslint:disable-next-line:no-default-export Needed for backward compatibility\n// with MDC Web v0.44.0 and earlier.\nexport default MDCListFoundation;\n//# sourceMappingURL=mwc-list-foundation.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport './mwc-list-item.js';\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { deepActiveElementPath, doesElementContainFocus, isNodeElement } from '@material/mwc-base/utils.js';\nimport { html } from 'lit';\nimport { property, query, queryAssignedNodes } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport MDCListFoundation, { isIndexSet } from './mwc-list-foundation.js';\nexport { createSetFromIndex, isEventMulti, isIndexSet } from './mwc-list-foundation.js';\nfunction debounceLayout(callback, waitInMS = 50) {\n let timeoutId;\n // tslint:disable-next-line\n return function (updateItems = true) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n callback(updateItems);\n }, waitInMS);\n };\n}\nconst isListItem = (element) => {\n return element.hasAttribute('mwc-list-item');\n};\nfunction clearAndCreateItemsReadyPromise() {\n const oldResolver = this.itemsReadyResolver;\n this.itemsReady = new Promise((res) => {\n // TODO(b/175626389): Type '(value: never[] | PromiseLike) => void'\n // is not assignable to type '(value?: never[] | PromiseLike |\n // undefined) => void'.\n return this.itemsReadyResolver = res;\n });\n oldResolver();\n}\n/**\n * @fires selected {SelectedDetail}\n * @fires action {ActionDetail}\n * @fires items-updated\n */\nexport class ListBase extends BaseElement {\n constructor() {\n super();\n this.mdcAdapter = null;\n this.mdcFoundationClass = MDCListFoundation;\n this.activatable = false;\n this.multi = false;\n this.wrapFocus = false;\n this.itemRoles = null;\n this.innerRole = null;\n this.innerAriaLabel = null;\n this.rootTabbable = false;\n this.previousTabindex = null;\n this.noninteractive = false;\n this.itemsReadyResolver = (() => {\n //\n });\n this.itemsReady = Promise.resolve([]);\n // tslint:enable:ban-ts-ignore\n this.items_ = [];\n const debouncedFunction = debounceLayout(this.layout.bind(this));\n this.debouncedLayout = (updateItems = true) => {\n clearAndCreateItemsReadyPromise.call(this);\n debouncedFunction(updateItems);\n };\n }\n // tslint:disable:ban-ts-ignore\n async getUpdateComplete() {\n // @ts-ignore\n const result = await super.getUpdateComplete();\n await this.itemsReady;\n return result;\n }\n get items() {\n return this.items_;\n }\n updateItems() {\n var _a;\n const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];\n const listItems = [];\n for (const node of nodes) {\n if (isListItem(node)) {\n listItems.push(node);\n node._managingList = this;\n }\n if (node.hasAttribute('divider') && !node.hasAttribute('role')) {\n node.setAttribute('role', 'separator');\n }\n }\n this.items_ = listItems;\n const selectedIndices = new Set();\n this.items_.forEach((item, index) => {\n if (this.itemRoles) {\n item.setAttribute('role', this.itemRoles);\n }\n else {\n item.removeAttribute('role');\n }\n if (item.selected) {\n selectedIndices.add(index);\n }\n });\n if (this.multi) {\n this.select(selectedIndices);\n }\n else {\n const index = selectedIndices.size ? selectedIndices.entries().next().value[1] : -1;\n this.select(index);\n }\n const itemsUpdatedEv = new Event('items-updated', { bubbles: true, composed: true });\n this.dispatchEvent(itemsUpdatedEv);\n }\n get selected() {\n const index = this.index;\n if (!isIndexSet(index)) {\n if (index === -1) {\n return null;\n }\n return this.items[index];\n }\n const selected = [];\n for (const entry of index) {\n selected.push(this.items[entry]);\n }\n return selected;\n }\n get index() {\n if (this.mdcFoundation) {\n return this.mdcFoundation.getSelectedIndex();\n }\n return -1;\n }\n render() {\n const role = this.innerRole === null ? undefined : this.innerRole;\n const ariaLabel = this.innerAriaLabel === null ? undefined : this.innerAriaLabel;\n const tabindex = this.rootTabbable ? '0' : '-1';\n return html `\n \n \n \n ${this.renderPlaceholder()}\n \n `;\n }\n renderPlaceholder() {\n var _a;\n const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];\n if (this.emptyMessage !== undefined && nodes.length === 0) {\n return html `\n ${this.emptyMessage}\n `;\n }\n return null;\n }\n firstUpdated() {\n super.firstUpdated();\n if (!this.items.length) {\n // required because this is called before observers\n this.mdcFoundation.setMulti(this.multi);\n // for when children upgrade before list\n this.layout();\n }\n }\n onFocusIn(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n this.mdcFoundation.handleFocusIn(evt, index);\n }\n }\n onFocusOut(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n this.mdcFoundation.handleFocusOut(evt, index);\n }\n }\n onKeydown(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n const target = evt.target;\n const isRootListItem = isListItem(target);\n this.mdcFoundation.handleKeydown(evt, isRootListItem, index);\n }\n }\n onRequestSelected(evt) {\n if (this.mdcFoundation) {\n let index = this.getIndexOfTarget(evt);\n // might happen in shady dom slowness. Recalc children\n if (index === -1) {\n this.layout();\n index = this.getIndexOfTarget(evt);\n // still not found; may not be mwc-list-item. Unsupported case.\n if (index === -1) {\n return;\n }\n }\n const element = this.items[index];\n if (element.disabled) {\n return;\n }\n const selected = evt.detail.selected;\n const source = evt.detail.source;\n this.mdcFoundation.handleSingleSelection(index, source === 'interaction', selected);\n evt.stopPropagation();\n }\n }\n getIndexOfTarget(evt) {\n const elements = this.items;\n const path = evt.composedPath();\n for (const pathItem of path) {\n let index = -1;\n if (isNodeElement(pathItem) && isListItem(pathItem)) {\n index = elements.indexOf(pathItem);\n }\n if (index !== -1) {\n return index;\n }\n }\n return -1;\n }\n createAdapter() {\n this.mdcAdapter = {\n getListItemCount: () => {\n if (this.mdcRoot) {\n return this.items.length;\n }\n return 0;\n },\n getFocusedElementIndex: this.getFocusedItemIndex,\n getAttributeForElementIndex: (index, attr) => {\n const listElement = this.mdcRoot;\n if (!listElement) {\n return '';\n }\n const element = this.items[index];\n return element ? element.getAttribute(attr) : '';\n },\n setAttributeForElementIndex: (index, attr, val) => {\n if (!this.mdcRoot) {\n return;\n }\n const element = this.items[index];\n if (element) {\n element.setAttribute(attr, val);\n }\n },\n focusItemAtIndex: (index) => {\n const element = this.items[index];\n if (element) {\n element.focus();\n }\n },\n setTabIndexForElementIndex: (index, value) => {\n const item = this.items[index];\n if (item) {\n item.tabindex = value;\n }\n },\n notifyAction: (index) => {\n const init = { bubbles: true, composed: true };\n init.detail = { index };\n const ev = new CustomEvent('action', init);\n this.dispatchEvent(ev);\n },\n notifySelected: (index, diff) => {\n const init = { bubbles: true, composed: true };\n init.detail = { index, diff };\n const ev = new CustomEvent('selected', init);\n this.dispatchEvent(ev);\n },\n isFocusInsideList: () => {\n return doesElementContainFocus(this);\n },\n isRootFocused: () => {\n const mdcRoot = this.mdcRoot;\n const root = mdcRoot.getRootNode();\n return root.activeElement === mdcRoot;\n },\n setDisabledStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.disabled = value;\n },\n getDisabledStateForElementIndex: (index) => {\n const item = this.items[index];\n if (!item) {\n return false;\n }\n return item.disabled;\n },\n setSelectedStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.selected = value;\n },\n getSelectedStateForElementIndex: (index) => {\n const item = this.items[index];\n if (!item) {\n return false;\n }\n return item.selected;\n },\n setActivatedStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.activated = value;\n },\n };\n return this.mdcAdapter;\n }\n selectUi(index, activate = false) {\n const item = this.items[index];\n if (item) {\n item.selected = true;\n item.activated = activate;\n }\n }\n deselectUi(index) {\n const item = this.items[index];\n if (item) {\n item.selected = false;\n item.activated = false;\n }\n }\n select(index) {\n if (!this.mdcFoundation) {\n return;\n }\n this.mdcFoundation.setSelectedIndex(index);\n }\n toggle(index, force) {\n if (this.multi) {\n this.mdcFoundation.toggleMultiAtIndex(index, force);\n }\n }\n onListItemConnected(e) {\n const target = e.target;\n this.layout(this.items.indexOf(target) === -1);\n }\n layout(updateItems = true) {\n if (updateItems) {\n this.updateItems();\n }\n const first = this.items[0];\n for (const item of this.items) {\n item.tabindex = -1;\n }\n if (first) {\n if (this.noninteractive) {\n if (!this.previousTabindex) {\n this.previousTabindex = first;\n }\n }\n else {\n first.tabindex = 0;\n }\n }\n this.itemsReadyResolver();\n }\n getFocusedItemIndex() {\n if (!this.mdcRoot) {\n return -1;\n }\n if (!this.items.length) {\n return -1;\n }\n const activeElementPath = deepActiveElementPath();\n if (!activeElementPath.length) {\n return -1;\n }\n for (let i = activeElementPath.length - 1; i >= 0; i--) {\n const activeItem = activeElementPath[i];\n if (isListItem(activeItem)) {\n return this.items.indexOf(activeItem);\n }\n }\n return -1;\n }\n focusItemAtIndex(index) {\n for (const item of this.items) {\n if (item.tabindex === 0) {\n item.tabindex = -1;\n break;\n }\n }\n this.items[index].tabindex = 0;\n this.items[index].focus();\n }\n focus() {\n const root = this.mdcRoot;\n if (root) {\n root.focus();\n }\n }\n blur() {\n const root = this.mdcRoot;\n if (root) {\n root.blur();\n }\n }\n}\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"emptyMessage\", void 0);\n__decorate([\n query('.mdc-deprecated-list')\n], ListBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n queryAssignedNodes('', true, '*')\n], ListBase.prototype, \"assignedElements\", void 0);\n__decorate([\n queryAssignedNodes('', true, '[tabindex=\"0\"]')\n], ListBase.prototype, \"tabbableElements\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (value) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setUseActivatedClass(value);\n }\n })\n], ListBase.prototype, \"activatable\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (newValue, oldValue) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setMulti(newValue);\n }\n if (oldValue !== undefined) {\n this.layout();\n }\n })\n], ListBase.prototype, \"multi\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (value) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setWrapFocus(value);\n }\n })\n], ListBase.prototype, \"wrapFocus\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (_newValue, oldValue) {\n if (oldValue !== undefined) {\n this.updateItems();\n }\n })\n], ListBase.prototype, \"itemRoles\", void 0);\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"innerRole\", void 0);\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"innerAriaLabel\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListBase.prototype, \"rootTabbable\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n var _a, _b;\n if (value) {\n const tabbable = (_b = (_a = this.tabbableElements) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;\n this.previousTabindex = tabbable;\n if (tabbable) {\n tabbable.setAttribute('tabindex', '-1');\n }\n }\n else if (!value && this.previousTabindex) {\n this.previousTabindex.setAttribute('tabindex', '0');\n this.previousTabindex = null;\n }\n })\n], ListBase.prototype, \"noninteractive\", void 0);\n//# sourceMappingURL=mwc-list-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}`;\n//# sourceMappingURL=mwc-list.css.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ListBase } from './mwc-list-base.js';\nimport { styles } from './mwc-list.css.js';\nexport { createSetFromIndex, isEventMulti, isIndexSet } from './mwc-list-foundation.js';\nlet List = class List extends ListBase {\n};\nList.styles = [styles];\nList = __decorate([\n customElement('mwc-list')\n], List);\nexport { List };\n//# sourceMappingURL=mwc-list.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch',\n};\nvar numbers = {\n // This should stay in sync with $mdc-notched-outline-padding * 2.\n NOTCH_ELEMENT_PADDING: 8,\n};\nvar cssClasses = {\n NO_LABEL: 'mdc-notched-outline--no-label',\n OUTLINE_NOTCHED: 'mdc-notched-outline--notched',\n OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded',\n};\nexport { cssClasses, numbers, strings };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar MDCNotchedOutlineFoundation = /** @class */ (function (_super) {\n __extends(MDCNotchedOutlineFoundation, _super);\n function MDCNotchedOutlineFoundation(adapter) {\n return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this;\n }\n Object.defineProperty(MDCNotchedOutlineFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n setNotchWidthProperty: function () { return undefined; },\n removeNotchWidthProperty: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Adds the outline notched selector and updates the notch width calculated based off of notchWidth.\n */\n MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) {\n var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;\n if (notchWidth > 0) {\n notchWidth += numbers.NOTCH_ELEMENT_PADDING; // Add padding from left/right.\n }\n this.adapter.setNotchWidthProperty(notchWidth);\n this.adapter.addClass(OUTLINE_NOTCHED);\n };\n /**\n * Removes notched outline selector to close the notch in the outline.\n */\n MDCNotchedOutlineFoundation.prototype.closeNotch = function () {\n var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;\n this.adapter.removeClass(OUTLINE_NOTCHED);\n this.adapter.removeNotchWidthProperty();\n };\n return MDCNotchedOutlineFoundation;\n}(MDCFoundation));\nexport { MDCNotchedOutlineFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCNotchedOutlineFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport { MDCNotchedOutlineFoundation } from '@material/notched-outline/foundation.js';\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nexport class NotchedOutlineBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.mdcFoundationClass = MDCNotchedOutlineFoundation;\n this.width = 0;\n this.open = false;\n this.lastOpen = this.open;\n }\n createAdapter() {\n return {\n addClass: (className) => this.mdcRoot.classList.add(className),\n removeClass: (className) => this.mdcRoot.classList.remove(className),\n setNotchWidthProperty: (width) => this.notchElement.style.setProperty('width', `${width}px`),\n removeNotchWidthProperty: () => this.notchElement.style.removeProperty('width'),\n };\n }\n openOrClose(shouldOpen, width) {\n if (!this.mdcFoundation) {\n return;\n }\n if (shouldOpen && width !== undefined) {\n this.mdcFoundation.notch(width);\n }\n else {\n this.mdcFoundation.closeNotch();\n }\n }\n render() {\n this.openOrClose(this.open, this.width);\n const classes = classMap({\n 'mdc-notched-outline--notched': this.open,\n });\n return html `\n \n \n \n \n \n \n `;\n }\n}\n__decorate([\n query('.mdc-notched-outline')\n], NotchedOutlineBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n property({ type: Number })\n], NotchedOutlineBase.prototype, \"width\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], NotchedOutlineBase.prototype, \"open\", void 0);\n__decorate([\n query('.mdc-notched-outline__notch')\n], NotchedOutlineBase.prototype, \"notchElement\", void 0);\n//# sourceMappingURL=mwc-notched-outline-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;\n//# sourceMappingURL=mwc-notched-outline.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { NotchedOutlineBase } from './mwc-notched-outline-base.js';\nimport { styles } from './mwc-notched-outline.css.js';\nlet NotchedOutline = class NotchedOutline extends NotchedOutlineBase {\n};\nNotchedOutline.styles = [styles];\nNotchedOutline = __decorate([\n customElement('mwc-notched-outline')\n], NotchedOutline);\nexport { NotchedOutline };\n//# sourceMappingURL=mwc-notched-outline.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nvar _a, _b;\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { property } from 'lit/decorators.js';\nimport { addHasRemoveClass, BaseElement } from './base-element.js';\nexport { addHasRemoveClass, BaseElement };\n// ShadyDOM should submit elements in component internals\nconst USING_SHADY_DOM = (_b = (_a = window.ShadyDOM) === null || _a === void 0 ? void 0 : _a.inUse) !== null && _b !== void 0 ? _b : false;\n/** @soyCompatible */\nexport class FormElement extends BaseElement {\n constructor() {\n super(...arguments);\n /**\n * Disabled state for the component. When `disabled` is set to `true`, the\n * component will not be added to form submission.\n */\n this.disabled = false;\n /**\n * Form element that contains this element\n */\n this.containingForm = null;\n this.formDataListener = (ev) => {\n if (!this.disabled) {\n this.setFormData(ev.formData);\n }\n };\n }\n findFormElement() {\n // If the component internals are not in Shadow DOM, subscribing to form\n // data events could lead to duplicated data, which may not work correctly\n // on the server side.\n if (!this.shadowRoot || USING_SHADY_DOM) {\n return null;\n }\n const root = this.getRootNode();\n const forms = root.querySelectorAll('form');\n for (const form of Array.from(forms)) {\n if (form.contains(this)) {\n return form;\n }\n }\n return null;\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n this.containingForm = this.findFormElement();\n (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.formDataListener);\n }\n disconnectedCallback() {\n var _a;\n super.disconnectedCallback();\n (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.formDataListener);\n this.containingForm = null;\n }\n click() {\n if (this.formElement && !this.disabled) {\n this.formElement.focus();\n this.formElement.click();\n }\n }\n firstUpdated() {\n super.firstUpdated();\n if (this.shadowRoot) {\n this.mdcRoot.addEventListener('change', (e) => {\n this.dispatchEvent(new Event('change', e));\n });\n }\n }\n}\nFormElement.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n property({ type: Boolean })\n], FormElement.prototype, \"disabled\", void 0);\n//# sourceMappingURL=form-element.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',\n LABEL_REQUIRED: 'mdc-floating-label--required',\n LABEL_SHAKE: 'mdc-floating-label--shake',\n ROOT: 'mdc-floating-label',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses } from './constants';\nvar MDCFloatingLabelFoundation = /** @class */ (function (_super) {\n __extends(MDCFloatingLabelFoundation, _super);\n function MDCFloatingLabelFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCFloatingLabelFoundation.defaultAdapter), adapter)) || this;\n _this.shakeAnimationEndHandler = function () {\n _this.handleShakeAnimationEnd();\n };\n return _this;\n }\n Object.defineProperty(MDCFloatingLabelFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFloatingLabelFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n getWidth: function () { return 0; },\n registerInteractionHandler: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCFloatingLabelFoundation.prototype.init = function () {\n this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler);\n };\n MDCFloatingLabelFoundation.prototype.destroy = function () {\n this.adapter.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler);\n };\n /**\n * Returns the width of the label element.\n */\n MDCFloatingLabelFoundation.prototype.getWidth = function () {\n return this.adapter.getWidth();\n };\n /**\n * Styles the label to produce a shake animation to indicate an error.\n * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.\n */\n MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) {\n var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;\n if (shouldShake) {\n this.adapter.addClass(LABEL_SHAKE);\n }\n else {\n this.adapter.removeClass(LABEL_SHAKE);\n }\n };\n /**\n * Styles the label to float or dock.\n * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.\n */\n MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) {\n var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE;\n if (shouldFloat) {\n this.adapter.addClass(LABEL_FLOAT_ABOVE);\n }\n else {\n this.adapter.removeClass(LABEL_FLOAT_ABOVE);\n this.adapter.removeClass(LABEL_SHAKE);\n }\n };\n /**\n * Styles the label as required.\n * @param isRequired If true, adds an asterisk to the label, indicating that it is required.\n */\n MDCFloatingLabelFoundation.prototype.setRequired = function (isRequired) {\n var LABEL_REQUIRED = MDCFloatingLabelFoundation.cssClasses.LABEL_REQUIRED;\n if (isRequired) {\n this.adapter.addClass(LABEL_REQUIRED);\n }\n else {\n this.adapter.removeClass(LABEL_REQUIRED);\n }\n };\n MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd = function () {\n var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;\n this.adapter.removeClass(LABEL_SHAKE);\n };\n return MDCFloatingLabelFoundation;\n}(MDCFoundation));\nexport { MDCFloatingLabelFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFloatingLabelFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { MDCFloatingLabelFoundation } from '@material/floating-label/foundation.js';\nimport { directive, Directive, PartType } from 'lit/directive.js';\nconst createAdapter = (labelElement) => {\n return {\n addClass: (className) => labelElement.classList.add(className),\n removeClass: (className) => labelElement.classList.remove(className),\n getWidth: () => labelElement.scrollWidth,\n registerInteractionHandler: (evtType, handler) => {\n labelElement.addEventListener(evtType, handler);\n },\n deregisterInteractionHandler: (evtType, handler) => {\n labelElement.removeEventListener(evtType, handler);\n },\n };\n};\nclass FloatingLabelDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n this.foundation = null;\n this.previousPart = null;\n switch (partInfo.type) {\n // Only allow Attribute and Part bindings\n case PartType.ATTRIBUTE:\n case PartType.PROPERTY:\n break;\n default:\n throw new Error('FloatingLabel directive only support attribute and property parts');\n }\n }\n /**\n * There is no PropertyPart in Lit 2 so far. For more info see:\n * https://github.com/lit/lit/issues/1863\n */\n update(part, [label]) {\n if (part !== this.previousPart) {\n if (this.foundation) {\n this.foundation.destroy();\n }\n this.previousPart = part;\n const labelElement = part.element;\n labelElement.classList.add('mdc-floating-label');\n const adapter = createAdapter(labelElement);\n this.foundation = new MDCFloatingLabelFoundation(adapter);\n this.foundation.init();\n }\n return this.render(label);\n }\n render(_label) {\n return this.foundation;\n }\n}\nexport const floatingLabel = directive(FloatingLabelDirective);\n//# sourceMappingURL=mwc-floating-label-directive.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssClasses = {\n LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',\n LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',\n};\nexport { cssClasses };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses } from './constants';\nvar MDCLineRippleFoundation = /** @class */ (function (_super) {\n __extends(MDCLineRippleFoundation, _super);\n function MDCLineRippleFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCLineRippleFoundation.defaultAdapter), adapter)) || this;\n _this.transitionEndHandler = function (evt) {\n _this.handleTransitionEnd(evt);\n };\n return _this;\n }\n Object.defineProperty(MDCLineRippleFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCLineRippleFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return false; },\n setStyle: function () { return undefined; },\n registerEventHandler: function () { return undefined; },\n deregisterEventHandler: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCLineRippleFoundation.prototype.init = function () {\n this.adapter.registerEventHandler('transitionend', this.transitionEndHandler);\n };\n MDCLineRippleFoundation.prototype.destroy = function () {\n this.adapter.deregisterEventHandler('transitionend', this.transitionEndHandler);\n };\n MDCLineRippleFoundation.prototype.activate = function () {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n this.adapter.addClass(cssClasses.LINE_RIPPLE_ACTIVE);\n };\n MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) {\n this.adapter.setStyle('transform-origin', xCoordinate + \"px center\");\n };\n MDCLineRippleFoundation.prototype.deactivate = function () {\n this.adapter.addClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n };\n MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) {\n // Wait for the line ripple to be either transparent or opaque\n // before emitting the animation end event\n var isDeactivating = this.adapter.hasClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n if (evt.propertyName === 'opacity') {\n if (isDeactivating) {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_ACTIVE);\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n }\n }\n };\n return MDCLineRippleFoundation;\n}(MDCFoundation));\nexport { MDCLineRippleFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCLineRippleFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { MDCLineRippleFoundation } from '@material/line-ripple/foundation.js';\nimport { directive, Directive, PartType } from 'lit/directive.js';\nconst createAdapter = (lineElement) => {\n return {\n addClass: (className) => lineElement.classList.add(className),\n removeClass: (className) => lineElement.classList.remove(className),\n hasClass: (className) => lineElement.classList.contains(className),\n setStyle: (propertyName, value) => lineElement.style.setProperty(propertyName, value),\n registerEventHandler: (evtType, handler) => {\n lineElement.addEventListener(evtType, handler);\n },\n deregisterEventHandler: (evtType, handler) => {\n lineElement.removeEventListener(evtType, handler);\n },\n };\n};\nexport class LineRippleDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n this.previousPart = null;\n this.foundation = null;\n switch (partInfo.type) {\n case PartType.ATTRIBUTE:\n case PartType.PROPERTY:\n return;\n default:\n throw new Error('LineRipple only support attribute and property parts.');\n }\n }\n /**\n * There is no PropertyPart in Lit 2 so far. For more info see:\n * https://github.com/lit/lit/issues/1863\n */\n update(part, _params) {\n if (this.previousPart !== part) {\n if (this.foundation) {\n this.foundation.destroy();\n }\n this.previousPart = part;\n const lineElement = part.element;\n lineElement.classList.add('mdc-line-ripple');\n const adapter = createAdapter(lineElement);\n this.foundation = new MDCLineRippleFoundation(adapter);\n this.foundation.init();\n }\n return this.render();\n }\n render() {\n return this.foundation;\n }\n}\nexport const lineRipple = directive(LineRippleDirective);\n//# sourceMappingURL=mwc-line-ripple-directive.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n ARIA_CONTROLS: 'aria-controls',\n ARIA_DESCRIBEDBY: 'aria-describedby',\n INPUT_SELECTOR: '.mdc-text-field__input',\n LABEL_SELECTOR: '.mdc-floating-label',\n LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',\n LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',\n OUTLINE_SELECTOR: '.mdc-notched-outline',\n PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',\n SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',\n TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'\n};\nvar cssClasses = {\n DISABLED: 'mdc-text-field--disabled',\n FOCUSED: 'mdc-text-field--focused',\n HELPER_LINE: 'mdc-text-field-helper-line',\n INVALID: 'mdc-text-field--invalid',\n LABEL_FLOATING: 'mdc-text-field--label-floating',\n NO_LABEL: 'mdc-text-field--no-label',\n OUTLINED: 'mdc-text-field--outlined',\n ROOT: 'mdc-text-field',\n TEXTAREA: 'mdc-text-field--textarea',\n WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',\n WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',\n WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',\n};\nvar numbers = {\n LABEL_SCALE: 0.75,\n};\n/**\n * Whitelist based off of\n * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n * under the \"Validation-related attributes\" section.\n */\nvar VALIDATION_ATTR_WHITELIST = [\n 'pattern',\n 'min',\n 'max',\n 'required',\n 'step',\n 'minlength',\n 'maxlength',\n];\n/**\n * Label should always float for these types as they show some UI even if value\n * is empty.\n */\nvar ALWAYS_FLOAT_TYPES = [\n 'color',\n 'date',\n 'datetime-local',\n 'month',\n 'range',\n 'time',\n 'week',\n];\nexport { cssClasses, strings, numbers, VALIDATION_ATTR_WHITELIST, ALWAYS_FLOAT_TYPES };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { ALWAYS_FLOAT_TYPES, cssClasses, numbers, strings, VALIDATION_ATTR_WHITELIST } from './constants';\nvar POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];\nvar INTERACTION_EVENTS = ['click', 'keydown'];\nvar MDCTextFieldFoundation = /** @class */ (function (_super) {\n __extends(MDCTextFieldFoundation, _super);\n /**\n * @param adapter\n * @param foundationMap Map from subcomponent names to their subfoundations.\n */\n function MDCTextFieldFoundation(adapter, foundationMap) {\n if (foundationMap === void 0) { foundationMap = {}; }\n var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;\n _this.isFocused = false;\n _this.receivedUserInput = false;\n _this.valid = true;\n _this.useNativeValidation = true;\n _this.validateOnValueChange = true;\n _this.helperText = foundationMap.helperText;\n _this.characterCounter = foundationMap.characterCounter;\n _this.leadingIcon = foundationMap.leadingIcon;\n _this.trailingIcon = foundationMap.trailingIcon;\n _this.inputFocusHandler = function () {\n _this.activateFocus();\n };\n _this.inputBlurHandler = function () {\n _this.deactivateFocus();\n };\n _this.inputInputHandler = function () {\n _this.handleInput();\n };\n _this.setPointerXOffset = function (evt) {\n _this.setTransformOrigin(evt);\n };\n _this.textFieldInteractionHandler = function () {\n _this.handleTextFieldInteraction();\n };\n _this.validationAttributeChangeHandler = function (attributesList) {\n _this.handleValidationAttributeChange(attributesList);\n };\n return _this;\n }\n Object.defineProperty(MDCTextFieldFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldAlwaysFloat\", {\n get: function () {\n var type = this.getNativeInput().type;\n return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldFloat\", {\n get: function () {\n return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||\n this.isBadInput();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldShake\", {\n get: function () {\n return !this.isFocused && !this.isValid() && !!this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCTextFieldAdapter} for typing information on parameters and\n * return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return true; },\n setInputAttr: function () { return undefined; },\n removeInputAttr: function () { return undefined; },\n registerTextFieldInteractionHandler: function () { return undefined; },\n deregisterTextFieldInteractionHandler: function () { return undefined; },\n registerInputInteractionHandler: function () { return undefined; },\n deregisterInputInteractionHandler: function () { return undefined; },\n registerValidationAttributeChangeHandler: function () {\n return new MutationObserver(function () { return undefined; });\n },\n deregisterValidationAttributeChangeHandler: function () { return undefined; },\n getNativeInput: function () { return null; },\n isFocused: function () { return false; },\n activateLineRipple: function () { return undefined; },\n deactivateLineRipple: function () { return undefined; },\n setLineRippleTransformOrigin: function () { return undefined; },\n shakeLabel: function () { return undefined; },\n floatLabel: function () { return undefined; },\n setLabelRequired: function () { return undefined; },\n hasLabel: function () { return false; },\n getLabelWidth: function () { return 0; },\n hasOutline: function () { return false; },\n notchOutline: function () { return undefined; },\n closeOutline: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCTextFieldFoundation.prototype.init = function () {\n var e_1, _a, e_2, _b;\n if (this.adapter.hasLabel() && this.getNativeInput().required) {\n this.adapter.setLabelRequired(true);\n }\n if (this.adapter.isFocused()) {\n this.inputFocusHandler();\n }\n else if (this.adapter.hasLabel() && this.shouldFloat) {\n this.notchOutline(true);\n this.adapter.floatLabel(true);\n this.styleFloating(true);\n }\n this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {\n var evtType = POINTERDOWN_EVENTS_1_1.value;\n this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {\n var evtType = INTERACTION_EVENTS_1_1.value;\n this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this.validationObserver =\n this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);\n this.setcharacterCounter(this.getValue().length);\n };\n MDCTextFieldFoundation.prototype.destroy = function () {\n var e_3, _a, e_4, _b;\n this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {\n var evtType = POINTERDOWN_EVENTS_2_1.value;\n this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {\n var evtType = INTERACTION_EVENTS_2_1.value;\n this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);\n };\n /**\n * Handles user interactions with the Text Field.\n */\n MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {\n var nativeInput = this.adapter.getNativeInput();\n if (nativeInput && nativeInput.disabled) {\n return;\n }\n this.receivedUserInput = true;\n };\n /**\n * Handles validation attribute changes\n */\n MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {\n var _this = this;\n attributesList.some(function (attributeName) {\n if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {\n _this.styleValidity(true);\n _this.adapter.setLabelRequired(_this.getNativeInput().required);\n return true;\n }\n return false;\n });\n if (attributesList.indexOf('maxlength') > -1) {\n this.setcharacterCounter(this.getValue().length);\n }\n };\n /**\n * Opens/closes the notched outline.\n */\n MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {\n if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {\n return;\n }\n if (openNotch) {\n var labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;\n this.adapter.notchOutline(labelWidth);\n }\n else {\n this.adapter.closeOutline();\n }\n };\n /**\n * Activates the text field focus state.\n */\n MDCTextFieldFoundation.prototype.activateFocus = function () {\n this.isFocused = true;\n this.styleFocused(this.isFocused);\n this.adapter.activateLineRipple();\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (this.helperText &&\n (this.helperText.isPersistent() || !this.helperText.isValidation() ||\n !this.valid)) {\n this.helperText.showToScreenReader();\n }\n };\n /**\n * Sets the line ripple's transform origin, so that the line ripple activate\n * animation will animate out from the user's click location.\n */\n MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {\n if (this.isDisabled() || this.adapter.hasOutline()) {\n return;\n }\n var touches = evt.touches;\n var targetEvent = touches ? touches[0] : evt;\n var targetClientRect = targetEvent.target.getBoundingClientRect();\n var normalizedX = targetEvent.clientX - targetClientRect.left;\n this.adapter.setLineRippleTransformOrigin(normalizedX);\n };\n /**\n * Handles input change of text input and text area.\n */\n MDCTextFieldFoundation.prototype.handleInput = function () {\n this.autoCompleteFocus();\n this.setcharacterCounter(this.getValue().length);\n };\n /**\n * Activates the Text Field's focus state in cases when the input value\n * changes without user input (e.g. programmatically).\n */\n MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {\n if (!this.receivedUserInput) {\n this.activateFocus();\n }\n };\n /**\n * Deactivates the Text Field's focus state.\n */\n MDCTextFieldFoundation.prototype.deactivateFocus = function () {\n this.isFocused = false;\n this.adapter.deactivateLineRipple();\n var isValid = this.isValid();\n this.styleValidity(isValid);\n this.styleFocused(this.isFocused);\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (!this.shouldFloat) {\n this.receivedUserInput = false;\n }\n };\n MDCTextFieldFoundation.prototype.getValue = function () {\n return this.getNativeInput().value;\n };\n /**\n * @param value The value to set on the input Element.\n */\n MDCTextFieldFoundation.prototype.setValue = function (value) {\n // Prevent Safari from moving the caret to the end of the input when the\n // value has not changed.\n if (this.getValue() !== value) {\n this.getNativeInput().value = value;\n }\n this.setcharacterCounter(value.length);\n if (this.validateOnValueChange) {\n var isValid = this.isValid();\n this.styleValidity(isValid);\n }\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n if (this.validateOnValueChange) {\n this.adapter.shakeLabel(this.shouldShake);\n }\n }\n };\n /**\n * @return The custom validity state, if set; otherwise, the result of a\n * native validity check.\n */\n MDCTextFieldFoundation.prototype.isValid = function () {\n return this.useNativeValidation ? this.isNativeInputValid() : this.valid;\n };\n /**\n * @param isValid Sets the custom validity state of the Text Field.\n */\n MDCTextFieldFoundation.prototype.setValid = function (isValid) {\n this.valid = isValid;\n this.styleValidity(isValid);\n var shouldShake = !isValid && !this.isFocused && !!this.getValue();\n if (this.adapter.hasLabel()) {\n this.adapter.shakeLabel(shouldShake);\n }\n };\n /**\n * @param shouldValidate Whether or not validity should be updated on\n * value change.\n */\n MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {\n this.validateOnValueChange = shouldValidate;\n };\n /**\n * @return Whether or not validity should be updated on value change. `true`\n * by default.\n */\n MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {\n return this.validateOnValueChange;\n };\n /**\n * Enables or disables the use of native validation. Use this for custom\n * validation.\n * @param useNativeValidation Set this to false to ignore native input\n * validation.\n */\n MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {\n this.useNativeValidation = useNativeValidation;\n };\n MDCTextFieldFoundation.prototype.isDisabled = function () {\n return this.getNativeInput().disabled;\n };\n /**\n * @param disabled Sets the text-field disabled or enabled.\n */\n MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {\n this.getNativeInput().disabled = disabled;\n this.styleDisabled(disabled);\n };\n /**\n * @param content Sets the content of the helper text.\n */\n MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {\n if (this.helperText) {\n this.helperText.setContent(content);\n }\n };\n /**\n * Sets the aria label of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {\n if (this.leadingIcon) {\n this.leadingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {\n if (this.leadingIcon) {\n this.leadingIcon.setContent(content);\n }\n };\n /**\n * Sets the aria label of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {\n if (this.trailingIcon) {\n this.trailingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {\n if (this.trailingIcon) {\n this.trailingIcon.setContent(content);\n }\n };\n /**\n * Sets character counter values that shows characters used and the total\n * character limit.\n */\n MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {\n if (!this.characterCounter) {\n return;\n }\n var maxLength = this.getNativeInput().maxLength;\n if (maxLength === -1) {\n throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');\n }\n this.characterCounter.setCounterValue(currentLength, maxLength);\n };\n /**\n * @return True if the Text Field input fails in converting the user-supplied\n * value.\n */\n MDCTextFieldFoundation.prototype.isBadInput = function () {\n // The badInput property is not supported in IE 11 💩.\n return this.getNativeInput().validity.badInput || false;\n };\n /**\n * @return The result of native validity checking (ValidityState.valid).\n */\n MDCTextFieldFoundation.prototype.isNativeInputValid = function () {\n return this.getNativeInput().validity.valid;\n };\n /**\n * Styles the component based on the validity state.\n */\n MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {\n var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;\n if (isValid) {\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.addClass(INVALID);\n }\n if (this.helperText) {\n this.helperText.setValidity(isValid);\n // We dynamically set or unset aria-describedby for validation helper text\n // only, based on whether the field is valid\n var helperTextValidation = this.helperText.isValidation();\n if (!helperTextValidation) {\n return;\n }\n var helperTextVisible = this.helperText.isVisible();\n var helperTextId = this.helperText.getId();\n if (helperTextVisible && helperTextId) {\n this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId);\n }\n else {\n this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY);\n }\n }\n };\n /**\n * Styles the component based on the focused state.\n */\n MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {\n var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;\n if (isFocused) {\n this.adapter.addClass(FOCUSED);\n }\n else {\n this.adapter.removeClass(FOCUSED);\n }\n };\n /**\n * Styles the component based on the disabled state.\n */\n MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {\n var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;\n if (isDisabled) {\n this.adapter.addClass(DISABLED);\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.removeClass(DISABLED);\n }\n if (this.leadingIcon) {\n this.leadingIcon.setDisabled(isDisabled);\n }\n if (this.trailingIcon) {\n this.trailingIcon.setDisabled(isDisabled);\n }\n };\n /**\n * Styles the component based on the label floating state.\n */\n MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {\n var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;\n if (isFloating) {\n this.adapter.addClass(LABEL_FLOATING);\n }\n else {\n this.adapter.removeClass(LABEL_FLOATING);\n }\n };\n /**\n * @return The native text input element from the host environment, or an\n * object with the same shape for unit tests.\n */\n MDCTextFieldFoundation.prototype.getNativeInput = function () {\n // this.adapter may be undefined in foundation unit tests. This happens when\n // testdouble is creating a mock object and invokes the\n // shouldShake/shouldFloat getters (which in turn call getValue(), which\n // calls this method) before init() has been called from the MDCTextField\n // constructor. To work around that issue, we return a dummy object.\n var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;\n return nativeInput || {\n disabled: false,\n maxLength: -1,\n required: false,\n type: 'input',\n validity: {\n badInput: false,\n valid: true,\n },\n value: '',\n };\n };\n return MDCTextFieldFoundation;\n}(MDCFoundation));\nexport { MDCTextFieldFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldFoundation;\n//# sourceMappingURL=foundation.js.map","import{noChange as r,nothing as e}from\"../lit-html.js\";import{directive as i,Directive as t,PartType as n}from\"../directive.js\";import{isSingleExpression as o,setCommittedValue as s}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=i(class extends t{constructor(r){if(super(r),r.type!==n.PROPERTY&&r.type!==n.ATTRIBUTE&&r.type!==n.BOOLEAN_ATTRIBUTE)throw Error(\"The `live` directive is not allowed on child or event bindings\");if(!o(r))throw Error(\"`live` bindings can only contain a single expression\")}render(r){return r}update(i,[t]){if(t===r||t===e)return t;const o=i.element,l=i.name;if(i.type===n.PROPERTY){if(t===o[l])return r}else if(i.type===n.BOOLEAN_ATTRIBUTE){if(!!t===o.hasAttribute(l))return r}else if(i.type===n.ATTRIBUTE&&o.getAttribute(l)===t+\"\")return r;return s(i),t}});export{l as live};\n//# sourceMappingURL=live.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-notched-outline/mwc-notched-outline.js';\nimport { addHasRemoveClass, FormElement } from '@material/mwc-base/form-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { floatingLabel } from '@material/mwc-floating-label/mwc-floating-label-directive.js';\nimport { lineRipple } from '@material/mwc-line-ripple/mwc-line-ripple-directive.js';\nimport MDCTextFieldFoundation from '@material/textfield/foundation.js';\nimport { html } from 'lit';\nimport { eventOptions, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nconst passiveEvents = ['touchstart', 'touchmove', 'scroll', 'mousewheel'];\nconst createValidityObj = (customValidity = {}) => {\n /*\n * We need to make ValidityState an object because it is readonly and\n * we cannot use the spread operator. Also, we don't export\n * `CustomValidityState` because it is a leaky implementation and the user\n * already has access to `ValidityState` in lib.dom.ts. Also an interface\n * {a: Type} can be casted to {readonly a: Type} so passing any object\n * should be fine.\n */\n const objectifiedCustomValidity = {};\n // eslint-disable-next-line guard-for-in\n for (const propName in customValidity) {\n /*\n * Casting is needed because ValidityState's props are all readonly and\n * thus cannot be set on `onjectifiedCustomValidity`. In the end, the\n * interface is the same as ValidityState (but not readonly), but the\n * function signature casts the output to ValidityState (thus readonly).\n */\n objectifiedCustomValidity[propName] =\n customValidity[propName];\n }\n return Object.assign({ badInput: false, customError: false, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false, stepMismatch: false, tooLong: false, tooShort: false, typeMismatch: false, valid: true, valueMissing: false }, objectifiedCustomValidity);\n};\n/** @soyCompatible */\nexport class TextFieldBase extends FormElement {\n constructor() {\n super(...arguments);\n this.mdcFoundationClass = MDCTextFieldFoundation;\n this.value = '';\n this.type = 'text';\n this.placeholder = '';\n this.label = '';\n this.icon = '';\n this.iconTrailing = '';\n this.disabled = false;\n this.required = false;\n this.minLength = -1;\n this.maxLength = -1;\n this.outlined = false;\n this.helper = '';\n this.validateOnInitialRender = false;\n this.validationMessage = '';\n this.autoValidate = false;\n this.pattern = '';\n this.min = '';\n this.max = '';\n /**\n * step can be a number or the keyword \"any\".\n *\n * Use `String` typing to pass down the value as a string and let the native\n * input cast internally as needed.\n */\n this.step = null;\n this.size = null;\n this.helperPersistent = false;\n this.charCounter = false;\n this.endAligned = false;\n this.prefix = '';\n this.suffix = '';\n this.name = '';\n this.readOnly = false;\n this.autocapitalize = '';\n this.outlineOpen = false;\n this.outlineWidth = 0;\n this.isUiValid = true;\n this.focused = false;\n this._validity = createValidityObj();\n this.validityTransform = null;\n }\n get validity() {\n this._checkValidity(this.value);\n return this._validity;\n }\n get willValidate() {\n return this.formElement.willValidate;\n }\n get selectionStart() {\n return this.formElement.selectionStart;\n }\n get selectionEnd() {\n return this.formElement.selectionEnd;\n }\n focus() {\n const focusEvt = new CustomEvent('focus');\n this.formElement.dispatchEvent(focusEvt);\n this.formElement.focus();\n }\n blur() {\n const blurEvt = new CustomEvent('blur');\n this.formElement.dispatchEvent(blurEvt);\n this.formElement.blur();\n }\n select() {\n this.formElement.select();\n }\n setSelectionRange(selectionStart, selectionEnd, selectionDirection) {\n this.formElement.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n update(changedProperties) {\n if (changedProperties.has('autoValidate') && this.mdcFoundation) {\n this.mdcFoundation.setValidateOnValueChange(this.autoValidate);\n }\n if (changedProperties.has('value') && typeof this.value !== 'string') {\n this.value = `${this.value}`;\n }\n super.update(changedProperties);\n }\n setFormData(formData) {\n if (this.name) {\n formData.append(this.name, this.value);\n }\n }\n /** @soyTemplate */\n render() {\n const shouldRenderCharCounter = this.charCounter && this.maxLength !== -1;\n const shouldRenderHelperText = !!this.helper || !!this.validationMessage || shouldRenderCharCounter;\n /** @classMap */\n const classes = {\n 'mdc-text-field--disabled': this.disabled,\n 'mdc-text-field--no-label': !this.label,\n 'mdc-text-field--filled': !this.outlined,\n 'mdc-text-field--outlined': this.outlined,\n 'mdc-text-field--with-leading-icon': this.icon,\n 'mdc-text-field--with-trailing-icon': this.iconTrailing,\n 'mdc-text-field--end-aligned': this.endAligned,\n };\n return html `\n \n ${this.renderHelperText(shouldRenderHelperText, shouldRenderCharCounter)}\n `;\n }\n updated(changedProperties) {\n if (changedProperties.has('value') &&\n changedProperties.get('value') !== undefined) {\n this.mdcFoundation.setValue(this.value);\n if (this.autoValidate) {\n this.reportValidity();\n }\n }\n }\n /** @soyTemplate */\n renderRipple() {\n return this.outlined ? '' : html `\n \n `;\n }\n /** @soyTemplate */\n renderOutline() {\n return !this.outlined ? '' : html `\n \n ${this.renderLabel()}\n `;\n }\n /** @soyTemplate */\n renderLabel() {\n return !this.label ?\n '' :\n html `\n ${this.label}\n `;\n }\n /** @soyTemplate */\n renderLeadingIcon() {\n return this.icon ? this.renderIcon(this.icon) : '';\n }\n /** @soyTemplate */\n renderTrailingIcon() {\n return this.iconTrailing ? this.renderIcon(this.iconTrailing, true) : '';\n }\n /** @soyTemplate */\n renderIcon(icon, isTrailingIcon = false) {\n /** @classMap */\n const classes = {\n 'mdc-text-field__icon--leading': !isTrailingIcon,\n 'mdc-text-field__icon--trailing': isTrailingIcon\n };\n return html `${icon}`;\n }\n /** @soyTemplate */\n renderPrefix() {\n return this.prefix ? this.renderAffix(this.prefix) : '';\n }\n /** @soyTemplate */\n renderSuffix() {\n return this.suffix ? this.renderAffix(this.suffix, true) : '';\n }\n /** @soyTemplate */\n renderAffix(content, isSuffix = false) {\n /** @classMap */\n const classes = {\n 'mdc-text-field__affix--prefix': !isSuffix,\n 'mdc-text-field__affix--suffix': isSuffix\n };\n return html `\n ${content}`;\n }\n /** @soyTemplate */\n renderInput(shouldRenderHelperText) {\n const minOrUndef = this.minLength === -1 ? undefined : this.minLength;\n const maxOrUndef = this.maxLength === -1 ? undefined : this.maxLength;\n const autocapitalizeOrUndef = this.autocapitalize ?\n this.autocapitalize :\n undefined;\n const showValidationMessage = this.validationMessage && !this.isUiValid;\n const ariaLabelledbyOrUndef = !!this.label ? 'label' : undefined;\n const ariaControlsOrUndef = shouldRenderHelperText ? 'helper-text' : undefined;\n const ariaDescribedbyOrUndef = this.focused || this.helperPersistent || showValidationMessage ?\n 'helper-text' :\n undefined;\n // TODO: live() directive needs casting for lit-analyzer\n // https://github.com/runem/lit-analyzer/pull/91/files\n // TODO: lit-analyzer labels min/max as (number|string) instead of string\n return html `\n `;\n }\n /** @soyTemplate */\n renderLineRipple() {\n return this.outlined ?\n '' :\n html `\n \n `;\n }\n /** @soyTemplate */\n renderHelperText(shouldRenderHelperText, shouldRenderCharCounter) {\n const showValidationMessage = this.validationMessage && !this.isUiValid;\n /** @classMap */\n const classes = {\n 'mdc-text-field-helper-text--persistent': this.helperPersistent,\n 'mdc-text-field-helper-text--validation-msg': showValidationMessage,\n };\n const ariaHiddenOrUndef = this.focused || this.helperPersistent || showValidationMessage ?\n undefined :\n 'true';\n const helperText = showValidationMessage ? this.validationMessage : this.helper;\n return !shouldRenderHelperText ? '' : html `\n
    \n
    ${helperText}
    \n ${this.renderCharCounter(shouldRenderCharCounter)}\n
    `;\n }\n /** @soyTemplate */\n renderCharCounter(shouldRenderCharCounter) {\n const length = Math.min(this.value.length, this.maxLength);\n return !shouldRenderCharCounter ? '' : html `\n ${length} / ${this.maxLength}`;\n }\n onInputFocus() {\n this.focused = true;\n }\n onInputBlur() {\n this.focused = false;\n this.reportValidity();\n }\n checkValidity() {\n const isValid = this._checkValidity(this.value);\n if (!isValid) {\n const invalidEvent = new Event('invalid', { bubbles: false, cancelable: true });\n this.dispatchEvent(invalidEvent);\n }\n return isValid;\n }\n reportValidity() {\n const isValid = this.checkValidity();\n this.mdcFoundation.setValid(isValid);\n this.isUiValid = isValid;\n return isValid;\n }\n _checkValidity(value) {\n const nativeValidity = this.formElement.validity;\n let validity = createValidityObj(nativeValidity);\n if (this.validityTransform) {\n const customValidity = this.validityTransform(value, validity);\n validity = Object.assign(Object.assign({}, validity), customValidity);\n this.mdcFoundation.setUseNativeValidation(false);\n }\n else {\n this.mdcFoundation.setUseNativeValidation(true);\n }\n this._validity = validity;\n return this._validity.valid;\n }\n setCustomValidity(message) {\n this.validationMessage = message;\n this.formElement.setCustomValidity(message);\n }\n handleInputChange() {\n this.value = this.formElement.value;\n }\n createAdapter() {\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());\n }\n getRootAdapterMethods() {\n return Object.assign({ registerTextFieldInteractionHandler: (evtType, handler) => this.addEventListener(evtType, handler), deregisterTextFieldInteractionHandler: (evtType, handler) => this.removeEventListener(evtType, handler), registerValidationAttributeChangeHandler: (handler) => {\n const getAttributesList = (mutationsList) => {\n return mutationsList.map((mutation) => mutation.attributeName)\n .filter((attributeName) => attributeName);\n };\n const observer = new MutationObserver((mutationsList) => {\n handler(getAttributesList(mutationsList));\n });\n const config = { attributes: true };\n observer.observe(this.formElement, config);\n return observer;\n }, deregisterValidationAttributeChangeHandler: (observer) => observer.disconnect() }, addHasRemoveClass(this.mdcRoot));\n }\n getInputAdapterMethods() {\n return {\n getNativeInput: () => this.formElement,\n // since HelperTextFoundation is not used, aria-describedby a11y logic\n // is implemented in render method instead of these adapter methods\n setInputAttr: () => undefined,\n removeInputAttr: () => undefined,\n isFocused: () => this.shadowRoot ?\n this.shadowRoot.activeElement === this.formElement :\n false,\n registerInputInteractionHandler: (evtType, handler) => this.formElement.addEventListener(evtType, handler, { passive: evtType in passiveEvents }),\n deregisterInputInteractionHandler: (evtType, handler) => this.formElement.removeEventListener(evtType, handler),\n };\n }\n getLabelAdapterMethods() {\n return {\n floatLabel: (shouldFloat) => this.labelElement &&\n this.labelElement.floatingLabelFoundation.float(shouldFloat),\n getLabelWidth: () => {\n return this.labelElement ?\n this.labelElement.floatingLabelFoundation.getWidth() :\n 0;\n },\n hasLabel: () => Boolean(this.labelElement),\n shakeLabel: (shouldShake) => this.labelElement &&\n this.labelElement.floatingLabelFoundation.shake(shouldShake),\n setLabelRequired: (isRequired) => {\n if (this.labelElement) {\n this.labelElement.floatingLabelFoundation.setRequired(isRequired);\n }\n },\n };\n }\n getLineRippleAdapterMethods() {\n return {\n activateLineRipple: () => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.activate();\n }\n },\n deactivateLineRipple: () => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.deactivate();\n }\n },\n setLineRippleTransformOrigin: (normalizedX) => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.setRippleCenter(normalizedX);\n }\n },\n };\n }\n // tslint:disable:ban-ts-ignore\n async getUpdateComplete() {\n var _a;\n // @ts-ignore\n const result = await super.getUpdateComplete();\n await ((_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete);\n return result;\n }\n // tslint:enable:ban-ts-ignore\n firstUpdated() {\n var _a;\n super.firstUpdated();\n this.mdcFoundation.setValidateOnValueChange(this.autoValidate);\n if (this.validateOnInitialRender) {\n this.reportValidity();\n }\n // wait for the outline element to render to update the notch width\n (_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete.then(() => {\n var _a;\n // `foundation.notchOutline()` assumes the label isn't floating and\n // multiplies by a constant, but the label is already is floating at this\n // stage, therefore directly set the outline width to the label width\n this.outlineWidth =\n ((_a = this.labelElement) === null || _a === void 0 ? void 0 : _a.floatingLabelFoundation.getWidth()) || 0;\n });\n }\n getOutlineAdapterMethods() {\n return {\n closeOutline: () => this.outlineElement && (this.outlineOpen = false),\n hasOutline: () => Boolean(this.outlineElement),\n notchOutline: (labelWidth) => {\n const outlineElement = this.outlineElement;\n if (outlineElement && !this.outlineOpen) {\n this.outlineWidth = labelWidth;\n this.outlineOpen = true;\n }\n }\n };\n }\n async layout() {\n await this.updateComplete;\n const labelElement = this.labelElement;\n if (!labelElement) {\n this.outlineOpen = false;\n return;\n }\n const shouldFloat = !!this.label && !!this.value;\n labelElement.floatingLabelFoundation.float(shouldFloat);\n if (!this.outlined) {\n return;\n }\n this.outlineOpen = shouldFloat;\n await this.updateComplete;\n /* When the textfield automatically notches due to a value and label\n * being defined, the textfield may be set to `display: none` by the user.\n * this means that the notch is of size 0px. We provide this function so\n * that the user may manually resize the notch to the floated label's\n * width.\n */\n const labelWidth = labelElement.floatingLabelFoundation.getWidth();\n if (this.outlineOpen) {\n this.outlineWidth = labelWidth;\n await this.updateComplete;\n }\n }\n}\n__decorate([\n query('.mdc-text-field')\n], TextFieldBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n query('input')\n], TextFieldBase.prototype, \"formElement\", void 0);\n__decorate([\n query('.mdc-floating-label')\n], TextFieldBase.prototype, \"labelElement\", void 0);\n__decorate([\n query('.mdc-line-ripple')\n], TextFieldBase.prototype, \"lineRippleElement\", void 0);\n__decorate([\n query('mwc-notched-outline')\n], TextFieldBase.prototype, \"outlineElement\", void 0);\n__decorate([\n query('.mdc-notched-outline__notch')\n], TextFieldBase.prototype, \"notchElement\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"value\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"type\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"placeholder\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (_newVal, oldVal) {\n if (oldVal !== undefined && this.label !== oldVal) {\n this.layout();\n }\n })\n], TextFieldBase.prototype, \"label\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"iconTrailing\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], TextFieldBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"required\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"minLength\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"maxLength\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (_newVal, oldVal) {\n if (oldVal !== undefined && this.outlined !== oldVal) {\n this.layout();\n }\n })\n], TextFieldBase.prototype, \"outlined\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"helper\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"validateOnInitialRender\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"validationMessage\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"autoValidate\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"pattern\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"min\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"max\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"step\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"helperPersistent\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"charCounter\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"endAligned\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"prefix\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"suffix\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"name\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"inputMode\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"readOnly\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"autocapitalize\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"outlineOpen\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"outlineWidth\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"isUiValid\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"focused\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], TextFieldBase.prototype, \"handleInputChange\", null);\n//# sourceMappingURL=mwc-textfield-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:\"*\"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:\"\"}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:\"\";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex=\"-1\"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;\n//# sourceMappingURL=mwc-textfield.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { TextFieldBase } from './mwc-textfield-base.js';\nimport { styles } from './mwc-textfield.css.js';\n/** @soyCompatible */\nlet TextField = class TextField extends TextFieldBase {\n};\nTextField.styles = [styles];\nTextField = __decorate([\n customElement('mwc-textfield')\n], TextField);\nexport { TextField };\n//# sourceMappingURL=mwc-textfield.js.map","import { html, svg, TemplateResult } from 'lit';\n\nexport const resizePath = svg``;\n\nexport const movePath = svg``;\n\nconst voltageLevelPath = svg``;\n\nconst bayPath = svg`\n \n \n \n \n \n \n `;\n\nexport const voltageLevelIcon = html`\n ${voltageLevelPath}\n`;\n\nexport const voltageLevelGraphic = html`\n ${voltageLevelPath}\n`;\n\nexport const bayIcon = html`\n ${bayPath}\n`;\n\nexport const bayGraphic = html`\n ${bayPath}\n`;\n\nconst equipmentPaths: Partial>> = {\n IFL: svg`\n \n \n \n`,\n DIS: svg`\n \n \n \n \n`,\n CBR: svg`\n \n \n \n \n \n`,\n CTR: svg`\n \n \n`,\n VTR: svg`\n \n \n \n \n \n`,\n};\n\nconst defaultEquipmentPath = svg`\n \n \n \n \n \n`;\n\nexport function equipmentPath(equipmentType: string | null): TemplateResult<2> {\n if (equipmentType && equipmentType in equipmentPaths)\n return equipmentPaths[equipmentType]!;\n return defaultEquipmentPath;\n}\n\nexport function equipmentGraphic(\n equipmentType: string | null\n): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport function equipmentIcon(equipmentType: string): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nfunction equipmentSymbol(equipmentType: string): TemplateResult<2> {\n return svg`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport const connectivityNodeMarker = svg`\n \n`;\n\nexport const groundedMarker = svg`\n \n \n \n`;\n\nexport const powerTransformerTwoWindingSymbol = svg`\n \n \n \n \n`;\n\nexport const symbols = svg`\n \n \n \n \n \n \n \n ${Object.keys(equipmentPaths).map(eqType => equipmentSymbol(eqType))}\n ${equipmentSymbol('ConductingEquipment')}\n ${connectivityNodeMarker}\n ${groundedMarker}\n \n`;\n","import { Edit } from '@openscd/open-scd-core';\nimport { getReference } from '@openscd/oscd-scl';\n\nexport const privType = 'Transpower-SLD-Vertices';\nexport const sldNs = 'https://transpower.co.nz/SCL/SSD/SLD/v0';\nexport const xmlnsNs = 'http://www.w3.org/2000/xmlns/';\nexport const svgNs = 'http://www.w3.org/2000/svg';\n\nexport type Point = [number, number];\nexport type Attrs = {\n pos: Point;\n dim: Point;\n label: Point;\n flip: boolean;\n rot: 0 | 1 | 2 | 3;\n bus: boolean;\n};\n\nexport function xmlBoolean(value?: string | null) {\n return ['true', '1'].includes(value?.trim() ?? 'false');\n}\n\nexport function isBusBar(element: Element) {\n return (\n element.tagName === 'Bay' &&\n xmlBoolean(element.querySelector('Section[bus]')?.getAttribute('bus'))\n );\n}\n\nexport function attributes(element: Element): Attrs {\n const [x, y, w, h, rotVal, labelX, labelY] = [\n 'x',\n 'y',\n 'w',\n 'h',\n 'rot',\n 'lx',\n 'ly',\n ].map(name => parseFloat(element.getAttributeNS(sldNs, name) ?? '0'));\n const pos = [x, y].map(d => Math.max(0, d)) as Point;\n const dim = [w, h].map(d => Math.max(1, d)) as Point;\n const label = [labelX, labelY].map(d => Math.max(0, d)) as Point;\n\n const bus = xmlBoolean(element.getAttribute('bus'));\n const flip = xmlBoolean(element.getAttributeNS(sldNs, 'flip'));\n\n const rot = (((rotVal % 4) + 4) % 4) as 0 | 1 | 2 | 3;\n\n return { pos, dim, label, flip, rot, bus };\n}\n\nfunction pathString(...args: string[]) {\n return args.join('/');\n}\n\nexport function elementPath(element: Element, ...rest: string[]): string {\n const pedigree = [];\n let child = element;\n while (child.parentElement && child.hasAttribute('name')) {\n pedigree.unshift(child.getAttribute('name')!);\n child = child.parentElement;\n }\n return pathString(...pedigree, ...rest);\n}\n\nfunction collinear(v0: Element, v1: Element, v2: Element) {\n const [[x0, y0], [x1, y1], [x2, y2]] = [v0, v1, v2].map(vertex =>\n ['x', 'y'].map(name => vertex.getAttributeNS(sldNs, name))\n );\n return (x0 === x1 && x1 === x2) || (y0 === y1 && y1 === y2);\n}\n\nexport function removeNode(node: Element): Edit[] {\n const edits = [] as Edit[];\n\n if (xmlBoolean(node.querySelector(`Section[bus]`)?.getAttribute('bus'))) {\n Array.from(node.querySelectorAll('Section:not([bus])')).forEach(section =>\n edits.push({ node: section })\n );\n const sections = Array.from(node.querySelectorAll('Section[bus]'));\n const busSection = sections[0];\n Array.from(busSection.children)\n .slice(1)\n .forEach(vertex => edits.push({ node: vertex }));\n const lastVertex = sections[sections.length - 1].lastElementChild;\n if (lastVertex)\n edits.push({ parent: busSection, node: lastVertex, reference: null });\n sections.slice(1).forEach(section => edits.push({ node: section }));\n } else edits.push({ node });\n\n Array.from(\n node.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${node.getAttribute('pathName')}\"]`\n )\n ).forEach(terminal => edits.push({ node: terminal }));\n\n return edits;\n}\n\nfunction reverseSection(section: Element): Edit[] {\n const edits = [] as Edit[];\n\n Array.from(section.children)\n .reverse()\n .forEach(vertex =>\n edits.push({ parent: section, node: vertex, reference: null })\n );\n\n return edits;\n}\n\nfunction healSectionCut(cut: Element): Edit[] {\n const [x, y] = ['x', 'y'].map(name => cut.getAttributeNS(sldNs, name));\n\n const isCut = (vertex: Element) =>\n vertex !== cut &&\n vertex.getAttributeNS(sldNs, 'x') === x &&\n vertex.getAttributeNS(sldNs, 'y') === y;\n\n const cutVertices = Array.from(\n cut.closest('Private')!.getElementsByTagNameNS(sldNs, 'Section')\n ).flatMap(section => Array.from(section.children).filter(isCut));\n const cutSections = cutVertices.map(v => v.parentElement) as Element[];\n\n if (cutSections.length > 2) return [];\n if (cutSections.length < 2)\n return removeNode(cut.closest('ConnectivityNode')!);\n const [busA, busB] = cutSections.map(section =>\n xmlBoolean(section.getAttribute('bus'))\n );\n if (busA !== busB) return [];\n\n const edits = [] as Edit[];\n const [sectionA, sectionB] = cutSections as [Element, Element];\n if (isCut(sectionA.firstElementChild!)) edits.push(reverseSection(sectionA));\n const sectionBChildren = Array.from(sectionB.children);\n if (isCut(sectionB.lastElementChild!)) sectionBChildren.reverse();\n\n sectionBChildren\n .slice(1)\n .forEach(node => edits.push({ parent: sectionA, node, reference: null }));\n\n const cutA = Array.from(sectionA.children).find(isCut);\n const neighbourA = isCut(sectionA.firstElementChild!)\n ? sectionA.children[1]\n : sectionA.children[sectionA.childElementCount - 2];\n const neighbourB = sectionBChildren[1];\n if (\n neighbourA &&\n cutA &&\n neighbourB &&\n collinear(neighbourA, cutA, neighbourB)\n )\n edits.push({ node: cutA });\n edits.push({ node: sectionB });\n\n return edits;\n}\n\nfunction updateTerminals(\n parent: Element,\n cNode: Element,\n substationName: string,\n voltageLevelName: string,\n bayName: string,\n cNodeName: string,\n connectivityNode: string\n) {\n const updates = [] as Edit[];\n\n const [oldSubstationName, oldVoltageLevelName, oldBayName] = [\n 'Substation',\n 'VoltageLevel',\n 'Bay',\n ].map(tag => cNode.closest(tag)?.getAttribute('name') ?? '');\n const oldCNodeName = cNode.getAttribute('name');\n const oldConnectivityNode = `${oldSubstationName}/${oldVoltageLevelName}/${oldBayName}/${oldCNodeName}`;\n\n const terminals = Array.from(\n parent.ownerDocument.querySelectorAll(\n `Terminal[substationName=\"${oldSubstationName}\"][voltageLevelName=\"${oldVoltageLevelName}\"][bayName=\"${oldBayName}\"][cNodeName=\"${oldCNodeName}\"], Terminal[connectivityNode=\"${oldConnectivityNode}\"]`\n )\n );\n terminals.forEach(terminal => {\n updates.push({\n element: terminal,\n attributes: {\n substationName,\n voltageLevelName,\n bayName,\n connectivityNode,\n cNodeName,\n },\n });\n });\n return updates;\n}\n\nfunction updateConnectivityNodes(\n element: Element,\n parent: Element,\n name: string\n) {\n const updates = [] as Edit[];\n\n const cNodes = Array.from(element.getElementsByTagName('ConnectivityNode'));\n if (element.tagName === 'ConnectivityNode') cNodes.push(element);\n const substationName = parent.closest('Substation')!.getAttribute('name');\n let voltageLevelName = parent.closest('VoltageLevel')?.getAttribute('name');\n if (element.tagName === 'VoltageLevel') voltageLevelName = name;\n\n cNodes.forEach(cNode => {\n let cNodeName = cNode.getAttribute('name');\n if (element === cNode) cNodeName = name;\n let bayName = cNode.parentElement?.getAttribute('name') ?? '';\n if (element.tagName === 'Bay') bayName = name;\n if (parent.tagName === 'Bay' && parent.hasAttribute('name'))\n bayName = parent.getAttribute('name')!;\n\n if (cNodeName && bayName) {\n const pathName = `${substationName}/${voltageLevelName}/${bayName}/${cNodeName}`;\n updates.push({\n element: cNode,\n attributes: {\n pathName,\n },\n });\n if (substationName && voltageLevelName && bayName)\n updates.push(\n ...updateTerminals(\n parent,\n cNode,\n substationName,\n voltageLevelName,\n bayName,\n cNodeName,\n pathName\n )\n );\n }\n });\n return updates;\n}\n\nfunction uniqueName(element: Element, parent: Element): string {\n const children = Array.from(parent.children);\n const oldName = element.getAttribute('name');\n if (\n oldName &&\n !children.find(child => child.getAttribute('name') === oldName)\n )\n return oldName;\n\n const baseName =\n element.getAttribute('name')?.replace(/[0-9]*$/, '') ??\n element.tagName.charAt(0);\n let index = 1;\n function hasName(child: Element) {\n return child.getAttribute('name') === baseName + index.toString();\n }\n while (children.find(hasName)) index += 1;\n\n return baseName + index.toString();\n}\n\nexport function reparentElement(element: Element, parent: Element): Edit[] {\n const edits: Edit[] = [];\n edits.push({\n node: element,\n parent,\n reference: getReference(parent, element.tagName),\n });\n const newName = uniqueName(element, parent);\n if (newName !== element.getAttribute('name'))\n edits.push({ element, attributes: { name: newName } });\n edits.push(...updateConnectivityNodes(element, parent, newName));\n return edits;\n}\n\nexport function removeTerminal(terminal: Element): Edit[] {\n const edits = [] as Edit[];\n\n edits.push({ node: terminal });\n const pathName = terminal.getAttribute('connectivityNode');\n const cNode = terminal.ownerDocument.querySelector(\n `ConnectivityNode[pathName=\"${pathName}\"]`\n );\n\n const otherTerminals = Array.from(\n terminal.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${pathName}\"]`\n )\n ).filter(t => t !== terminal);\n\n if (\n cNode &&\n otherTerminals.length &&\n otherTerminals.some(t => t.closest('Bay')) &&\n otherTerminals.every(t => t.closest('Bay') !== cNode.closest('Bay')) &&\n !isBusBar(cNode.closest('Bay')!)\n ) {\n const newParent = otherTerminals\n .find(t => t.closest('Bay'))!\n .closest('Bay');\n if (newParent) edits.push(...reparentElement(cNode, newParent));\n }\n\n const priv = cNode?.querySelector(`Private[type=\"${privType}\"]`);\n const vertex = priv?.querySelector(\n `Vertex[*|uuid=\"${terminal.getAttributeNS(sldNs, 'uuid')}\"]`\n );\n const section = vertex?.parentElement;\n if (!section) return edits;\n edits.push({ node: section });\n\n const cut =\n vertex === section.lastElementChild\n ? section.firstElementChild\n : section.lastElementChild;\n\n if (cut) edits.push(...healSectionCut(cut));\n\n return edits;\n}\n\nexport function connectionStartPoints(equipment: Element): {\n top: { close: Point; far: Point };\n bottom: { close: Point; far: Point };\n} {\n const {\n pos: [x, y],\n rot,\n } = attributes(equipment);\n\n const top = {\n close: [\n [x + 0.5, y],\n [x + 1, y + 0.5],\n [x + 0.5, y + 1],\n [x, y + 0.5],\n ][rot] as Point,\n far: [\n [x + 0.5, y - 0.5],\n [x + 1.5, y + 0.5],\n [x + 0.5, y + 1.5],\n [x - 0.5, y + 0.5],\n ][rot] as Point,\n };\n const bottom = {\n close: [\n [x + 0.5, y + 1],\n [x, y + 0.5],\n [x + 0.5, y],\n [x + 1, y + 0.5],\n ][rot] as Point,\n far: [\n [x + 0.5, y + 1.5],\n [x - 0.5, y + 0.5],\n [x + 0.5, y - 0.5],\n [x + 1.5, y + 0.5],\n ][rot] as Point,\n };\n\n return { top, bottom };\n}\n\nexport type ResizeDetail = {\n w: number;\n h: number;\n element: Element;\n};\nexport type ResizeEvent = CustomEvent;\nexport function newResizeEvent(detail: ResizeDetail): ResizeEvent {\n return new CustomEvent('oscd-sld-resize', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type PlaceLabelDetail = {\n x: number;\n y: number;\n element: Element;\n};\nexport type PlaceDetail = {\n x: number;\n y: number;\n element: Element;\n parent: Element;\n};\nexport type PlaceEvent = CustomEvent;\nexport function newPlaceEvent(detail: PlaceDetail): PlaceEvent {\n return new CustomEvent('oscd-sld-place', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type PlaceLabelEvent = CustomEvent;\nexport function newPlaceLabelEvent(detail: PlaceLabelDetail): PlaceLabelEvent {\n return new CustomEvent('oscd-sld-place-label', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type ConnectDetail = {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n connectTo: Element;\n toTerminal?: 'top' | 'bottom';\n};\nexport type ConnectEvent = CustomEvent;\nexport function newConnectEvent(detail: ConnectDetail): ConnectEvent {\n return new CustomEvent('oscd-sld-connect', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport type StartEvent = CustomEvent;\nexport function newRotateEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-rotate', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartResizeEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-resize', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartPlaceEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-place', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartPlaceLabelEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-place-label', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport type StartConnectDetail = {\n equipment: Element;\n terminal: 'top' | 'bottom';\n};\nexport type StartConnectEvent = CustomEvent;\nexport function newStartConnectEvent(\n detail: StartConnectDetail\n): StartConnectEvent {\n return new CustomEvent('oscd-sld-start-connect', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\ndeclare global {\n interface ElementEventMap {\n ['oscd-sld-resize']: ResizeEvent;\n ['oscd-sld-place']: PlaceEvent;\n ['oscd-sld-place-label']: PlaceLabelEvent;\n ['oscd-sld-connect']: ConnectEvent;\n ['oscd-sld-rotate']: StartEvent;\n ['oscd-sld-start-resize']: StartEvent;\n ['oscd-sld-start-place']: StartEvent;\n ['oscd-sld-start-place-label']: StartEvent;\n ['oscd-sld-start-connect']: StartConnectEvent;\n }\n}\n","import { css, html, nothing, LitElement, svg, TemplateResult } from 'lit';\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ref } from 'lit/directives/ref.js';\n\nimport { Edit, newEditEvent } from '@openscd/open-scd-core';\n\nimport type { Dialog } from '@material/mwc-dialog';\nimport type { SingleSelectedEvent } from '@material/mwc-list';\nimport type { TextField } from '@material/mwc-textfield';\n\nimport '@material/mwc-dialog';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item.js';\nimport '@material/mwc-textfield';\n\nimport { getReference, identity } from '@openscd/oscd-scl';\nimport {\n bayGraphic,\n equipmentGraphic,\n movePath,\n resizePath,\n symbols,\n voltageLevelGraphic,\n} from './icons.js';\nimport {\n attributes,\n connectionStartPoints,\n elementPath,\n isBusBar,\n newConnectEvent,\n newPlaceEvent,\n newPlaceLabelEvent,\n newResizeEvent,\n newRotateEvent,\n newStartConnectEvent,\n newStartPlaceEvent,\n newStartPlaceLabelEvent,\n newStartResizeEvent,\n Point,\n privType,\n removeNode,\n removeTerminal,\n sldNs,\n svgNs,\n xmlBoolean,\n} from './util.js';\n\ntype EditWizardDetial = { element: Element };\n\nfunction newEditWizardEvent(element: Element): CustomEvent {\n return new CustomEvent('oscd-edit-wizard-request', {\n bubbles: true,\n composed: true,\n detail: { element },\n });\n}\n\ntype MenuItem = { handler: () => void; content: TemplateResult };\n\ntype Rect = [number, number, number, number];\n\nfunction contains([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n return x1 <= x2 && y1 <= y2 && x1 + w1 >= x2 + w2 && y1 + h1 >= y2 + h2;\n}\n\nfunction overlaps([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n if (x1 >= x2 + w2 || x2 >= x1 + w1) return false;\n if (y1 >= y2 + h2 || y2 >= y1 + h1) return false;\n return true;\n}\n\nfunction containsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return contains([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction overlapsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return overlaps([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction cleanPath(path: Point[]) {\n let i = path.length - 2;\n while (i > 0) {\n const [x, y] = path[i];\n const [nx, ny] = path[i + 1];\n const [px, py] = path[i - 1];\n\n if (\n (x === nx && y === ny) ||\n (x === nx && x === px) ||\n (y === ny && y === py)\n )\n path.splice(i, 1);\n i -= 1;\n }\n}\n\nfunction isBay(element: Element) {\n return element.tagName === 'Bay' && !isBusBar(element);\n}\n\nconst parentTags: Partial> = {\n ConductingEquipment: 'Bay',\n Bay: 'VoltageLevel',\n VoltageLevel: 'Substation',\n};\n\nconst singleTerminal = new Set([\n 'VTR',\n 'GEN',\n 'MOT',\n 'FAN',\n 'PMP',\n 'EFN',\n 'BAT',\n 'RRC',\n 'SAR',\n 'SMC',\n 'IFL',\n]);\n\nfunction preventDefault(e: Event) {\n e.preventDefault();\n}\n\nfunction renderMenuFooter(element: Element) {\n const name = element.getAttribute('name');\n const desc = element.getAttribute('desc') || element.getAttribute('type');\n let footerGraphic = equipmentGraphic(null);\n if (element.tagName === 'ConductingEquipment')\n footerGraphic = equipmentGraphic(element.getAttribute('type'));\n else if (element.tagName === 'Bay' && isBusBar(element))\n footerGraphic = html`horizontal_rule`;\n else if (element.tagName === 'Bay') footerGraphic = bayGraphic;\n else if (element.tagName === 'VoltageLevel')\n footerGraphic = voltageLevelGraphic;\n return html`\n ${name}\n ${desc ? html`${desc}` : nothing}\n ${footerGraphic}\n `;\n}\n\n@customElement('sld-editor')\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class SLDEditor extends LitElement {\n @property()\n doc!: XMLDocument;\n\n @property()\n substation!: Element;\n\n @property()\n editCount = -1;\n\n @property()\n gridSize = 32;\n\n @property()\n nsp = 'esld';\n\n @property()\n resizing?: Element;\n\n @property()\n placing?: Element;\n\n @property()\n placingLabel?: Element;\n\n @property()\n connecting?: {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n };\n\n @query('#resizeSubstationUI')\n resizeSubstationUI!: Dialog;\n\n @query('#substationWidthUI')\n substationWidthUI!: TextField;\n\n @query('#substationHeightUI')\n substationHeightUI!: TextField;\n\n @query('svg#sld')\n sld!: SVGGraphicsElement;\n\n @state()\n mouseX = 0;\n\n @state()\n mouseY = 0;\n\n @state()\n mouseX2 = 0;\n\n @state()\n mouseY2 = 0;\n\n @state()\n menu?: { element: Element; top: number; left: number };\n\n svgCoordinates(clientX: number, clientY: number) {\n const p = new DOMPoint(clientX, clientY);\n const { x, y } = p.matrixTransform(this.sld.getScreenCTM()!.inverse());\n return [x, y].map(coord => Math.max(0, coord));\n }\n\n canPlaceAt(element: Element, x: number, y: number, w: number, h: number) {\n if (element.tagName === 'Substation') return true;\n\n const overlappingSibling = Array.from(\n this.substation.querySelectorAll(element.tagName)\n ).find(\n sibling =>\n sibling !== element &&\n overlapsRect(sibling, x, y, w, h) &&\n !isBusBar(sibling)\n );\n if (overlappingSibling && !isBusBar(element)) {\n return false;\n }\n\n const containingParent =\n element.tagName === 'VoltageLevel'\n ? containsRect(this.substation, x, y, w, h)\n : Array.from(\n this.substation.querySelectorAll(parentTags[element.tagName]!)\n ).find(parent => containsRect(parent, x, y, w, h));\n if (containingParent) return true;\n return false;\n }\n\n canResizeTo(element: Element, w: number, h: number) {\n const {\n pos: [x, y],\n dim: [oldW, oldH],\n } = attributes(element);\n\n if (\n !this.canPlaceAt(element, x, y, w, h) &&\n this.canPlaceAt(element, x, y, oldW, oldH)\n )\n return false;\n\n const lostChild = Array.from(element.children).find(child => {\n if (parentTags[child.tagName] !== element.tagName) return false;\n const {\n pos: [cx, cy],\n dim: [cw, ch],\n } = attributes(child);\n\n return !contains([x, y, w, h], [cx, cy, cw, ch]);\n });\n if (lostChild) return false;\n\n return true;\n }\n\n renderedLabelPosition(element: Element): Point {\n let {\n label: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n if (this.placingLabel === element) {\n x = this.mouseX2;\n y = this.mouseY2 + 0.5;\n }\n return [x, y];\n }\n\n renderedPosition(element: Element): Point {\n let {\n pos: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n return [x, y];\n }\n\n handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') this.menu = undefined;\n };\n\n handleClick = (_e: MouseEvent) => {\n this.menu = undefined;\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.handleKeydown);\n window.addEventListener('click', this.handleClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('keydown', this.handleKeydown);\n window.removeEventListener('click', this.handleClick);\n }\n\n nearestOpenTerminal(equipment?: Element): 'top' | 'bottom' | undefined {\n if (!equipment) return undefined;\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n const oneSided = singleTerminal.has(equipment.getAttribute('type')!);\n if (topTerminal && bottomTerminal) return undefined;\n if (oneSided && (topTerminal || bottomTerminal)) return undefined;\n if (oneSided) return 'top';\n if (topTerminal) return 'bottom';\n if (bottomTerminal) return 'top';\n\n const [mX2, mY2] = [this.mouseX2, this.mouseY2].map(n => n % 1);\n const { rot } = attributes(equipment);\n if (rot === 0 && mY2 === 0.5) return 'bottom';\n if (rot === 1 && mX2 === 0) return 'bottom';\n if (rot === 2 && mY2 === 0) return 'bottom';\n if (rot === 3 && mX2 === 0.5) return 'bottom';\n return 'top';\n }\n\n groundTerminal(equipment: Element, name: 'T1' | 'T2') {\n const bay = equipment.closest('Bay')!;\n const edits: Edit[] = [];\n let grounded = bay.querySelector(\n ':scope > ConnectivityNode[name=\"grounded\"]'\n );\n let pathName = grounded?.getAttribute('pathName');\n if (!pathName) {\n pathName = elementPath(equipment.closest('Bay')!, 'grounded');\n grounded = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'ConnectivityNode'\n );\n grounded.setAttribute('name', 'grounded');\n grounded.setAttribute('pathName', pathName);\n edits.push({\n parent: bay,\n node: grounded,\n reference: getReference(bay, 'ConnectivityNode'),\n });\n }\n const terminal = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Terminal'\n );\n terminal.setAttribute('name', name);\n terminal.setAttribute('cNodeName', 'grounded');\n const sName = equipment.closest('Substation')!.getAttribute('name');\n if (sName) terminal.setAttribute('substationName', sName);\n const vlName = equipment.closest('VoltageLevel')!.getAttribute('name');\n if (vlName) terminal.setAttribute('voltageLevelName', vlName);\n const bName = equipment.closest('Bay')!.getAttribute('name');\n if (bName) terminal.setAttribute('bayName', bName);\n terminal.setAttribute('connectivityNode', pathName);\n edits.push({\n parent: equipment,\n node: terminal,\n reference: getReference(equipment, 'Terminal'),\n });\n this.dispatchEvent(newEditEvent(edits));\n }\n\n flipElement(element: Element) {\n const { flip } = attributes(element);\n this.dispatchEvent(\n newEditEvent({\n element,\n attributes: {\n [`${this.nsp}:flip`]: {\n namespaceURI: sldNs,\n value: flip ? null : 'true',\n },\n },\n })\n );\n }\n\n equipmentMenuItems(equipment: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Mirror\n flip\n `,\n handler: () => this.flipElement(equipment),\n },\n {\n content: html`\n Rotate\n rotate_90_degrees_cw\n `,\n handler: () => {\n this.dispatchEvent(newRotateEvent(equipment));\n },\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(equipment)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(equipment)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(equipment.querySelectorAll('Terminal')).forEach(terminal =>\n edits.push(...removeTerminal(terminal))\n );\n edits.push({ node: equipment });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n\n const { rot } = attributes(equipment);\n const icons = {\n connect: ['north', 'east', 'south', 'west'],\n ground: ['expand_less', 'chevron_right', 'expand_more', 'chevron_left'],\n disconnect: [\n 'arrow_drop_up',\n 'arrow_right',\n 'arrow_drop_down',\n 'arrow_left',\n ],\n };\n const texts = {\n connect: [\n 'Connect top',\n 'Connect right',\n 'Connect bottom',\n 'Connect left',\n ],\n ground: ['Ground top', 'Ground right', 'Ground bottom', 'Ground left'],\n disconnect: [\n 'Detach top',\n 'Detach right',\n 'Detach bottom',\n 'Detach left',\n ],\n };\n const icon = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n icons[kind][top ? rot % 4 : (rot + 2) % 4];\n const text = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n texts[kind][top ? rot % 4 : (rot + 2) % 4];\n const item = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n html`\n ${text(kind, top)}\n ${icon(kind, top)}\n `;\n\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n\n if (!singleTerminal.has(equipment.getAttribute('type')!)) {\n if (bottomTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(bottomTerminal))),\n content: item('disconnect', false),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({\n equipment,\n terminal: 'bottom',\n })\n ),\n content: item('connect', false),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T2'),\n content: item('ground', false),\n }\n );\n }\n if (topTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(topTerminal))),\n content: item('disconnect', true),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({ equipment, terminal: 'top' })\n ),\n content: item('connect', true),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T1'),\n content: item('ground', true),\n }\n );\n return items;\n }\n\n busBarMenuItems(busBar: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(busBar)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(busBar)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(busBar)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const node = busBar.querySelector('ConnectivityNode')!;\n this.dispatchEvent(\n newEditEvent([...removeNode(node), { node: busBar }])\n );\n },\n },\n ];\n return items;\n }\n\n containerMenuItems(bayOrVL: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(bayOrVL)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(bayOrVL)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(bayOrVL)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(bayOrVL.getElementsByTagName('ConnectivityNode')).forEach(\n cNode => {\n if (\n Array.from(\n this.doc.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute(\n 'pathName'\n )}\"]`\n )\n ).find(\n terminal => terminal.closest(bayOrVL.tagName) !== bayOrVL\n )\n )\n edits.push(...removeNode(cNode));\n }\n );\n Array.from(bayOrVL.getElementsByTagName('Terminal')).forEach(\n terminal => {\n const cNode = this.doc.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode && cNode.closest(bayOrVL.tagName) !== bayOrVL)\n edits.push(...removeNode(cNode));\n }\n );\n edits.push({ node: bayOrVL });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n return items;\n }\n\n renderMenu() {\n if (!this.menu) return html``;\n const { element } = this.menu;\n\n let items: MenuItem[] = [];\n if (element.tagName === 'ConductingEquipment')\n items = this.equipmentMenuItems(element);\n else if (element.tagName === 'Bay' && isBusBar(element))\n items = this.busBarMenuItems(element);\n else if (element.tagName === 'Bay' || element.tagName === 'VoltageLevel')\n items = this.containerMenuItems(element);\n\n return html`\n {\n if (!(m instanceof HTMLElement)) return;\n await this.updateComplete;\n const { bottom, right } = m.getBoundingClientRect();\n if (bottom > window.innerHeight) {\n m.style.removeProperty('top');\n // eslint-disable-next-line no-param-reassign\n m.style.bottom = '0px';\n }\n if (right > window.innerWidth) {\n m.style.removeProperty('left');\n // eslint-disable-next-line no-param-reassign\n m.style.right = '0px';\n }\n })}\n >\n {\n items[index]?.handler();\n this.menu = undefined;\n }}\n >\n ${items.map(i => i.content)}\n
  • \n ${renderMenuFooter(element)}\n \n \n `;\n }\n\n render() {\n const {\n dim: [w, h],\n } = attributes(this.substation);\n\n const placingTarget =\n this.placing?.tagName === 'VoltageLevel'\n ? svg``\n : nothing;\n\n let placingElement = svg``;\n if (this.placing) {\n if (this.placing.tagName === 'VoltageLevel' || isBay(this.placing))\n placingElement = svg`${this.renderContainer(this.placing, true)}`;\n else if (this.placing.tagName === 'ConductingEquipment')\n placingElement = this.renderEquipment(this.placing, { preview: true });\n else if (isBusBar(this.placing))\n placingElement = this.renderBusBar(this.placing);\n }\n\n let placingIndicator = svg``;\n if (this.placing) {\n const {\n dim: [w0, h0],\n } = attributes(this.placing);\n const invalid = !this.canPlaceAt(\n this.placing,\n this.mouseX,\n this.mouseY,\n w0,\n h0\n );\n placingIndicator = svg`\n \n \n (${this.mouseX},${this.mouseY})\n \n \n `;\n }\n\n let resizingIndicator = svg``;\n if (this.resizing && !isBusBar(this.resizing)) {\n const {\n pos: [x, y],\n } = attributes(this.resizing);\n const newW = Math.max(1, this.mouseX - x + 1);\n const newH = Math.max(1, this.mouseY - y + 1);\n const invalid = !this.canResizeTo(this.resizing, newW, newH);\n resizingIndicator = svg`\n \n \n (${newW}×${newH})\n \n \n `;\n }\n\n const connectionPreview = [];\n if (this.connecting) {\n const { equipment, path, terminal } = this.connecting;\n let i = 0;\n while (i < path.length - 2) {\n const [x1, y1] = path[i];\n const [x2, y2] = path[i + 1];\n connectionPreview.push(\n svg``\n );\n i += 1;\n }\n\n const [[x1, y1], [oldX2, oldY2]] = path.slice(-2);\n const vertical = x1 === oldX2;\n\n let x3 = this.mouseX + 0.5;\n let y3 = this.mouseY + 0.5;\n let [x4, y4] = [x3, y3];\n\n const targetEq = Array.from(\n this.substation.querySelectorAll('ConductingEquipment')\n )\n .filter(eq => eq !== equipment)\n .find(eq => {\n const {\n pos: [x, y],\n } = attributes(eq);\n return x === this.mouseX && y === this.mouseY;\n });\n\n const toTerminal = this.nearestOpenTerminal(targetEq);\n\n if (targetEq && toTerminal) {\n const { far, close } = connectionStartPoints(targetEq)[toTerminal];\n [x3, y3] = far;\n [x4, y4] = close;\n }\n\n const x2 = vertical ? oldX2 : x3;\n const y2 = vertical ? y3 : oldY2;\n\n connectionPreview.push(\n svg``,\n svg``,\n svg``\n );\n connectionPreview.push(\n svg` {\n path[path.length - 1] = [x2, y2];\n path.push([x3, y3]);\n path.push([x4, y4]);\n cleanPath(path);\n this.requestUpdate();\n if (targetEq && toTerminal)\n this.dispatchEvent(\n newConnectEvent({\n equipment,\n terminal,\n path,\n connectTo: targetEq,\n toTerminal,\n })\n );\n }} />`\n );\n }\n\n const menu = this.renderMenu();\n\n return html`
    \n

    \n ${this.substation.getAttribute('name')}\n this.resizeSubstationUI.show()}\n >\n \n ${resizePath}\n \n \n

    \n {\n const [x, y] = this.svgCoordinates(e.clientX, e.clientY);\n this.mouseX = Math.floor(x);\n this.mouseY = Math.floor(y);\n this.mouseX2 = Math.floor(x * 2) / 2;\n this.mouseY2 = Math.floor(y * 2) / 2;\n }}\n >\n \n ${symbols}\n \n ${placingTarget}\n ${Array.from(this.substation.children)\n .filter(child => child.tagName === 'VoltageLevel')\n .map(vl => svg`${this.renderContainer(vl)}`)}\n ${connectionPreview}\n ${this.connecting?.equipment.closest('Substation') === this.substation\n ? Array.from(\n this.substation.querySelectorAll('ConductingEquipment')\n ).map(eq => this.renderEquipment(eq, { connect: true }))\n : nothing}\n ${Array.from(this.substation.querySelectorAll('ConnectivityNode'))\n .filter(\n node =>\n node.getAttribute('name') !== 'grounded' &&\n !(\n this.placing &&\n node.closest(this.placing.tagName) === this.placing\n ) &&\n !isBusBar(node.parentElement!)\n )\n .map(cNode => this.renderConnectivityNode(cNode))}\n ${Array.from(this.substation.querySelectorAll('ConnectivityNode'))\n .filter(\n node =>\n node.getAttribute('name') !== 'grounded' &&\n !(\n this.placing &&\n node.closest(this.placing.tagName) === this.placing\n ) &&\n isBusBar(node.parentElement!)\n )\n .map(cNode => this.renderConnectivityNode(cNode))}\n ${placingElement} ${placingIndicator} ${resizingIndicator}\n ${Array.from(\n this.substation.querySelectorAll(\n 'VoltageLevel, Bay, ConductingEquipment'\n )\n ).map(element => this.renderLabel(element))}\n \n ${menu}\n \n
    \n {\n const {\n dim: [_w, oldH],\n } = attributes(this.substation);\n if (\n validity.valid &&\n !this.canResizeTo(this.substation, parseInt(value, 10), oldH)\n ) {\n return { valid: false, rangeUnderflow: true };\n }\n return {};\n }}\n >\n {\n const {\n dim: [oldW, _h],\n } = attributes(this.substation);\n if (\n validity.valid &&\n !this.canResizeTo(this.substation, oldW, parseInt(value, 10))\n ) {\n return { valid: false, rangeUnderflow: true };\n }\n return {};\n }}\n >\n
    \n {\n const valid = Array.from(\n this.resizeSubstationUI.querySelectorAll('mwc-textfield')\n ).every(textField => textField.checkValidity());\n if (!valid) return;\n const {\n dim: [oldW, oldH],\n } = attributes(this.substation);\n const [newW, newH] = [\n this.substationWidthUI,\n this.substationHeightUI,\n ].map(ui => parseInt(ui.value ?? '1', 10).toString());\n this.resizeSubstationUI.close();\n if (newW === oldW.toString() && newH === oldH.toString()) return;\n this.dispatchEvent(\n newEditEvent({\n element: this.substation,\n attributes: {\n [`${this.nsp}:w`]: { namespaceURI: sldNs, value: newW },\n [`${this.nsp}:h`]: { namespaceURI: sldNs, value: newH },\n },\n })\n );\n }}\n >resize\n cancel\n \n
    `;\n }\n\n renderLabel(element: Element) {\n const [x, y] = this.renderedLabelPosition(element);\n const name = element.getAttribute('name');\n const fontSize = element.tagName === 'ConductingEquipment' ? 0.45 : 0.6;\n let cursor = 'default';\n let handleClick: (() => void) | symbol = nothing;\n if (this.placingLabel === element)\n handleClick = () =>\n this.dispatchEvent(newPlaceLabelEvent({ element, x, y }));\n else if (!this.placing && !this.resizing) {\n cursor = 'move';\n handleClick = () => this.dispatchEvent(newStartPlaceLabelEvent(element));\n }\n const id = identity(element);\n return svg`\n \n ${name}\n `;\n }\n\n renderContainer(bayOrVL: Element, preview = false): TemplateResult<2> {\n const isVL = bayOrVL.tagName === 'VoltageLevel';\n if (this.placing === bayOrVL && !preview) return svg``;\n\n const [x, y] = this.renderedPosition(bayOrVL);\n let {\n dim: [w, h],\n } = attributes(bayOrVL);\n let handleClick: (() => void) | undefined;\n let invalid = false;\n\n if (this.resizing === bayOrVL) {\n w = Math.max(1, this.mouseX - x + 1);\n h = Math.max(1, this.mouseY - y + 1);\n if (this.canResizeTo(bayOrVL, w, h))\n handleClick = () => {\n this.dispatchEvent(\n newResizeEvent({\n w,\n h,\n element: bayOrVL,\n })\n );\n };\n else invalid = true;\n }\n\n if (this.placing === bayOrVL) {\n let parent: Element | undefined;\n if (isVL) parent = this.substation;\n else\n parent = Array.from(\n this.substation.querySelectorAll(':root > Substation > VoltageLevel')\n ).find(vl => containsRect(vl, x, y, w, h));\n if (parent && this.canPlaceAt(bayOrVL, x, y, w, h))\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: bayOrVL,\n parent: parent!,\n })\n );\n };\n else invalid = true;\n }\n\n let moveHandle = svg``;\n let resizeHandle = svg``;\n let placingTarget = svg``;\n let resizingTarget = svg``;\n if (\n this.resizing === bayOrVL ||\n (isVL && this.placing?.tagName === 'Bay') ||\n (!isVL && this.placing?.tagName === 'ConductingEquipment')\n )\n placingTarget = svg``;\n\n if (\n this.resizing &&\n isBusBar(this.resizing) &&\n this.resizing.parentElement === bayOrVL\n )\n resizingTarget = svg``;\n\n if (!this.placing && !this.resizing && !this.connecting) {\n moveHandle = svg`\n\n this.dispatchEvent(newStartPlaceEvent(bayOrVL))}>\n \n \n ${movePath}\n \n\n `;\n resizeHandle = svg`\n\n this.dispatchEvent(newStartResizeEvent(bayOrVL))}>\n \n \n ${resizePath}\n \n\n `;\n }\n\n return svg`\n {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: bayOrVL, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }}\n @click=${handleClick || nothing}\n fill=\"white\" stroke-dasharray=\"${isVL ? nothing : '0.18'}\"\n stroke=\"${\n // eslint-disable-next-line no-nested-ternary\n invalid ? '#BB1326' : isVL ? '#F5E214' : '#12579B'\n }\" />\n ${moveHandle}\n ${Array.from(bayOrVL.children)\n .filter(isBay)\n .map(bay => this.renderContainer(bay))}\n ${Array.from(bayOrVL.children)\n .filter(child => child.tagName === 'ConductingEquipment')\n .map(equipment => this.renderEquipment(equipment))}\n ${\n preview\n ? Array.from(bayOrVL.querySelectorAll('ConnectivityNode'))\n .filter(child => child.getAttribute('name') !== 'grounded')\n .map(cNode => this.renderConnectivityNode(cNode))\n : nothing\n }\n ${placingTarget}\n ${resizeHandle}\n ${resizingTarget}\n `;\n }\n\n renderEquipment(\n equipment: Element,\n { preview = false, connect = false } = {}\n ) {\n if (this.placing === equipment && !preview) return svg``;\n if (\n this.connecting?.equipment.closest('Substation') === this.substation &&\n !connect\n )\n return svg``;\n\n const [x, y] = this.renderedPosition(equipment);\n const { flip, rot } = attributes(equipment);\n const deg = 90 * rot;\n\n const eqType = equipment.getAttribute('type')!;\n const symbol = ['CBR', 'CTR', 'VTR', 'DIS', 'IFL'].includes(eqType)\n ? eqType\n : 'ConductingEquipment';\n\n let handleClick = () => {\n this.dispatchEvent(newStartPlaceEvent(equipment));\n };\n\n if (this.placing === equipment) {\n const parent = Array.from(\n this.substation.querySelectorAll(\n ':root > Substation > VoltageLevel > Bay'\n )\n ).find(vl => containsRect(vl, x, y, 1, 1));\n if (parent && this.canPlaceAt(equipment, x, y, 1, 1))\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: equipment,\n parent,\n })\n );\n };\n }\n\n const terminals = Array.from(equipment.children).filter(\n c => c.tagName === 'Terminal'\n );\n const topTerminal = terminals.find(t => t.getAttribute('name') === 'T1');\n const bottomTerminal = terminals.find(t => t.getAttribute('name') !== 'T1');\n\n const topConnector =\n topTerminal || this.placing || this.resizing || this.connecting\n ? nothing\n : svg`\n this.dispatchEvent(newStartConnectEvent({ equipment, terminal: 'top' }))}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n e.preventDefault();\n this.groundTerminal(equipment, 'T1');\n }}\n />`;\n\n const topIndicator =\n !this.connecting ||\n this.connecting.equipment === equipment ||\n (this.connecting &&\n this.mouseX === x &&\n this.mouseY === y &&\n this.nearestOpenTerminal(equipment) === 'top') ||\n topTerminal\n ? nothing\n : svg``;\n\n const topGrounded =\n topTerminal?.getAttribute('cNodeName') === 'grounded'\n ? svg``\n : nothing;\n\n const bottomConnector =\n bottomTerminal ||\n this.placing ||\n this.resizing ||\n this.connecting ||\n singleTerminal.has(eqType)\n ? nothing\n : svg`\n this.dispatchEvent(\n newStartConnectEvent({ equipment, terminal: 'bottom' })\n )}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n e.preventDefault();\n this.groundTerminal(equipment, 'T2');\n }}\n />`;\n\n const bottomIndicator =\n !this.connecting ||\n this.connecting.equipment === equipment ||\n (this.connecting &&\n this.mouseX === x &&\n this.mouseY === y &&\n this.nearestOpenTerminal(equipment) === 'bottom') ||\n bottomTerminal ||\n singleTerminal.has(eqType)\n ? nothing\n : svg``;\n\n const bottomGrounded =\n bottomTerminal?.getAttribute('cNodeName') === 'grounded'\n ? svg``\n : nothing;\n\n return svg`\n ${equipment.getAttribute('name')}\n \n {\n if (e.button === 1) {\n // middle mouse button\n this.dispatchEvent(newRotateEvent(equipment));\n e.preventDefault();\n }\n }}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: equipment, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }}\n />\n ${topConnector}\n ${topIndicator}\n ${topGrounded}\n ${bottomConnector}\n ${bottomIndicator}\n ${bottomGrounded}\n `;\n }\n\n renderBusBar(busBar: Element) {\n const [x, y] = this.renderedPosition(busBar);\n const {\n dim: [w, h],\n } = attributes(busBar);\n let placingTarget = svg``;\n if (this.placing === busBar)\n placingTarget = svg` {\n const parent = Array.from(\n this.substation.querySelectorAll(\n ':root > Substation > VoltageLevel'\n )\n ).find(vl => containsRect(vl, x, y, w, h));\n if (parent)\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: busBar,\n parent: parent!,\n })\n );\n }}\n />`;\n return svg`\n ${busBar.getAttribute('name')}\n ${this.renderConnectivityNode(busBar.querySelector('ConnectivityNode')!)}\n ${placingTarget}\n `;\n }\n\n renderConnectivityNode(cNode: Element) {\n const priv = cNode.querySelector(`Private[type=\"${privType}\"]`);\n if (!priv) return nothing;\n const circles = [] as TemplateResult<2>[];\n const intersections = Object.entries(\n Array.from(priv.querySelectorAll('Vertex'))\n .map(v => this.renderedPosition(v))\n .reduce((obj, pos) => {\n const ret = obj;\n const key = JSON.stringify(pos);\n if (ret[key]) ret[key].count += 1;\n else ret[key] = { val: pos, count: 1 };\n return ret;\n }, {} as Record)\n )\n .filter(([_, { count }]) => count > 2)\n .map(([_, { val }]) => val);\n intersections.forEach(([x, y]) =>\n circles.push(svg``)\n );\n const lines = [] as TemplateResult<2>[];\n const sections = Array.from(priv.getElementsByTagNameNS(sldNs, 'Section'));\n const bay = cNode.closest('Bay');\n sections.forEach(section => {\n const busBar = xmlBoolean(section.getAttribute('bus'));\n const vertices = Array.from(\n section.getElementsByTagNameNS(sldNs, 'Vertex')\n ).map(vertex => this.renderedPosition(vertex));\n let i = 0;\n while (i < vertices.length - 1) {\n const [x1, y1] = vertices[i];\n let [x2, y2] = vertices[i + 1];\n let handleClick: (() => void) | symbol = nothing;\n let handleAuxClick: ((e: MouseEvent) => void) | symbol = nothing;\n let handleContextMenu: ((e: MouseEvent) => void) | symbol = nothing;\n if (busBar && bay) {\n handleClick = () => this.dispatchEvent(newStartPlaceEvent(bay));\n handleAuxClick = ({ button }: MouseEvent) => {\n if (button === 1) this.dispatchEvent(newStartResizeEvent(bay));\n };\n handleContextMenu = (e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: bay, left: e.clientX, top: e.clientY };\n e.preventDefault();\n };\n }\n if (busBar && this.resizing === bay) {\n if (section !== sections.find(s => xmlBoolean(s.getAttribute('bus'))))\n return;\n circles.length = 0;\n const {\n pos: [vX, vY],\n dim: [vW, vH],\n } = attributes(bay.parentElement!);\n const maxX = vX + vW - 0.5;\n const maxY = vY + vH - 0.5;\n if (i === 0) {\n const dx = Math.max(this.mouseX - x1, 0);\n const dy = Math.max(this.mouseY - y1, 0);\n if (dx > dy) {\n x2 = Math.max(x1, Math.min(maxX, this.mouseX + 0.5));\n y2 = y1;\n } else {\n y2 = Math.max(y1, Math.min(maxY, this.mouseY + 0.5));\n x2 = x1;\n }\n if (x1 === x2 && y1 === y2)\n if (x2 >= maxX) y2 += 1;\n else x2 += 1;\n }\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n parent: section,\n element: section.getElementsByTagNameNS(sldNs, 'Vertex')[\n vertices.length - 1\n ],\n x: x2,\n y: y2,\n })\n );\n };\n lines.push(svg``);\n }\n if (this.connecting)\n handleClick = () => {\n const { equipment, path, terminal } = this.connecting!;\n if (\n equipment.querySelector(\n `Terminal[connectivityNode=\"${cNode.getAttribute('pathName')}\"]`\n )\n )\n return;\n const [[oldX1, _y], [oldX2, oldY2]] = path.slice(-2);\n const vertical = oldX1 === oldX2;\n\n const x3 = this.mouseX + 0.5;\n const y3 = this.mouseY + 0.5;\n\n const newX2 = vertical ? oldX2 : x3;\n const newY2 = vertical ? y3 : oldY2;\n\n path[path.length - 1] = [newX2, newY2];\n path.push([x3, y3]);\n cleanPath(path);\n this.dispatchEvent(\n newConnectEvent({\n equipment,\n terminal,\n path,\n connectTo: cNode,\n })\n );\n };\n\n lines.push(\n svg``\n );\n lines.push(\n svg``\n );\n if (![x1, y1].find(n => Number.isInteger(n)))\n lines.push(\n svg``\n );\n if (![x2, y2].find(n => Number.isInteger(n)))\n lines.push(\n svg``\n );\n i += 1;\n }\n });\n const id = cNode.parentElement!.parentElement ? identity(cNode) : nothing;\n return svg`\n ${cNode.getAttribute('pathName')}\n ${circles}\n ${lines}\n `;\n }\n\n static styles = css`\n h2 {\n font-family: Roboto;\n font-weight: 300;\n font-size: 24px;\n margin-bottom: 4px;\n --mdc-icon-button-size: 28px;\n --mdc-icon-size: 24px;\n }\n `;\n}\n","import { LitElement, html, css, nothing } from 'lit';\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nimport { property, state } from 'lit/decorators.js';\n\nimport { Edit, newEditEvent, Update } from '@openscd/open-scd-core';\nimport { getReference } from '@openscd/oscd-scl';\n\nimport '@material/mwc-button';\nimport '@material/mwc-fab';\nimport '@material/mwc-icon-button';\nimport '@material/mwc-icon';\n\nimport './sld-editor.js';\n\nimport { bayIcon, equipmentIcon, voltageLevelIcon } from './icons.js';\nimport {\n attributes,\n ConnectDetail,\n ConnectEvent,\n connectionStartPoints,\n isBusBar,\n PlaceEvent,\n PlaceLabelEvent,\n Point,\n privType,\n removeNode,\n removeTerminal,\n reparentElement,\n ResizeEvent,\n sldNs,\n StartConnectDetail,\n StartConnectEvent,\n StartEvent,\n xmlnsNs,\n} from './util.js';\n\n/* eslint-disable no-bitwise */\nfunction uuid() {\n const halfBytes = new Array(36);\n for (let i = 0; i < 36; i += 1) {\n if ([8, 13, 18, 23].includes(i)) halfBytes[i] = '-';\n else halfBytes[i] = Math.floor(Math.random() * 16);\n }\n halfBytes[14] = 4;\n halfBytes[19] &= ~(1 << 2);\n halfBytes[19] |= 1 << 3;\n return halfBytes.map(x => x.toString(16)).join('');\n}\n/* eslint-enable no-bitwise */\n\nfunction makeBusBar(doc: XMLDocument, nsp: string) {\n const busBar = doc.createElementNS(doc.documentElement.namespaceURI, 'Bay');\n busBar.setAttribute('name', 'BB1');\n busBar.setAttributeNS(sldNs, `${nsp}:w`, '2');\n const cNode = doc.createElementNS(\n doc.documentElement.namespaceURI,\n 'ConnectivityNode'\n );\n cNode.setAttribute('name', 'L');\n const priv = doc.createElementNS(doc.documentElement.namespaceURI, 'Private');\n priv.setAttribute('type', privType);\n const section = doc.createElementNS(sldNs, `${nsp}:Section`);\n section.setAttribute('bus', 'true');\n const v1 = doc.createElementNS(sldNs, `${nsp}:Vertex`);\n v1.setAttributeNS(sldNs, `${nsp}:x`, '0.5');\n v1.setAttributeNS(sldNs, `${nsp}:y`, '0.5');\n section.appendChild(v1);\n const v2 = doc.createElementNS(sldNs, `${nsp}:Vertex`);\n v2.setAttributeNS(sldNs, `${nsp}:x`, '1.5');\n v2.setAttributeNS(sldNs, `${nsp}:y`, '0.5');\n section.appendChild(v2);\n priv.appendChild(section);\n cNode.appendChild(priv);\n busBar.appendChild(cNode);\n return busBar;\n}\n\nfunction cutSectionAt(\n section: Element,\n index: number,\n [x, y]: Point,\n nsPrefix: string\n): Edit[] {\n const parent = section.parentElement!;\n const edits = [] as Edit[];\n const vertices = Array.from(section.getElementsByTagNameNS(sldNs, 'Vertex'));\n const vertexAtXY = vertices.find(\n ve =>\n ve.getAttributeNS(sldNs, 'x') === x.toString() &&\n ve.getAttributeNS(sldNs, 'y') === y.toString()\n );\n\n if (\n vertexAtXY === vertices[0] ||\n vertexAtXY === vertices[vertices.length - 1]\n )\n return [];\n\n const newSection = section.cloneNode(true) as Element;\n Array.from(newSection.getElementsByTagNameNS(sldNs, 'Vertex'))\n .slice(0, index + 1)\n .forEach(vertex => vertex.remove());\n const v = vertices[index].cloneNode() as Element;\n v.setAttributeNS(sldNs, `${nsPrefix}:x`, x.toString());\n v.setAttributeNS(sldNs, `${nsPrefix}:y`, y.toString());\n v.removeAttributeNS(sldNs, 'uuid');\n newSection.prepend(v);\n edits.push({\n node: newSection,\n parent,\n reference: section.nextElementSibling,\n });\n\n vertices.slice(index + 1).forEach(vertex => edits.push({ node: vertex }));\n\n if (!vertexAtXY) {\n const v2 = v.cloneNode();\n edits.push({ node: v2, parent: section, reference: null });\n }\n\n return edits;\n}\n\nexport default class Designer extends LitElement {\n @property()\n doc!: XMLDocument;\n\n @property()\n editCount = -1;\n\n @state()\n gridSize = 32;\n\n @state()\n nsp = 'esld';\n\n @state()\n templateElements: Record = {};\n\n @state()\n resizing?: Element;\n\n @state()\n placing?: Element;\n\n @state()\n placingLabel?: Element;\n\n @state()\n connecting?: {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n };\n\n zoomIn(step = 4) {\n this.gridSize += step;\n }\n\n zoomOut(step = 4) {\n this.gridSize -= step;\n if (this.gridSize < 4) this.gridSize = 4;\n }\n\n startResizing(element: Element | undefined) {\n this.reset();\n this.resizing = element;\n }\n\n startPlacing(element: Element | undefined) {\n this.reset();\n this.placing = element;\n }\n\n startPlacingLabel(element: Element | undefined) {\n this.reset();\n this.placingLabel = element;\n }\n\n startConnecting({ equipment, terminal }: StartConnectDetail) {\n this.reset();\n const { close, far } = connectionStartPoints(equipment)[terminal];\n if (equipment)\n this.connecting = {\n equipment,\n path: [close, far],\n terminal,\n };\n }\n\n reset() {\n this.resizing = undefined;\n this.placing = undefined;\n this.placingLabel = undefined;\n this.connecting = undefined;\n }\n\n handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') this.reset();\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.handleKeydown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('keydown', this.handleKeydown);\n }\n\n updated(changedProperties: Map) {\n if (!changedProperties.has('doc')) return;\n const sldNsPrefix = this.doc.documentElement.lookupPrefix(sldNs);\n if (sldNsPrefix) {\n this.nsp = sldNsPrefix;\n } else {\n this.doc.documentElement.setAttributeNS(xmlnsNs, 'xmlns:esld', sldNs);\n this.nsp = 'esld';\n }\n\n ['Substation', 'VoltageLevel', 'Bay', 'ConductingEquipment'].forEach(\n tag => {\n this.templateElements[tag] = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n tag\n );\n }\n );\n this.templateElements.BusBar = makeBusBar(this.doc, this.nsp);\n }\n\n rotateElement(element: Element) {\n const { rot } = attributes(element);\n const edits = [\n {\n element,\n attributes: {\n [`${this.nsp}:rot`]: {\n namespaceURI: sldNs,\n value: ((rot + 1) % 4).toString(),\n },\n },\n },\n ] as Edit[];\n if (element.tagName === 'ConductingEquipment') {\n Array.from(element.getElementsByTagName('Terminal'))\n .filter(terminal => terminal.getAttribute('cNodeName') !== 'grounded')\n .forEach(terminal => edits.push(...removeTerminal(terminal)));\n }\n this.dispatchEvent(newEditEvent(edits));\n }\n\n placeLabel(element: Element, x: number, y: number) {\n this.dispatchEvent(\n newEditEvent({\n element,\n attributes: {\n lx: { namespaceURI: sldNs, value: x.toString() },\n ly: { namespaceURI: sldNs, value: y.toString() },\n },\n })\n );\n this.reset();\n }\n\n placeElement(element: Element, parent: Element, x: number, y: number) {\n const edits: Edit[] = [];\n if (element.parentElement !== parent) {\n edits.push(...reparentElement(element, parent));\n }\n\n const {\n pos: [oldX, oldY],\n label: [lX, lY],\n } = attributes(element);\n\n const dx = x - oldX;\n const dy = y - oldY;\n if (element.localName !== 'Vertex')\n edits.push({\n element,\n attributes: {\n x: { namespaceURI: sldNs, value: x.toString() },\n y: { namespaceURI: sldNs, value: y.toString() },\n lx: { namespaceURI: sldNs, value: (lX + dx).toString() },\n ly: { namespaceURI: sldNs, value: (lY + dy).toString() },\n },\n });\n\n Array.from(\n element.querySelectorAll('Bay, ConductingEquipment, Vertex')\n ).forEach(descendant => {\n const {\n pos: [descX, descY],\n label: [descLX, descLY],\n } = attributes(descendant);\n edits.push({\n element: descendant,\n attributes: {\n x: { namespaceURI: sldNs, value: (descX + dx).toString() },\n y: { namespaceURI: sldNs, value: (descY + dy).toString() },\n lx: { namespaceURI: sldNs, value: (descLX + dx).toString() },\n ly: { namespaceURI: sldNs, value: (descLY + dy).toString() },\n },\n });\n });\n\n if (element.tagName === 'ConductingEquipment') {\n Array.from(element.getElementsByTagName('Terminal'))\n .filter(terminal => terminal.getAttribute('cNodeName') !== 'grounded')\n .forEach(terminal => edits.push(...removeTerminal(terminal)));\n } else {\n Array.from(element.getElementsByTagName('ConnectivityNode')).forEach(\n cNode => {\n if (\n Array.from(\n this.doc.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute('pathName')}\"]`\n )\n ).find(terminal => terminal.closest(element.tagName) !== element)\n )\n edits.push(...removeNode(cNode));\n }\n );\n Array.from(element.getElementsByTagName('Terminal')).forEach(terminal => {\n const cNode = this.doc.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode && cNode.closest(element.tagName) !== element)\n edits.push(...removeNode(cNode));\n });\n }\n\n if (element.localName === 'Vertex') {\n const bay = element.closest('Bay')!;\n const sections = Array.from(bay.querySelectorAll('Section[bus]'));\n const section = sections[0];\n const vertex = section.querySelector('Vertex')!;\n const lastSection = sections[sections.length - 1];\n const lastVertex = lastSection.querySelector('Vertex:last-of-type')!;\n const {\n pos: [x1, y1],\n } = attributes(vertex);\n const w = x - x1 + 1;\n const h = y - y1 + 1;\n if (isBusBar(bay)) {\n edits.push(...removeNode(section.closest('ConnectivityNode')!));\n edits.push({\n element: lastVertex,\n attributes: {\n x: { namespaceURI: sldNs, value: x.toString() },\n y: { namespaceURI: sldNs, value: y.toString() },\n },\n });\n edits.push({\n element: bay,\n attributes: {\n w: { namespaceURI: sldNs, value: w.toString() },\n h: { namespaceURI: sldNs, value: h.toString() },\n },\n });\n }\n }\n\n this.dispatchEvent(newEditEvent(edits));\n if (\n ['Bay', 'VoltageLevel'].includes(element.tagName) &&\n (!element.hasAttributeNS(sldNs, 'w') ||\n !element.hasAttributeNS(sldNs, 'h'))\n )\n this.startResizing(element);\n else this.reset();\n }\n\n connectEquipment({\n equipment,\n terminal,\n connectTo,\n toTerminal,\n path,\n }: ConnectDetail) {\n const edits = [] as Edit[];\n let cNode: Element;\n let connectivityNode: string;\n let cNodeName: string;\n let priv: Element;\n if (connectTo.tagName !== 'ConnectivityNode') {\n cNode = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'ConnectivityNode'\n );\n cNode.setAttribute('name', 'L1');\n const bay = equipment.closest('Bay')!;\n edits.push(...reparentElement(cNode, bay));\n connectivityNode = (edits.find(\n e => 'attributes' in e && 'pathName' in e.attributes\n ) as Update | undefined)!.attributes.pathName as string;\n cNodeName =\n ((\n edits.find(e => 'attributes' in e && 'name' in e.attributes) as\n | Update\n | undefined\n )?.attributes.name as string | undefined) ??\n cNode.getAttribute('name')!;\n priv = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Private'\n );\n priv.setAttribute('type', privType);\n edits.push({\n parent: cNode,\n node: priv,\n reference: getReference(cNode, 'Private'),\n });\n } else {\n cNode = connectTo;\n connectivityNode = cNode.getAttribute('pathName')!;\n cNodeName = cNode.getAttribute('name')!;\n priv = cNode.querySelector(`Private[type=\"${privType}\"]`)!;\n }\n const section = this.doc.createElementNS(sldNs, `${this.nsp}:Section`);\n edits.push({ parent: priv!, node: section, reference: null });\n const fromTermUUID = uuid();\n const toTermUUID = uuid();\n path.forEach(([x, y], i) => {\n const vertex = this.doc.createElementNS(sldNs, `${this.nsp}:Vertex`);\n vertex.setAttributeNS(sldNs, `${this.nsp}:x`, x.toString());\n vertex.setAttributeNS(sldNs, `${this.nsp}:y`, y.toString());\n if (i === 0)\n vertex.setAttributeNS(sldNs, `${this.nsp}:uuid`, fromTermUUID);\n else if (\n i === path.length - 1 &&\n connectTo.tagName !== 'ConnectivityNode'\n )\n vertex.setAttributeNS(sldNs, `${this.nsp}:uuid`, toTermUUID);\n edits.push({ parent: section, node: vertex, reference: null });\n });\n if (connectTo.tagName === 'ConnectivityNode') {\n const [x, y] = path[path.length - 1];\n Array.from(priv.getElementsByTagNameNS(sldNs, 'Section')).find(s => {\n const sectionPath = Array.from(\n s.getElementsByTagNameNS(sldNs, 'Vertex')\n ).map(v => attributes(v).pos);\n for (let i = 0; i < sectionPath.length - 1; i += 1) {\n const [x0, y0] = sectionPath[i];\n const [x1, y1] = sectionPath[i + 1];\n if (\n (y0 === y &&\n y === y1 &&\n ((x0 < x && x < x1) || (x1 < x && x < x0))) ||\n (x0 === x &&\n x === x1 &&\n ((y0 < y && y < y1) || (y1 < y && y < y0))) ||\n (y0 === y && x0 === x)\n ) {\n edits.push(cutSectionAt(s, i, [x, y], this.nsp));\n return true;\n }\n }\n return false;\n });\n }\n const [substationName, voltageLevelName, bayName] = connectivityNode.split(\n '/',\n 3\n );\n const fromTermElement = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Terminal'\n );\n fromTermElement.setAttributeNS(sldNs, `${this.nsp}:uuid`, fromTermUUID);\n const fromTermName = terminal === 'top' ? 'T1' : 'T2';\n fromTermElement.setAttribute('name', fromTermName);\n fromTermElement.setAttribute('connectivityNode', connectivityNode);\n fromTermElement.setAttribute('substationName', substationName);\n fromTermElement.setAttribute('voltageLevelName', voltageLevelName);\n fromTermElement.setAttribute('bayName', bayName);\n fromTermElement.setAttribute('cNodeName', cNodeName);\n edits.push({\n node: fromTermElement,\n parent: equipment,\n reference: getReference(equipment, 'Terminal'),\n });\n if (connectTo.tagName === 'ConductingEquipment') {\n const toTermElement = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Terminal'\n );\n toTermElement.setAttributeNS(sldNs, `${this.nsp}:uuid`, toTermUUID);\n const toTermName = toTerminal === 'top' ? 'T1' : 'T2';\n toTermElement.setAttribute('name', toTermName);\n toTermElement.setAttribute('connectivityNode', connectivityNode);\n toTermElement.setAttribute('substationName', substationName);\n toTermElement.setAttribute('voltageLevelName', voltageLevelName);\n toTermElement.setAttribute('bayName', bayName);\n toTermElement.setAttribute('cNodeName', cNodeName);\n edits.push({\n node: toTermElement,\n parent: connectTo,\n reference: getReference(connectTo, 'Terminal'),\n });\n }\n this.reset();\n this.dispatchEvent(newEditEvent(edits));\n }\n\n render() {\n if (!this.doc) return html`

    Please open an SCL document

    `;\n return html`
    \n ${Array.from(this.doc.querySelectorAll(':root > Substation')).map(\n subs =>\n html` {\n this.startResizing(detail);\n }}\n @oscd-sld-start-place=${({ detail }: StartEvent) => {\n this.startPlacing(detail);\n }}\n @oscd-sld-start-place-label=${({ detail }: StartEvent) => {\n this.startPlacingLabel(detail);\n }}\n @oscd-sld-start-connect=${({ detail }: StartConnectEvent) => {\n this.startConnecting(detail);\n }}\n @oscd-sld-resize=${({ detail: { element, w, h } }: ResizeEvent) => {\n this.dispatchEvent(\n newEditEvent({\n element,\n attributes: {\n w: { namespaceURI: sldNs, value: w.toString() },\n h: { namespaceURI: sldNs, value: h.toString() },\n },\n })\n );\n this.reset();\n }}\n @oscd-sld-place=${({\n detail: { element, parent, x, y },\n }: PlaceEvent) => this.placeElement(element, parent, x, y)}\n @oscd-sld-place-label=${({\n detail: { element, x, y },\n }: PlaceLabelEvent) => this.placeLabel(element, x, y)}\n @oscd-sld-connect=${({ detail }: ConnectEvent) =>\n this.connectEquipment(detail)}\n @oscd-sld-rotate=${({ detail }: StartEvent) =>\n this.rotateElement(detail)}\n >`\n )}\n \n
    `;\n }\n\n insertSubstation() {\n const parent = this.doc.documentElement;\n const node = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Substation'\n );\n const reference = getReference(parent, 'Substation');\n let index = 1;\n while (this.doc.querySelector(`:root > Substation[name=\"S${index}\"]`))\n index += 1;\n node.setAttribute('name', `S${index}`);\n node.setAttributeNS(sldNs, `${this.nsp}:w`, '50');\n node.setAttributeNS(sldNs, `${this.nsp}:h`, '25');\n this.dispatchEvent(newEditEvent({ parent, node, reference }));\n }\n\n static styles = css`\n main {\n padding: 16px;\n }\n\n div {\n margin-top: 12px;\n }\n\n nav {\n position: fixed;\n bottom: 4px;\n left: 4px;\n }\n `;\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__values","o","Symbol","iterator","m","next","value","done","SuppressedError","window","e","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","WeakMap","_$cssResult$","Error","cssText","styleSheet","get","replaceSync","set","toString","css","reduce","cssRules","trustedTypes","h","emptyScript","reactiveElementPolyfillSupport","toAttribute","Boolean","JSON","stringify","fromAttribute","Number","parse","a","notEqual","l","attribute","type","converter","reflect","hasChanged","u","HTMLElement","super","_$Ei","Map","isUpdatePending","hasUpdated","_$El","_$Eu","addInitializer","finalize","push","observedAttributes","elementProperties","forEach","_$Ep","_$Ev","createProperty","state","noAccessor","getPropertyDescriptor","requestUpdate","configurable","enumerable","getPropertyOptions","getPrototypeOf","properties","getOwnPropertyNames","getOwnPropertySymbols","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","_$E_","Promise","enableUpdating","_$AL","_$Eg","addController","_$ES","renderRoot","isConnected","hostConnected","removeController","splice","indexOf","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","adoptStyles","adoptedStyleSheets","map","document","createElement","litNonce","setAttribute","textContent","appendChild","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$EO","removeAttribute","has","_$EC","_$Ej","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$Ek","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","createPolicy","createHTML","Math","random","slice","createMarker","createComment","f","_","RegExp","g","$","y","w","_$litType$","strings","values","x","T","for","A","E","C","createTreeWalker","P","V","getTemplateHtml","v","lastIndex","exec","test","startsWith","N","parts","el","currentNode","content","firstChild","remove","append","childNodes","nextNode","nodeType","hasAttributes","getAttributeNames","endsWith","getAttribute","split","index","name","ctor","H","L","z","k","tagName","data","innerHTML","S","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","M","_$AV","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","R","nextSibling","Z","_$AI","_$AH","_$AA","_$AB","options","_$Cp","startNode","endNode","_$AR","insertBefore","createTextNode","_$AC","_$AP","setConnected","element","fill","j","I","capture","once","passive","removeEventListener","addEventListener","handleEvent","host","B","litHtmlPolyfillSupport","litHtmlVersions","renderOptions","_$Do","renderBefore","render","_$litPart$","finalized","_$litElement$","globalThis","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions","customElements","define","kind","elements","finisher","standardProperty","descriptor","placement","originalKey","initializer","legacyProperty","decorateProperty","querySelector","HTMLSlotElement","assignedElements","assignedNodes","filter","Node","ELEMENT_NODE","slot","flatten","selector","matches","newEditEvent","edit","CustomEvent","composed","bubbles","detail","tAbstractConductingEquipment","tEquipment","tEquipmentContainer","tGeneralEquipmentContainer","tAbstractEqFuncSubFunc","tLNodeContainer","tAnyLN","tServiceWithMax","sCLTags","tBaseNameSequence","tNamingSequence","tUnNamingSequence","tIDNamingSequence","tAbstractDataAttributeSequence","tLNodeContainerSequence","tPowerSystemResourceSequence","tEquipmentSequence","tEquipmentContainerSequence","tAbstractConductingEquipmentSequence","tControlBlockSequence","tControlSequence","tControlWithIEDNameSequence","tAnyLNSequence","tGeneralEquipmentContainerSequence","tControlWithTriggerOptSequence","tAbstractEqFuncSubFuncSequence","tags","AccessControl","parents","children","AccessPoint","Address","Association","Authentication","BDA","BitRate","Bay","ClientLN","ClientServices","CommProt","Communication","ConductingEquipment","ConfDataSet","ConfLdName","ConfLNs","ConfLogControl","ConfReportControl","ConfSG","ConfSigRef","ConnectedAP","ConnectivityNode","DA","DAI","DAType","DO","DOI","DOType","DataObjectDirectory","DataSet","DataSetDirectory","DataTypeTemplates","DynAssociation","DynDataSet","EnumType","EnumVal","EqFunction","EqSubFunction","ExtRef","FCDA","FileHandling","Function","GeneralEquipment","GetCBValues","GetDataObjectDefinition","GetDataSetValue","GetDirectory","GOOSE","GOOSESecurity","GSE","GSEDir","GSEControl","GSESettings","GSSE","Header","History","Hitem","IED","IEDName","Inputs","IssuerName","KDC","LDevice","LN","LN0","LNode","LNodeType","Line","Log","LogControl","LogSettings","MaxTime","McSecurity","MinTime","NeutralPoint","OptFields","PhysConn","PowerTransformer","Private","Process","ProtNs","Protocol","ReadWrite","RedProt","ReportControl","ReportSettings","RptEnabled","SamplesPerSec","SampledValueControl","SecPerSamples","SCL","SDI","SDO","Server","ServerAt","Services","SetDataSetValue","SettingControl","SettingGroups","SGEdit","SmpRate","SMV","SmvOpts","SMVsc","SMVSecurity","SMVSettings","SubEquipment","SubFunction","SubNetwork","Subject","Substation","SupSubscription","TapChanger","Terminal","Text","tag","TimerActivatedControl","TimeSyncProt","TransformerWinding","TrgOps","Val","ValueHandling","Voltage","VoltageLevel","tagSet","isSCLTag","getReference","parent","parentTag","from","find","child","sequence","findIndex","terminalIdentity","identity","parentElement","ixNamingIdentity","ix","naming","controlBlockIdentity","ldInst","cbName","namingIdentity","singletonIdentity","idNamingIdentity","id","iedName","prefix","lnClass","lnInst","apRef","apName","NaN","parentIdentity","intAddr","intAddrIndex","querySelectorAll","doName","daName","serviceType","srcLDInst","srcPrefix","srcLNClass","srcLNInst","srcCBName","cbPath","fc","dataPath","closest","inst","lnType","eParent","eType","isSameNode","pcType","sGroup","Icon","html","webkitMatchesSelector","msMatchesSelector","customElement","addHasRemoveClass","addClass","className","classList","add","removeClass","hasClass","contains","fn","optionsBlock","deepActiveElementPath","doc","activeElement","path","BaseElement","click","mdcRoot","focus","createFoundation","undefined","mdcFoundation","destroy","mdcFoundationClass","createAdapter","init","MDCFoundation","adapter","cssClasses","BG_FOCUSED","FG_ACTIVATION","FG_DEACTIVATION","ROOT","UNBOUNDED","VAR_FG_SCALE","VAR_FG_SIZE","VAR_FG_TRANSLATE_END","VAR_FG_TRANSLATE_START","VAR_LEFT","VAR_TOP","numbers","DEACTIVATION_TIMEOUT_MS","FG_DEACTIVATION_MS","INITIAL_ORIGIN_SCALE","PADDING","TAP_DELAY_MS","ACTIVATION_EVENT_TYPES","POINTER_DEACTIVATION_EVENT_TYPES","activatedTargets","MDCRippleFoundation","_super","_this","defaultAdapter","activationAnimationHasEnded","activationTimer","fgDeactivationRemovalTimer","fgScale","frame","width","height","initialSize","layoutFrame","maxRadius","unboundedCoords","left","top","activationState","defaultActivationState","activationTimerCallback","runDeactivationUXLogicIfReady","activateHandler","activateImpl","deactivateHandler","deactivateImpl","focusHandler","handleFocus","blurHandler","handleBlur","resizeHandler","layout","browserSupportsCssVars","computeBoundingRect","right","bottom","containsEventTarget","deregisterDocumentInteractionHandler","deregisterInteractionHandler","deregisterResizeHandler","getWindowPageOffset","isSurfaceActive","isSurfaceDisabled","isUnbounded","registerDocumentInteractionHandler","registerInteractionHandler","registerResizeHandler","updateCssVariable","supportsPressRipple","registerRootHandlers","_a","ROOT_1","UNBOUNDED_1","requestAnimationFrame","layoutInternal","clearTimeout","ROOT_2","UNBOUNDED_2","removeCssVars","deregisterRootHandlers","deregisterDeactivationHandlers","activate","evt","deactivate","cancelAnimationFrame","setUnbounded","unbounded","activationEvent","hasDeactivationUXRun","isActivated","isProgrammatic","wasActivatedByPointer","wasElementMadeActive","ACTIVATION_EVENT_TYPES_1","ACTIVATION_EVENT_TYPES_1_1","evtType","registerDeactivationHandlers","POINTER_DEACTIVATION_EVENT_TYPES_1","POINTER_DEACTIVATION_EVENT_TYPES_1_1","ACTIVATION_EVENT_TYPES_2","ACTIVATION_EVENT_TYPES_2_1","POINTER_DEACTIVATION_EVENT_TYPES_2","POINTER_DEACTIVATION_EVENT_TYPES_2_1","rippleStrings","keys","previousActivationEvent","some","resetActivationState","checkElementMadeActive","animateActivation","keyCode","_b","translateStart","translateEnd","_c","getFgTranslationCoordinates","startPoint","endPoint","rmBoundedActivationClasses","setTimeout","pageOffset","clientRect","normalizedX","normalizedY","documentX","documentY","touchEvent","changedTouches","pageX","pageY","mouseEvent","getNormalizedEventCoords","animateDeactivation","maxDim","max","sqrt","pow","floor","updateLayoutCssVars","round","MDCRippleFoundation$1","_$Ct","_$Ci","join","it","nt","delete","includes","replace","style","ht","removeProperty","setProperty","RippleBase","primary","accent","disabled","activated","selected","internalUseStateLayerCustomProperties","hovering","bgFocused","fgActivation","fgDeactivation","fgSize","leftPos","topPos","isActive","varName","getBoundingClientRect","pageXOffset","pageYOffset","startPress","ev","waitForFoundation","endPress","startFocus","endFocus","startHover","endHover","then","changedProperties","shouldActivateInPrimary","shouldSelectInPrimary","classes","classMap","styleMap","query","property","Ripple","ariaProperty","protoOrDescriptor","litInternalPropertyKey","propDescriptor","dispatchWizEvent","wrappedDescriptor","hasAttribute","tsDecorator","RippleHandlers","rippleFn","ButtonBase","raised","unelevated","outlined","dense","trailingIcon","fullwidth","icon","label","expandContent","shouldRenderRipple","rippleHandlers","ripple","renderOverlay","renderRipple","filled","buttonElement","blur","getRenderClasses","ifDefined","ariaHasPopup","handleRippleFocus","handleRippleBlur","handleRippleActivate","handleRippleMouseEnter","handleRippleMouseLeave","handleRippleDeactivate","renderIcon","flex","onUp","delegatesFocus","queryAsync","eventOptions","Button","FabBase","mini","exited","extended","showIconAtEnd","reducedTouchTarget","useStateLayerCustomProperties","hasTouchTarget","ariaLabel","handleRippleStartPress","renderBeforeRipple","renderLabel","renderTouchTarget","showLabel","event","Fab","IconButtonBase","handleRippleMouseDown","handleRippleTouchStart","IconButton","notifyChildrenConnectedChanged","size","_$AQ","reconnected","disconnected","setValue","G","ot","rt","lt","dt","_blockingElements","_alreadyInertElements","_topElParents","_siblingsToRestore","_parentMO","_topChanged","_swapInertedSibling","_inertSiblings","_restoreInertedSiblings","_getParents","_getDistributedChildren","_isInertable","_handleMutations","BlockingElementsImpl","destructor","nullable","elems","pop","newTop","toKeepInert","oldParents","clear","newParents","body","toSkip","oldInert","newInert","siblingsToRestore","inert","disconnect","siblings","sibling","inertedSiblings","mo","MutationObserver","bind","parentToObserve","maybeShadyRoot","__shady","observe","childList","mutations","mutation","idx","inertedChild","removedNodes","console","info","addedNodes","localName","current","assignedSlot","result","nodes","slots","$blockingElements","_createClass","defineProperties","props","writable","Constructor","protoProps","staticProps","_classCallCheck","instance","Element","_focusableElementsString","InertRoot","rootElement","inertManager","_inertManager","_rootElement","_managedNodes","_savedAriaHidden","_makeSubtreeUnfocusable","_observer","_onMutation","attributes","subtree","inertNode","_unmanageNode","node","_this2","composedTreeWalk","_visitNode","root","DOCUMENT_FRAGMENT_NODE","_adoptInertRoot","_manageNode","register","deregister","_this3","inertSubroot","getInertRoot","setInert","managedNodes","savedInertNode","records","self","record","_unmanageSubtree","attributeName","managedNode","ariaHidden","InertNode","inertRoot","_node","_overrodeFocusMethod","_inertRoots","_savedTabIndex","_destroyed","ensureUntabbable","_throwIfDestroyed","destroyed","tabIndex","hasSavedTabIndex","InertManager","_document","_watchForInert","addInertStyle","head","documentElement","readyState","_onDocumentLoaded","addInertRoot","removeInertRoot","inertElement","inertElements","callback","shadowRootAncestor","distributedNodes","getDistributedNodes","_distributedNodes","_i","AnimationKeys","CLOSING","OPEN","OPENING","SCROLLABLE","SCROLL_LOCK","STACKED","FULLSCREEN","SCROLL_DIVIDER_HEADER","SCROLL_DIVIDER_FOOTER","SURFACE_SCRIM_SHOWN","SURFACE_SCRIM_SHOWING","SURFACE_SCRIM_HIDING","SCRIM_HIDDEN","ACTION_ATTRIBUTE","BUTTON_DEFAULT_ATTRIBUTE","BUTTON_SELECTOR","CLOSED_EVENT","CLOSE_ACTION","CLOSING_EVENT","CONTAINER_SELECTOR","CONTENT_SELECTOR","DESTROY_ACTION","INITIAL_FOCUS_ATTRIBUTE","OPENED_EVENT","OPENING_EVENT","SCRIM_SELECTOR","SUPPRESS_DEFAULT_PRESS_SELECTOR","SURFACE_SELECTOR","DIALOG_ANIMATION_CLOSE_TIME_MS","DIALOG_ANIMATION_OPEN_TIME_MS","AnimationFrame","rafIDs","request","cancel","frameID","rafID","cancelAll","getQueue","queue","MDCDialogFoundation$1","MDCDialogFoundation","dialogOpen","isFullscreen","animationFrame","animationTimer","escapeKeyAction","scrimClickAction","autoStackButtons","areButtonsStacked","suppressDefaultPressSelector","animFrame","contentScrollHandler","handleScrollEvent","windowResizeHandler","windowOrientationChangeHandler","addBodyClass","clickDefaultButton","eventTargetMatches","getActionFromEvent","getInitialFocusEl","isContentScrollable","notifyClosed","notifyClosing","notifyOpened","notifyOpening","releaseFocus","removeBodyClass","reverseButtons","trapFocus","registerContentEventHandler","deregisterContentEventHandler","isScrollableContentAtTop","isScrollableContentAtBottom","registerWindowEventHandler","deregisterWindowEventHandler","setAutoStackButtons","handleAnimationTimerEnd","open","dialogOptions","isAboveFullscreenDialog","runNextAnimationFrame","close","action","showSurfaceScrim","hideSurfaceScrim","handleSurfaceScrimTransitionEnd","isOpen","getEscapeKeyAction","setEscapeKeyAction","getScrimClickAction","setScrimClickAction","getAutoStackButtons","autoStack","getSuppressDefaultPressSelector","setSuppressDefaultPressSelector","POLL_LAYOUT_CHANGE","handleClick","handleKeydown","isEnter","composedPath","isDefault","handleDocumentKeydown","POLL_SCROLL_POS","toggleScrollDividerHeader","toggleScrollDividerFooter","detectStackedButtons","toggleScrollableClasses","applyPassive","globalObj","passiveSupported","handler","err","supportsPassiveOption","observer","proto","propName","_observers","observers","userUpdated","blockingElements","DialogBase","hideActions","stacked","heading","defaultAction","actionAttribute","initialFocusAttribute","initialSupressDefaultPressSelector","boundHandleClick","boundHandleKeydown","boundHandleDocumentKeydown","primaryButton","primarySlot","button","emitNotification","dispatchEvent","initFocusSelector","lightDomQs","primaryNodes","primaryFocusElement","searchNodeTreesForAttribute","secondaryNodes","secondarySlot","secondaryFocusElement","contentNodes","contentSlot","selection","overflow","contentElement","scrollHeight","offsetHeight","closingDueToDisconnect","scrollTop","ceil","clientHeight","renderHeading","actionsClasses","setEventListeners","removeEventListeners","currentAction","forceLayout","initialFocusEl","activeEl","getRootNode","show","newAction","Dialog","ListItemBase","group","tabindex","twoline","graphic","multipleGraphics","hasMeta","noninteractive","_managingList","boundOnClick","onClick","_firstChanged","_skipPropRequest","listeners","eventNames","cb","onDown","text","trim","renderText","renderGraphic","meta","renderMeta","graphicClasses","multi","inner","renderTwoline","renderSingleLine","fireRequestSelected","upName","source","customEv","listener","eventName","debouncedLayout","Event","role","isAriaSelectable","ListItem","KEY","normalizedKeys","KEY_CODE","mappedKeyCodes","navigationKeys","normalizeKey","mappedKey","deprecatedClassNameMap","ACTION_EVENT","SELECTION_CHANGE_EVENT","ARIA_CHECKED","ARIA_CHECKED_CHECKBOX_SELECTOR","ARIA_CHECKED_RADIO_SELECTOR","ARIA_CURRENT","ARIA_DISABLED","ARIA_ORIENTATION","ARIA_ORIENTATION_HORIZONTAL","ARIA_ROLE_CHECKBOX_SELECTOR","ARIA_SELECTED","ARIA_INTERACTIVE_ROLES_SELECTOR","ARIA_MULTI_SELECTABLE_SELECTOR","CHECKBOX_RADIO_SELECTOR","CHECKBOX_SELECTOR","CHILD_ELEMENTS_TO_TOGGLE_TABINDEX","DEPRECATED_SELECTOR","FOCUSABLE_CHILD_ELEMENTS","RADIO_SELECTOR","SELECTED_ITEM_SELECTOR","UNSET_INDEX","TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS","integerSort","ELEMENTS_KEY_ALLOWED_IN","isIndexSet","selectedIndex","createSetFromIndex","entry","MDCListFoundation","isMulti_","wrapFocus_","isVertical_","selectedIndex_","focusedItemIndex_","useActivatedClass_","ariaCurrentAttrValue_","focusItemAtIndex","getFocusedElementIndex","getListItemCount","isFocusInsideList","isRootFocused","notifyAction","notifySelected","getSelectedStateForElementIndex","setDisabledStateForElementIndex","getDisabledStateForElementIndex","setSelectedStateForElementIndex","setActivatedStateForElementIndex","setTabIndexForElementIndex","setAttributeForElementIndex","getAttributeForElementIndex","setWrapFocus","setMulti","currentIndex","isUnset","vals","sort","setVerticalOrientation","setUseActivatedClass","useActivated","getSelectedIndex","setSelectedIndex","isIndexValid_","setMultiSelectionAtIndex_","setSingleSelectionAtIndex_","handleFocusIn","listItemIndex","handleFocusOut","setTabindexToFirstSelectedItem_","isRootListItem","isArrowLeft","isArrowUp","isArrowRight","isArrowDown","isHome","isEnd","isSpace","preventDefault","focusLastElement","focusFirstElement","nextIndex","preventDefaultEvent","focusNextElement","focusPrevElement","setSelectedIndexOnAction_","setTabindexAtIndex_","handleSingleSelection","isInteraction","force","prevIndex","setEnabled","itemIndex","isEnabled","setAriaForSingleSelectionAtIndex_","newIndex","diff","findIndexDiff","oldSet","newSet","oldArr","newArr","added","removed","oldSorted","newSorted","oldVal","newVal","isAriaCurrent","ariaAttribute","ariaAttributeValue","targetIndex","min","isOneInRange","isIndexInRange_","listSize","checkedIndex","toggleMultiAtIndex","newSelectionValue","isListItem","clearAndCreateItemsReadyPromise","oldResolver","itemsReadyResolver","itemsReady","res","ListBase","mdcAdapter","activatable","wrapFocus","itemRoles","innerRole","innerAriaLabel","rootTabbable","previousTabindex","resolve","items_","debouncedFunction","waitInMS","timeoutId","updateItems","debounceLayout","items","listItems","selectedIndices","item","select","entries","itemsUpdatedEv","onKeydown","onFocusIn","onFocusOut","onRequestSelected","onListItemConnected","renderPlaceholder","emptyMessage","getIndexOfTarget","stopPropagation","pathItem","getFocusedItemIndex","attr","val","activePath","deepActiveElement","focusEv","doesElementContainFocus","selectUi","deselectUi","toggle","first","activeElementPath","activeItem","queryAssignedNodes","newValue","oldValue","_newValue","tabbable","tabbableElements","List","NOTCH_ELEMENT_SELECTOR","NOTCH_ELEMENT_PADDING","NO_LABEL","OUTLINE_NOTCHED","OUTLINE_UPGRADED","MDCNotchedOutlineFoundation","setNotchWidthProperty","removeNotchWidthProperty","notch","notchWidth","closeNotch","NotchedOutlineBase","lastOpen","notchElement","openOrClose","shouldOpen","NotchedOutline","USING_SHADY_DOM","ShadyDOM","inUse","FormElement","containingForm","formDataListener","setFormData","formData","findFormElement","forms","form","formElement","LABEL_FLOAT_ABOVE","LABEL_REQUIRED","LABEL_SHAKE","MDCFloatingLabelFoundation","shakeAnimationEndHandler","handleShakeAnimationEnd","getWidth","shake","shouldShake","float","shouldFloat","setRequired","isRequired","floatingLabel","directive","Directive","partInfo","foundation","previousPart","PartType","part","labelElement","scrollWidth","_label","LINE_RIPPLE_ACTIVE","LINE_RIPPLE_DEACTIVATING","MDCLineRippleFoundation","transitionEndHandler","handleTransitionEnd","setStyle","registerEventHandler","deregisterEventHandler","setRippleCenter","xCoordinate","isDeactivating","propertyName","lineRipple","_params","lineElement","ARIA_CONTROLS","ARIA_DESCRIBEDBY","INPUT_SELECTOR","LABEL_SELECTOR","LEADING_ICON_SELECTOR","LINE_RIPPLE_SELECTOR","OUTLINE_SELECTOR","PREFIX_SELECTOR","SUFFIX_SELECTOR","TRAILING_ICON_SELECTOR","DISABLED","FOCUSED","HELPER_LINE","INVALID","LABEL_FLOATING","OUTLINED","TEXTAREA","WITH_LEADING_ICON","WITH_TRAILING_ICON","WITH_INTERNAL_COUNTER","LABEL_SCALE","VALIDATION_ATTR_WHITELIST","ALWAYS_FLOAT_TYPES","POINTERDOWN_EVENTS","INTERACTION_EVENTS","MDCTextFieldFoundation","foundationMap","isFocused","receivedUserInput","valid","useNativeValidation","validateOnValueChange","helperText","characterCounter","leadingIcon","inputFocusHandler","activateFocus","inputBlurHandler","deactivateFocus","inputInputHandler","handleInput","setPointerXOffset","setTransformOrigin","textFieldInteractionHandler","handleTextFieldInteraction","validationAttributeChangeHandler","attributesList","handleValidationAttributeChange","getNativeInput","shouldAlwaysFloat","getValue","isBadInput","isValid","setInputAttr","removeInputAttr","registerTextFieldInteractionHandler","deregisterTextFieldInteractionHandler","registerInputInteractionHandler","deregisterInputInteractionHandler","registerValidationAttributeChangeHandler","deregisterValidationAttributeChangeHandler","activateLineRipple","deactivateLineRipple","setLineRippleTransformOrigin","shakeLabel","floatLabel","setLabelRequired","hasLabel","getLabelWidth","hasOutline","notchOutline","closeOutline","required","styleFloating","POINTERDOWN_EVENTS_1","POINTERDOWN_EVENTS_1_1","INTERACTION_EVENTS_1","INTERACTION_EVENTS_1_1","validationObserver","setcharacterCounter","POINTERDOWN_EVENTS_2","POINTERDOWN_EVENTS_2_1","INTERACTION_EVENTS_2","INTERACTION_EVENTS_2_1","nativeInput","styleValidity","openNotch","labelWidth","styleFocused","isPersistent","isValidation","showToScreenReader","isDisabled","touches","targetEvent","targetClientRect","clientX","autoCompleteFocus","isNativeInputValid","setValid","setValidateOnValueChange","shouldValidate","getValidateOnValueChange","setUseNativeValidation","setDisabled","styleDisabled","setHelperTextContent","setContent","setLeadingIconAriaLabel","setAriaLabel","setLeadingIconContent","setTrailingIconAriaLabel","setTrailingIconContent","currentLength","maxLength","setCounterValue","validity","badInput","setValidity","helperTextVisible","isVisible","helperTextId","getId","isFloating","MDCTextFieldFoundation$1","setCommittedValue","passiveEvents","createValidityObj","customValidity","objectifiedCustomValidity","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing","TextFieldBase","placeholder","iconTrailing","minLength","helper","validateOnInitialRender","validationMessage","autoValidate","pattern","step","helperPersistent","charCounter","endAligned","suffix","readOnly","autocapitalize","outlineOpen","outlineWidth","isUiValid","focused","_validity","validityTransform","_checkValidity","willValidate","selectionStart","selectionEnd","focusEvt","blurEvt","setSelectionRange","selectionDirection","shouldRenderCharCounter","shouldRenderHelperText","renderOutline","renderLeadingIcon","renderPrefix","renderInput","renderSuffix","renderTrailingIcon","renderLineRipple","renderHelperText","reportValidity","isTrailingIcon","renderAffix","isSuffix","minOrUndef","maxOrUndef","autocapitalizeOrUndef","showValidationMessage","ariaLabelledbyOrUndef","ariaControlsOrUndef","ariaDescribedbyOrUndef","live","inputMode","handleInputChange","onInputFocus","onInputBlur","ariaHiddenOrUndef","renderCharCounter","checkValidity","invalidEvent","cancelable","nativeValidity","setCustomValidity","message","getRootAdapterMethods","getInputAdapterMethods","getLabelAdapterMethods","getLineRippleAdapterMethods","getOutlineAdapterMethods","mutationsList","getAttributesList","floatingLabelFoundation","lineRippleElement","lineRippleFoundation","outlineElement","_newVal","TextField","resizePath","svg","movePath","voltageLevelPath","bayPath","voltageLevelIcon","voltageLevelGraphic","bayIcon","bayGraphic","equipmentPaths","IFL","DIS","CBR","CTR","VTR","defaultEquipmentPath","equipmentPath","equipmentType","equipmentGraphic","equipmentSymbol","connectivityNodeMarker","groundedMarker","symbols","eqType","privType","sldNs","svgNs","xmlBoolean","isBusBar","rotVal","labelX","labelY","parseFloat","getAttributeNS","pos","dim","bus","flip","rot","removeNode","edits","section","sections","busSection","vertex","lastVertex","lastElementChild","reference","ownerDocument","terminal","healSectionCut","cut","isCut","cutSections","getElementsByTagNameNS","flatMap","busA","busB","sectionA","sectionB","firstElementChild","reverseSection","sectionBChildren","cutA","neighbourA","childElementCount","neighbourB","v0","v1","v2","x0","y0","x1","y1","x2","y2","collinear","updateConnectivityNodes","updates","cNodes","getElementsByTagName","substationName","voltageLevelName","cNode","cNodeName","bayName","pathName","connectivityNode","oldSubstationName","oldVoltageLevelName","oldBayName","oldCNodeName","oldConnectivityNode","updateTerminals","reparentElement","newName","oldName","baseName","charAt","hasName","uniqueName","removeTerminal","otherTerminals","every","newParent","priv","connectionStartPoints","equipment","far","newPlaceEvent","newConnectEvent","newRotateEvent","newStartResizeEvent","newStartPlaceEvent","newStartConnectEvent","newEditWizardEvent","w1","h1","w2","h2","containsRect","w0","h0","cleanPath","nx","ny","px","py","isBay","parentTags","singleTerminal","SLDEditor","editCount","gridSize","nsp","mouseX","mouseY","mouseX2","mouseY2","menu","_e","svgCoordinates","clientY","DOMPoint","matrixTransform","sld","getScreenCTM","inverse","coord","canPlaceAt","overlappingSibling","substation","overlaps","overlapsRect","canResizeTo","oldW","oldH","cx","cy","cw","ch","renderedLabelPosition","placing","parentX","parentY","placingLabel","renderedPosition","nearestOpenTerminal","topTerminal","bottomTerminal","oneSided","mX2","mY2","groundTerminal","bay","grounded","rest","pedigree","args","pathString","elementPath","createElementNS","namespaceURI","sName","vlName","bName","flipElement","equipmentMenuItems","icons","connect","ground","texts","busBarMenuItems","busBar","containerMenuItems","bayOrVL","renderMenu","ref","async","innerHeight","innerWidth","footerGraphic","nothing","renderMenuFooter","placingTarget","placingElement","renderContainer","renderEquipment","preview","renderBusBar","placingIndicator","invalid","indicator","resizingIndicator","resizing","newW","newH","connectionPreview","connecting","oldX2","oldY2","vertical","x3","y3","x4","y4","targetEq","eq","toTerminal","connectTo","resizeSubstationUI","vl","renderConnectivityNode","_w","parseInt","_h","textField","substationWidthUI","substationHeightUI","ui","fontSize","cursor","isVL","moveHandle","resizeHandle","resizingTarget","voltagelevel","getModifierState","deg","symbol","terminals","topConnector","topIndicator","topGrounded","bottomConnector","bottomIndicator","bottomGrounded","circles","intersections","obj","ret","count","lines","vertices","handleAuxClick","handleContextMenu","vX","vY","vW","vH","maxX","maxY","oldX1","_y","newX2","newY2","isInteger","uuid","halfBytes","cutSectionAt","nsPrefix","vertexAtXY","ve","newSection","cloneNode","setAttributeNS","removeAttributeNS","prepend","nextElementSibling","Designer","templateElements","reset","zoomIn","zoomOut","startResizing","startPlacing","startPlacingLabel","startConnecting","sldNsPrefix","lookupPrefix","BusBar","makeBusBar","rotateElement","placeLabel","lx","ly","placeElement","oldX","oldY","lX","lY","dx","dy","descendant","descX","descY","descLX","descLY","hasAttributeNS","connectEquipment","fromTermUUID","toTermUUID","sectionPath","fromTermElement","fromTermName","toTermElement","toTermName","subs","concat","insertSubstation"],"mappings":"AAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAG,GAC1E,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,KACzFP,EAAcC,EAAGC,EAC5B,EAEO,SAASS,EAAUV,EAAGC,GACzB,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,iCAE7D,SAASY,IAAOC,KAAKC,YAAcf,CAAG,CADtCD,EAAcC,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOc,OAAOf,IAAMY,EAAGN,UAAYN,EAAEM,UAAW,IAAIM,EACnF,CAEO,IAAII,EAAW,WAQlB,OAPAA,EAAWf,OAAOgB,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIf,KADTc,EAAIG,UAAUF,GACOnB,OAAOK,UAAUC,eAAeC,KAAKW,EAAGd,KAAIa,EAAEb,GAAKc,EAAEd,IAE9E,OAAOa,GAEJF,EAASQ,MAAMX,KAAMS,UAChC,EAcO,SAASG,EA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,GAC3C,OAAO,IAAIC,YAAe,YAAa,CACrCC,UAAU,EACVC,SAAS,EACTC,OAAQJ,GAEZ,CC1DA,MAAMK,GAA+B,CACnC,qBACA,uBAGIC,GAAa,CACjB,mBACA,sBACGD,IAECE,GAAsB,CAAC,aAAc,eAAgB,OACrDC,GAA6B,CAAC,UAAW,QACzCC,GAAyB,CAAC,gBAAiB,cAY3CC,GAAkB,CAAC,sBAVI,CAC3B,cACA,WACA,aACA,kBACGJ,MACAC,MACAC,MACAC,KAoCCE,GAAS,CAAC,MAAO,MAmCjBC,GAAkB,CACtB,OACA,QACA,oBACA,QANuC,aAAc,eAqBjDC,GAAU,IAFK,CAAC,SApFN,CAAC,aADK,gBAAiB,iBACYH,OAOjC,CAChB,cACA,WACA,MACA,KACA,MACA,MACA,MACA,SACA,aACA,SACA,WACA,iBACA,gBACA,MACA,UACA,UACA,cACA,MACA,kBArBe,CAFY,sBAAuB,aACpB,aAAc,iBAEvB,MAAO,MAJE,MAAO,MA0CpB,YAAa,SAAU,SAAU,YATlD,OACA,UACA,QACA,gBAmDA,SACA,QACA,MACA,UACA,WApDa,UAAW,aACG,UAAW,UAsDtC,cACA,OACA,WACA,UACA,SACA,cACGC,GAvDH,eACA,eACA,WACA,SACA,SACA,eACA,0BACA,sBACA,kBACA,kBACA,mBACA,YACA,wBACA,cACA,SACA,aA0CA,iBACA,mBACGC,GA/B2B,iBAAkB,aAGhD,iBACA,cACA,cACA,cA4BA,UACA,iBACA,kBACA,gBACA,UACA,aACA,MACA,UACA,IACA,SACA,UACA,WACA,UACA,iBACA,oBACA,UACA,YACA,UACA,SACA,gBACA,UACA,iBAKIE,GAAoB,CAAC,OAAQ,WAC7BC,GAAkB,IAAID,IACtBE,GAAoB,IAAIF,IACxBG,GAAoB,IAAIH,IAExBI,GAAiC,IAAIF,GAAmB,OACxDG,GAA0B,IAAIJ,GAAiB,SAC/CK,GAA+B,IAAID,IACnCE,GAAqB,IAAID,IACzBE,GAA8B,IAC/BF,GACH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,EAAQ,cACvC,IAAI9P,EAAQ,EACZ,KAAOjN,KAAKihB,IAAI/O,cAAc,6BAA6BjF,QACzDA,GAAS,EACX0qB,EAAKxvB,aAAa,OAAQ,IAAI8E,KAC9B0qB,EAAKs/B,eAAepQ,GAAO,GAAG7mD,KAAK0tD,QAAS,MAC5C/1B,EAAKs/B,eAAepQ,GAAO,GAAG7mD,KAAK0tD,QAAS,MAC5C1tD,KAAKwjC,cAAc3wB,GAAa,CAAEkK,SAAQ4a,OAAMwwB,cACjD,EAEMkP,GAAMhxD,OAAGrD,CAAG;;;;;;;;;;;;;;IAtiBnBpC,EAAA,CADCitB,MACiBwpC,GAAA53D,UAAA,WAAA,GAGlBmB,EAAA,CADCitB,MACcwpC,GAAA53D,UAAA,iBAAA,GAGfmB,EAAA,CADC4E,MACa6xD,GAAA53D,UAAA,gBAAA,GAGdmB,EAAA,CADC4E,MACY6xD,GAAA53D,UAAA,WAAA,GAGbmB,EAAA,CADC4E,MAC8C6xD,GAAA53D,UAAA,wBAAA,GAG/CmB,EAAA,CADC4E,MACkB6xD,GAAA53D,UAAA,gBAAA,GAGnBmB,EAAA,CADC4E,MACiB6xD,GAAA53D,UAAA,eAAA,GAGlBmB,EAAA,CADC4E,MACsB6xD,GAAA53D,UAAA,oBAAA,GAGvBmB,EAAA,CADC4E,MAKC6xD,GAAA53D,UAAA,kBAAA"} \ No newline at end of file +{"version":3,"file":"oscd-designer.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/event-options.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/query-async.js","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js","../node_modules/@openscd/open-scd-core/dist/foundation/edit-event.js","../node_modules/@openscd/oscd-scl/dist/utils/tags.js","../node_modules/@openscd/oscd-scl/dist/utils/identity.js","../node_modules/@material/mwc-icon/mwc-icon-host.css.js","../node_modules/@material/mwc-icon/mwc-icon.js","../node_modules/@material/dom/ponyfill.js","../node_modules/@material/mwc-base/utils.js","../node_modules/@material/mwc-base/base-element.js","../node_modules/@material/base/foundation.js","../node_modules/@material/ripple/constants.js","../node_modules/@material/ripple/foundation.js","../node_modules/@material/ripple/util.js","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/class-map.js","../node_modules/lit-html/directives/style-map.js","../node_modules/@material/mwc-ripple/mwc-ripple-base.js","../node_modules/@material/mwc-ripple/mwc-ripple.css.js","../node_modules/@material/mwc-ripple/mwc-ripple.js","../node_modules/@material/mwc-base/aria-property.js","../node_modules/@material/mwc-ripple/ripple-handlers.js","../node_modules/lit-html/directives/if-defined.js","../node_modules/@material/mwc-button/mwc-button-base.js","../node_modules/@material/mwc-button/styles.css.js","../node_modules/@material/mwc-button/mwc-button.js","../node_modules/@material/mwc-fab/mwc-fab-base.js","../node_modules/@material/mwc-fab/mwc-fab.css.js","../node_modules/@material/mwc-fab/mwc-fab.js","../node_modules/@material/mwc-icon-button/mwc-icon-button-base.js","../node_modules/@material/mwc-icon-button/mwc-icon-button.css.js","../node_modules/@material/mwc-icon-button/mwc-icon-button.js","../node_modules/lit-html/directive-helpers.js","../node_modules/lit-html/async-directive.js","../node_modules/lit-html/directives/ref.js","../node_modules/blocking-elements/dist/blocking-elements.js","../node_modules/wicg-inert/dist/inert.esm.js","../node_modules/@material/dialog/constants.js","../node_modules/@material/dialog/foundation.js","../node_modules/@material/animation/animationframe.js","../node_modules/@material/dom/events.js","../node_modules/@material/mwc-base/observer.js","../node_modules/@material/mwc-dialog/mwc-dialog-base.js","../node_modules/@material/mwc-dialog/mwc-dialog.css.js","../node_modules/@material/mwc-dialog/mwc-dialog.js","../node_modules/@material/mwc-list/mwc-list-item-base.js","../node_modules/@material/mwc-list/mwc-list-item.css.js","../node_modules/@material/mwc-list/mwc-list-item.js","../node_modules/@material/dom/keyboard.js","../node_modules/@material/list/constants.js","../node_modules/@material/mwc-list/mwc-list-foundation.js","../node_modules/@material/mwc-list/mwc-list-base.js","../node_modules/@material/mwc-list/mwc-list.css.js","../node_modules/@material/mwc-list/mwc-list.js","../node_modules/@material/notched-outline/constants.js","../node_modules/@material/notched-outline/foundation.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline-base.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline.css.js","../node_modules/@material/mwc-notched-outline/mwc-notched-outline.js","../node_modules/@material/mwc-base/form-element.js","../node_modules/@material/floating-label/constants.js","../node_modules/@material/floating-label/foundation.js","../node_modules/@material/mwc-floating-label/mwc-floating-label-directive.js","../node_modules/@material/line-ripple/constants.js","../node_modules/@material/line-ripple/foundation.js","../node_modules/@material/mwc-line-ripple/mwc-line-ripple-directive.js","../node_modules/@material/textfield/constants.js","../node_modules/@material/textfield/foundation.js","../node_modules/lit-html/directives/live.js","../node_modules/@material/mwc-textfield/mwc-textfield-base.js","../node_modules/@material/mwc-textfield/mwc-textfield.css.js","../node_modules/@material/mwc-textfield/mwc-textfield.js","../../util.ts","../../icons.ts","../../sld-editor.ts","../../oscd-designer.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement(\"style\"),o=t.litNonce;void 0!==o&&n.setAttribute(\"nonce\",o),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window,r=e.trustedTypes,h=r?r.emptyScript:\"\",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n,reflect:!1,hasChanged:a},d=\"finalized\";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:\"open\"},null==o||o({ReactiveElement:u}),(null!==(s=e.reactiveElementVersions)&&void 0!==s?s:e.reactiveElementVersions=[]).push(\"1.6.3\");export{u as ReactiveElement,n as defaultConverter,a as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,u=()=>r.createComment(\"\"),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?\"\":\"\",u=f;for(let i=0;i\"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w)}return[P(t,r+(t[s]||\"\")+(2===i?\"\":\"\")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{j as _$LH,x as html,T as noChange,A as nothing,D as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.3.3\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=e=>n=>\"function\"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return{kind:t,elements:s,finisher(n){customElements.define(e,n)}}})(e,n);export{e as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}},e=(i,e,n)=>{e.constructor.createProperty(n,i)};function n(n){return(t,o)=>void 0!==o?e(n,t,o):i(n,t)}export{n as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:\"method\",placement:\"prototype\",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:\"method\",placement:\"prototype\",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};\n//# sourceMappingURL=base.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({finisher:(r,t)=>{Object.assign(r.prototype[t],e)}})}export{e as eventOptions};\n//# sourceMappingURL=event-options.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n=\"symbol\"==typeof o?Symbol():\"__\"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};\n//# sourceMappingURL=query.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction e(e){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}export{e as queryAsync};\n//# sourceMappingURL=query-async.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import{decorateProperty as e}from\"./base.js\";import{queryAssignedElements as t}from\"./query-assigned-elements.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o,n,r){let l,s=o;return\"object\"==typeof o?(s=o.slot,l=o):l={flatten:n},r?t({slot:s,flatten:n,selector:r}):e({descriptor:e=>({get(){var e,t;const o=\"slot\"+(s?`[name=${s}]`:\":not([name])\"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes};\n//# sourceMappingURL=query-assigned-nodes.js.map\n","export function isComplex(edit) {\n return edit instanceof Array;\n}\nexport function isInsert(edit) {\n return edit.parent !== undefined;\n}\nexport function isNamespaced(value) {\n return value !== null && typeof value !== 'string';\n}\nexport function isUpdate(edit) {\n return edit.element !== undefined;\n}\nexport function isRemove(edit) {\n return (edit.parent === undefined && edit.node !== undefined);\n}\nexport function newEditEvent(edit) {\n return new CustomEvent('oscd-edit', {\n composed: true,\n bubbles: true,\n detail: edit,\n });\n}\n/** EDIT HANDLING */\nfunction localAttributeName(attribute) {\n return attribute.includes(':') ? attribute.split(':', 2)[1] : attribute;\n}\nfunction handleInsert({ parent, node, reference, }) {\n try {\n const { parentNode, nextSibling } = node;\n parent.insertBefore(node, reference);\n if (parentNode)\n return {\n node,\n parent: parentNode,\n reference: nextSibling,\n };\n return { node };\n }\n catch (e) {\n // do nothing if insert doesn't work on these nodes\n return [];\n }\n}\nfunction handleUpdate({ element, attributes }) {\n const oldAttributes = { ...attributes };\n Object.entries(attributes)\n .reverse()\n .forEach(([name, value]) => {\n var _a;\n let oldAttribute;\n if (isNamespaced(value))\n oldAttribute = {\n value: element.getAttributeNS(value.namespaceURI, localAttributeName(name)),\n namespaceURI: value.namespaceURI,\n };\n else\n oldAttribute = ((_a = element.getAttributeNode(name)) === null || _a === void 0 ? void 0 : _a.namespaceURI)\n ? {\n value: element.getAttribute(name),\n namespaceURI: element.getAttributeNode(name).namespaceURI,\n }\n : element.getAttribute(name);\n oldAttributes[name] = oldAttribute;\n });\n for (const entry of Object.entries(attributes)) {\n try {\n const [attribute, value] = entry;\n if (isNamespaced(value)) {\n if (value.value === null)\n element.removeAttributeNS(value.namespaceURI, localAttributeName(attribute));\n else\n element.setAttributeNS(value.namespaceURI, attribute, value.value);\n }\n else if (value === null)\n element.removeAttribute(attribute);\n else\n element.setAttribute(attribute, value);\n }\n catch (e) {\n // do nothing if update doesn't work on this attribute\n delete oldAttributes[entry[0]];\n }\n }\n return {\n element,\n attributes: oldAttributes,\n };\n}\nfunction handleRemove({ node }) {\n var _a;\n const { parentNode: parent, nextSibling: reference } = node;\n (_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);\n if (parent)\n return {\n node,\n parent,\n reference,\n };\n return [];\n}\nexport function handleEdit(edit) {\n if (isInsert(edit))\n return handleInsert(edit);\n if (isUpdate(edit))\n return handleUpdate(edit);\n if (isRemove(edit))\n return handleRemove(edit);\n if (isComplex(edit))\n return edit.map(handleEdit).reverse();\n return [];\n}\n//# sourceMappingURL=edit-event.js.map","const tAbstractConductingEquipment = [\n 'TransformerWinding',\n 'ConductingEquipment',\n];\nconst tEquipment = [\n 'GeneralEquipment',\n 'PowerTransformer',\n ...tAbstractConductingEquipment,\n];\nconst tEquipmentContainer = ['Substation', 'VoltageLevel', 'Bay'];\nconst tGeneralEquipmentContainer = ['Process', 'Line'];\nconst tAbstractEqFuncSubFunc = ['EqSubFunction', 'EqFunction'];\nconst tPowerSystemResource = [\n 'SubFunction',\n 'Function',\n 'TapChanger',\n 'SubEquipment',\n ...tEquipment,\n ...tEquipmentContainer,\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n];\nconst tLNodeContainer = ['ConnectivityNode', ...tPowerSystemResource];\nconst tCertificate = ['GOOSESecurity', 'SMVSecurity'];\nconst tNaming = ['SubNetwork', ...tCertificate, ...tLNodeContainer];\nconst tAbstractDataAttribute = ['BDA', 'DA'];\nconst tControlWithIEDName = ['SampledValueControl', 'GSEControl'];\nconst tControlWithTriggerOpt = ['LogControl', 'ReportControl'];\nconst tControl = [...tControlWithIEDName, ...tControlWithTriggerOpt];\nconst tControlBlock = ['GSE', 'SMV'];\nconst tUnNaming = [\n 'ConnectedAP',\n 'PhysConn',\n 'SDO',\n 'DO',\n 'DAI',\n 'SDI',\n 'DOI',\n 'Inputs',\n 'RptEnabled',\n 'Server',\n 'ServerAt',\n 'SettingControl',\n 'Communication',\n 'Log',\n 'LDevice',\n 'DataSet',\n 'AccessPoint',\n 'IED',\n 'NeutralPoint',\n ...tControl,\n ...tControlBlock,\n ...tAbstractDataAttribute,\n];\nconst tAnyLN = ['LN0', 'LN'];\nconst tAnyContentFromOtherNamespace = [\n 'Text',\n 'Private',\n 'Hitem',\n 'AccessControl',\n];\nconst tCert = ['Subject', 'IssuerName'];\nconst tDurationInMilliSec = ['MinTime', 'MaxTime'];\nconst tIDNaming = ['LNodeType', 'DOType', 'DAType', 'EnumType'];\nconst tServiceYesNo = [\n 'FileHandling',\n 'TimeSyncProt',\n 'CommProt',\n 'SGEdit',\n 'ConfSG',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'GetCBValues',\n 'GSEDir',\n 'ConfLdName',\n];\nconst tServiceWithMaxAndMaxAttributes = ['DynDataSet', 'ConfDataSet'];\nconst tServiceWithMax = [\n 'GSSE',\n 'GOOSE',\n 'ConfReportControl',\n 'SMVsc',\n ...tServiceWithMaxAndMaxAttributes,\n];\nconst tServiceWithMaxNonZero = ['ConfLogControl', 'ConfSigRef'];\nconst tServiceSettings = [\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n];\nconst tBaseElement = ['SCL', ...tNaming, ...tUnNaming, ...tIDNaming];\nconst sCLTags = [\n ...tBaseElement,\n ...tAnyContentFromOtherNamespace,\n 'Header',\n 'LNode',\n 'Val',\n 'Voltage',\n 'Services',\n ...tCert,\n ...tDurationInMilliSec,\n 'Association',\n 'FCDA',\n 'ClientLN',\n 'IEDName',\n 'ExtRef',\n 'Protocol',\n ...tAnyLN,\n ...tServiceYesNo,\n 'DynAssociation',\n 'SettingGroups',\n ...tServiceWithMax,\n ...tServiceWithMaxNonZero,\n ...tServiceSettings,\n 'ConfLNs',\n 'ClientServices',\n 'SupSubscription',\n 'ValueHandling',\n 'RedProt',\n 'McSecurity',\n 'KDC',\n 'Address',\n 'P',\n 'ProtNs',\n 'EnumVal',\n 'Terminal',\n 'BitRate',\n 'Authentication',\n 'DataTypeTemplates',\n 'History',\n 'OptFields',\n 'SmvOpts',\n 'TrgOps',\n 'SamplesPerSec',\n 'SmpRate',\n 'SecPerSamples',\n];\nconst tBaseNameSequence = ['Text', 'Private'];\nconst tNamingSequence = [...tBaseNameSequence];\nconst tUnNamingSequence = [...tBaseNameSequence];\nconst tIDNamingSequence = [...tBaseNameSequence];\nconst tAbstractDataAttributeSequence = [...tUnNamingSequence, 'Val'];\nconst tLNodeContainerSequence = [...tNamingSequence, 'LNode'];\nconst tPowerSystemResourceSequence = [...tLNodeContainerSequence];\nconst tEquipmentSequence = [...tPowerSystemResourceSequence];\nconst tEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'PowerTransformer',\n 'GeneralEquipment',\n];\nconst tAbstractConductingEquipmentSequence = [\n ...tEquipmentSequence,\n 'Terminal',\n];\nconst tControlBlockSequence = [...tUnNamingSequence, 'Address'];\nconst tControlSequence = [...tNamingSequence];\nconst tControlWithIEDNameSequence = [...tControlSequence, 'IEDName'];\nconst tAnyLNSequence = [\n ...tUnNamingSequence,\n 'DataSet',\n 'ReportControl',\n 'LogControl',\n 'DOI',\n 'Inputs',\n 'Log',\n];\nconst tGeneralEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'Function',\n];\nconst tControlWithTriggerOptSequence = [...tControlSequence, 'TrgOps'];\nconst tAbstractEqFuncSubFuncSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'EqSubFunction',\n];\nconst tags = {\n AccessControl: {\n parents: ['LDevice'],\n children: [],\n },\n AccessPoint: {\n parents: ['IED'],\n children: [\n ...tNamingSequence,\n 'Server',\n 'LN',\n 'ServerAt',\n 'Services',\n 'GOOSESecurity',\n 'SMVSecurity',\n ],\n },\n Address: {\n parents: ['ConnectedAP', 'GSE', 'SMV'],\n children: ['P'],\n },\n Association: {\n parents: ['Server'],\n children: [],\n },\n Authentication: {\n parents: ['Server'],\n children: [],\n },\n BDA: {\n parents: ['DAType'],\n children: [...tAbstractDataAttributeSequence],\n },\n BitRate: {\n parents: ['SubNetwork'],\n children: [],\n },\n Bay: {\n parents: ['VoltageLevel'],\n children: [\n ...tEquipmentContainerSequence,\n 'ConductingEquipment',\n 'ConnectivityNode',\n 'Function',\n ],\n },\n ClientLN: {\n parents: ['RptEnabled'],\n children: [],\n },\n ClientServices: {\n parents: ['Services'],\n children: ['TimeSyncProt', 'McSecurity'],\n },\n CommProt: {\n parents: ['Services'],\n children: [],\n },\n Communication: {\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'SubNetwork'],\n },\n ConductingEquipment: {\n parents: ['Process', 'Line', 'SubFunction', 'Function', 'Bay'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n ConfDataSet: {\n parents: ['Services'],\n children: [],\n },\n ConfLdName: {\n parents: ['Services'],\n children: [],\n },\n ConfLNs: {\n parents: ['Services'],\n children: [],\n },\n ConfLogControl: {\n parents: ['Services'],\n children: [],\n },\n ConfReportControl: {\n parents: ['Services'],\n children: [],\n },\n ConfSG: {\n parents: ['SettingGroups'],\n children: [],\n },\n ConfSigRef: {\n parents: ['Services'],\n children: [],\n },\n ConnectedAP: {\n parents: ['SubNetwork'],\n children: [...tUnNamingSequence, 'Address', 'GSE', 'SMV', 'PhysConn'],\n },\n ConnectivityNode: {\n parents: ['Bay', 'Line'],\n children: [...tLNodeContainerSequence],\n },\n DA: {\n parents: ['DOType'],\n children: [...tAbstractDataAttributeSequence],\n },\n DAI: {\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'Val'],\n },\n DAType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'BDA', 'ProtNs'],\n },\n DO: {\n parents: ['LNodeType'],\n children: [...tUnNamingSequence],\n },\n DOI: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n DOType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'SDO', 'DA'],\n },\n DataObjectDirectory: {\n parents: ['Services'],\n children: [],\n },\n DataSet: {\n parents: [...tAnyLN],\n children: [...tNamingSequence, 'FCDA'],\n },\n DataSetDirectory: {\n parents: ['Services'],\n children: [],\n },\n DataTypeTemplates: {\n parents: ['SCL'],\n children: ['LNodeType', 'DOType', 'DAType', 'EnumType'],\n },\n DynAssociation: {\n parents: ['Services'],\n children: [],\n },\n DynDataSet: {\n parents: ['Services'],\n children: [],\n },\n EnumType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'EnumVal'],\n },\n EnumVal: {\n parents: ['EnumType'],\n children: [],\n },\n EqFunction: {\n parents: [\n 'GeneralEquipment',\n 'TapChanger',\n 'TransformerWinding',\n 'PowerTransformer',\n 'SubEquipment',\n 'ConductingEquipment',\n ],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n EqSubFunction: {\n parents: ['EqSubFunction', 'EqFunction'],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n ExtRef: {\n parents: ['Inputs'],\n children: [],\n },\n FCDA: {\n parents: ['DataSet'],\n children: [],\n },\n FileHandling: {\n parents: ['Services'],\n children: [],\n },\n Function: {\n parents: ['Bay', 'VoltageLevel', 'Substation', 'Process', 'Line'],\n children: [\n ...tPowerSystemResourceSequence,\n 'SubFunction',\n 'GeneralEquipment',\n 'ConductingEquipment',\n ],\n },\n GeneralEquipment: {\n parents: [\n 'SubFunction',\n 'Function',\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n ...tEquipmentContainer,\n ],\n children: [...tEquipmentSequence, 'EqFunction'],\n },\n GetCBValues: {\n parents: ['Services'],\n children: [],\n },\n GetDataObjectDefinition: {\n parents: ['Services'],\n children: [],\n },\n GetDataSetValue: {\n parents: ['Services'],\n children: [],\n },\n GetDirectory: {\n parents: ['Services'],\n children: [],\n },\n GOOSE: {\n parents: ['Services'],\n children: [],\n },\n GOOSESecurity: {\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n GSE: {\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence, 'MinTime', 'MaxTime'],\n },\n GSEDir: {\n parents: ['Services'],\n children: [],\n },\n GSEControl: {\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'Protocol'],\n },\n GSESettings: {\n parents: ['Services'],\n children: [],\n },\n GSSE: {\n parents: ['Services'],\n children: [],\n },\n Header: {\n parents: ['SCL'],\n children: ['Text', 'History'],\n },\n History: {\n parents: ['Header'],\n children: ['Hitem'],\n },\n Hitem: {\n parents: ['History'],\n children: [],\n },\n IED: {\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'Services', 'AccessPoint', 'KDC'],\n },\n IEDName: {\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n Inputs: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'ExtRef'],\n },\n IssuerName: {\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n KDC: {\n parents: ['IED'],\n children: [],\n },\n LDevice: {\n parents: ['Server'],\n children: [...tUnNamingSequence, 'LN0', 'LN', 'AccessControl'],\n },\n LN: {\n parents: ['AccessPoint', 'LDevice'],\n children: [...tAnyLNSequence],\n },\n LN0: {\n parents: ['LDevice'],\n children: [\n ...tAnyLNSequence,\n 'GSEControl',\n 'SampledValueControl',\n 'SettingControl',\n ],\n },\n LNode: {\n parents: [...tLNodeContainer],\n children: [...tUnNamingSequence],\n },\n LNodeType: {\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'DO'],\n },\n Line: {\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'Voltage',\n 'ConductingEquipment',\n ],\n },\n Log: {\n parents: [...tAnyLN],\n children: [...tUnNamingSequence],\n },\n LogControl: {\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence],\n },\n LogSettings: {\n parents: ['Services'],\n children: [],\n },\n MaxTime: {\n parents: ['GSE'],\n children: [],\n },\n McSecurity: {\n parents: ['GSESettings', 'SMVSettings', 'ClientServices'],\n children: [],\n },\n MinTime: {\n parents: ['GSE'],\n children: [],\n },\n NeutralPoint: {\n parents: ['TransformerWinding'],\n children: [...tUnNamingSequence],\n },\n OptFields: {\n parents: ['ReportControl'],\n children: [],\n },\n P: {\n parents: ['Address', 'PhysConn'],\n children: [],\n },\n PhysConn: {\n parents: ['ConnectedAP'],\n children: [...tUnNamingSequence, 'P'],\n },\n PowerTransformer: {\n parents: [...tEquipmentContainer],\n children: [\n ...tEquipmentSequence,\n 'TransformerWinding',\n 'SubEquipment',\n 'EqFunction',\n ],\n },\n Private: {\n parents: [],\n children: [],\n },\n Process: {\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'ConductingEquipment',\n 'Substation',\n 'Line',\n 'Process',\n ],\n },\n ProtNs: {\n parents: ['DAType', 'DA'],\n children: [],\n },\n Protocol: {\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n ReadWrite: {\n parents: ['Services'],\n children: [],\n },\n RedProt: {\n parents: ['Services'],\n children: [],\n },\n ReportControl: {\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence, 'OptFields', 'RptEnabled'],\n },\n ReportSettings: {\n parents: ['Services'],\n children: [],\n },\n RptEnabled: {\n parents: ['ReportControl'],\n children: [...tUnNamingSequence, 'ClientLN'],\n },\n SamplesPerSec: {\n parents: ['SMVSettings'],\n children: [],\n },\n SampledValueControl: {\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'SmvOpts'],\n },\n SecPerSamples: {\n parents: ['SMVSettings'],\n children: [],\n },\n SCL: {\n parents: [],\n children: [\n ...tBaseNameSequence,\n 'Header',\n 'Substation',\n 'Communication',\n 'IED',\n 'DataTypeTemplates',\n 'Line',\n 'Process',\n ],\n },\n SDI: {\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n SDO: {\n parents: ['DOType'],\n children: [...tNamingSequence],\n },\n Server: {\n parents: ['AccessPoint'],\n children: [\n ...tUnNamingSequence,\n 'Authentication',\n 'LDevice',\n 'Association',\n ],\n },\n ServerAt: {\n parents: ['AccessPoint'],\n children: [...tUnNamingSequence],\n },\n Services: {\n parents: ['IED', 'AccessPoint'],\n children: [\n 'DynAssociation',\n 'SettingGroups',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ConfDataSet',\n 'DynDataSet',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'ConfReportControl',\n 'GetCBValues',\n 'ConfLogControl',\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n 'GSEDir',\n 'GOOSE',\n 'GSSE',\n 'SMVsc',\n 'FileHandling',\n 'ConfLNs',\n 'ClientServices',\n 'ConfLdName',\n 'SupSubscription',\n 'ConfSigRef',\n 'ValueHandling',\n 'RedProt',\n 'TimeSyncProt',\n 'CommProt',\n ],\n },\n SetDataSetValue: {\n parents: ['Services'],\n children: [],\n },\n SettingControl: {\n parents: ['LN0'],\n children: [...tUnNamingSequence],\n },\n SettingGroups: {\n parents: ['Services'],\n children: ['SGEdit', 'ConfSG'],\n },\n SGEdit: {\n parents: ['SettingGroups'],\n children: [],\n },\n SmpRate: {\n parents: ['SMVSettings'],\n children: [],\n },\n SMV: {\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence],\n },\n SmvOpts: {\n parents: ['SampledValueControl'],\n children: [],\n },\n SMVsc: {\n parents: ['Services'],\n children: [],\n },\n SMVSecurity: {\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n SMVSettings: {\n parents: ['Services'],\n children: ['SmpRate', 'SamplesPerSec', 'SecPerSamples', 'McSecurity'],\n },\n SubEquipment: {\n parents: [\n 'TapChanger',\n 'PowerTransformer',\n 'ConductingEquipment',\n 'TransformerWinding',\n ...tAbstractConductingEquipment,\n ],\n children: [...tPowerSystemResourceSequence, 'EqFunction'],\n },\n SubFunction: {\n parents: ['SubFunction', 'Function'],\n children: [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'ConductingEquipment',\n 'SubFunction',\n ],\n },\n SubNetwork: {\n parents: ['Communication'],\n children: [...tNamingSequence, 'BitRate', 'ConnectedAP'],\n },\n Subject: {\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n Substation: {\n parents: ['SCL'],\n children: [...tEquipmentContainerSequence, 'VoltageLevel', 'Function'],\n },\n SupSubscription: {\n parents: ['Services'],\n children: [],\n },\n TapChanger: {\n parents: ['TransformerWinding'],\n children: [...tPowerSystemResourceSequence, 'SubEquipment', 'EqFunction'],\n },\n Terminal: {\n parents: [...tEquipment],\n children: [...tUnNamingSequence],\n },\n Text: {\n parents: sCLTags.filter(tag => tag !== 'Text' && tag !== 'Private'),\n children: [],\n },\n TimerActivatedControl: {\n parents: ['Services'],\n children: [],\n },\n TimeSyncProt: {\n parents: ['Services', 'ClientServices'],\n children: [],\n },\n TransformerWinding: {\n parents: ['PowerTransformer'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'TapChanger',\n 'NeutralPoint',\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n TrgOps: {\n parents: ['ReportControl'],\n children: [],\n },\n Val: {\n parents: ['DAI', 'DA', 'BDA'],\n children: [],\n },\n ValueHandling: {\n parents: ['Services'],\n children: [],\n },\n Voltage: {\n parents: ['VoltageLevel'],\n children: [],\n },\n VoltageLevel: {\n parents: ['Substation'],\n children: [...tEquipmentContainerSequence, 'Voltage', 'Bay', 'Function'],\n },\n};\nconst tagSet = new Set(sCLTags);\nexport function isSCLTag(tag) {\n return tagSet.has(tag);\n}\n/** @returns parent `tagName` s for SCL (2007B4) element tag */\n/** export function parentTags(tagName: string): string[] {\n if (!isSCLTag(tagName)) return [];\n\n return tags[tagName].parents;\n} */\n/** @returns child `tagName`s for SCL (2007B4) element tag */\n/** export function childTags(tagName: string): string[] {\n if (!isSCLTag(tagName)) return [];\n\n return tags[tagName].children;\n} */\n/** @returns Reference for new [[`tag`]] child within [[`parent`]] or `null` */\nexport function getReference(parent, tag) {\n if (!isSCLTag(tag))\n return null;\n const parentTag = parent.tagName;\n const children = Array.from(parent.children);\n if (parentTag === 'Services' ||\n parentTag === 'SettingGroups' ||\n !isSCLTag(parentTag))\n return children.find(child => child.tagName === tag) ?? null;\n const sequence = tags[parentTag].children;\n let index = sequence.findIndex(element => element === tag);\n if (index < 0)\n return null;\n let nextSibling;\n while (index < sequence.length && !nextSibling) {\n // eslint-disable-next-line no-loop-func\n nextSibling = children.find(child => child.tagName === sequence[index]);\n index += 1;\n }\n return nextSibling ?? null;\n}\n//# sourceMappingURL=tags.js.map","/* eslint-disable no-use-before-define */\nimport { isSCLTag } from './tags.js';\nfunction hitemIdentity(e) {\n return `${e.getAttribute('version')}\\t${e.getAttribute('revision')}`;\n}\nfunction terminalIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('connectivityNode')}`;\n}\nfunction lNodeIdentity(e) {\n const [iedName, ldInst, prefix, lnClass, lnInst, lnType] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n if (iedName === 'None')\n return `${identity(e.parentElement)}>(${lnClass} ${lnType})`;\n return `${iedName} ${ldInst || '(Client)'}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}`;\n}\nfunction kDCIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('iedName')} ${e.getAttribute('apName')}`;\n}\nfunction associationIdentity(e) {\n const [iedName, ldInst, prefix, lnClass, lnInst] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}`;\n}\nfunction lDeviceIdentity(e) {\n return `${identity(e.closest('IED'))}>>${e.getAttribute('inst')}`;\n}\nfunction iEDNameIdentity(e) {\n const iedName = e.textContent;\n const [apRef, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef || ''} ${ldInst || ''}/${prefix ?? ''} ${lnClass ?? ''} ${lnInst ?? ''}`;\n}\nfunction fCDAIdentity(e) {\n const [ldInst, prefix, lnClass, lnInst, doName, daName, fc, ix] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'fc',\n 'ix',\n ].map(name => e.getAttribute(name));\n const dataPath = `${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''}.${doName} ${daName || ''}`;\n return `${identity(e.parentElement)}>${dataPath} (${fc}${ix ? ` [${ix}]` : ''})`;\n}\nfunction extRefIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const parentIdentity = identity(e.parentElement);\n const iedName = e.getAttribute('iedName');\n const intAddr = e.getAttribute('intAddr');\n const intAddrIndex = Array.from(e.parentElement.querySelectorAll(`ExtRef[intAddr=\"${intAddr}\"]`)).indexOf(e);\n if (!iedName)\n return `${parentIdentity}>${intAddr}[${intAddrIndex}]`;\n const [ldInst, prefix, lnClass, lnInst, doName, daName, serviceType, srcLDInst, srcPrefix, srcLNClass, srcLNInst, srcCBName,] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'serviceType',\n 'srcLDInst',\n 'srcPrefix',\n 'srcLNClass',\n 'srcLNInst',\n 'srcCBName',\n ].map(name => e.getAttribute(name));\n const cbPath = srcCBName\n ? `${serviceType}:${srcCBName} ${srcLDInst ?? ''}/${srcPrefix ?? ''} ${srcLNClass ?? ''} ${srcLNInst ?? ''}`\n : '';\n const dataPath = `${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst ?? ''} ${doName} ${daName || ''}`;\n return `${parentIdentity}>${cbPath ? `${cbPath} ` : ''}${dataPath}${\n // eslint-disable-next-line no-useless-concat\n intAddr ? '@' + `${intAddr}` : ''}`;\n}\nfunction lNIdentity(e) {\n const [prefix, lnClass, inst] = ['prefix', 'lnClass', 'inst'].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${prefix ?? ''} ${lnClass} ${inst}`;\n}\nfunction clientLNIdentity(e) {\n const [apRef, iedName, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef || ''} ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst}`;\n}\nfunction ixNamingIdentity(e) {\n const [name, ix] = ['name', 'ix'].map(naming => e.getAttribute(naming));\n return `${identity(e.parentElement)}>${name}${ix ? `[${ix}]` : ''}`;\n}\nfunction valIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const sGroup = e.getAttribute('sGroup');\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('sGroup') === sGroup)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${sGroup ? `${sGroup}.` : ''} ${index}`;\n}\nfunction connectedAPIdentity(e) {\n const [iedName, apName] = ['iedName', 'apName'].map(name => e.getAttribute(name));\n return `${iedName} ${apName}`;\n}\nfunction controlBlockIdentity(e) {\n const [ldInst, cbName] = ['ldInst', 'cbName'].map(name => e.getAttribute(name));\n return `${ldInst} ${cbName}`;\n}\nfunction physConnIdentity(e) {\n if (!e.parentElement)\n return NaN;\n if (!e.parentElement.querySelector('PhysConn[type=\"RedConn\"]'))\n return NaN;\n const pcType = e.getAttribute('type');\n if (e.parentElement.children.length > 1 &&\n pcType !== 'Connection' &&\n pcType !== 'RedConn')\n return NaN;\n return `${identity(e.parentElement)}>${pcType}`;\n}\nfunction pIdentity(e) {\n if (!e.parentElement)\n return NaN;\n const eParent = e.parentElement;\n const eType = e.getAttribute('type');\n if (eParent.tagName === 'PhysConn')\n return `${identity(e.parentElement)}>${eType}`;\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('type') === eType)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${eType} [${index}]`;\n}\nfunction enumValIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('ord')}`;\n}\nfunction protNsIdentity(e) {\n return `${identity(e.parentElement)}>${e.getAttribute('type') || '8-MMS'}\\t${e.textContent}`;\n}\nfunction sCLIdentity() {\n return '';\n}\nfunction namingIdentity(e) {\n return e.parentElement.tagName === 'SCL'\n ? e.getAttribute('name')\n : `${identity(e.parentElement)}>${e.getAttribute('name')}`;\n}\nfunction singletonIdentity(e) {\n return identity(e.parentElement).toString();\n}\nfunction idNamingIdentity(e) {\n return `#${e.id}`;\n}\nconst tags = {\n AccessControl: {\n identity: singletonIdentity,\n },\n AccessPoint: {\n identity: namingIdentity,\n },\n Address: {\n identity: singletonIdentity,\n },\n Association: {\n identity: associationIdentity,\n },\n Authentication: {\n identity: singletonIdentity,\n },\n BDA: {\n identity: namingIdentity,\n },\n BitRate: {\n identity: singletonIdentity,\n },\n Bay: {\n identity: namingIdentity,\n },\n ClientLN: {\n identity: clientLNIdentity,\n },\n ClientServices: {\n identity: singletonIdentity,\n },\n CommProt: {\n identity: singletonIdentity,\n },\n Communication: {\n identity: singletonIdentity,\n },\n ConductingEquipment: {\n identity: namingIdentity,\n },\n ConfDataSet: {\n identity: singletonIdentity,\n },\n ConfLdName: {\n identity: singletonIdentity,\n },\n ConfLNs: {\n identity: singletonIdentity,\n },\n ConfLogControl: {\n identity: singletonIdentity,\n },\n ConfReportControl: {\n identity: singletonIdentity,\n },\n ConfSG: {\n identity: singletonIdentity,\n },\n ConfSigRef: {\n identity: singletonIdentity,\n },\n ConnectedAP: {\n identity: connectedAPIdentity,\n },\n ConnectivityNode: {\n identity: namingIdentity,\n },\n DA: {\n identity: namingIdentity,\n },\n DAI: {\n identity: ixNamingIdentity,\n },\n DAType: {\n identity: idNamingIdentity,\n },\n DO: {\n identity: namingIdentity,\n },\n DOI: {\n identity: namingIdentity,\n },\n DOType: {\n identity: idNamingIdentity,\n },\n DataObjectDirectory: {\n identity: singletonIdentity,\n },\n DataSet: {\n identity: namingIdentity,\n },\n DataSetDirectory: {\n identity: singletonIdentity,\n },\n DataTypeTemplates: {\n identity: singletonIdentity,\n },\n DynAssociation: {\n identity: singletonIdentity,\n },\n DynDataSet: {\n identity: singletonIdentity,\n },\n EnumType: {\n identity: idNamingIdentity,\n },\n EnumVal: {\n identity: enumValIdentity,\n },\n EqFunction: {\n identity: namingIdentity,\n },\n EqSubFunction: {\n identity: namingIdentity,\n },\n ExtRef: {\n identity: extRefIdentity,\n },\n FCDA: {\n identity: fCDAIdentity,\n },\n FileHandling: {\n identity: singletonIdentity,\n },\n Function: {\n identity: namingIdentity,\n },\n GeneralEquipment: {\n identity: namingIdentity,\n },\n GetCBValues: {\n identity: singletonIdentity,\n },\n GetDataObjectDefinition: {\n identity: singletonIdentity,\n },\n GetDataSetValue: {\n identity: singletonIdentity,\n },\n GetDirectory: {\n identity: singletonIdentity,\n },\n GOOSE: {\n identity: singletonIdentity,\n },\n GOOSESecurity: {\n identity: namingIdentity,\n },\n GSE: {\n identity: controlBlockIdentity,\n },\n GSEDir: {\n identity: singletonIdentity,\n },\n GSEControl: {\n identity: namingIdentity,\n },\n GSESettings: {\n identity: singletonIdentity,\n },\n GSSE: {\n identity: singletonIdentity,\n },\n Header: {\n identity: singletonIdentity,\n },\n History: {\n identity: singletonIdentity,\n },\n Hitem: {\n identity: hitemIdentity,\n },\n IED: {\n identity: namingIdentity,\n },\n IEDName: {\n identity: iEDNameIdentity,\n },\n Inputs: {\n identity: singletonIdentity,\n },\n IssuerName: {\n identity: singletonIdentity,\n },\n KDC: {\n identity: kDCIdentity,\n },\n LDevice: {\n identity: lDeviceIdentity,\n },\n LN: {\n identity: lNIdentity,\n },\n LN0: {\n identity: singletonIdentity,\n },\n LNode: {\n identity: lNodeIdentity,\n },\n LNodeType: {\n identity: idNamingIdentity,\n },\n Line: {\n identity: namingIdentity,\n },\n Log: {\n identity: namingIdentity,\n },\n LogControl: {\n identity: namingIdentity,\n },\n LogSettings: {\n identity: singletonIdentity,\n },\n MaxTime: {\n identity: singletonIdentity,\n },\n McSecurity: {\n identity: singletonIdentity,\n },\n MinTime: {\n identity: singletonIdentity,\n },\n NeutralPoint: {\n identity: terminalIdentity,\n },\n OptFields: {\n identity: singletonIdentity,\n },\n P: {\n identity: pIdentity,\n },\n PhysConn: {\n identity: physConnIdentity,\n },\n PowerTransformer: {\n identity: namingIdentity,\n },\n Private: {\n identity: () => NaN,\n },\n Process: {\n identity: namingIdentity,\n },\n ProtNs: {\n identity: protNsIdentity,\n },\n Protocol: {\n identity: singletonIdentity,\n },\n ReadWrite: {\n identity: singletonIdentity,\n },\n RedProt: {\n identity: singletonIdentity,\n },\n ReportControl: {\n identity: namingIdentity,\n },\n ReportSettings: {\n identity: singletonIdentity,\n },\n RptEnabled: {\n identity: singletonIdentity,\n },\n SamplesPerSec: {\n identity: singletonIdentity,\n },\n SampledValueControl: {\n identity: namingIdentity,\n },\n SecPerSamples: {\n identity: singletonIdentity,\n },\n SCL: {\n identity: sCLIdentity,\n },\n SDI: {\n identity: ixNamingIdentity,\n },\n SDO: {\n identity: namingIdentity,\n },\n Server: {\n identity: singletonIdentity,\n },\n ServerAt: {\n identity: singletonIdentity,\n },\n Services: {\n identity: singletonIdentity,\n },\n SetDataSetValue: {\n identity: singletonIdentity,\n },\n SettingControl: {\n identity: singletonIdentity,\n },\n SettingGroups: {\n identity: singletonIdentity,\n },\n SGEdit: {\n identity: singletonIdentity,\n },\n SmpRate: {\n identity: singletonIdentity,\n },\n SMV: {\n identity: controlBlockIdentity,\n },\n SmvOpts: {\n identity: singletonIdentity,\n },\n SMVsc: {\n identity: singletonIdentity,\n },\n SMVSecurity: {\n identity: namingIdentity,\n },\n SMVSettings: {\n identity: singletonIdentity,\n },\n SubEquipment: {\n identity: namingIdentity,\n },\n SubFunction: {\n identity: namingIdentity,\n },\n SubNetwork: {\n identity: namingIdentity,\n },\n Subject: {\n identity: singletonIdentity,\n },\n Substation: {\n identity: namingIdentity,\n },\n SupSubscription: {\n identity: singletonIdentity,\n },\n TapChanger: {\n identity: namingIdentity,\n },\n Terminal: {\n identity: terminalIdentity,\n },\n Text: {\n identity: singletonIdentity,\n },\n TimerActivatedControl: {\n identity: singletonIdentity,\n },\n TimeSyncProt: {\n identity: singletonIdentity,\n },\n TransformerWinding: {\n identity: namingIdentity,\n },\n TrgOps: {\n identity: singletonIdentity,\n },\n Val: {\n identity: valIdentity,\n },\n ValueHandling: {\n identity: singletonIdentity,\n },\n Voltage: {\n identity: singletonIdentity,\n },\n VoltageLevel: {\n identity: namingIdentity,\n },\n};\n/** @returns Identity string for a valid SCL element or NaN */\nexport function identity(e) {\n if (e === null)\n return NaN;\n if (e.closest('Private'))\n return NaN;\n const tag = e.tagName;\n if (isSCLTag(tag))\n return tags[tag].identity(e);\n return NaN;\n}\n//# sourceMappingURL=identity.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}`;\n//# sourceMappingURL=mwc-icon-host.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './mwc-icon-host.css.js';\n/** @soyCompatible */\nlet Icon = class Icon extends LitElement {\n /** @soyTemplate */\n render() {\n return html ``;\n }\n};\nIcon.styles = [styles];\nIcon = __decorate([\n customElement('mwc-icon')\n], Icon);\nexport { Icon };\n//# sourceMappingURL=mwc-icon.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * @fileoverview A \"ponyfill\" is a polyfill that doesn't modify the global prototype chain.\n * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.\n */\nexport function closest(element, selector) {\n if (element.closest) {\n return element.closest(selector);\n }\n var el = element;\n while (el) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentElement;\n }\n return null;\n}\nexport function matches(element, selector) {\n var nativeMatches = element.matches\n || element.webkitMatchesSelector\n || element.msMatchesSelector;\n return nativeMatches.call(element, selector);\n}\n/**\n * Used to compute the estimated scroll width of elements. When an element is\n * hidden due to display: none; being applied to a parent element, the width is\n * returned as 0. However, the element will have a true width once no longer\n * inside a display: none context. This method computes an estimated width when\n * the element is hidden or returns the true width when the element is visble.\n * @param {Element} element the element whose width to estimate\n */\nexport function estimateScrollWidth(element) {\n // Check the offsetParent. If the element inherits display: none from any\n // parent, the offsetParent property will be null (see\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).\n // This check ensures we only clone the node when necessary.\n var htmlEl = element;\n if (htmlEl.offsetParent !== null) {\n return htmlEl.scrollWidth;\n }\n var clone = htmlEl.cloneNode(true);\n clone.style.setProperty('position', 'absolute');\n clone.style.setProperty('transform', 'translate(-9999px, -9999px)');\n document.documentElement.appendChild(clone);\n var scrollWidth = clone.scrollWidth;\n document.documentElement.removeChild(clone);\n return scrollWidth;\n}\n//# sourceMappingURL=ponyfill.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\n/**\n * Determines whether a node is an element.\n *\n * @param node Node to check\n */\nexport const isNodeElement = (node) => {\n return node.nodeType === Node.ELEMENT_NODE;\n};\nexport function addHasRemoveClass(element) {\n return {\n addClass: (className) => {\n element.classList.add(className);\n },\n removeClass: (className) => {\n element.classList.remove(className);\n },\n hasClass: (className) => element.classList.contains(className),\n };\n}\nlet supportsPassive = false;\nconst fn = () => { };\nconst optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n};\ndocument.addEventListener('x', fn, optionsBlock);\ndocument.removeEventListener('x', fn);\n/**\n * Do event listeners suport the `passive` option?\n */\nexport const supportsPassiveEventListener = supportsPassive;\nexport const deepActiveElementPath = (doc = window.document) => {\n let activeElement = doc.activeElement;\n const path = [];\n if (!activeElement) {\n return path;\n }\n while (activeElement) {\n path.push(activeElement);\n if (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n else {\n break;\n }\n }\n return path;\n};\nexport const doesElementContainFocus = (element) => {\n const activePath = deepActiveElementPath();\n if (!activePath.length) {\n return false;\n }\n const deepActiveElement = activePath[activePath.length - 1];\n const focusEv = new Event('check-if-focused', { bubbles: true, composed: true });\n let composedPath = [];\n const listener = (ev) => {\n composedPath = ev.composedPath();\n };\n document.body.addEventListener('check-if-focused', listener);\n deepActiveElement.dispatchEvent(focusEv);\n document.body.removeEventListener('check-if-focused', listener);\n return composedPath.indexOf(element) !== -1;\n};\n//# sourceMappingURL=utils.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { LitElement } from 'lit';\nexport { addHasRemoveClass } from './utils.js';\n/** @soyCompatible */\nexport class BaseElement extends LitElement {\n click() {\n if (this.mdcRoot) {\n this.mdcRoot.focus();\n this.mdcRoot.click();\n return;\n }\n super.click();\n }\n /**\n * Create and attach the MDC Foundation to the instance\n */\n createFoundation() {\n if (this.mdcFoundation !== undefined) {\n this.mdcFoundation.destroy();\n }\n if (this.mdcFoundationClass) {\n this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());\n this.mdcFoundation.init();\n }\n }\n firstUpdated() {\n this.createFoundation();\n }\n}\n//# sourceMappingURL=base-element.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar MDCFoundation = /** @class */ (function () {\n function MDCFoundation(adapter) {\n if (adapter === void 0) { adapter = {}; }\n this.adapter = adapter;\n }\n Object.defineProperty(MDCFoundation, \"cssClasses\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports every\n // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"strings\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"numbers\", {\n get: function () {\n // Classes extending MDCFoundation should implement this method to return an object which exports all\n // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}\n return {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFoundation, \"defaultAdapter\", {\n get: function () {\n // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient\n // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter\n // validation.\n return {};\n },\n enumerable: false,\n configurable: true\n });\n MDCFoundation.prototype.init = function () {\n // Subclasses should override this method to perform initialization routines (registering events, etc.)\n };\n MDCFoundation.prototype.destroy = function () {\n // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)\n };\n return MDCFoundation;\n}());\nexport { MDCFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n // Ripple is a special case where the \"root\" component is really a \"mixin\" of sorts,\n // given that it's an 'upgrade' to an existing component. That being said it is the root\n // CSS class that all other CSS classes derive from.\n BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',\n FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',\n ROOT: 'mdc-ripple-upgraded',\n UNBOUNDED: 'mdc-ripple-upgraded--unbounded',\n};\nexport var strings = {\n VAR_FG_SCALE: '--mdc-ripple-fg-scale',\n VAR_FG_SIZE: '--mdc-ripple-fg-size',\n VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',\n VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',\n VAR_LEFT: '--mdc-ripple-left',\n VAR_TOP: '--mdc-ripple-top',\n};\nexport var numbers = {\n DEACTIVATION_TIMEOUT_MS: 225,\n FG_DEACTIVATION_MS: 150,\n INITIAL_ORIGIN_SCALE: 0.6,\n PADDING: 10,\n TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nimport { getNormalizedEventCoords } from './util';\n// Activation events registered on the root element of each instance for activation\nvar ACTIVATION_EVENT_TYPES = [\n 'touchstart', 'pointerdown', 'mousedown', 'keydown',\n];\n// Deactivation events registered on documentElement when a pointer-related down event occurs\nvar POINTER_DEACTIVATION_EVENT_TYPES = [\n 'touchend', 'pointerup', 'mouseup', 'contextmenu',\n];\n// simultaneous nested activations\nvar activatedTargets = [];\nvar MDCRippleFoundation = /** @class */ (function (_super) {\n __extends(MDCRippleFoundation, _super);\n function MDCRippleFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this;\n _this.activationAnimationHasEnded = false;\n _this.activationTimer = 0;\n _this.fgDeactivationRemovalTimer = 0;\n _this.fgScale = '0';\n _this.frame = { width: 0, height: 0 };\n _this.initialSize = 0;\n _this.layoutFrame = 0;\n _this.maxRadius = 0;\n _this.unboundedCoords = { left: 0, top: 0 };\n _this.activationState = _this.defaultActivationState();\n _this.activationTimerCallback = function () {\n _this.activationAnimationHasEnded = true;\n _this.runDeactivationUXLogicIfReady();\n };\n _this.activateHandler = function (e) {\n _this.activateImpl(e);\n };\n _this.deactivateHandler = function () {\n _this.deactivateImpl();\n };\n _this.focusHandler = function () {\n _this.handleFocus();\n };\n _this.blurHandler = function () {\n _this.handleBlur();\n };\n _this.resizeHandler = function () {\n _this.layout();\n };\n return _this;\n }\n Object.defineProperty(MDCRippleFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCRippleFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n browserSupportsCssVars: function () { return true; },\n computeBoundingRect: function () {\n return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });\n },\n containsEventTarget: function () { return true; },\n deregisterDocumentInteractionHandler: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n deregisterResizeHandler: function () { return undefined; },\n getWindowPageOffset: function () { return ({ x: 0, y: 0 }); },\n isSurfaceActive: function () { return true; },\n isSurfaceDisabled: function () { return true; },\n isUnbounded: function () { return true; },\n registerDocumentInteractionHandler: function () { return undefined; },\n registerInteractionHandler: function () { return undefined; },\n registerResizeHandler: function () { return undefined; },\n removeClass: function () { return undefined; },\n updateCssVariable: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCRippleFoundation.prototype.init = function () {\n var _this = this;\n var supportsPressRipple = this.supportsPressRipple();\n this.registerRootHandlers(supportsPressRipple);\n if (supportsPressRipple) {\n var _a = MDCRippleFoundation.cssClasses, ROOT_1 = _a.ROOT, UNBOUNDED_1 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter.addClass(ROOT_1);\n if (_this.adapter.isUnbounded()) {\n _this.adapter.addClass(UNBOUNDED_1);\n // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple\n _this.layoutInternal();\n }\n });\n }\n };\n MDCRippleFoundation.prototype.destroy = function () {\n var _this = this;\n if (this.supportsPressRipple()) {\n if (this.activationTimer) {\n clearTimeout(this.activationTimer);\n this.activationTimer = 0;\n this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);\n }\n if (this.fgDeactivationRemovalTimer) {\n clearTimeout(this.fgDeactivationRemovalTimer);\n this.fgDeactivationRemovalTimer = 0;\n this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);\n }\n var _a = MDCRippleFoundation.cssClasses, ROOT_2 = _a.ROOT, UNBOUNDED_2 = _a.UNBOUNDED;\n requestAnimationFrame(function () {\n _this.adapter.removeClass(ROOT_2);\n _this.adapter.removeClass(UNBOUNDED_2);\n _this.removeCssVars();\n });\n }\n this.deregisterRootHandlers();\n this.deregisterDeactivationHandlers();\n };\n /**\n * @param evt Optional event containing position information.\n */\n MDCRippleFoundation.prototype.activate = function (evt) {\n this.activateImpl(evt);\n };\n MDCRippleFoundation.prototype.deactivate = function () {\n this.deactivateImpl();\n };\n MDCRippleFoundation.prototype.layout = function () {\n var _this = this;\n if (this.layoutFrame) {\n cancelAnimationFrame(this.layoutFrame);\n }\n this.layoutFrame = requestAnimationFrame(function () {\n _this.layoutInternal();\n _this.layoutFrame = 0;\n });\n };\n MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {\n var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;\n if (unbounded) {\n this.adapter.addClass(UNBOUNDED);\n }\n else {\n this.adapter.removeClass(UNBOUNDED);\n }\n };\n MDCRippleFoundation.prototype.handleFocus = function () {\n var _this = this;\n requestAnimationFrame(function () { return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });\n };\n MDCRippleFoundation.prototype.handleBlur = function () {\n var _this = this;\n requestAnimationFrame(function () { return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });\n };\n /**\n * We compute this property so that we are not querying information about the client\n * until the point in time where the foundation requests it. This prevents scenarios where\n * client-side feature-detection may happen too early, such as when components are rendered on the server\n * and then initialized at mount time on the client.\n */\n MDCRippleFoundation.prototype.supportsPressRipple = function () {\n return this.adapter.browserSupportsCssVars();\n };\n MDCRippleFoundation.prototype.defaultActivationState = function () {\n return {\n activationEvent: undefined,\n hasDeactivationUXRun: false,\n isActivated: false,\n isProgrammatic: false,\n wasActivatedByPointer: false,\n wasElementMadeActive: false,\n };\n };\n /**\n * supportsPressRipple Passed from init to save a redundant function call\n */\n MDCRippleFoundation.prototype.registerRootHandlers = function (supportsPressRipple) {\n var e_1, _a;\n if (supportsPressRipple) {\n try {\n for (var ACTIVATION_EVENT_TYPES_1 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next(); !ACTIVATION_EVENT_TYPES_1_1.done; ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next()) {\n var evtType = ACTIVATION_EVENT_TYPES_1_1.value;\n this.adapter.registerInteractionHandler(evtType, this.activateHandler);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (ACTIVATION_EVENT_TYPES_1_1 && !ACTIVATION_EVENT_TYPES_1_1.done && (_a = ACTIVATION_EVENT_TYPES_1.return)) _a.call(ACTIVATION_EVENT_TYPES_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.adapter.isUnbounded()) {\n this.adapter.registerResizeHandler(this.resizeHandler);\n }\n }\n this.adapter.registerInteractionHandler('focus', this.focusHandler);\n this.adapter.registerInteractionHandler('blur', this.blurHandler);\n };\n MDCRippleFoundation.prototype.registerDeactivationHandlers = function (evt) {\n var e_2, _a;\n if (evt.type === 'keydown') {\n this.adapter.registerInteractionHandler('keyup', this.deactivateHandler);\n }\n else {\n try {\n for (var POINTER_DEACTIVATION_EVENT_TYPES_1 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next(); !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done; POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next()) {\n var evtType = POINTER_DEACTIVATION_EVENT_TYPES_1_1.value;\n this.adapter.registerDocumentInteractionHandler(evtType, this.deactivateHandler);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (POINTER_DEACTIVATION_EVENT_TYPES_1_1 && !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_1.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n };\n MDCRippleFoundation.prototype.deregisterRootHandlers = function () {\n var e_3, _a;\n try {\n for (var ACTIVATION_EVENT_TYPES_2 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next(); !ACTIVATION_EVENT_TYPES_2_1.done; ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next()) {\n var evtType = ACTIVATION_EVENT_TYPES_2_1.value;\n this.adapter.deregisterInteractionHandler(evtType, this.activateHandler);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (ACTIVATION_EVENT_TYPES_2_1 && !ACTIVATION_EVENT_TYPES_2_1.done && (_a = ACTIVATION_EVENT_TYPES_2.return)) _a.call(ACTIVATION_EVENT_TYPES_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n this.adapter.deregisterInteractionHandler('focus', this.focusHandler);\n this.adapter.deregisterInteractionHandler('blur', this.blurHandler);\n if (this.adapter.isUnbounded()) {\n this.adapter.deregisterResizeHandler(this.resizeHandler);\n }\n };\n MDCRippleFoundation.prototype.deregisterDeactivationHandlers = function () {\n var e_4, _a;\n this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler);\n try {\n for (var POINTER_DEACTIVATION_EVENT_TYPES_2 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next(); !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done; POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next()) {\n var evtType = POINTER_DEACTIVATION_EVENT_TYPES_2_1.value;\n this.adapter.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (POINTER_DEACTIVATION_EVENT_TYPES_2_1 && !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_2.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n };\n MDCRippleFoundation.prototype.removeCssVars = function () {\n var _this = this;\n var rippleStrings = MDCRippleFoundation.strings;\n var keys = Object.keys(rippleStrings);\n keys.forEach(function (key) {\n if (key.indexOf('VAR_') === 0) {\n _this.adapter.updateCssVariable(rippleStrings[key], null);\n }\n });\n };\n MDCRippleFoundation.prototype.activateImpl = function (evt) {\n var _this = this;\n if (this.adapter.isSurfaceDisabled()) {\n return;\n }\n var activationState = this.activationState;\n if (activationState.isActivated) {\n return;\n }\n // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction\n var previousActivationEvent = this.previousActivationEvent;\n var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;\n if (isSameInteraction) {\n return;\n }\n activationState.isActivated = true;\n activationState.isProgrammatic = evt === undefined;\n activationState.activationEvent = evt;\n activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');\n var hasActivatedChild = evt !== undefined &&\n activatedTargets.length > 0 &&\n activatedTargets.some(function (target) { return _this.adapter.containsEventTarget(target); });\n if (hasActivatedChild) {\n // Immediately reset activation state, while preserving logic that prevents touch follow-on events\n this.resetActivationState();\n return;\n }\n if (evt !== undefined) {\n activatedTargets.push(evt.target);\n this.registerDeactivationHandlers(evt);\n }\n activationState.wasElementMadeActive = this.checkElementMadeActive(evt);\n if (activationState.wasElementMadeActive) {\n this.animateActivation();\n }\n requestAnimationFrame(function () {\n // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples\n activatedTargets = [];\n if (!activationState.wasElementMadeActive\n && evt !== undefined\n && (evt.key === ' ' || evt.keyCode === 32)) {\n // If space was pressed, try again within an rAF call to detect :active, because different UAs report\n // active states inconsistently when they're called within event handling code:\n // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741\n // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS\n // variable is set within a rAF callback for a submit button interaction (#2241).\n activationState.wasElementMadeActive = _this.checkElementMadeActive(evt);\n if (activationState.wasElementMadeActive) {\n _this.animateActivation();\n }\n }\n if (!activationState.wasElementMadeActive) {\n // Reset activation state immediately if element was not made active.\n _this.activationState = _this.defaultActivationState();\n }\n });\n };\n MDCRippleFoundation.prototype.checkElementMadeActive = function (evt) {\n return (evt !== undefined && evt.type === 'keydown') ?\n this.adapter.isSurfaceActive() :\n true;\n };\n MDCRippleFoundation.prototype.animateActivation = function () {\n var _this = this;\n var _a = MDCRippleFoundation.strings, VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;\n var _b = MDCRippleFoundation.cssClasses, FG_DEACTIVATION = _b.FG_DEACTIVATION, FG_ACTIVATION = _b.FG_ACTIVATION;\n var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;\n this.layoutInternal();\n var translateStart = '';\n var translateEnd = '';\n if (!this.adapter.isUnbounded()) {\n var _c = this.getFgTranslationCoordinates(), startPoint = _c.startPoint, endPoint = _c.endPoint;\n translateStart = startPoint.x + \"px, \" + startPoint.y + \"px\";\n translateEnd = endPoint.x + \"px, \" + endPoint.y + \"px\";\n }\n this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);\n this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);\n // Cancel any ongoing activation/deactivation animations\n clearTimeout(this.activationTimer);\n clearTimeout(this.fgDeactivationRemovalTimer);\n this.rmBoundedActivationClasses();\n this.adapter.removeClass(FG_DEACTIVATION);\n // Force layout in order to re-trigger the animation.\n this.adapter.computeBoundingRect();\n this.adapter.addClass(FG_ACTIVATION);\n this.activationTimer = setTimeout(function () {\n _this.activationTimerCallback();\n }, DEACTIVATION_TIMEOUT_MS);\n };\n MDCRippleFoundation.prototype.getFgTranslationCoordinates = function () {\n var _a = this.activationState, activationEvent = _a.activationEvent, wasActivatedByPointer = _a.wasActivatedByPointer;\n var startPoint;\n if (wasActivatedByPointer) {\n startPoint = getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect());\n }\n else {\n startPoint = {\n x: this.frame.width / 2,\n y: this.frame.height / 2,\n };\n }\n // Center the element around the start point.\n startPoint = {\n x: startPoint.x - (this.initialSize / 2),\n y: startPoint.y - (this.initialSize / 2),\n };\n var endPoint = {\n x: (this.frame.width / 2) - (this.initialSize / 2),\n y: (this.frame.height / 2) - (this.initialSize / 2),\n };\n return { startPoint: startPoint, endPoint: endPoint };\n };\n MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady = function () {\n var _this = this;\n // This method is called both when a pointing device is released, and when the activation animation ends.\n // The deactivation animation should only run after both of those occur.\n var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;\n var _a = this.activationState, hasDeactivationUXRun = _a.hasDeactivationUXRun, isActivated = _a.isActivated;\n var activationHasEnded = hasDeactivationUXRun || !isActivated;\n if (activationHasEnded && this.activationAnimationHasEnded) {\n this.rmBoundedActivationClasses();\n this.adapter.addClass(FG_DEACTIVATION);\n this.fgDeactivationRemovalTimer = setTimeout(function () {\n _this.adapter.removeClass(FG_DEACTIVATION);\n }, numbers.FG_DEACTIVATION_MS);\n }\n };\n MDCRippleFoundation.prototype.rmBoundedActivationClasses = function () {\n var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;\n this.adapter.removeClass(FG_ACTIVATION);\n this.activationAnimationHasEnded = false;\n this.adapter.computeBoundingRect();\n };\n MDCRippleFoundation.prototype.resetActivationState = function () {\n var _this = this;\n this.previousActivationEvent = this.activationState.activationEvent;\n this.activationState = this.defaultActivationState();\n // Touch devices may fire additional events for the same interaction within a short time.\n // Store the previous event until it's safe to assume that subsequent events are for new interactions.\n setTimeout(function () { return _this.previousActivationEvent = undefined; }, MDCRippleFoundation.numbers.TAP_DELAY_MS);\n };\n MDCRippleFoundation.prototype.deactivateImpl = function () {\n var _this = this;\n var activationState = this.activationState;\n // This can happen in scenarios such as when you have a keyup event that blurs the element.\n if (!activationState.isActivated) {\n return;\n }\n var state = __assign({}, activationState);\n if (activationState.isProgrammatic) {\n requestAnimationFrame(function () {\n _this.animateDeactivation(state);\n });\n this.resetActivationState();\n }\n else {\n this.deregisterDeactivationHandlers();\n requestAnimationFrame(function () {\n _this.activationState.hasDeactivationUXRun = true;\n _this.animateDeactivation(state);\n _this.resetActivationState();\n });\n }\n };\n MDCRippleFoundation.prototype.animateDeactivation = function (_a) {\n var wasActivatedByPointer = _a.wasActivatedByPointer, wasElementMadeActive = _a.wasElementMadeActive;\n if (wasActivatedByPointer || wasElementMadeActive) {\n this.runDeactivationUXLogicIfReady();\n }\n };\n MDCRippleFoundation.prototype.layoutInternal = function () {\n var _this = this;\n this.frame = this.adapter.computeBoundingRect();\n var maxDim = Math.max(this.frame.height, this.frame.width);\n // Surface diameter is treated differently for unbounded vs. bounded ripples.\n // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately\n // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically\n // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter\n // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via\n // `overflow: hidden`.\n var getBoundedRadius = function () {\n var hypotenuse = Math.sqrt(Math.pow(_this.frame.width, 2) + Math.pow(_this.frame.height, 2));\n return hypotenuse + MDCRippleFoundation.numbers.PADDING;\n };\n this.maxRadius = this.adapter.isUnbounded() ? maxDim : getBoundedRadius();\n // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform\n var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);\n // Unbounded ripple size should always be even number to equally center align.\n if (this.adapter.isUnbounded() && initialSize % 2 !== 0) {\n this.initialSize = initialSize - 1;\n }\n else {\n this.initialSize = initialSize;\n }\n this.fgScale = \"\" + this.maxRadius / this.initialSize;\n this.updateLayoutCssVars();\n };\n MDCRippleFoundation.prototype.updateLayoutCssVars = function () {\n var _a = MDCRippleFoundation.strings, VAR_FG_SIZE = _a.VAR_FG_SIZE, VAR_LEFT = _a.VAR_LEFT, VAR_TOP = _a.VAR_TOP, VAR_FG_SCALE = _a.VAR_FG_SCALE;\n this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize + \"px\");\n this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale);\n if (this.adapter.isUnbounded()) {\n this.unboundedCoords = {\n left: Math.round((this.frame.width / 2) - (this.initialSize / 2)),\n top: Math.round((this.frame.height / 2) - (this.initialSize / 2)),\n };\n this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords.left + \"px\");\n this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords.top + \"px\");\n }\n };\n return MDCRippleFoundation;\n}(MDCFoundation));\nexport { MDCRippleFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCRippleFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * Stores result from supportsCssVariables to avoid redundant processing to\n * detect CSS custom variable support.\n */\nvar supportsCssVariables_;\nexport function supportsCssVariables(windowObj, forceRefresh) {\n if (forceRefresh === void 0) { forceRefresh = false; }\n var CSS = windowObj.CSS;\n var supportsCssVars = supportsCssVariables_;\n if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {\n return supportsCssVariables_;\n }\n var supportsFunctionPresent = CSS && typeof CSS.supports === 'function';\n if (!supportsFunctionPresent) {\n return false;\n }\n var explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');\n // See: https://bugs.webkit.org/show_bug.cgi?id=154669\n // See: README section on Safari\n var weAreFeatureDetectingSafari10plus = (CSS.supports('(--css-vars: yes)') &&\n CSS.supports('color', '#00000000'));\n supportsCssVars =\n explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus;\n if (!forceRefresh) {\n supportsCssVariables_ = supportsCssVars;\n }\n return supportsCssVars;\n}\nexport function getNormalizedEventCoords(evt, pageOffset, clientRect) {\n if (!evt) {\n return { x: 0, y: 0 };\n }\n var x = pageOffset.x, y = pageOffset.y;\n var documentX = x + clientRect.left;\n var documentY = y + clientRect.top;\n var normalizedX;\n var normalizedY;\n // Determine touch point relative to the ripple container.\n if (evt.type === 'touchstart') {\n var touchEvent = evt;\n normalizedX = touchEvent.changedTouches[0].pageX - documentX;\n normalizedY = touchEvent.changedTouches[0].pageY - documentY;\n }\n else {\n var mouseEvent = evt;\n normalizedX = mouseEvent.pageX - documentX;\n normalizedY = mouseEvent.pageY - documentY;\n }\n return { x: normalizedX, y: normalizedY };\n}\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as i,Directive as s,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((i=>t[i])).join(\" \")+\" \"}update(i,[s]){var r,o;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as e,Directive as r,PartType as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const i=\"important\",n=\" !\"+i,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||\"style\"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes(\"-\")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,\"-$&\").toLowerCase()}:${s};`}),\"\")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ht){this.ht=new Set;for(const t in r)this.ht.add(t);return this.render(r)}this.ht.forEach((t=>{null==r[t]&&(this.ht.delete(t),t.includes(\"-\")?s.removeProperty(t):s[t]=\"\")}));for(const t in r){const e=r[t];if(null!=e){this.ht.add(t);const r=\"string\"==typeof e&&e.endsWith(n);t.includes(\"-\")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:\"\"):s[t]=e}}return t}});export{o as styleMap};\n//# sourceMappingURL=style-map.js.map\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { matches } from '@material/dom/ponyfill.js';\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport MDCRippleFoundation from '@material/ripple/foundation.js';\nimport { html } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n/** @soyCompatible */\nexport class RippleBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.primary = false;\n this.accent = false;\n this.unbounded = false;\n this.disabled = false;\n this.activated = false;\n this.selected = false;\n this.internalUseStateLayerCustomProperties = false;\n this.hovering = false;\n this.bgFocused = false;\n this.fgActivation = false;\n this.fgDeactivation = false;\n this.fgScale = '';\n this.fgSize = '';\n this.translateStart = '';\n this.translateEnd = '';\n this.leftPos = '';\n this.topPos = '';\n this.mdcFoundationClass = MDCRippleFoundation;\n }\n get isActive() {\n return matches(this.parentElement || this, ':active');\n }\n createAdapter() {\n return {\n browserSupportsCssVars: () => true,\n isUnbounded: () => this.unbounded,\n isSurfaceActive: () => this.isActive,\n isSurfaceDisabled: () => this.disabled,\n addClass: (className) => {\n switch (className) {\n case 'mdc-ripple-upgraded--background-focused':\n this.bgFocused = true;\n break;\n case 'mdc-ripple-upgraded--foreground-activation':\n this.fgActivation = true;\n break;\n case 'mdc-ripple-upgraded--foreground-deactivation':\n this.fgDeactivation = true;\n break;\n default:\n break;\n }\n },\n removeClass: (className) => {\n switch (className) {\n case 'mdc-ripple-upgraded--background-focused':\n this.bgFocused = false;\n break;\n case 'mdc-ripple-upgraded--foreground-activation':\n this.fgActivation = false;\n break;\n case 'mdc-ripple-upgraded--foreground-deactivation':\n this.fgDeactivation = false;\n break;\n default:\n break;\n }\n },\n containsEventTarget: () => true,\n registerInteractionHandler: () => undefined,\n deregisterInteractionHandler: () => undefined,\n registerDocumentInteractionHandler: () => undefined,\n deregisterDocumentInteractionHandler: () => undefined,\n registerResizeHandler: () => undefined,\n deregisterResizeHandler: () => undefined,\n updateCssVariable: (varName, value) => {\n switch (varName) {\n case '--mdc-ripple-fg-scale':\n this.fgScale = value;\n break;\n case '--mdc-ripple-fg-size':\n this.fgSize = value;\n break;\n case '--mdc-ripple-fg-translate-end':\n this.translateEnd = value;\n break;\n case '--mdc-ripple-fg-translate-start':\n this.translateStart = value;\n break;\n case '--mdc-ripple-left':\n this.leftPos = value;\n break;\n case '--mdc-ripple-top':\n this.topPos = value;\n break;\n default:\n break;\n }\n },\n computeBoundingRect: () => (this.parentElement || this).getBoundingClientRect(),\n getWindowPageOffset: () => ({ x: window.pageXOffset, y: window.pageYOffset }),\n };\n }\n startPress(ev) {\n this.waitForFoundation(() => {\n this.mdcFoundation.activate(ev);\n });\n }\n endPress() {\n this.waitForFoundation(() => {\n this.mdcFoundation.deactivate();\n });\n }\n startFocus() {\n this.waitForFoundation(() => {\n this.mdcFoundation.handleFocus();\n });\n }\n endFocus() {\n this.waitForFoundation(() => {\n this.mdcFoundation.handleBlur();\n });\n }\n startHover() {\n this.hovering = true;\n }\n endHover() {\n this.hovering = false;\n }\n /**\n * Wait for the MDCFoundation to be created by `firstUpdated`\n */\n waitForFoundation(fn) {\n if (this.mdcFoundation) {\n fn();\n }\n else {\n this.updateComplete.then(fn);\n }\n }\n update(changedProperties) {\n if (changedProperties.has('disabled')) {\n // stop hovering when ripple is disabled to prevent a stuck \"hover\" state\n // When re-enabled, the outer component will get a `mouseenter` event on\n // the first movement, which will call `startHover()`\n if (this.disabled) {\n this.endHover();\n }\n }\n super.update(changedProperties);\n }\n /** @soyTemplate */\n render() {\n const shouldActivateInPrimary = this.activated && (this.primary || !this.accent);\n const shouldSelectInPrimary = this.selected && (this.primary || !this.accent);\n /** @classMap */\n const classes = {\n 'mdc-ripple-surface--accent': this.accent,\n 'mdc-ripple-surface--primary--activated': shouldActivateInPrimary,\n 'mdc-ripple-surface--accent--activated': this.accent && this.activated,\n 'mdc-ripple-surface--primary--selected': shouldSelectInPrimary,\n 'mdc-ripple-surface--accent--selected': this.accent && this.selected,\n 'mdc-ripple-surface--disabled': this.disabled,\n 'mdc-ripple-surface--hover': this.hovering,\n 'mdc-ripple-surface--primary': this.primary,\n 'mdc-ripple-surface--selected': this.selected,\n 'mdc-ripple-upgraded--background-focused': this.bgFocused,\n 'mdc-ripple-upgraded--foreground-activation': this.fgActivation,\n 'mdc-ripple-upgraded--foreground-deactivation': this.fgDeactivation,\n 'mdc-ripple-upgraded--unbounded': this.unbounded,\n 'mdc-ripple-surface--internal-use-state-layer-custom-properties': this.internalUseStateLayerCustomProperties,\n };\n return html `\n
    `;\n }\n}\n__decorate([\n query('.mdc-ripple-surface')\n], RippleBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"primary\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"accent\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"unbounded\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"activated\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], RippleBase.prototype, \"internalUseStateLayerCustomProperties\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"hovering\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"bgFocused\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgActivation\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgDeactivation\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgScale\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"fgSize\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"translateStart\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"translateEnd\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"leftPos\", void 0);\n__decorate([\n state()\n], RippleBase.prototype, \"topPos\", void 0);\n//# sourceMappingURL=mwc-ripple-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`;\n//# sourceMappingURL=mwc-ripple.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { RippleBase } from './mwc-ripple-base.js';\nimport { styles } from './mwc-ripple.css.js';\n/** @soyCompatible */\nlet Ripple = class Ripple extends RippleBase {\n};\nRipple.styles = [styles];\nRipple = __decorate([\n customElement('mwc-ripple')\n], Ripple);\nexport { Ripple };\n//# sourceMappingURL=mwc-ripple.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * TypeScript version of the decorator\n * @see https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators\n */\nfunction tsDecorator(prototype, name, descriptor) {\n const constructor = prototype.constructor;\n if (!descriptor) {\n /**\n * lit uses internal properties with two leading underscores to\n * provide storage for accessors\n */\n const litInternalPropertyKey = `__${name}`;\n descriptor =\n constructor.getPropertyDescriptor(name, litInternalPropertyKey);\n if (!descriptor) {\n throw new Error('@ariaProperty must be used after a @property decorator');\n }\n }\n // descriptor must exist at this point, reassign so typescript understands\n const propDescriptor = descriptor;\n let attribute = '';\n if (!propDescriptor.set) {\n throw new Error(`@ariaProperty requires a setter for ${name}`);\n }\n // TODO(b/202853219): Remove this check when internal tooling is\n // compatible\n // tslint:disable-next-line:no-any bail if applied to internal generated class\n if (prototype.dispatchWizEvent) {\n return descriptor;\n }\n const wrappedDescriptor = {\n configurable: true,\n enumerable: true,\n set(value) {\n if (attribute === '') {\n const options = constructor.getPropertyOptions(name);\n // if attribute is not a string, use `name` instead\n attribute =\n typeof options.attribute === 'string' ? options.attribute : name;\n }\n if (this.hasAttribute(attribute)) {\n this.removeAttribute(attribute);\n }\n propDescriptor.set.call(this, value);\n }\n };\n if (propDescriptor.get) {\n wrappedDescriptor.get = function () {\n return propDescriptor.get.call(this);\n };\n }\n return wrappedDescriptor;\n}\n/**\n * A property decorator proxies an aria attribute to an internal node\n *\n * This decorator is only intended for use with ARIA attributes, such as `role`\n * and `aria-label` due to screenreader needs.\n *\n * Upon first render, `@ariaProperty` will remove the attribute from the host\n * element to prevent screenreaders from reading the host instead of the\n * internal node.\n *\n * This decorator should only be used for non-Symbol public fields decorated\n * with `@property`, or on a setter with an optional getter.\n *\n * @example\n * ```ts\n * class MyElement {\n * @ariaProperty\n * @property({ type: String, attribute: 'aria-label' })\n * ariaLabel!: string;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function ariaProperty(protoOrDescriptor, name, \n// tslint:disable-next-line:no-any any is required as a return type from decorators\ndescriptor) {\n if (name !== undefined) {\n return tsDecorator(protoOrDescriptor, name, descriptor);\n }\n else {\n throw new Error('@ariaProperty only supports TypeScript Decorators');\n }\n}\n//# sourceMappingURL=aria-property.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Class that encapsulates the events handlers for `mwc-ripple`\n *\n *\n * Example:\n * ```\n * class XFoo extends LitElement {\n * async getRipple() {\n * this.renderRipple = true;\n * await this.updateComplete;\n * return this.renderRoot.querySelector('mwc-ripple');\n * }\n * rippleHandlers = new RippleHandlers(() => this.getRipple());\n *\n * render() {\n * return html`\n *
    \n * ${this.renderRipple ? html`` : ''}\n * `;\n * }\n * }\n * ```\n */\nexport class RippleHandlers {\n constructor(\n /** Function that returns a `mwc-ripple` */\n rippleFn) {\n this.startPress = (ev) => {\n rippleFn().then((r) => {\n r && r.startPress(ev);\n });\n };\n this.endPress = () => {\n rippleFn().then((r) => {\n r && r.endPress();\n });\n };\n this.startFocus = () => {\n rippleFn().then((r) => {\n r && r.startFocus();\n });\n };\n this.endFocus = () => {\n rippleFn().then((r) => {\n r && r.endFocus();\n });\n };\n this.startHover = () => {\n rippleFn().then((r) => {\n r && r.startHover();\n });\n };\n this.endHover = () => {\n rippleFn().then((r) => {\n r && r.endHover();\n });\n };\n }\n}\n//# sourceMappingURL=ripple-handlers.js.map","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=l=>null!=l?l:t;export{l as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-icon/mwc-icon.js';\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { ariaProperty } from '@material/mwc-base/aria-property.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, query, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n/** @soyCompatible */\nexport class ButtonBase extends LitElement {\n constructor() {\n super(...arguments);\n this.raised = false;\n this.unelevated = false;\n this.outlined = false;\n this.dense = false;\n this.disabled = false;\n this.trailingIcon = false;\n this.fullwidth = false;\n this.icon = '';\n this.label = '';\n this.expandContent = false;\n this.shouldRenderRipple = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /** @soyTemplate */\n renderOverlay() {\n return html ``;\n }\n /** @soyTemplate */\n renderRipple() {\n const filled = this.raised || this.unelevated;\n return this.shouldRenderRipple ?\n html `` :\n '';\n }\n focus() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.startFocus();\n buttonElement.focus();\n }\n }\n blur() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.endFocus();\n buttonElement.blur();\n }\n }\n /** @soyTemplate */\n getRenderClasses() {\n return {\n 'mdc-button--raised': this.raised,\n 'mdc-button--unelevated': this.unelevated,\n 'mdc-button--outlined': this.outlined,\n 'mdc-button--dense': this.dense,\n };\n }\n /**\n * @soyTemplate\n * @soyAttributes buttonAttributes: #button\n * @soyClasses buttonClasses: #button\n */\n render() {\n return html `\n \n ${this.renderOverlay()}\n ${this.renderRipple()}\n \n \n ${this.icon && !this.trailingIcon ? this.renderIcon() : ''}\n \n \n ${this.label}\n \n \n \n \n \n ${this.icon && this.trailingIcon ? this.renderIcon() : ''}\n \n \n `;\n }\n /** @soyTemplate */\n renderIcon() {\n return html `\n \n ${this.icon}\n `;\n }\n handleRippleActivate(evt) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.rippleHandlers.startPress(evt);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\nButtonBase.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-haspopup' })\n], ButtonBase.prototype, \"ariaHasPopup\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"raised\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"unelevated\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"outlined\", void 0);\n__decorate([\n property({ type: Boolean })\n], ButtonBase.prototype, \"dense\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean, attribute: 'trailingicon' })\n], ButtonBase.prototype, \"trailingIcon\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ButtonBase.prototype, \"fullwidth\", void 0);\n__decorate([\n property({ type: String })\n], ButtonBase.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], ButtonBase.prototype, \"label\", void 0);\n__decorate([\n property({ type: Boolean })\n], ButtonBase.prototype, \"expandContent\", void 0);\n__decorate([\n query('#button')\n], ButtonBase.prototype, \"buttonElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], ButtonBase.prototype, \"ripple\", void 0);\n__decorate([\n state()\n], ButtonBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], ButtonBase.prototype, \"handleRippleActivate\", null);\n//# sourceMappingURL=mwc-button-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:transparent}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{display:none}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px );display:block}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{border-color:CanvasText}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}.mdc-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised,.mdc-button--unelevated{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{background-color:rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--raised .mdc-button__ripple,.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px);padding:0 15px 0 15px;border-width:1px}.mdc-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button--outlined:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined:disabled{border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:1px}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);width:calc(100% + 2 * 1px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--raised:hover,.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12)}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0,0,0,.12)}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent;vertical-align:top}:host([fullwidth]){width:100%}:host([raised]),:host([unelevated]){--mdc-ripple-color:#fff;--mdc-ripple-focus-opacity:0.24;--mdc-ripple-hover-opacity:0.08;--mdc-ripple-press-opacity:0.24}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon,.leading-icon ::slotted(*),.leading-icon .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .leading-icon ::slotted(*),[dir=rtl] .leading-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl],.leading-icon ::slotted(*[dir=rtl]),.leading-icon .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}.slot-container{display:inline-flex;align-items:center;justify-content:center}.slot-container.flex{flex:auto}.mdc-button{flex:auto;overflow:hidden;padding-left:8px;padding-left:var(--mdc-button-horizontal-padding, 8px);padding-right:8px;padding-right:var(--mdc-button-horizontal-padding, 8px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-focus, var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)))}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-active, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-disabled, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised,.mdc-button--unelevated{padding-left:16px;padding-left:var(--mdc-button-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mdc-button-horizontal-padding, 16px)}.mdc-button--outlined{border-width:1px;border-width:var(--mdc-button-outline-width, 1px);padding-left:calc(16px - 1px);padding-left:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px));padding-right:calc(16px - 1px);padding-right:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined .ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-button-outline-width, 1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-button-outline-width, 1px));right:initial;right:initial;border-width:1px;border-width:var(--mdc-button-outline-width, 1px);border-style:solid;border-color:transparent}[dir=rtl] .mdc-button--outlined .ripple,.mdc-button--outlined .ripple[dir=rtl]{left:initial;left:initial;right:calc(-1 * 1px);right:calc(-1 * var(--mdc-button-outline-width, 1px))}.mdc-button--dense{height:28px;margin-top:0;margin-bottom:0}.mdc-button--dense .mdc-button__touch{height:100%}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-button{color:rgba(0, 0, 0, 0.38);color:var(--mdc-button-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-button--raised,:host([disabled]) .mdc-button--unelevated{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-button-disabled-fill-color, rgba(0, 0, 0, 0.12))}:host([disabled]) .mdc-button--outlined{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}`;\n//# sourceMappingURL=styles.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ButtonBase } from './mwc-button-base.js';\nimport { styles } from './styles.css.js';\n/** @soyCompatible */\nlet Button = class Button extends ButtonBase {\n};\nButton.styles = [styles];\nButton = __decorate([\n customElement('mwc-button')\n], Button);\nexport { Button };\n//# sourceMappingURL=mwc-button.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n/**\n * Fab Base class logic and template definition\n * @soyCompatible\n */\nexport class FabBase extends LitElement {\n constructor() {\n super(...arguments);\n this.mini = false;\n this.exited = false;\n this.disabled = false;\n this.extended = false;\n this.showIconAtEnd = false;\n this.reducedTouchTarget = false;\n this.icon = '';\n this.label = '';\n this.shouldRenderRipple = false;\n this.useStateLayerCustomProperties = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /**\n * @soyTemplate\n * @soyClasses fabClasses: .mdc-fab\n */\n render() {\n const hasTouchTarget = this.mini && !this.reducedTouchTarget;\n /** @classMap */\n const classes = {\n 'mdc-fab--mini': this.mini,\n 'mdc-fab--touch': hasTouchTarget,\n 'mdc-fab--exited': this.exited,\n 'mdc-fab--extended': this.extended,\n 'icon-end': this.showIconAtEnd,\n };\n const ariaLabel = this.label ? this.label : this.icon;\n /*\n * Some internal styling is sensitive to whitespace in this template, take\n * care when modifying it.\n */\n return html `${this.renderBeforeRipple()}${this.renderRipple()}${this.showIconAtEnd ? this.renderLabel() : ''}${this.icon}${!this.showIconAtEnd ? this.renderLabel() : ''}${this.renderTouchTarget()}`;\n }\n /** @soyTemplate */\n renderIcon() {\n // TODO(b/191914389): reimplement once Wit issue is resolved\n return html ``;\n }\n /** @soyTemplate */\n renderTouchTarget() {\n const hasTouchTarget = this.mini && !this.reducedTouchTarget;\n return html `${hasTouchTarget ? html `
    ` : ''}`;\n }\n /** @soyTemplate */\n renderLabel() {\n const showLabel = this.label !== '' && this.extended;\n return html `${showLabel ? html `${this.label}` :\n ''}`;\n }\n /** @soyTemplate */\n renderBeforeRipple() {\n return html ``;\n }\n /** @soyTemplate */\n renderRipple() {\n return this.shouldRenderRipple ? html `` :\n '';\n }\n handleRippleActivate(event) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.handleRippleStartPress(event);\n }\n handleRippleStartPress(event) {\n this.rippleHandlers.startPress(event);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\nFabBase.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n queryAsync('mwc-ripple')\n], FabBase.prototype, \"ripple\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"mini\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"exited\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"extended\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"showIconAtEnd\", void 0);\n__decorate([\n property({ type: Boolean })\n], FabBase.prototype, \"reducedTouchTarget\", void 0);\n__decorate([\n property()\n], FabBase.prototype, \"icon\", void 0);\n__decorate([\n property()\n], FabBase.prototype, \"label\", void 0);\n__decorate([\n state()\n], FabBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n state()\n], FabBase.prototype, \"useStateLayerCustomProperties\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], FabBase.prototype, \"handleRippleStartPress\", null);\n//# sourceMappingURL=mwc-fab-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host .mdc-fab .material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}:host{outline:none;--mdc-ripple-color: currentcolor;user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;-webkit-tap-highlight-color:transparent;display:inline-flex;outline:none;user-select:none}:host .mdc-touch-target-wrapper{display:inline}:host .mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}:host .mdc-fab,:host .mdc-fab:not(:disabled) .mdc-fab__icon,:host .mdc-fab:not(:disabled) .mdc-fab__label,:host .mdc-fab:disabled .mdc-fab__icon,:host .mdc-fab:disabled .mdc-fab__label{color:#fff;color:var(--mdc-theme-on-secondary, #fff)}:host .mdc-fab:not(.mdc-fab--extended){border-radius:50%}:host .mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab .mdc-fab__icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}:host .mdc-fab--extended.mdc-fab--exited .mdc-fab__icon ::slotted(*){transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:0px;padding-right:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:0px;padding-left:max(0px, var(--mdc-fab-focus-outline-width, 0px));box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12))}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-color:initial;border-color:var(--mdc-fab-focus-outline-color, initial)}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:0px;padding-right:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:0px;padding-left:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab:hover,:host .mdc-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}:host .mdc-fab:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12))}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__icon{width:24px;width:var(--mdc-icon-size, 24px);height:24px;height:var(--mdc-icon-size, 24px);font-size:24px;font-size:var(--mdc-icon-size, 24px);transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform;display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab.mdc-fab--extended{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:20px;padding-right:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:20px;padding-left:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px))}:host .mdc-fab.mdc-fab--extended:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab.mdc-fab--extended:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:20px;padding-right:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:20px;padding-left:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon{margin-left:12px;margin-left:var(--mdc-fab-extended-icon-padding, 12px);margin-right:calc(12px - 20px);margin-right:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px))}[dir=rtl] :host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon,:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-left:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px));margin-right:12px;margin-right:var(--mdc-fab-extended-icon-padding, 12px)}`;\n//# sourceMappingURL=mwc-fab.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { FabBase } from './mwc-fab-base.js';\nimport { styles } from './mwc-fab.css.js';\n/** @soyCompatible */\nlet Fab = class Fab extends FabBase {\n};\nFab.styles = [styles];\nFab = __decorate([\n customElement('mwc-fab')\n], Fab);\nexport { Fab };\n//# sourceMappingURL=mwc-fab.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { ariaProperty } from '@material/mwc-base/aria-property.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { eventOptions, property, query, queryAsync, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n/** @soyCompatible */\nexport class IconButtonBase extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.icon = '';\n this.shouldRenderRipple = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n }\n /** @soyTemplate */\n renderRipple() {\n return this.shouldRenderRipple ? html `\n \n ` :\n '';\n }\n focus() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.startFocus();\n buttonElement.focus();\n }\n }\n blur() {\n const buttonElement = this.buttonElement;\n if (buttonElement) {\n this.rippleHandlers.endFocus();\n buttonElement.blur();\n }\n }\n /** @soyTemplate */\n render() {\n return html `${this.renderRipple()}\n ${this.icon ? html `${this.icon}` : ''}\n \n `;\n }\n handleRippleMouseDown(event) {\n const onUp = () => {\n window.removeEventListener('mouseup', onUp);\n this.handleRippleDeactivate();\n };\n window.addEventListener('mouseup', onUp);\n this.rippleHandlers.startPress(event);\n }\n handleRippleTouchStart(event) {\n this.rippleHandlers.startPress(event);\n }\n handleRippleDeactivate() {\n this.rippleHandlers.endPress();\n }\n handleRippleMouseEnter() {\n this.rippleHandlers.startHover();\n }\n handleRippleMouseLeave() {\n this.rippleHandlers.endHover();\n }\n handleRippleFocus() {\n this.rippleHandlers.startFocus();\n }\n handleRippleBlur() {\n this.rippleHandlers.endFocus();\n }\n}\n__decorate([\n property({ type: Boolean, reflect: true })\n], IconButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], IconButtonBase.prototype, \"icon\", void 0);\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-label' })\n], IconButtonBase.prototype, \"ariaLabel\", void 0);\n__decorate([\n ariaProperty,\n property({ type: String, attribute: 'aria-haspopup' })\n], IconButtonBase.prototype, \"ariaHasPopup\", void 0);\n__decorate([\n query('button')\n], IconButtonBase.prototype, \"buttonElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], IconButtonBase.prototype, \"ripple\", void 0);\n__decorate([\n state()\n], IconButtonBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], IconButtonBase.prototype, \"handleRippleMouseDown\", null);\n__decorate([\n eventOptions({ passive: true })\n], IconButtonBase.prototype, \"handleRippleTouchStart\", null);\n//# sourceMappingURL=mwc-icon-button-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:\"\";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;\n//# sourceMappingURL=mwc-icon-button.css.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { IconButtonBase } from './mwc-icon-button-base.js';\nimport { styles } from './mwc-icon-button.css.js';\n/** @soyCompatible */\nlet IconButton = class IconButton extends IconButtonBase {\n};\nIconButton.styles = [styles];\nIconButton = __decorate([\n customElement('mwc-icon-button')\n], IconButton);\nexport { IconButton };\n//# sourceMappingURL=mwc-icon-button.js.map","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:l}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},t=(o,l)=>void 0===l?void 0!==(null==o?void 0:o._$litType$):(null==o?void 0:o._$litType$)===l,v=o=>{var l;return null!=(null===(l=null==o?void 0:o._$litType$)||void 0===l?void 0:l.h)},d=o=>void 0!==(null==o?void 0:o._$litDirective$),u=o=>null==o?void 0:o._$litDirective$,e=o=>void 0===o.strings,r=()=>document.createComment(\"\"),c=(o,i,n)=>{var t;const v=o._$AA.parentNode,d=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=v.insertBefore(r(),d),t=v.insertBefore(r(),d);n=new l(i,t,o,o.options)}else{const l=n._$AB.nextSibling,i=n._$AM,u=i!==o;if(u){let l;null===(t=n._$AQ)||void 0===t||t.call(n,o),n._$AM=o,void 0!==n._$AP&&(l=o._$AU)!==i._$AU&&n._$AP(l)}if(l!==d||u){let o=n._$AA;for(;o!==l;){const l=o.nextSibling;v.insertBefore(o,d),o=l}}}return n},f=(o,l,i=o)=>(o._$AI(l,i),o),s={},a=(o,l=s)=>o._$AH=l,m=o=>o._$AH,p=o=>{var l;null===(l=o._$AP)||void 0===l||l.call(o,!1,!0);let i=o._$AA;const n=o._$AB.nextSibling;for(;i!==n;){const o=i.nextSibling;i.remove(),i=o}},h=o=>{o._$AR()};export{n as TemplateResultType,h as clearPart,m as getCommittedValue,u as getDirectiveClass,c as insertPart,v as isCompiledTemplateResult,d as isDirectiveResult,i as isPrimitive,e as isSingleExpression,t as isTemplateResult,p as removePart,f as setChildPartValue,a as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{var e,o;const r=i._$AN;if(void 0===r)return!1;for(const i of r)null===(o=(e=i)._$AO)||void 0===o||o.call(e,t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===(null==e?void 0:e.size))},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),l(t)}};function n(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function h(i,t=!1,e=0){const r=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(r))for(let i=e;i{var t,s,o,r;i.type==e.CHILD&&(null!==(t=(o=i)._$AP)&&void 0!==t||(o._$AP=h),null!==(s=(r=i)._$AQ)&&void 0!==s||(r._$AQ=n))};class c extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?null===(e=this.reconnected)||void 0===e||e.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{c as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as i}from\"../lit-html.js\";import{AsyncDirective as t}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.dt=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if(\"function\"==typeof this.G){const s=null!==(t=this.dt)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.dt,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,t,s;return\"function\"==typeof this.G?null===(t=h.get(null!==(i=this.dt)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","/**\n * @license\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n(() => {\n var _a, _b, _c;\n /* Symbols for private properties */\n const _blockingElements = Symbol();\n const _alreadyInertElements = Symbol();\n const _topElParents = Symbol();\n const _siblingsToRestore = Symbol();\n const _parentMO = Symbol();\n /* Symbols for private static methods */\n const _topChanged = Symbol();\n const _swapInertedSibling = Symbol();\n const _inertSiblings = Symbol();\n const _restoreInertedSiblings = Symbol();\n const _getParents = Symbol();\n const _getDistributedChildren = Symbol();\n const _isInertable = Symbol();\n const _handleMutations = Symbol();\n class BlockingElementsImpl {\n constructor() {\n /**\n * The blocking elements.\n */\n this[_a] = [];\n /**\n * Used to keep track of the parents of the top element, from the element\n * itself up to body. When top changes, the old top might have been removed\n * from the document, so we need to memoize the inerted parents' siblings\n * in order to restore their inerteness when top changes.\n */\n this[_b] = [];\n /**\n * Elements that are already inert before the first blocking element is\n * pushed.\n */\n this[_c] = new Set();\n }\n destructor() {\n // Restore original inertness.\n this[_restoreInertedSiblings](this[_topElParents]);\n // Note we don't want to make these properties nullable on the class,\n // since then we'd need non-null casts in many places. Calling a method on\n // a BlockingElements instance after calling destructor will result in an\n // exception.\n const nullable = this;\n nullable[_blockingElements] = null;\n nullable[_topElParents] = null;\n nullable[_alreadyInertElements] = null;\n }\n get top() {\n const elems = this[_blockingElements];\n return elems[elems.length - 1] || null;\n }\n push(element) {\n if (!element || element === this.top) {\n return;\n }\n // Remove it from the stack, we'll bring it to the top.\n this.remove(element);\n this[_topChanged](element);\n this[_blockingElements].push(element);\n }\n remove(element) {\n const i = this[_blockingElements].indexOf(element);\n if (i === -1) {\n return false;\n }\n this[_blockingElements].splice(i, 1);\n // Top changed only if the removed element was the top element.\n if (i === this[_blockingElements].length) {\n this[_topChanged](this.top);\n }\n return true;\n }\n pop() {\n const top = this.top;\n top && this.remove(top);\n return top;\n }\n has(element) {\n return this[_blockingElements].indexOf(element) !== -1;\n }\n /**\n * Sets `inert` to all document elements except the new top element, its\n * parents, and its distributed content.\n */\n [(_a = _blockingElements, _b = _topElParents, _c = _alreadyInertElements, _topChanged)](newTop) {\n const toKeepInert = this[_alreadyInertElements];\n const oldParents = this[_topElParents];\n // No new top, reset old top if any.\n if (!newTop) {\n this[_restoreInertedSiblings](oldParents);\n toKeepInert.clear();\n this[_topElParents] = [];\n return;\n }\n const newParents = this[_getParents](newTop);\n // New top is not contained in the main document!\n if (newParents[newParents.length - 1].parentNode !== document.body) {\n throw Error('Non-connected element cannot be a blocking element');\n }\n // Cast here because we know we'll call _inertSiblings on newParents\n // below.\n this[_topElParents] = newParents;\n const toSkip = this[_getDistributedChildren](newTop);\n // No previous top element.\n if (!oldParents.length) {\n this[_inertSiblings](newParents, toSkip, toKeepInert);\n return;\n }\n let i = oldParents.length - 1;\n let j = newParents.length - 1;\n // Find common parent. Index 0 is the element itself (so stop before it).\n while (i > 0 && j > 0 && oldParents[i] === newParents[j]) {\n i--;\n j--;\n }\n // If up the parents tree there are 2 elements that are siblings, swap\n // the inerted sibling.\n if (oldParents[i] !== newParents[j]) {\n this[_swapInertedSibling](oldParents[i], newParents[j]);\n }\n // Restore old parents siblings inertness.\n i > 0 && this[_restoreInertedSiblings](oldParents.slice(0, i));\n // Make new parents siblings inert.\n j > 0 && this[_inertSiblings](newParents.slice(0, j), toSkip, null);\n }\n /**\n * Swaps inertness between two sibling elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_swapInertedSibling](oldInert, newInert) {\n const siblingsToRestore = oldInert[_siblingsToRestore];\n // oldInert is not contained in siblings to restore, so we have to check\n // if it's inertable and if already inert.\n if (this[_isInertable](oldInert) && !oldInert.inert) {\n oldInert.inert = true;\n siblingsToRestore.add(oldInert);\n }\n // If newInert was already between the siblings to restore, it means it is\n // inertable and must be restored.\n if (siblingsToRestore.has(newInert)) {\n newInert.inert = false;\n siblingsToRestore.delete(newInert);\n }\n newInert[_parentMO] = oldInert[_parentMO];\n newInert[_siblingsToRestore] = siblingsToRestore;\n oldInert[_parentMO] = undefined;\n oldInert[_siblingsToRestore] = undefined;\n }\n /**\n * Restores original inertness to the siblings of the elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_restoreInertedSiblings](elements) {\n for (const element of elements) {\n const mo = element[_parentMO];\n mo.disconnect();\n element[_parentMO] = undefined;\n const siblings = element[_siblingsToRestore];\n for (const sibling of siblings) {\n sibling.inert = false;\n }\n element[_siblingsToRestore] = undefined;\n }\n }\n /**\n * Inerts the siblings of the elements except the elements to skip. Stores\n * the inerted siblings into the element's symbol `_siblingsToRestore`.\n * Pass `toKeepInert` to collect the already inert elements.\n * Sets the property `inert` over the attribute since the inert spec\n * doesn't specify if it should be reflected.\n * https://html.spec.whatwg.org/multipage/interaction.html#inert\n */\n [_inertSiblings](elements, toSkip, toKeepInert) {\n for (const element of elements) {\n // Assume element is not a Document, so it must have a parentNode.\n const parent = element.parentNode;\n const children = parent.children;\n const inertedSiblings = new Set();\n for (let j = 0; j < children.length; j++) {\n const sibling = children[j];\n // Skip the input element, if not inertable or to be skipped.\n if (sibling === element || !this[_isInertable](sibling) ||\n (toSkip && toSkip.has(sibling))) {\n continue;\n }\n // Should be collected since already inerted.\n if (toKeepInert && sibling.inert) {\n toKeepInert.add(sibling);\n }\n else {\n sibling.inert = true;\n inertedSiblings.add(sibling);\n }\n }\n // Store the siblings that were inerted.\n element[_siblingsToRestore] = inertedSiblings;\n // Observe only immediate children mutations on the parent.\n const mo = new MutationObserver(this[_handleMutations].bind(this));\n element[_parentMO] = mo;\n let parentToObserve = parent;\n // If we're using the ShadyDOM polyfill, then our parent could be a\n // shady root, which is an object that acts like a ShadowRoot, but isn't\n // actually a node in the real DOM. Observe the real DOM parent instead.\n const maybeShadyRoot = parentToObserve;\n if (maybeShadyRoot.__shady && maybeShadyRoot.host) {\n parentToObserve = maybeShadyRoot.host;\n }\n mo.observe(parentToObserve, {\n childList: true,\n });\n }\n }\n /**\n * Handles newly added/removed nodes by toggling their inertness.\n * It also checks if the current top Blocking Element has been removed,\n * notifying and removing it.\n */\n [_handleMutations](mutations) {\n const parents = this[_topElParents];\n const toKeepInert = this[_alreadyInertElements];\n for (const mutation of mutations) {\n // If the target is a shadowRoot, get its host as we skip shadowRoots when\n // computing _topElParents.\n const target = mutation.target.host || mutation.target;\n const idx = target === document.body ?\n parents.length :\n parents.indexOf(target);\n const inertedChild = parents[idx - 1];\n const inertedSiblings = inertedChild[_siblingsToRestore];\n // To restore.\n for (let i = 0; i < mutation.removedNodes.length; i++) {\n const sibling = mutation.removedNodes[i];\n if (sibling === inertedChild) {\n console.info('Detected removal of the top Blocking Element.');\n this.pop();\n return;\n }\n if (inertedSiblings.has(sibling)) {\n sibling.inert = false;\n inertedSiblings.delete(sibling);\n }\n }\n // To inert.\n for (let i = 0; i < mutation.addedNodes.length; i++) {\n const sibling = mutation.addedNodes[i];\n if (!this[_isInertable](sibling)) {\n continue;\n }\n if (toKeepInert && sibling.inert) {\n toKeepInert.add(sibling);\n }\n else {\n sibling.inert = true;\n inertedSiblings.add(sibling);\n }\n }\n }\n }\n /**\n * Returns if the element is inertable.\n */\n [_isInertable](element) {\n return false === /^(style|template|script)$/.test(element.localName);\n }\n /**\n * Returns the list of newParents of an element, starting from element\n * (included) up to `document.body` (excluded).\n */\n [_getParents](element) {\n const parents = [];\n let current = element;\n // Stop to body.\n while (current && current !== document.body) {\n // Skip shadow roots.\n if (current.nodeType === Node.ELEMENT_NODE) {\n parents.push(current);\n }\n // ShadowDom v1\n if (current.assignedSlot) {\n // Collect slots from deepest slot to top.\n while (current = current.assignedSlot) {\n parents.push(current);\n }\n // Continue the search on the top slot.\n current = parents.pop();\n continue;\n }\n current = current.parentNode ||\n current.host;\n }\n return parents;\n }\n /**\n * Returns the distributed children of the element's shadow root.\n * Returns null if the element doesn't have a shadow root.\n */\n [_getDistributedChildren](element) {\n const shadowRoot = element.shadowRoot;\n if (!shadowRoot) {\n return null;\n }\n const result = new Set();\n let i;\n let j;\n let nodes;\n const slots = shadowRoot.querySelectorAll('slot');\n if (slots.length && slots[0].assignedNodes) {\n for (i = 0; i < slots.length; i++) {\n nodes = slots[i].assignedNodes({\n flatten: true,\n });\n for (j = 0; j < nodes.length; j++) {\n if (nodes[j].nodeType === Node.ELEMENT_NODE) {\n result.add(nodes[j]);\n }\n }\n }\n // No need to search for .\n }\n return result;\n }\n }\n document.$blockingElements =\n new BlockingElementsImpl();\n})();\n//# sourceMappingURL=blocking-elements.js.map","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n\n(function () {\n // Return early if we're not running inside of the browser.\n if (typeof window === 'undefined') {\n return;\n }\n\n // Convenience function for converting NodeLists.\n /** @type {typeof Array.prototype.slice} */\n var slice = Array.prototype.slice;\n\n /**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n\n /** @type {string} */\n var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');\n\n /**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n var InertRoot = function () {\n /**\n * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n _classCallCheck(this, InertRoot);\n\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n\n /** @type {!HTMLElement} */\n this._rootElement = rootElement;\n\n /**\n * @type {!Set}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n this._managedNodes = new Set();\n\n // Make the subtree hidden from assistive technology\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n this._rootElement.setAttribute('aria-hidden', 'true');\n\n // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n this._makeSubtreeUnfocusable(this._rootElement);\n\n // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n this._observer = new MutationObserver(this._onMutation.bind(this));\n this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });\n }\n\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n _createClass(InertRoot, [{\n key: 'destructor',\n value: function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this);\n\n // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n this._observer = /** @type {?} */null;\n this._rootElement = /** @type {?} */null;\n this._managedNodes = /** @type {?} */null;\n this._inertManager = /** @type {?} */null;\n }\n\n /**\n * @return {!Set} A copy of this InertRoot's managed nodes set.\n */\n\n }, {\n key: '_makeSubtreeUnfocusable',\n\n\n /**\n * @param {!Node} startNode\n */\n value: function _makeSubtreeUnfocusable(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._visitNode(node);\n });\n\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n var root = undefined;\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root = /** @type {!ShadowRoot} */node;\n break;\n }\n node = node.parentNode;\n }\n if (root) {\n activeElement = root.activeElement;\n }\n }\n if (startNode.contains(activeElement)) {\n activeElement.blur();\n // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n\n /**\n * @param {!Node} node\n */\n\n }, {\n key: '_visitNode',\n value: function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */node;\n\n // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_manageNode',\n value: function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n this._managedNodes.add(inertNode);\n }\n\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_unmanageNode',\n value: function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n if (inertNode) {\n this._managedNodes['delete'](inertNode);\n }\n }\n\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n\n }, {\n key: '_unmanageSubtree',\n value: function _unmanageSubtree(startNode) {\n var _this3 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this3._unmanageNode(node);\n });\n }\n\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!HTMLElement} node\n */\n\n }, {\n key: '_adoptInertRoot',\n value: function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node);\n\n // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_onMutation',\n value: function _onMutation(records, self) {\n records.forEach(function (record) {\n var target = /** @type {!HTMLElement} */record.target;\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this);\n\n // Un-manage removed nodes\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n var inertSubroot = this._inertManager.getInertRoot(target);\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n }\n }, {\n key: 'managedNodes',\n get: function get() {\n return new Set(this._managedNodes);\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'hasSavedAriaHidden',\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n\n /** @param {?string} ariaHidden */\n\n }, {\n key: 'savedAriaHidden',\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n }();\n\n /**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\n var InertNode = function () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n _classCallCheck(this, InertNode);\n\n /** @type {!Node} */\n this._node = node;\n\n /** @type {boolean} */\n this._overrodeFocusMethod = false;\n\n /**\n * @type {!Set} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n this._inertRoots = new Set([inertRoot]);\n\n /** @type {?number} */\n this._savedTabIndex = null;\n\n /** @type {boolean} */\n this._destroyed = false;\n\n // Save any prior tabindex info and make this node untabbable\n this.ensureUntabbable();\n }\n\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n _createClass(InertNode, [{\n key: 'destructor',\n value: function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */this._node;\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n }\n\n // Use `delete` to restore native focus method.\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n }\n\n // See note in InertRoot.destructor for why we cast these nulls to ANY.\n this._node = /** @type {?} */null;\n this._inertRoots = /** @type {?} */null;\n this._destroyed = true;\n }\n\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n\n }, {\n key: '_throwIfDestroyed',\n\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n value: function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'ensureUntabbable',\n\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n value: function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */this.node;\n if (matches.call(element, _focusableElementsString)) {\n if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n }\n element.setAttribute('tabindex', '-1');\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'addInertRoot',\n value: function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots.add(inertRoot);\n }\n\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'removeInertRoot',\n value: function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots['delete'](inertRoot);\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n }\n }, {\n key: 'destroyed',\n get: function get() {\n return (/** @type {!InertNode} */this._destroyed\n );\n }\n }, {\n key: 'hasSavedTabIndex',\n get: function get() {\n return this._savedTabIndex !== null;\n }\n\n /** @return {!Node} */\n\n }, {\n key: 'node',\n get: function get() {\n this._throwIfDestroyed();\n return this._node;\n }\n\n /** @param {?number} tabIndex */\n\n }, {\n key: 'savedTabIndex',\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n this._savedTabIndex = tabIndex;\n }\n\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n }();\n\n /**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\n var InertManager = function () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n _classCallCheck(this, InertManager);\n\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n\n /** @type {!Document} */\n this._document = document;\n\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._managedNodes = new Map();\n\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._inertRoots = new Map();\n\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n this._observer = new MutationObserver(this._watchForInert.bind(this));\n\n // Add inert style.\n addInertStyle(document.head || document.body || document.documentElement);\n\n // Wait for document to be loaded.\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!HTMLElement} root\n * @param {boolean} inert\n */\n\n\n _createClass(InertManager, [{\n key: 'setInert',\n value: function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n this._inertRoots.set(root, inertRoot);\n // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n _inertRoot.destructor();\n this._inertRoots['delete'](root);\n root.removeAttribute('inert');\n }\n }\n\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n\n }, {\n key: 'getInertRoot',\n value: function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n\n }, {\n key: 'register',\n value: function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n\n }, {\n key: 'deregister',\n value: function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n if (inertNode.destroyed) {\n this._managedNodes['delete'](node);\n }\n\n return inertNode;\n }\n\n /**\n * Callback used when document has finished loading.\n */\n\n }, {\n key: '_onDocumentLoaded',\n value: function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this);\n\n // Comment this out to use programmatic API only.\n this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });\n }\n\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_watchForInert',\n value: function _watchForInert(records, self) {\n var _this = this;\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n var target = /** @type {!HTMLElement} */record.target;\n var inert = target.hasAttribute('inert');\n _this.setInert(target, inert);\n break;\n }\n }, this);\n }\n }]);\n\n return InertManager;\n }();\n\n /**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\n function composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */node;\n if (callback) {\n callback(element);\n }\n\n // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the or elements. Descend straight into the\n // ShadowRoot.\n var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n }\n\n // If it is a element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'content') {\n var content = /** @type {!HTMLContentElement} */element;\n // Verifies if ShadowDom v0 is supported.\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n return;\n }\n\n // If it is a element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'slot') {\n var slot = /** @type {!HTMLSlotElement} */element;\n // Verify if ShadowDom v1 is supported.\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n return;\n }\n }\n\n // If it is neither the parent of a ShadowRoot, a element, a \n // element, nor a element recurse normally.\n var child = node.firstChild;\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n }\n\n /**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n function addInertStyle(node) {\n if (node.querySelector('style#inert-style, link#inert-style')) {\n return;\n }\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + ' user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n }\n\n if (!HTMLElement.prototype.hasOwnProperty('inert')) {\n /** @type {!InertManager} */\n var inertManager = new InertManager(document);\n\n Object.defineProperty(HTMLElement.prototype, 'inert', {\n enumerable: true,\n /** @this {!HTMLElement} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n /** @this {!HTMLElement} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n }\n})();\n","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n CLOSING: 'mdc-dialog--closing',\n OPEN: 'mdc-dialog--open',\n OPENING: 'mdc-dialog--opening',\n SCROLLABLE: 'mdc-dialog--scrollable',\n SCROLL_LOCK: 'mdc-dialog-scroll-lock',\n STACKED: 'mdc-dialog--stacked',\n FULLSCREEN: 'mdc-dialog--fullscreen',\n // Class for showing a scroll divider on full-screen dialog header element.\n // Should only be displayed on scrollable content, when the dialog content is\n // scrolled \"underneath\" the header.\n SCROLL_DIVIDER_HEADER: 'mdc-dialog-scroll-divider-header',\n // Class for showing a scroll divider on a full-screen dialog footer element.\n // Should only be displayed on scrolalble content, when the dialog content is\n // obscured \"underneath\" the footer.\n SCROLL_DIVIDER_FOOTER: 'mdc-dialog-scroll-divider-footer',\n // The \"surface scrim\" is a scrim covering only the surface of a dialog. This\n // is used in situations where a confirmation dialog is shown over an already\n // opened full-screen dialog. On larger screen-sizes, the full-screen dialog\n // is sized as a modal and so in these situations we display a \"surface scrim\"\n // to prevent a \"double scrim\" (where the scrim from the secondary\n // confirmation dialog would overlap with the scrim from the full-screen\n // dialog).\n SURFACE_SCRIM_SHOWN: 'mdc-dialog__surface-scrim--shown',\n // \"Showing\" animating class for the surface-scrim.\n SURFACE_SCRIM_SHOWING: 'mdc-dialog__surface-scrim--showing',\n // \"Hiding\" animating class for the surface-scrim.\n SURFACE_SCRIM_HIDING: 'mdc-dialog__surface-scrim--hiding',\n // Class to hide a dialog's scrim (used in conjunction with a surface-scrim).\n // Note that we only hide the original scrim rather than removing it entirely\n // to prevent interactions with the content behind this scrim, and to capture\n // scrim clicks.\n SCRIM_HIDDEN: 'mdc-dialog__scrim--hidden',\n};\nexport var strings = {\n ACTION_ATTRIBUTE: 'data-mdc-dialog-action',\n BUTTON_DEFAULT_ATTRIBUTE: 'data-mdc-dialog-button-default',\n BUTTON_SELECTOR: '.mdc-dialog__button',\n CLOSED_EVENT: 'MDCDialog:closed',\n CLOSE_ACTION: 'close',\n CLOSING_EVENT: 'MDCDialog:closing',\n CONTAINER_SELECTOR: '.mdc-dialog__container',\n CONTENT_SELECTOR: '.mdc-dialog__content',\n DESTROY_ACTION: 'destroy',\n INITIAL_FOCUS_ATTRIBUTE: 'data-mdc-dialog-initial-focus',\n OPENED_EVENT: 'MDCDialog:opened',\n OPENING_EVENT: 'MDCDialog:opening',\n SCRIM_SELECTOR: '.mdc-dialog__scrim',\n SUPPRESS_DEFAULT_PRESS_SELECTOR: [\n 'textarea',\n '.mdc-menu .mdc-list-item',\n '.mdc-menu .mdc-deprecated-list-item',\n ].join(', '),\n SURFACE_SELECTOR: '.mdc-dialog__surface',\n};\nexport var numbers = {\n DIALOG_ANIMATION_CLOSE_TIME_MS: 75,\n DIALOG_ANIMATION_OPEN_TIME_MS: 150,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { AnimationFrame } from '@material/animation/animationframe';\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar AnimationKeys;\n(function (AnimationKeys) {\n AnimationKeys[\"POLL_SCROLL_POS\"] = \"poll_scroll_position\";\n AnimationKeys[\"POLL_LAYOUT_CHANGE\"] = \"poll_layout_change\";\n})(AnimationKeys || (AnimationKeys = {}));\nvar MDCDialogFoundation = /** @class */ (function (_super) {\n __extends(MDCDialogFoundation, _super);\n function MDCDialogFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCDialogFoundation.defaultAdapter), adapter)) || this;\n _this.dialogOpen = false;\n _this.isFullscreen = false;\n _this.animationFrame = 0;\n _this.animationTimer = 0;\n _this.escapeKeyAction = strings.CLOSE_ACTION;\n _this.scrimClickAction = strings.CLOSE_ACTION;\n _this.autoStackButtons = true;\n _this.areButtonsStacked = false;\n _this.suppressDefaultPressSelector = strings.SUPPRESS_DEFAULT_PRESS_SELECTOR;\n _this.animFrame = new AnimationFrame();\n _this.contentScrollHandler = function () {\n _this.handleScrollEvent();\n };\n _this.windowResizeHandler = function () {\n _this.layout();\n };\n _this.windowOrientationChangeHandler = function () {\n _this.layout();\n };\n return _this;\n }\n Object.defineProperty(MDCDialogFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCDialogFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addBodyClass: function () { return undefined; },\n addClass: function () { return undefined; },\n areButtonsStacked: function () { return false; },\n clickDefaultButton: function () { return undefined; },\n eventTargetMatches: function () { return false; },\n getActionFromEvent: function () { return ''; },\n getInitialFocusEl: function () { return null; },\n hasClass: function () { return false; },\n isContentScrollable: function () { return false; },\n notifyClosed: function () { return undefined; },\n notifyClosing: function () { return undefined; },\n notifyOpened: function () { return undefined; },\n notifyOpening: function () { return undefined; },\n releaseFocus: function () { return undefined; },\n removeBodyClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n reverseButtons: function () { return undefined; },\n trapFocus: function () { return undefined; },\n registerContentEventHandler: function () { return undefined; },\n deregisterContentEventHandler: function () { return undefined; },\n isScrollableContentAtTop: function () { return false; },\n isScrollableContentAtBottom: function () { return false; },\n registerWindowEventHandler: function () { return undefined; },\n deregisterWindowEventHandler: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCDialogFoundation.prototype.init = function () {\n if (this.adapter.hasClass(cssClasses.STACKED)) {\n this.setAutoStackButtons(false);\n }\n this.isFullscreen = this.adapter.hasClass(cssClasses.FULLSCREEN);\n };\n MDCDialogFoundation.prototype.destroy = function () {\n if (this.animationTimer) {\n clearTimeout(this.animationTimer);\n this.handleAnimationTimerEnd();\n }\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n }\n this.animFrame.cancelAll();\n this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n };\n MDCDialogFoundation.prototype.open = function (dialogOptions) {\n var _this = this;\n this.dialogOpen = true;\n this.adapter.notifyOpening();\n this.adapter.addClass(cssClasses.OPENING);\n if (this.isFullscreen) {\n // A scroll event listener is registered even if the dialog is not\n // scrollable on open, since the window resize event, or orientation\n // change may make the dialog scrollable after it is opened.\n this.adapter.registerContentEventHandler('scroll', this.contentScrollHandler);\n }\n if (dialogOptions && dialogOptions.isAboveFullscreenDialog) {\n this.adapter.addClass(cssClasses.SCRIM_HIDDEN);\n }\n this.adapter.registerWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.registerWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n // Wait a frame once display is no longer \"none\", to establish basis for\n // animation\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(cssClasses.OPEN);\n _this.adapter.addBodyClass(cssClasses.SCROLL_LOCK);\n _this.layout();\n _this.animationTimer = setTimeout(function () {\n _this.handleAnimationTimerEnd();\n _this.adapter.trapFocus(_this.adapter.getInitialFocusEl());\n _this.adapter.notifyOpened();\n }, numbers.DIALOG_ANIMATION_OPEN_TIME_MS);\n });\n };\n MDCDialogFoundation.prototype.close = function (action) {\n var _this = this;\n if (action === void 0) { action = ''; }\n if (!this.dialogOpen) {\n // Avoid redundant close calls (and events), e.g. from keydown on elements\n // that inherently emit click\n return;\n }\n this.dialogOpen = false;\n this.adapter.notifyClosing(action);\n this.adapter.addClass(cssClasses.CLOSING);\n this.adapter.removeClass(cssClasses.OPEN);\n this.adapter.removeBodyClass(cssClasses.SCROLL_LOCK);\n if (this.isFullscreen) {\n this.adapter.deregisterContentEventHandler('scroll', this.contentScrollHandler);\n }\n this.adapter.deregisterWindowEventHandler('resize', this.windowResizeHandler);\n this.adapter.deregisterWindowEventHandler('orientationchange', this.windowOrientationChangeHandler);\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(function () {\n _this.adapter.releaseFocus();\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyClosed(action);\n }, numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);\n };\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Shows the \"surface scrim\" displayed over the full-screen dialog.\n */\n MDCDialogFoundation.prototype.showSurfaceScrim = function () {\n var _this = this;\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWING);\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(cssClasses.SURFACE_SCRIM_SHOWN);\n });\n };\n /**\n * Used only in instances of showing a secondary dialog over a full-screen\n * dialog. Hides the \"surface scrim\" displayed over the full-screen dialog.\n */\n MDCDialogFoundation.prototype.hideSurfaceScrim = function () {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWN);\n this.adapter.addClass(cssClasses.SURFACE_SCRIM_HIDING);\n };\n /**\n * Handles `transitionend` event triggered when surface scrim animation is\n * finished.\n */\n MDCDialogFoundation.prototype.handleSurfaceScrimTransitionEnd = function () {\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_HIDING);\n this.adapter.removeClass(cssClasses.SURFACE_SCRIM_SHOWING);\n };\n MDCDialogFoundation.prototype.isOpen = function () {\n return this.dialogOpen;\n };\n MDCDialogFoundation.prototype.getEscapeKeyAction = function () {\n return this.escapeKeyAction;\n };\n MDCDialogFoundation.prototype.setEscapeKeyAction = function (action) {\n this.escapeKeyAction = action;\n };\n MDCDialogFoundation.prototype.getScrimClickAction = function () {\n return this.scrimClickAction;\n };\n MDCDialogFoundation.prototype.setScrimClickAction = function (action) {\n this.scrimClickAction = action;\n };\n MDCDialogFoundation.prototype.getAutoStackButtons = function () {\n return this.autoStackButtons;\n };\n MDCDialogFoundation.prototype.setAutoStackButtons = function (autoStack) {\n this.autoStackButtons = autoStack;\n };\n MDCDialogFoundation.prototype.getSuppressDefaultPressSelector = function () {\n return this.suppressDefaultPressSelector;\n };\n MDCDialogFoundation.prototype.setSuppressDefaultPressSelector = function (selector) {\n this.suppressDefaultPressSelector = selector;\n };\n MDCDialogFoundation.prototype.layout = function () {\n var _this = this;\n this.animFrame.request(AnimationKeys.POLL_LAYOUT_CHANGE, function () {\n _this.layoutInternal();\n });\n };\n /** Handles click on the dialog root element. */\n MDCDialogFoundation.prototype.handleClick = function (evt) {\n var isScrim = this.adapter.eventTargetMatches(evt.target, strings.SCRIM_SELECTOR);\n // Check for scrim click first since it doesn't require querying ancestors.\n if (isScrim && this.scrimClickAction !== '') {\n this.close(this.scrimClickAction);\n }\n else {\n var action = this.adapter.getActionFromEvent(evt);\n if (action) {\n this.close(action);\n }\n }\n };\n /** Handles keydown on the dialog root element. */\n MDCDialogFoundation.prototype.handleKeydown = function (evt) {\n var isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n if (!isEnter) {\n return;\n }\n var action = this.adapter.getActionFromEvent(evt);\n if (action) {\n // Action button callback is handled in `handleClick`,\n // since space/enter keydowns on buttons trigger click events.\n return;\n }\n // `composedPath` is used here, when available, to account for use cases\n // where a target meant to suppress the default press behaviour\n // may exist in a shadow root.\n // For example, a textarea inside a web component:\n // \n // \n // #shadow-root (open)\n // \n // #shadow-root (open)\n // \n // \n // \n // \n var target = evt.composedPath ? evt.composedPath()[0] : evt.target;\n var isDefault = this.suppressDefaultPressSelector ?\n !this.adapter.eventTargetMatches(target, this.suppressDefaultPressSelector) :\n true;\n if (isEnter && isDefault) {\n this.adapter.clickDefaultButton();\n }\n };\n /** Handles keydown on the document. */\n MDCDialogFoundation.prototype.handleDocumentKeydown = function (evt) {\n var isEscape = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscape && this.escapeKeyAction !== '') {\n this.close(this.escapeKeyAction);\n }\n };\n /**\n * Handles scroll event on the dialog's content element -- showing a scroll\n * divider on the header or footer based on the scroll position. This handler\n * should only be registered on full-screen dialogs with scrollable content.\n */\n MDCDialogFoundation.prototype.handleScrollEvent = function () {\n var _this = this;\n // Since scroll events can fire at a high rate, we throttle these events by\n // using requestAnimationFrame.\n this.animFrame.request(AnimationKeys.POLL_SCROLL_POS, function () {\n _this.toggleScrollDividerHeader();\n _this.toggleScrollDividerFooter();\n });\n };\n MDCDialogFoundation.prototype.layoutInternal = function () {\n if (this.autoStackButtons) {\n this.detectStackedButtons();\n }\n this.toggleScrollableClasses();\n };\n MDCDialogFoundation.prototype.handleAnimationTimerEnd = function () {\n this.animationTimer = 0;\n this.adapter.removeClass(cssClasses.OPENING);\n this.adapter.removeClass(cssClasses.CLOSING);\n };\n /**\n * Runs the given logic on the next animation frame, using setTimeout to\n * factor in Firefox reflow behavior.\n */\n MDCDialogFoundation.prototype.runNextAnimationFrame = function (callback) {\n var _this = this;\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(function () {\n _this.animationFrame = 0;\n clearTimeout(_this.animationTimer);\n _this.animationTimer = setTimeout(callback, 0);\n });\n };\n MDCDialogFoundation.prototype.detectStackedButtons = function () {\n // Remove the class first to let us measure the buttons' natural positions.\n this.adapter.removeClass(cssClasses.STACKED);\n var areButtonsStacked = this.adapter.areButtonsStacked();\n if (areButtonsStacked) {\n this.adapter.addClass(cssClasses.STACKED);\n }\n if (areButtonsStacked !== this.areButtonsStacked) {\n this.adapter.reverseButtons();\n this.areButtonsStacked = areButtonsStacked;\n }\n };\n MDCDialogFoundation.prototype.toggleScrollableClasses = function () {\n // Remove the class first to let us measure the natural height of the\n // content.\n this.adapter.removeClass(cssClasses.SCROLLABLE);\n if (this.adapter.isContentScrollable()) {\n this.adapter.addClass(cssClasses.SCROLLABLE);\n if (this.isFullscreen) {\n // If dialog is full-screen and scrollable, check if a scroll divider\n // should be shown.\n this.toggleScrollDividerHeader();\n this.toggleScrollDividerFooter();\n }\n }\n };\n MDCDialogFoundation.prototype.toggleScrollDividerHeader = function () {\n if (!this.adapter.isScrollableContentAtTop()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_HEADER);\n }\n else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_HEADER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_HEADER);\n }\n };\n MDCDialogFoundation.prototype.toggleScrollDividerFooter = function () {\n if (!this.adapter.isScrollableContentAtBottom()) {\n this.adapter.addClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n }\n else if (this.adapter.hasClass(cssClasses.SCROLL_DIVIDER_FOOTER)) {\n this.adapter.removeClass(cssClasses.SCROLL_DIVIDER_FOOTER);\n }\n };\n return MDCDialogFoundation;\n}(MDCFoundation));\nexport { MDCDialogFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCDialogFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * AnimationFrame provides a user-friendly abstraction around requesting\n * and canceling animation frames.\n */\nvar AnimationFrame = /** @class */ (function () {\n function AnimationFrame() {\n this.rafIDs = new Map();\n }\n /**\n * Requests an animation frame. Cancels any existing frame with the same key.\n * @param {string} key The key for this callback.\n * @param {FrameRequestCallback} callback The callback to be executed.\n */\n AnimationFrame.prototype.request = function (key, callback) {\n var _this = this;\n this.cancel(key);\n var frameID = requestAnimationFrame(function (frame) {\n _this.rafIDs.delete(key);\n // Callback must come *after* the key is deleted so that nested calls to\n // request with the same key are not deleted.\n callback(frame);\n });\n this.rafIDs.set(key, frameID);\n };\n /**\n * Cancels a queued callback with the given key.\n * @param {string} key The key for this callback.\n */\n AnimationFrame.prototype.cancel = function (key) {\n var rafID = this.rafIDs.get(key);\n if (rafID) {\n cancelAnimationFrame(rafID);\n this.rafIDs.delete(key);\n }\n };\n /**\n * Cancels all queued callback.\n */\n AnimationFrame.prototype.cancelAll = function () {\n var _this = this;\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach(function (_, key) {\n _this.cancel(key);\n });\n };\n /**\n * Returns the queue of unexecuted callback keys.\n */\n AnimationFrame.prototype.getQueue = function () {\n var queue = [];\n // Need to use forEach because it's the only iteration method supported\n // by IE11. Suppress the underscore because we don't need it.\n // tslint:disable-next-line:enforce-name-casing\n this.rafIDs.forEach(function (_, key) {\n queue.push(key);\n });\n return queue;\n };\n return AnimationFrame;\n}());\nexport { AnimationFrame };\n//# sourceMappingURL=animationframe.js.map","/**\n * @license\n * Copyright 2019 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Determine whether the current browser supports passive event listeners, and\n * if so, use them.\n */\nexport function applyPassive(globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n return supportsPassiveOption(globalObj) ?\n { passive: true } :\n false;\n}\nfunction supportsPassiveOption(globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n // See\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n var passiveSupported = false;\n try {\n var options = {\n // This function will be called when the browser\n // attempts to access the passive property.\n get passive() {\n passiveSupported = true;\n return false;\n }\n };\n var handler = function () { };\n globalObj.document.addEventListener('test', handler, options);\n globalObj.document.removeEventListener('test', handler, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n return passiveSupported;\n}\n//# sourceMappingURL=events.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Specifies an observer callback that is run when the decorated property\n * changes. The observer receives the current and old value as arguments.\n */\nexport const observer = (observer) => \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(proto, propName) => {\n // if we haven't wrapped `updated` in this class, do so\n if (!proto.constructor\n ._observers) {\n proto.constructor._observers = new Map();\n const userUpdated = proto.updated;\n proto.updated = function (changedProperties) {\n userUpdated.call(this, changedProperties);\n changedProperties.forEach((v, k) => {\n const observers = this.constructor\n ._observers;\n const observer = observers.get(k);\n if (observer !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n observer.call(this, this[k], v);\n }\n });\n };\n // clone any existing observers (superclasses)\n // eslint-disable-next-line no-prototype-builtins\n }\n else if (!proto.constructor.hasOwnProperty('_observers')) {\n const observers = proto.constructor._observers;\n proto.constructor._observers = new Map();\n observers.forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (v, k) => proto.constructor._observers.set(k, v));\n }\n // set this method\n proto.constructor._observers.set(propName, observer);\n};\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport 'blocking-elements';\nimport 'wicg-inert';\nimport { cssClasses } from '@material/dialog/constants.js';\nimport MDCDialogFoundation from '@material/dialog/foundation.js';\nimport { applyPassive } from '@material/dom/events.js';\nimport { closest, matches } from '@material/dom/ponyfill.js';\nimport { addHasRemoveClass, BaseElement } from '@material/mwc-base/base-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nconst blockingElements = document.$blockingElements;\nexport class DialogBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.hideActions = false;\n this.stacked = false;\n this.heading = '';\n this.scrimClickAction = 'close';\n this.escapeKeyAction = 'close';\n this.open = false;\n this.defaultAction = 'close';\n this.actionAttribute = 'dialogAction';\n this.initialFocusAttribute = 'dialogInitialFocus';\n this.initialSupressDefaultPressSelector = '';\n this.mdcFoundationClass = MDCDialogFoundation;\n this.boundHandleClick = null;\n this.boundHandleKeydown = null;\n this.boundHandleDocumentKeydown = null;\n }\n set suppressDefaultPressSelector(selector) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setSuppressDefaultPressSelector(selector);\n }\n else {\n this.initialSupressDefaultPressSelector = selector;\n }\n }\n /**\n * @export\n */\n get suppressDefaultPressSelector() {\n return this.mdcFoundation ?\n this.mdcFoundation.getSuppressDefaultPressSelector() :\n this.initialSupressDefaultPressSelector;\n }\n get primaryButton() {\n let assignedNodes = this.primarySlot.assignedNodes();\n assignedNodes = assignedNodes.filter((node) => node instanceof HTMLElement);\n const button = assignedNodes[0];\n return button ? button : null;\n }\n emitNotification(name, action) {\n const init = { detail: action ? { action } : {} };\n const ev = new CustomEvent(name, init);\n this.dispatchEvent(ev);\n }\n getInitialFocusEl() {\n const initFocusSelector = `[${this.initialFocusAttribute}]`;\n // only search light DOM. This typically handles all the cases\n const lightDomQs = this.querySelector(initFocusSelector);\n if (lightDomQs) {\n return lightDomQs;\n }\n // if not in light dom, search each flattened distributed node.\n const primarySlot = this.primarySlot;\n const primaryNodes = primarySlot.assignedNodes({ flatten: true });\n const primaryFocusElement = this.searchNodeTreesForAttribute(primaryNodes, this.initialFocusAttribute);\n if (primaryFocusElement) {\n return primaryFocusElement;\n }\n const secondarySlot = this.secondarySlot;\n const secondaryNodes = secondarySlot.assignedNodes({ flatten: true });\n const secondaryFocusElement = this.searchNodeTreesForAttribute(secondaryNodes, this.initialFocusAttribute);\n if (secondaryFocusElement) {\n return secondaryFocusElement;\n }\n const contentSlot = this.contentSlot;\n const contentNodes = contentSlot.assignedNodes({ flatten: true });\n const initFocusElement = this.searchNodeTreesForAttribute(contentNodes, this.initialFocusAttribute);\n return initFocusElement;\n }\n searchNodeTreesForAttribute(nodes, attribute) {\n for (const node of nodes) {\n if (!(node instanceof HTMLElement)) {\n continue;\n }\n if (node.hasAttribute(attribute)) {\n return node;\n }\n else {\n const selection = node.querySelector(`[${attribute}]`);\n if (selection) {\n return selection;\n }\n }\n }\n return null;\n }\n createAdapter() {\n return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { addBodyClass: () => document.body.style.overflow = 'hidden', removeBodyClass: () => document.body.style.overflow = '', areButtonsStacked: () => this.stacked, clickDefaultButton: () => {\n const primary = this.primaryButton;\n if (primary) {\n primary.click();\n }\n }, eventTargetMatches: (target, selector) => target ? matches(target, selector) : false, getActionFromEvent: (e) => {\n if (!e.target) {\n return '';\n }\n const element = closest(e.target, `[${this.actionAttribute}]`);\n const action = element && element.getAttribute(this.actionAttribute);\n return action;\n }, getInitialFocusEl: () => {\n return this.getInitialFocusEl();\n }, isContentScrollable: () => {\n const el = this.contentElement;\n return el ? el.scrollHeight > el.offsetHeight : false;\n }, notifyClosed: (action) => this.emitNotification('closed', action), notifyClosing: (action) => {\n if (!this.closingDueToDisconnect) {\n // Don't set our open state to closed just because we were\n // disconnected. That way if we get reconnected, we'll know to\n // re-open.\n this.open = false;\n }\n this.emitNotification('closing', action);\n }, notifyOpened: () => this.emitNotification('opened'), notifyOpening: () => {\n this.open = true;\n this.emitNotification('opening');\n }, reverseButtons: () => { }, releaseFocus: () => {\n blockingElements.remove(this);\n }, trapFocus: (el) => {\n if (!this.isConnected) {\n // this is the case where it is opened and closed and then removed\n // from DOM before the animation has completed. Blocking Elements will\n // throw if this is the case\n return;\n }\n blockingElements.push(this);\n if (el) {\n el.focus();\n }\n }, registerContentEventHandler: (evtType, handler) => {\n const el = this.contentElement;\n el.addEventListener(evtType, handler);\n }, deregisterContentEventHandler: (evtType, handler) => {\n const el = this.contentElement;\n el.removeEventListener(evtType, handler);\n }, isScrollableContentAtTop: () => {\n const el = this.contentElement;\n return el ? el.scrollTop === 0 : false;\n }, isScrollableContentAtBottom: () => {\n const el = this.contentElement;\n return el ?\n Math.ceil(el.scrollHeight - el.scrollTop) === el.clientHeight :\n false;\n }, registerWindowEventHandler: (evtType, handler) => {\n window.addEventListener(evtType, handler, applyPassive());\n }, deregisterWindowEventHandler: (evtType, handler) => {\n window.removeEventListener(evtType, handler, applyPassive());\n } });\n }\n render() {\n const classes = {\n [cssClasses.STACKED]: this.stacked,\n };\n let heading = html ``;\n if (this.heading) {\n heading = this.renderHeading();\n }\n const actionsClasses = {\n 'mdc-dialog__actions': !this.hideActions,\n };\n return html `\n
    \n
    \n
    \n ${heading}\n
    \n \n
    \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    `;\n }\n renderHeading() {\n return html `\n

    ${this.heading}

    `;\n }\n firstUpdated() {\n super.firstUpdated();\n this.mdcFoundation.setAutoStackButtons(true);\n if (this.initialSupressDefaultPressSelector) {\n this.suppressDefaultPressSelector =\n this.initialSupressDefaultPressSelector;\n }\n else {\n this.suppressDefaultPressSelector = [\n this.suppressDefaultPressSelector, 'mwc-textarea',\n 'mwc-menu mwc-list-item', 'mwc-select mwc-list-item'\n ].join(', ');\n }\n this.boundHandleClick = this.mdcFoundation.handleClick.bind(this.mdcFoundation);\n this.boundHandleKeydown = this.mdcFoundation.handleKeydown.bind(this.mdcFoundation);\n this.boundHandleDocumentKeydown =\n this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation);\n }\n connectedCallback() {\n super.connectedCallback();\n if (this.open && this.mdcFoundation && !this.mdcFoundation.isOpen()) {\n // We probably got disconnected while we were still open. Re-open,\n // matching the behavior of native .\n this.setEventListeners();\n this.mdcFoundation.open();\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.open && this.mdcFoundation) {\n // If this dialog is opened and then disconnected, we want to close\n // the foundation, so that 1) any pending timers are cancelled\n // (in particular for trapFocus), and 2) if we reconnect, we can open\n // the foundation again to retrigger animations and focus.\n this.removeEventListeners();\n this.closingDueToDisconnect = true;\n this.mdcFoundation.close(this.currentAction || this.defaultAction);\n this.closingDueToDisconnect = false;\n this.currentAction = undefined;\n // When we close normally, the releaseFocus callback handles removing\n // ourselves from the blocking elements stack. However, that callback\n // happens on a delay, and when we are closing due to a disconnect we\n // need to remove ourselves before the blocking element polyfill's\n // mutation observer notices and logs a warning, since it's not valid to\n // be in the blocking elements stack while disconnected.\n blockingElements.remove(this);\n }\n }\n forceLayout() {\n this.mdcFoundation.layout();\n }\n focus() {\n const initialFocusEl = this.getInitialFocusEl();\n initialFocusEl && initialFocusEl.focus();\n }\n blur() {\n if (!this.shadowRoot) {\n return;\n }\n const activeEl = this.shadowRoot.activeElement;\n if (activeEl) {\n if (activeEl instanceof HTMLElement) {\n activeEl.blur();\n }\n }\n else {\n const root = this.getRootNode();\n const activeEl = root instanceof Document ? root.activeElement : null;\n if (activeEl instanceof HTMLElement) {\n activeEl.blur();\n }\n }\n }\n setEventListeners() {\n if (this.boundHandleClick) {\n this.mdcRoot.addEventListener('click', this.boundHandleClick);\n }\n if (this.boundHandleKeydown) {\n this.mdcRoot.addEventListener('keydown', this.boundHandleKeydown, applyPassive());\n }\n if (this.boundHandleDocumentKeydown) {\n document.addEventListener('keydown', this.boundHandleDocumentKeydown, applyPassive());\n }\n }\n removeEventListeners() {\n if (this.boundHandleClick) {\n this.mdcRoot.removeEventListener('click', this.boundHandleClick);\n }\n if (this.boundHandleKeydown) {\n this.mdcRoot.removeEventListener('keydown', this.boundHandleKeydown);\n }\n if (this.boundHandleDocumentKeydown) {\n document.removeEventListener('keydown', this.boundHandleDocumentKeydown);\n }\n }\n close() {\n this.open = false;\n }\n show() {\n this.open = true;\n }\n}\n__decorate([\n query('.mdc-dialog')\n], DialogBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n query('slot[name=\"primaryAction\"]')\n], DialogBase.prototype, \"primarySlot\", void 0);\n__decorate([\n query('slot[name=\"secondaryAction\"]')\n], DialogBase.prototype, \"secondarySlot\", void 0);\n__decorate([\n query('#contentSlot')\n], DialogBase.prototype, \"contentSlot\", void 0);\n__decorate([\n query('.mdc-dialog__content')\n], DialogBase.prototype, \"contentElement\", void 0);\n__decorate([\n query('.mdc-container')\n], DialogBase.prototype, \"conatinerElement\", void 0);\n__decorate([\n property({ type: Boolean })\n], DialogBase.prototype, \"hideActions\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function () {\n this.forceLayout();\n })\n], DialogBase.prototype, \"stacked\", void 0);\n__decorate([\n property({ type: String })\n], DialogBase.prototype, \"heading\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (newAction) {\n this.mdcFoundation.setScrimClickAction(newAction);\n })\n], DialogBase.prototype, \"scrimClickAction\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (newAction) {\n this.mdcFoundation.setEscapeKeyAction(newAction);\n })\n], DialogBase.prototype, \"escapeKeyAction\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (isOpen) {\n // Check isConnected because we could have been disconnected before first\n // update. If we're now closed, then we shouldn't start the MDC foundation\n // opening animation. If we're now closed, then we've already closed the\n // foundation in disconnectedCallback.\n if (this.mdcFoundation && this.isConnected) {\n if (isOpen) {\n this.setEventListeners();\n this.mdcFoundation.open();\n }\n else {\n this.removeEventListeners();\n this.mdcFoundation.close(this.currentAction || this.defaultAction);\n this.currentAction = undefined;\n }\n }\n })\n], DialogBase.prototype, \"open\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"defaultAction\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"actionAttribute\", void 0);\n__decorate([\n property()\n], DialogBase.prototype, \"initialFocusAttribute\", void 0);\n//# sourceMappingURL=mwc-dialog-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}@media(min-width: 560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width, 560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32);background-color:var(--mdc-dialog-scrim-color, rgba(0, 0, 0, 0.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87);color:var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6);color:var(--mdc-dialog-content-ink-color, rgba(0, 0, 0, 0.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width, 280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height, calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){margin-left:0;margin-right:8px}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions *:not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}`;\n//# sourceMappingURL=mwc-dialog.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { DialogBase } from './mwc-dialog-base.js';\nimport { styles } from './mwc-dialog.css.js';\nlet Dialog = class Dialog extends DialogBase {\n};\nDialog.styles = [styles];\nDialog = __decorate([\n customElement('mwc-dialog')\n], Dialog);\nexport { Dialog };\n//# sourceMappingURL=mwc-dialog.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-ripple/mwc-ripple.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { RippleHandlers } from '@material/mwc-ripple/ripple-handlers.js';\nimport { html, LitElement } from 'lit';\nimport { property, query, queryAsync, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n/**\n * @fires request-selected {RequestSelectedDetail}\n * @fires list-item-rendered\n */\nexport class ListItemBase extends LitElement {\n constructor() {\n super(...arguments);\n this.value = '';\n this.group = null;\n this.tabindex = -1;\n this.disabled = false;\n this.twoline = false;\n this.activated = false;\n this.graphic = null;\n this.multipleGraphics = false;\n this.hasMeta = false;\n this.noninteractive = false;\n this.selected = false;\n this.shouldRenderRipple = false;\n this._managingList = null;\n this.boundOnClick = this.onClick.bind(this);\n this._firstChanged = true;\n this._skipPropRequest = false;\n this.rippleHandlers = new RippleHandlers(() => {\n this.shouldRenderRipple = true;\n return this.ripple;\n });\n this.listeners = [\n {\n target: this,\n eventNames: ['click'],\n cb: () => {\n this.onClick();\n },\n },\n {\n target: this,\n eventNames: ['mouseenter'],\n cb: this.rippleHandlers.startHover,\n },\n {\n target: this,\n eventNames: ['mouseleave'],\n cb: this.rippleHandlers.endHover,\n },\n {\n target: this,\n eventNames: ['focus'],\n cb: this.rippleHandlers.startFocus,\n },\n {\n target: this,\n eventNames: ['blur'],\n cb: this.rippleHandlers.endFocus,\n },\n {\n target: this,\n eventNames: ['mousedown', 'touchstart'],\n cb: (e) => {\n const name = e.type;\n this.onDown(name === 'mousedown' ? 'mouseup' : 'touchend', e);\n },\n },\n ];\n }\n get text() {\n const textContent = this.textContent;\n return textContent ? textContent.trim() : '';\n }\n render() {\n const text = this.renderText();\n const graphic = this.graphic ? this.renderGraphic() : html ``;\n const meta = this.hasMeta ? this.renderMeta() : html ``;\n return html `\n ${this.renderRipple()}\n ${graphic}\n ${text}\n ${meta}`;\n }\n renderRipple() {\n if (this.shouldRenderRipple) {\n return html `\n \n `;\n }\n else if (this.activated) {\n return html `
    `;\n }\n else {\n return '';\n }\n }\n renderGraphic() {\n const graphicClasses = {\n multi: this.multipleGraphics,\n };\n return html `\n \n \n `;\n }\n renderMeta() {\n return html `\n \n \n `;\n }\n renderText() {\n const inner = this.twoline ? this.renderTwoline() : this.renderSingleLine();\n return html `\n \n ${inner}\n `;\n }\n renderSingleLine() {\n return html ``;\n }\n renderTwoline() {\n return html `\n \n \n \n \n \n \n `;\n }\n onClick() {\n this.fireRequestSelected(!this.selected, 'interaction');\n }\n onDown(upName, evt) {\n const onUp = () => {\n window.removeEventListener(upName, onUp);\n this.rippleHandlers.endPress();\n };\n window.addEventListener(upName, onUp);\n this.rippleHandlers.startPress(evt);\n }\n fireRequestSelected(selected, source) {\n if (this.noninteractive) {\n return;\n }\n const customEv = new CustomEvent('request-selected', { bubbles: true, composed: true, detail: { source, selected } });\n this.dispatchEvent(customEv);\n }\n connectedCallback() {\n super.connectedCallback();\n if (!this.noninteractive) {\n this.setAttribute('mwc-list-item', '');\n }\n for (const listener of this.listeners) {\n for (const eventName of listener.eventNames) {\n listener.target.addEventListener(eventName, listener.cb, { passive: true });\n }\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n for (const listener of this.listeners) {\n for (const eventName of listener.eventNames) {\n listener.target.removeEventListener(eventName, listener.cb);\n }\n }\n if (this._managingList) {\n this._managingList.debouncedLayout ?\n this._managingList.debouncedLayout(true) :\n this._managingList.layout(true);\n }\n }\n // composed flag, event fire through shadow root and up through composed tree\n firstUpdated() {\n const ev = new Event('list-item-rendered', { bubbles: true, composed: true });\n this.dispatchEvent(ev);\n }\n}\n__decorate([\n query('slot')\n], ListItemBase.prototype, \"slotElement\", void 0);\n__decorate([\n queryAsync('mwc-ripple')\n], ListItemBase.prototype, \"ripple\", void 0);\n__decorate([\n property({ type: String })\n], ListItemBase.prototype, \"value\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ListItemBase.prototype, \"group\", void 0);\n__decorate([\n property({ type: Number, reflect: true })\n], ListItemBase.prototype, \"tabindex\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n if (value) {\n this.setAttribute('aria-disabled', 'true');\n }\n else {\n this.setAttribute('aria-disabled', 'false');\n }\n })\n], ListItemBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ListItemBase.prototype, \"twoline\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ListItemBase.prototype, \"activated\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ListItemBase.prototype, \"graphic\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"multipleGraphics\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"hasMeta\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n if (value) {\n this.removeAttribute('aria-checked');\n this.removeAttribute('mwc-list-item');\n this.selected = false;\n this.activated = false;\n this.tabIndex = -1;\n }\n else {\n this.setAttribute('mwc-list-item', '');\n }\n })\n], ListItemBase.prototype, \"noninteractive\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n const role = this.getAttribute('role');\n const isAriaSelectable = role === 'gridcell' || role === 'option' ||\n role === 'row' || role === 'tab';\n if (isAriaSelectable && value) {\n this.setAttribute('aria-selected', 'true');\n }\n else if (isAriaSelectable) {\n this.setAttribute('aria-selected', 'false');\n }\n if (this._firstChanged) {\n this._firstChanged = false;\n return;\n }\n if (this._skipPropRequest) {\n return;\n }\n this.fireRequestSelected(value, 'property');\n })\n], ListItemBase.prototype, \"selected\", void 0);\n__decorate([\n state()\n], ListItemBase.prototype, \"shouldRenderRipple\", void 0);\n__decorate([\n state()\n], ListItemBase.prototype, \"_managingList\", void 0);\n//# sourceMappingURL=mwc-list-item-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:\"\";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\"\";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;\n//# sourceMappingURL=mwc-list-item.css.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ListItemBase } from './mwc-list-item-base.js';\nimport { styles } from './mwc-list-item.css.js';\nlet ListItem = class ListItem extends ListItemBase {\n};\nListItem.styles = [styles];\nListItem = __decorate([\n customElement('mwc-list-item')\n], ListItem);\nexport { ListItem };\n//# sourceMappingURL=mwc-list-item.js.map","/**\n * @license\n * Copyright 2020 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * KEY provides normalized string values for keys.\n */\nexport var KEY = {\n UNKNOWN: 'Unknown',\n BACKSPACE: 'Backspace',\n ENTER: 'Enter',\n SPACEBAR: 'Spacebar',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n END: 'End',\n HOME: 'Home',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_UP: 'ArrowUp',\n ARROW_RIGHT: 'ArrowRight',\n ARROW_DOWN: 'ArrowDown',\n DELETE: 'Delete',\n ESCAPE: 'Escape',\n TAB: 'Tab',\n};\nvar normalizedKeys = new Set();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nnormalizedKeys.add(KEY.BACKSPACE);\nnormalizedKeys.add(KEY.ENTER);\nnormalizedKeys.add(KEY.SPACEBAR);\nnormalizedKeys.add(KEY.PAGE_UP);\nnormalizedKeys.add(KEY.PAGE_DOWN);\nnormalizedKeys.add(KEY.END);\nnormalizedKeys.add(KEY.HOME);\nnormalizedKeys.add(KEY.ARROW_LEFT);\nnormalizedKeys.add(KEY.ARROW_UP);\nnormalizedKeys.add(KEY.ARROW_RIGHT);\nnormalizedKeys.add(KEY.ARROW_DOWN);\nnormalizedKeys.add(KEY.DELETE);\nnormalizedKeys.add(KEY.ESCAPE);\nnormalizedKeys.add(KEY.TAB);\nvar KEY_CODE = {\n BACKSPACE: 8,\n ENTER: 13,\n SPACEBAR: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n DELETE: 46,\n ESCAPE: 27,\n TAB: 9,\n};\nvar mappedKeyCodes = new Map();\n// IE11 has no support for new Map with iterable so we need to initialize this\n// by hand.\nmappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE);\nmappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER);\nmappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR);\nmappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP);\nmappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN);\nmappedKeyCodes.set(KEY_CODE.END, KEY.END);\nmappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME);\nmappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT);\nmappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP);\nmappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT);\nmappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN);\nmappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE);\nmappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE);\nmappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB);\nvar navigationKeys = new Set();\n// IE11 has no support for new Set with iterable so we need to initialize this\n// by hand.\nnavigationKeys.add(KEY.PAGE_UP);\nnavigationKeys.add(KEY.PAGE_DOWN);\nnavigationKeys.add(KEY.END);\nnavigationKeys.add(KEY.HOME);\nnavigationKeys.add(KEY.ARROW_LEFT);\nnavigationKeys.add(KEY.ARROW_UP);\nnavigationKeys.add(KEY.ARROW_RIGHT);\nnavigationKeys.add(KEY.ARROW_DOWN);\n/**\n * normalizeKey returns the normalized string for a navigational action.\n */\nexport function normalizeKey(evt) {\n var key = evt.key;\n // If the event already has a normalized key, return it\n if (normalizedKeys.has(key)) {\n return key;\n }\n // tslint:disable-next-line:deprecation\n var mappedKey = mappedKeyCodes.get(evt.keyCode);\n if (mappedKey) {\n return mappedKey;\n }\n return KEY.UNKNOWN;\n}\n/**\n * isNavigationEvent returns whether the event is a navigation event\n */\nexport function isNavigationEvent(evt) {\n return navigationKeys.has(normalizeKey(evt));\n}\n//# sourceMappingURL=keyboard.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar _a, _b;\nvar cssClasses = {\n LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated',\n LIST_ITEM_CLASS: 'mdc-list-item',\n LIST_ITEM_DISABLED_CLASS: 'mdc-list-item--disabled',\n LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected',\n LIST_ITEM_TEXT_CLASS: 'mdc-list-item__text',\n LIST_ITEM_PRIMARY_TEXT_CLASS: 'mdc-list-item__primary-text',\n ROOT: 'mdc-list',\n};\nvar evolutionClassNameMap = (_a = {},\n _a[\"\" + cssClasses.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-list-item--activated',\n _a[\"\" + cssClasses.LIST_ITEM_CLASS] = 'mdc-list-item',\n _a[\"\" + cssClasses.LIST_ITEM_DISABLED_CLASS] = 'mdc-list-item--disabled',\n _a[\"\" + cssClasses.LIST_ITEM_SELECTED_CLASS] = 'mdc-list-item--selected',\n _a[\"\" + cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-list-item__primary-text',\n _a[\"\" + cssClasses.ROOT] = 'mdc-list',\n _a);\nvar deprecatedClassNameMap = (_b = {},\n _b[\"\" + cssClasses.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-deprecated-list-item--activated',\n _b[\"\" + cssClasses.LIST_ITEM_CLASS] = 'mdc-deprecated-list-item',\n _b[\"\" + cssClasses.LIST_ITEM_DISABLED_CLASS] = 'mdc-deprecated-list-item--disabled',\n _b[\"\" + cssClasses.LIST_ITEM_SELECTED_CLASS] = 'mdc-deprecated-list-item--selected',\n _b[\"\" + cssClasses.LIST_ITEM_TEXT_CLASS] = 'mdc-deprecated-list-item__text',\n _b[\"\" + cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-deprecated-list-item__primary-text',\n _b[\"\" + cssClasses.ROOT] = 'mdc-deprecated-list',\n _b);\nvar strings = {\n ACTION_EVENT: 'MDCList:action',\n SELECTION_CHANGE_EVENT: 'MDCList:selectionChange',\n ARIA_CHECKED: 'aria-checked',\n ARIA_CHECKED_CHECKBOX_SELECTOR: '[role=\"checkbox\"][aria-checked=\"true\"]',\n ARIA_CHECKED_RADIO_SELECTOR: '[role=\"radio\"][aria-checked=\"true\"]',\n ARIA_CURRENT: 'aria-current',\n ARIA_DISABLED: 'aria-disabled',\n ARIA_ORIENTATION: 'aria-orientation',\n ARIA_ORIENTATION_HORIZONTAL: 'horizontal',\n ARIA_ROLE_CHECKBOX_SELECTOR: '[role=\"checkbox\"]',\n ARIA_SELECTED: 'aria-selected',\n ARIA_INTERACTIVE_ROLES_SELECTOR: '[role=\"listbox\"], [role=\"menu\"]',\n ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable=\"true\"]',\n CHECKBOX_RADIO_SELECTOR: 'input[type=\"checkbox\"], input[type=\"radio\"]',\n CHECKBOX_SELECTOR: 'input[type=\"checkbox\"]',\n CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: \"\\n .\" + cssClasses.LIST_ITEM_CLASS + \" button:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" a,\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" button:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" a\\n \",\n DEPRECATED_SELECTOR: '.mdc-deprecated-list',\n FOCUSABLE_CHILD_ELEMENTS: \"\\n .\" + cssClasses.LIST_ITEM_CLASS + \" button:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" a,\\n .\" + cssClasses.LIST_ITEM_CLASS + \" input[type=\\\"radio\\\"]:not(:disabled),\\n .\" + cssClasses.LIST_ITEM_CLASS + \" input[type=\\\"checkbox\\\"]:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" button:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" a,\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" input[type=\\\"radio\\\"]:not(:disabled),\\n .\" + deprecatedClassNameMap[cssClasses.LIST_ITEM_CLASS] + \" input[type=\\\"checkbox\\\"]:not(:disabled)\\n \",\n RADIO_SELECTOR: 'input[type=\"radio\"]',\n SELECTED_ITEM_SELECTOR: '[aria-selected=\"true\"], [aria-current=\"true\"]',\n};\nvar numbers = {\n UNSET_INDEX: -1,\n TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300\n};\nvar evolutionAttribute = 'evolution';\nexport { strings, cssClasses, numbers, deprecatedClassNameMap, evolutionAttribute, evolutionClassNameMap };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { MDCFoundation } from '@material/base/foundation.js';\nimport { normalizeKey } from '@material/dom/keyboard.js';\nimport { numbers, strings } from '@material/list/constants.js';\nconst integerSort = (a, b) => {\n return a - b;\n};\nconst findIndexDiff = (oldSet, newSet) => {\n const oldArr = Array.from(oldSet);\n const newArr = Array.from(newSet);\n const diff = { added: [], removed: [] };\n const oldSorted = oldArr.sort(integerSort);\n const newSorted = newArr.sort(integerSort);\n let i = 0;\n let j = 0;\n while (i < oldSorted.length || j < newSorted.length) {\n const oldVal = oldSorted[i];\n const newVal = newSorted[j];\n if (oldVal === newVal) {\n i++;\n j++;\n continue;\n }\n if (oldVal !== undefined && (newVal === undefined || oldVal < newVal)) {\n diff.removed.push(oldVal);\n i++;\n continue;\n }\n if (newVal !== undefined && (oldVal === undefined || newVal < oldVal)) {\n diff.added.push(newVal);\n j++;\n continue;\n }\n }\n return diff;\n};\nconst ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select'];\nexport function isIndexSet(selectedIndex) {\n return selectedIndex instanceof Set;\n}\nexport function isEventMulti(evt) {\n return isIndexSet(evt.detail.index);\n}\nexport const createSetFromIndex = (index) => {\n const entry = index === numbers.UNSET_INDEX ? new Set() : index;\n return isIndexSet(entry) ? new Set(entry) : new Set([entry]);\n};\nexport class MDCListFoundation extends MDCFoundation {\n constructor(adapter) {\n super(Object.assign(Object.assign({}, MDCListFoundation.defaultAdapter), adapter));\n this.isMulti_ = false;\n this.wrapFocus_ = false;\n this.isVertical_ = true;\n this.selectedIndex_ = numbers.UNSET_INDEX;\n this.focusedItemIndex_ = numbers.UNSET_INDEX;\n this.useActivatedClass_ = false;\n this.ariaCurrentAttrValue_ = null;\n }\n static get strings() {\n return strings;\n }\n static get numbers() {\n return numbers;\n }\n static get defaultAdapter() {\n return {\n focusItemAtIndex: () => undefined,\n getFocusedElementIndex: () => 0,\n getListItemCount: () => 0,\n isFocusInsideList: () => false,\n isRootFocused: () => false,\n notifyAction: () => undefined,\n notifySelected: () => undefined,\n getSelectedStateForElementIndex: () => false,\n setDisabledStateForElementIndex: () => undefined,\n getDisabledStateForElementIndex: () => false,\n setSelectedStateForElementIndex: () => undefined,\n setActivatedStateForElementIndex: () => undefined,\n setTabIndexForElementIndex: () => undefined,\n setAttributeForElementIndex: () => undefined,\n getAttributeForElementIndex: () => null,\n };\n }\n /**\n * Sets the private wrapFocus_ variable.\n */\n setWrapFocus(value) {\n this.wrapFocus_ = value;\n }\n /**\n * Sets the private wrapFocus_ variable.\n */\n setMulti(value) {\n this.isMulti_ = value;\n const currentIndex = this.selectedIndex_;\n if (value) {\n // number to set\n if (!isIndexSet(currentIndex)) {\n const isUnset = currentIndex === numbers.UNSET_INDEX;\n this.selectedIndex_ = isUnset ? new Set() : new Set([currentIndex]);\n }\n }\n else {\n // set to first sorted number in set\n if (isIndexSet(currentIndex)) {\n if (currentIndex.size) {\n const vals = Array.from(currentIndex).sort(integerSort);\n this.selectedIndex_ = vals[0];\n }\n else {\n this.selectedIndex_ = numbers.UNSET_INDEX;\n }\n }\n }\n }\n /**\n * Sets the isVertical_ private variable.\n */\n setVerticalOrientation(value) {\n this.isVertical_ = value;\n }\n /**\n * Sets the useActivatedClass_ private variable.\n */\n setUseActivatedClass(useActivated) {\n this.useActivatedClass_ = useActivated;\n }\n getSelectedIndex() {\n return this.selectedIndex_;\n }\n setSelectedIndex(index) {\n if (!this.isIndexValid_(index)) {\n return;\n }\n if (this.isMulti_) {\n this.setMultiSelectionAtIndex_(createSetFromIndex(index));\n }\n else {\n this.setSingleSelectionAtIndex_(index);\n }\n }\n /**\n * Focus in handler for the list items.\n */\n handleFocusIn(_, listItemIndex) {\n if (listItemIndex >= 0) {\n this.adapter.setTabIndexForElementIndex(listItemIndex, 0);\n }\n }\n /**\n * Focus out handler for the list items.\n */\n handleFocusOut(_, listItemIndex) {\n if (listItemIndex >= 0) {\n this.adapter.setTabIndexForElementIndex(listItemIndex, -1);\n }\n /**\n * Between Focusout & Focusin some browsers do not have focus on any\n * element. Setting a delay to wait till the focus is moved to next element.\n */\n setTimeout(() => {\n if (!this.adapter.isFocusInsideList()) {\n this.setTabindexToFirstSelectedItem_();\n }\n }, 0);\n }\n /**\n * Key handler for the list.\n */\n handleKeydown(event, isRootListItem, listItemIndex) {\n const isArrowLeft = normalizeKey(event) === 'ArrowLeft';\n const isArrowUp = normalizeKey(event) === 'ArrowUp';\n const isArrowRight = normalizeKey(event) === 'ArrowRight';\n const isArrowDown = normalizeKey(event) === 'ArrowDown';\n const isHome = normalizeKey(event) === 'Home';\n const isEnd = normalizeKey(event) === 'End';\n const isEnter = normalizeKey(event) === 'Enter';\n const isSpace = normalizeKey(event) === 'Spacebar';\n if (this.adapter.isRootFocused()) {\n if (isArrowUp || isEnd) {\n event.preventDefault();\n this.focusLastElement();\n }\n else if (isArrowDown || isHome) {\n event.preventDefault();\n this.focusFirstElement();\n }\n return;\n }\n let currentIndex = this.adapter.getFocusedElementIndex();\n if (currentIndex === -1) {\n currentIndex = listItemIndex;\n if (currentIndex < 0) {\n // If this event doesn't have a mdc-deprecated-list-item ancestor from\n // the current list (not from a sublist), return early.\n return;\n }\n }\n let nextIndex;\n if ((this.isVertical_ && isArrowDown) ||\n (!this.isVertical_ && isArrowRight)) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusNextElement(currentIndex);\n }\n else if ((this.isVertical_ && isArrowUp) || (!this.isVertical_ && isArrowLeft)) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusPrevElement(currentIndex);\n }\n else if (isHome) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusFirstElement();\n }\n else if (isEnd) {\n this.preventDefaultEvent(event);\n nextIndex = this.focusLastElement();\n }\n else if (isEnter || isSpace) {\n if (isRootListItem) {\n // Return early if enter key is pressed on anchor element which triggers\n // synthetic MouseEvent event.\n const target = event.target;\n if (target && target.tagName === 'A' && isEnter) {\n return;\n }\n this.preventDefaultEvent(event);\n this.setSelectedIndexOnAction_(currentIndex, true);\n }\n }\n this.focusedItemIndex_ = currentIndex;\n if (nextIndex !== undefined) {\n this.setTabindexAtIndex_(nextIndex);\n this.focusedItemIndex_ = nextIndex;\n }\n }\n /**\n * Click handler for the list.\n */\n handleSingleSelection(index, isInteraction, force) {\n if (index === numbers.UNSET_INDEX) {\n return;\n }\n this.setSelectedIndexOnAction_(index, isInteraction, force);\n this.setTabindexAtIndex_(index);\n this.focusedItemIndex_ = index;\n }\n /**\n * Focuses the next element on the list.\n */\n focusNextElement(index) {\n const count = this.adapter.getListItemCount();\n let nextIndex = index + 1;\n if (nextIndex >= count) {\n if (this.wrapFocus_) {\n nextIndex = 0;\n }\n else {\n // Return early because last item is already focused.\n return index;\n }\n }\n this.adapter.focusItemAtIndex(nextIndex);\n return nextIndex;\n }\n /**\n * Focuses the previous element on the list.\n */\n focusPrevElement(index) {\n let prevIndex = index - 1;\n if (prevIndex < 0) {\n if (this.wrapFocus_) {\n prevIndex = this.adapter.getListItemCount() - 1;\n }\n else {\n // Return early because first item is already focused.\n return index;\n }\n }\n this.adapter.focusItemAtIndex(prevIndex);\n return prevIndex;\n }\n focusFirstElement() {\n this.adapter.focusItemAtIndex(0);\n return 0;\n }\n focusLastElement() {\n const lastIndex = this.adapter.getListItemCount() - 1;\n this.adapter.focusItemAtIndex(lastIndex);\n return lastIndex;\n }\n /**\n * @param itemIndex Index of the list item\n * @param isEnabled Sets the list item to enabled or disabled.\n */\n setEnabled(itemIndex, isEnabled) {\n if (!this.isIndexValid_(itemIndex)) {\n return;\n }\n this.adapter.setDisabledStateForElementIndex(itemIndex, !isEnabled);\n }\n /**\n * Ensures that preventDefault is only called if the containing element\n * doesn't consume the event, and it will cause an unintended scroll.\n */\n preventDefaultEvent(evt) {\n const target = evt.target;\n const tagName = `${target.tagName}`.toLowerCase();\n if (ELEMENTS_KEY_ALLOWED_IN.indexOf(tagName) === -1) {\n evt.preventDefault();\n }\n }\n setSingleSelectionAtIndex_(index, isInteraction = true) {\n if (this.selectedIndex_ === index) {\n return;\n }\n // unset previous\n if (this.selectedIndex_ !== numbers.UNSET_INDEX) {\n this.adapter.setSelectedStateForElementIndex(this.selectedIndex_, false);\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(this.selectedIndex_, false);\n }\n }\n // set new\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(index, true);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(index, true);\n }\n this.setAriaForSingleSelectionAtIndex_(index);\n this.selectedIndex_ = index;\n this.adapter.notifySelected(index);\n }\n setMultiSelectionAtIndex_(newIndex, isInteraction = true) {\n const oldIndex = createSetFromIndex(this.selectedIndex_);\n const diff = findIndexDiff(oldIndex, newIndex);\n if (!diff.removed.length && !diff.added.length) {\n return;\n }\n for (const removed of diff.removed) {\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(removed, false);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(removed, false);\n }\n }\n for (const added of diff.added) {\n if (isInteraction) {\n this.adapter.setSelectedStateForElementIndex(added, true);\n }\n if (this.useActivatedClass_) {\n this.adapter.setActivatedStateForElementIndex(added, true);\n }\n }\n this.selectedIndex_ = newIndex;\n this.adapter.notifySelected(newIndex, diff);\n }\n /**\n * Sets aria attribute for single selection at given index.\n */\n setAriaForSingleSelectionAtIndex_(index) {\n // Detect the presence of aria-current and get the value only during list\n // initialization when it is in unset state.\n if (this.selectedIndex_ === numbers.UNSET_INDEX) {\n this.ariaCurrentAttrValue_ =\n this.adapter.getAttributeForElementIndex(index, strings.ARIA_CURRENT);\n }\n const isAriaCurrent = this.ariaCurrentAttrValue_ !== null;\n const ariaAttribute = isAriaCurrent ? strings.ARIA_CURRENT : strings.ARIA_SELECTED;\n if (this.selectedIndex_ !== numbers.UNSET_INDEX) {\n this.adapter.setAttributeForElementIndex(this.selectedIndex_, ariaAttribute, 'false');\n }\n const ariaAttributeValue = isAriaCurrent ? this.ariaCurrentAttrValue_ : 'true';\n this.adapter.setAttributeForElementIndex(index, ariaAttribute, ariaAttributeValue);\n }\n setTabindexAtIndex_(index) {\n if (this.focusedItemIndex_ === numbers.UNSET_INDEX && index !== 0) {\n // If no list item was selected set first list item's tabindex to -1.\n // Generally, tabindex is set to 0 on first list item of list that has no\n // preselected items.\n this.adapter.setTabIndexForElementIndex(0, -1);\n }\n else if (this.focusedItemIndex_ >= 0 && this.focusedItemIndex_ !== index) {\n this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_, -1);\n }\n this.adapter.setTabIndexForElementIndex(index, 0);\n }\n setTabindexToFirstSelectedItem_() {\n let targetIndex = 0;\n if (typeof this.selectedIndex_ === 'number' &&\n this.selectedIndex_ !== numbers.UNSET_INDEX) {\n targetIndex = this.selectedIndex_;\n }\n else if (isIndexSet(this.selectedIndex_) && this.selectedIndex_.size > 0) {\n targetIndex = Math.min(...this.selectedIndex_);\n }\n this.setTabindexAtIndex_(targetIndex);\n }\n isIndexValid_(index) {\n if (index instanceof Set) {\n if (!this.isMulti_) {\n throw new Error('MDCListFoundation: Array of index is only supported for checkbox based list');\n }\n if (index.size === 0) {\n return true;\n }\n else {\n let isOneInRange = false;\n for (const entry of index) {\n isOneInRange = this.isIndexInRange_(entry);\n if (isOneInRange) {\n break;\n }\n }\n return isOneInRange;\n }\n }\n else if (typeof index === 'number') {\n if (this.isMulti_) {\n throw new Error('MDCListFoundation: Expected array of index for checkbox based list but got number: ' +\n index);\n }\n return index === numbers.UNSET_INDEX || this.isIndexInRange_(index);\n }\n else {\n return false;\n }\n }\n isIndexInRange_(index) {\n const listSize = this.adapter.getListItemCount();\n return index >= 0 && index < listSize;\n }\n /**\n * Sets selected index on user action, toggles checkbox / radio based on\n * toggleCheckbox value. User interaction should not toggle list item(s) when\n * disabled.\n */\n setSelectedIndexOnAction_(index, isInteraction, force) {\n if (this.adapter.getDisabledStateForElementIndex(index)) {\n return;\n }\n let checkedIndex = index;\n if (this.isMulti_) {\n checkedIndex = new Set([index]);\n }\n if (!this.isIndexValid_(checkedIndex)) {\n return;\n }\n if (this.isMulti_) {\n this.toggleMultiAtIndex(index, force, isInteraction);\n }\n else {\n if (isInteraction || force) {\n this.setSingleSelectionAtIndex_(index, isInteraction);\n }\n else {\n const isDeselection = this.selectedIndex_ === index;\n if (isDeselection) {\n this.setSingleSelectionAtIndex_(numbers.UNSET_INDEX);\n }\n }\n }\n if (isInteraction) {\n this.adapter.notifyAction(index);\n }\n }\n toggleMultiAtIndex(index, force, isInteraction = true) {\n let newSelectionValue = false;\n if (force === undefined) {\n newSelectionValue = !this.adapter.getSelectedStateForElementIndex(index);\n }\n else {\n newSelectionValue = force;\n }\n const newSet = createSetFromIndex(this.selectedIndex_);\n if (newSelectionValue) {\n newSet.add(index);\n }\n else {\n newSet.delete(index);\n }\n this.setMultiSelectionAtIndex_(newSet, isInteraction);\n }\n}\n// tslint:disable-next-line:no-default-export Needed for backward compatibility\n// with MDC Web v0.44.0 and earlier.\nexport default MDCListFoundation;\n//# sourceMappingURL=mwc-list-foundation.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport './mwc-list-item.js';\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { deepActiveElementPath, doesElementContainFocus, isNodeElement } from '@material/mwc-base/utils.js';\nimport { html } from 'lit';\nimport { property, query, queryAssignedNodes } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport MDCListFoundation, { isIndexSet } from './mwc-list-foundation.js';\nexport { createSetFromIndex, isEventMulti, isIndexSet } from './mwc-list-foundation.js';\nfunction debounceLayout(callback, waitInMS = 50) {\n let timeoutId;\n // tslint:disable-next-line\n return function (updateItems = true) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n callback(updateItems);\n }, waitInMS);\n };\n}\nconst isListItem = (element) => {\n return element.hasAttribute('mwc-list-item');\n};\nfunction clearAndCreateItemsReadyPromise() {\n const oldResolver = this.itemsReadyResolver;\n this.itemsReady = new Promise((res) => {\n // TODO(b/175626389): Type '(value: never[] | PromiseLike) => void'\n // is not assignable to type '(value?: never[] | PromiseLike |\n // undefined) => void'.\n return this.itemsReadyResolver = res;\n });\n oldResolver();\n}\n/**\n * @fires selected {SelectedDetail}\n * @fires action {ActionDetail}\n * @fires items-updated\n */\nexport class ListBase extends BaseElement {\n constructor() {\n super();\n this.mdcAdapter = null;\n this.mdcFoundationClass = MDCListFoundation;\n this.activatable = false;\n this.multi = false;\n this.wrapFocus = false;\n this.itemRoles = null;\n this.innerRole = null;\n this.innerAriaLabel = null;\n this.rootTabbable = false;\n this.previousTabindex = null;\n this.noninteractive = false;\n this.itemsReadyResolver = (() => {\n //\n });\n this.itemsReady = Promise.resolve([]);\n // tslint:enable:ban-ts-ignore\n this.items_ = [];\n const debouncedFunction = debounceLayout(this.layout.bind(this));\n this.debouncedLayout = (updateItems = true) => {\n clearAndCreateItemsReadyPromise.call(this);\n debouncedFunction(updateItems);\n };\n }\n // tslint:disable:ban-ts-ignore\n async getUpdateComplete() {\n // @ts-ignore\n const result = await super.getUpdateComplete();\n await this.itemsReady;\n return result;\n }\n get items() {\n return this.items_;\n }\n updateItems() {\n var _a;\n const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];\n const listItems = [];\n for (const node of nodes) {\n if (isListItem(node)) {\n listItems.push(node);\n node._managingList = this;\n }\n if (node.hasAttribute('divider') && !node.hasAttribute('role')) {\n node.setAttribute('role', 'separator');\n }\n }\n this.items_ = listItems;\n const selectedIndices = new Set();\n this.items_.forEach((item, index) => {\n if (this.itemRoles) {\n item.setAttribute('role', this.itemRoles);\n }\n else {\n item.removeAttribute('role');\n }\n if (item.selected) {\n selectedIndices.add(index);\n }\n });\n if (this.multi) {\n this.select(selectedIndices);\n }\n else {\n const index = selectedIndices.size ? selectedIndices.entries().next().value[1] : -1;\n this.select(index);\n }\n const itemsUpdatedEv = new Event('items-updated', { bubbles: true, composed: true });\n this.dispatchEvent(itemsUpdatedEv);\n }\n get selected() {\n const index = this.index;\n if (!isIndexSet(index)) {\n if (index === -1) {\n return null;\n }\n return this.items[index];\n }\n const selected = [];\n for (const entry of index) {\n selected.push(this.items[entry]);\n }\n return selected;\n }\n get index() {\n if (this.mdcFoundation) {\n return this.mdcFoundation.getSelectedIndex();\n }\n return -1;\n }\n render() {\n const role = this.innerRole === null ? undefined : this.innerRole;\n const ariaLabel = this.innerAriaLabel === null ? undefined : this.innerAriaLabel;\n const tabindex = this.rootTabbable ? '0' : '-1';\n return html `\n \n \n \n ${this.renderPlaceholder()}\n \n `;\n }\n renderPlaceholder() {\n var _a;\n const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];\n if (this.emptyMessage !== undefined && nodes.length === 0) {\n return html `\n ${this.emptyMessage}\n `;\n }\n return null;\n }\n firstUpdated() {\n super.firstUpdated();\n if (!this.items.length) {\n // required because this is called before observers\n this.mdcFoundation.setMulti(this.multi);\n // for when children upgrade before list\n this.layout();\n }\n }\n onFocusIn(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n this.mdcFoundation.handleFocusIn(evt, index);\n }\n }\n onFocusOut(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n this.mdcFoundation.handleFocusOut(evt, index);\n }\n }\n onKeydown(evt) {\n if (this.mdcFoundation && this.mdcRoot) {\n const index = this.getIndexOfTarget(evt);\n const target = evt.target;\n const isRootListItem = isListItem(target);\n this.mdcFoundation.handleKeydown(evt, isRootListItem, index);\n }\n }\n onRequestSelected(evt) {\n if (this.mdcFoundation) {\n let index = this.getIndexOfTarget(evt);\n // might happen in shady dom slowness. Recalc children\n if (index === -1) {\n this.layout();\n index = this.getIndexOfTarget(evt);\n // still not found; may not be mwc-list-item. Unsupported case.\n if (index === -1) {\n return;\n }\n }\n const element = this.items[index];\n if (element.disabled) {\n return;\n }\n const selected = evt.detail.selected;\n const source = evt.detail.source;\n this.mdcFoundation.handleSingleSelection(index, source === 'interaction', selected);\n evt.stopPropagation();\n }\n }\n getIndexOfTarget(evt) {\n const elements = this.items;\n const path = evt.composedPath();\n for (const pathItem of path) {\n let index = -1;\n if (isNodeElement(pathItem) && isListItem(pathItem)) {\n index = elements.indexOf(pathItem);\n }\n if (index !== -1) {\n return index;\n }\n }\n return -1;\n }\n createAdapter() {\n this.mdcAdapter = {\n getListItemCount: () => {\n if (this.mdcRoot) {\n return this.items.length;\n }\n return 0;\n },\n getFocusedElementIndex: this.getFocusedItemIndex,\n getAttributeForElementIndex: (index, attr) => {\n const listElement = this.mdcRoot;\n if (!listElement) {\n return '';\n }\n const element = this.items[index];\n return element ? element.getAttribute(attr) : '';\n },\n setAttributeForElementIndex: (index, attr, val) => {\n if (!this.mdcRoot) {\n return;\n }\n const element = this.items[index];\n if (element) {\n element.setAttribute(attr, val);\n }\n },\n focusItemAtIndex: (index) => {\n const element = this.items[index];\n if (element) {\n element.focus();\n }\n },\n setTabIndexForElementIndex: (index, value) => {\n const item = this.items[index];\n if (item) {\n item.tabindex = value;\n }\n },\n notifyAction: (index) => {\n const init = { bubbles: true, composed: true };\n init.detail = { index };\n const ev = new CustomEvent('action', init);\n this.dispatchEvent(ev);\n },\n notifySelected: (index, diff) => {\n const init = { bubbles: true, composed: true };\n init.detail = { index, diff };\n const ev = new CustomEvent('selected', init);\n this.dispatchEvent(ev);\n },\n isFocusInsideList: () => {\n return doesElementContainFocus(this);\n },\n isRootFocused: () => {\n const mdcRoot = this.mdcRoot;\n const root = mdcRoot.getRootNode();\n return root.activeElement === mdcRoot;\n },\n setDisabledStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.disabled = value;\n },\n getDisabledStateForElementIndex: (index) => {\n const item = this.items[index];\n if (!item) {\n return false;\n }\n return item.disabled;\n },\n setSelectedStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.selected = value;\n },\n getSelectedStateForElementIndex: (index) => {\n const item = this.items[index];\n if (!item) {\n return false;\n }\n return item.selected;\n },\n setActivatedStateForElementIndex: (index, value) => {\n const item = this.items[index];\n if (!item) {\n return;\n }\n item.activated = value;\n },\n };\n return this.mdcAdapter;\n }\n selectUi(index, activate = false) {\n const item = this.items[index];\n if (item) {\n item.selected = true;\n item.activated = activate;\n }\n }\n deselectUi(index) {\n const item = this.items[index];\n if (item) {\n item.selected = false;\n item.activated = false;\n }\n }\n select(index) {\n if (!this.mdcFoundation) {\n return;\n }\n this.mdcFoundation.setSelectedIndex(index);\n }\n toggle(index, force) {\n if (this.multi) {\n this.mdcFoundation.toggleMultiAtIndex(index, force);\n }\n }\n onListItemConnected(e) {\n const target = e.target;\n this.layout(this.items.indexOf(target) === -1);\n }\n layout(updateItems = true) {\n if (updateItems) {\n this.updateItems();\n }\n const first = this.items[0];\n for (const item of this.items) {\n item.tabindex = -1;\n }\n if (first) {\n if (this.noninteractive) {\n if (!this.previousTabindex) {\n this.previousTabindex = first;\n }\n }\n else {\n first.tabindex = 0;\n }\n }\n this.itemsReadyResolver();\n }\n getFocusedItemIndex() {\n if (!this.mdcRoot) {\n return -1;\n }\n if (!this.items.length) {\n return -1;\n }\n const activeElementPath = deepActiveElementPath();\n if (!activeElementPath.length) {\n return -1;\n }\n for (let i = activeElementPath.length - 1; i >= 0; i--) {\n const activeItem = activeElementPath[i];\n if (isListItem(activeItem)) {\n return this.items.indexOf(activeItem);\n }\n }\n return -1;\n }\n focusItemAtIndex(index) {\n for (const item of this.items) {\n if (item.tabindex === 0) {\n item.tabindex = -1;\n break;\n }\n }\n this.items[index].tabindex = 0;\n this.items[index].focus();\n }\n focus() {\n const root = this.mdcRoot;\n if (root) {\n root.focus();\n }\n }\n blur() {\n const root = this.mdcRoot;\n if (root) {\n root.blur();\n }\n }\n}\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"emptyMessage\", void 0);\n__decorate([\n query('.mdc-deprecated-list')\n], ListBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n queryAssignedNodes('', true, '*')\n], ListBase.prototype, \"assignedElements\", void 0);\n__decorate([\n queryAssignedNodes('', true, '[tabindex=\"0\"]')\n], ListBase.prototype, \"tabbableElements\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (value) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setUseActivatedClass(value);\n }\n })\n], ListBase.prototype, \"activatable\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (newValue, oldValue) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setMulti(newValue);\n }\n if (oldValue !== undefined) {\n this.layout();\n }\n })\n], ListBase.prototype, \"multi\", void 0);\n__decorate([\n property({ type: Boolean }),\n observer(function (value) {\n if (this.mdcFoundation) {\n this.mdcFoundation.setWrapFocus(value);\n }\n })\n], ListBase.prototype, \"wrapFocus\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (_newValue, oldValue) {\n if (oldValue !== undefined) {\n this.updateItems();\n }\n })\n], ListBase.prototype, \"itemRoles\", void 0);\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"innerRole\", void 0);\n__decorate([\n property({ type: String })\n], ListBase.prototype, \"innerAriaLabel\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListBase.prototype, \"rootTabbable\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (value) {\n var _a, _b;\n if (value) {\n const tabbable = (_b = (_a = this.tabbableElements) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;\n this.previousTabindex = tabbable;\n if (tabbable) {\n tabbable.setAttribute('tabindex', '-1');\n }\n }\n else if (!value && this.previousTabindex) {\n this.previousTabindex.setAttribute('tabindex', '0');\n this.previousTabindex = null;\n }\n })\n], ListBase.prototype, \"noninteractive\", void 0);\n//# sourceMappingURL=mwc-list-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}`;\n//# sourceMappingURL=mwc-list.css.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { ListBase } from './mwc-list-base.js';\nimport { styles } from './mwc-list.css.js';\nexport { createSetFromIndex, isEventMulti, isIndexSet } from './mwc-list-foundation.js';\nlet List = class List extends ListBase {\n};\nList.styles = [styles];\nList = __decorate([\n customElement('mwc-list')\n], List);\nexport { List };\n//# sourceMappingURL=mwc-list.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch',\n};\nvar numbers = {\n // This should stay in sync with $mdc-notched-outline-padding * 2.\n NOTCH_ELEMENT_PADDING: 8,\n};\nvar cssClasses = {\n NO_LABEL: 'mdc-notched-outline--no-label',\n OUTLINE_NOTCHED: 'mdc-notched-outline--notched',\n OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded',\n};\nexport { cssClasses, numbers, strings };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar MDCNotchedOutlineFoundation = /** @class */ (function (_super) {\n __extends(MDCNotchedOutlineFoundation, _super);\n function MDCNotchedOutlineFoundation(adapter) {\n return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this;\n }\n Object.defineProperty(MDCNotchedOutlineFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCNotchedOutlineFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n setNotchWidthProperty: function () { return undefined; },\n removeNotchWidthProperty: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Adds the outline notched selector and updates the notch width calculated based off of notchWidth.\n */\n MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) {\n var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;\n if (notchWidth > 0) {\n notchWidth += numbers.NOTCH_ELEMENT_PADDING; // Add padding from left/right.\n }\n this.adapter.setNotchWidthProperty(notchWidth);\n this.adapter.addClass(OUTLINE_NOTCHED);\n };\n /**\n * Removes notched outline selector to close the notch in the outline.\n */\n MDCNotchedOutlineFoundation.prototype.closeNotch = function () {\n var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;\n this.adapter.removeClass(OUTLINE_NOTCHED);\n this.adapter.removeNotchWidthProperty();\n };\n return MDCNotchedOutlineFoundation;\n}(MDCFoundation));\nexport { MDCNotchedOutlineFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCNotchedOutlineFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { BaseElement } from '@material/mwc-base/base-element.js';\nimport { MDCNotchedOutlineFoundation } from '@material/notched-outline/foundation.js';\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nexport class NotchedOutlineBase extends BaseElement {\n constructor() {\n super(...arguments);\n this.mdcFoundationClass = MDCNotchedOutlineFoundation;\n this.width = 0;\n this.open = false;\n this.lastOpen = this.open;\n }\n createAdapter() {\n return {\n addClass: (className) => this.mdcRoot.classList.add(className),\n removeClass: (className) => this.mdcRoot.classList.remove(className),\n setNotchWidthProperty: (width) => this.notchElement.style.setProperty('width', `${width}px`),\n removeNotchWidthProperty: () => this.notchElement.style.removeProperty('width'),\n };\n }\n openOrClose(shouldOpen, width) {\n if (!this.mdcFoundation) {\n return;\n }\n if (shouldOpen && width !== undefined) {\n this.mdcFoundation.notch(width);\n }\n else {\n this.mdcFoundation.closeNotch();\n }\n }\n render() {\n this.openOrClose(this.open, this.width);\n const classes = classMap({\n 'mdc-notched-outline--notched': this.open,\n });\n return html `\n \n \n \n \n \n \n `;\n }\n}\n__decorate([\n query('.mdc-notched-outline')\n], NotchedOutlineBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n property({ type: Number })\n], NotchedOutlineBase.prototype, \"width\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], NotchedOutlineBase.prototype, \"open\", void 0);\n__decorate([\n query('.mdc-notched-outline__notch')\n], NotchedOutlineBase.prototype, \"notchElement\", void 0);\n//# sourceMappingURL=mwc-notched-outline-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;\n//# sourceMappingURL=mwc-notched-outline.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { NotchedOutlineBase } from './mwc-notched-outline-base.js';\nimport { styles } from './mwc-notched-outline.css.js';\nlet NotchedOutline = class NotchedOutline extends NotchedOutlineBase {\n};\nNotchedOutline.styles = [styles];\nNotchedOutline = __decorate([\n customElement('mwc-notched-outline')\n], NotchedOutline);\nexport { NotchedOutline };\n//# sourceMappingURL=mwc-notched-outline.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nvar _a, _b;\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { property } from 'lit/decorators.js';\nimport { addHasRemoveClass, BaseElement } from './base-element.js';\nexport { addHasRemoveClass, BaseElement };\n// ShadyDOM should submit elements in component internals\nconst USING_SHADY_DOM = (_b = (_a = window.ShadyDOM) === null || _a === void 0 ? void 0 : _a.inUse) !== null && _b !== void 0 ? _b : false;\n/** @soyCompatible */\nexport class FormElement extends BaseElement {\n constructor() {\n super(...arguments);\n /**\n * Disabled state for the component. When `disabled` is set to `true`, the\n * component will not be added to form submission.\n */\n this.disabled = false;\n /**\n * Form element that contains this element\n */\n this.containingForm = null;\n this.formDataListener = (ev) => {\n if (!this.disabled) {\n this.setFormData(ev.formData);\n }\n };\n }\n findFormElement() {\n // If the component internals are not in Shadow DOM, subscribing to form\n // data events could lead to duplicated data, which may not work correctly\n // on the server side.\n if (!this.shadowRoot || USING_SHADY_DOM) {\n return null;\n }\n const root = this.getRootNode();\n const forms = root.querySelectorAll('form');\n for (const form of Array.from(forms)) {\n if (form.contains(this)) {\n return form;\n }\n }\n return null;\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n this.containingForm = this.findFormElement();\n (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.formDataListener);\n }\n disconnectedCallback() {\n var _a;\n super.disconnectedCallback();\n (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.formDataListener);\n this.containingForm = null;\n }\n click() {\n if (this.formElement && !this.disabled) {\n this.formElement.focus();\n this.formElement.click();\n }\n }\n firstUpdated() {\n super.firstUpdated();\n if (this.shadowRoot) {\n this.mdcRoot.addEventListener('change', (e) => {\n this.dispatchEvent(new Event('change', e));\n });\n }\n }\n}\nFormElement.shadowRootOptions = { mode: 'open', delegatesFocus: true };\n__decorate([\n property({ type: Boolean })\n], FormElement.prototype, \"disabled\", void 0);\n//# sourceMappingURL=form-element.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nexport var cssClasses = {\n LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',\n LABEL_REQUIRED: 'mdc-floating-label--required',\n LABEL_SHAKE: 'mdc-floating-label--shake',\n ROOT: 'mdc-floating-label',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses } from './constants';\nvar MDCFloatingLabelFoundation = /** @class */ (function (_super) {\n __extends(MDCFloatingLabelFoundation, _super);\n function MDCFloatingLabelFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCFloatingLabelFoundation.defaultAdapter), adapter)) || this;\n _this.shakeAnimationEndHandler = function () {\n _this.handleShakeAnimationEnd();\n };\n return _this;\n }\n Object.defineProperty(MDCFloatingLabelFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFloatingLabelFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n getWidth: function () { return 0; },\n registerInteractionHandler: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCFloatingLabelFoundation.prototype.init = function () {\n this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler);\n };\n MDCFloatingLabelFoundation.prototype.destroy = function () {\n this.adapter.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler);\n };\n /**\n * Returns the width of the label element.\n */\n MDCFloatingLabelFoundation.prototype.getWidth = function () {\n return this.adapter.getWidth();\n };\n /**\n * Styles the label to produce a shake animation to indicate an error.\n * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.\n */\n MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) {\n var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;\n if (shouldShake) {\n this.adapter.addClass(LABEL_SHAKE);\n }\n else {\n this.adapter.removeClass(LABEL_SHAKE);\n }\n };\n /**\n * Styles the label to float or dock.\n * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.\n */\n MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) {\n var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE;\n if (shouldFloat) {\n this.adapter.addClass(LABEL_FLOAT_ABOVE);\n }\n else {\n this.adapter.removeClass(LABEL_FLOAT_ABOVE);\n this.adapter.removeClass(LABEL_SHAKE);\n }\n };\n /**\n * Styles the label as required.\n * @param isRequired If true, adds an asterisk to the label, indicating that it is required.\n */\n MDCFloatingLabelFoundation.prototype.setRequired = function (isRequired) {\n var LABEL_REQUIRED = MDCFloatingLabelFoundation.cssClasses.LABEL_REQUIRED;\n if (isRequired) {\n this.adapter.addClass(LABEL_REQUIRED);\n }\n else {\n this.adapter.removeClass(LABEL_REQUIRED);\n }\n };\n MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd = function () {\n var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;\n this.adapter.removeClass(LABEL_SHAKE);\n };\n return MDCFloatingLabelFoundation;\n}(MDCFoundation));\nexport { MDCFloatingLabelFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFloatingLabelFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { MDCFloatingLabelFoundation } from '@material/floating-label/foundation.js';\nimport { directive, Directive, PartType } from 'lit/directive.js';\nconst createAdapter = (labelElement) => {\n return {\n addClass: (className) => labelElement.classList.add(className),\n removeClass: (className) => labelElement.classList.remove(className),\n getWidth: () => labelElement.scrollWidth,\n registerInteractionHandler: (evtType, handler) => {\n labelElement.addEventListener(evtType, handler);\n },\n deregisterInteractionHandler: (evtType, handler) => {\n labelElement.removeEventListener(evtType, handler);\n },\n };\n};\nclass FloatingLabelDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n this.foundation = null;\n this.previousPart = null;\n switch (partInfo.type) {\n // Only allow Attribute and Part bindings\n case PartType.ATTRIBUTE:\n case PartType.PROPERTY:\n break;\n default:\n throw new Error('FloatingLabel directive only support attribute and property parts');\n }\n }\n /**\n * There is no PropertyPart in Lit 2 so far. For more info see:\n * https://github.com/lit/lit/issues/1863\n */\n update(part, [label]) {\n if (part !== this.previousPart) {\n if (this.foundation) {\n this.foundation.destroy();\n }\n this.previousPart = part;\n const labelElement = part.element;\n labelElement.classList.add('mdc-floating-label');\n const adapter = createAdapter(labelElement);\n this.foundation = new MDCFloatingLabelFoundation(adapter);\n this.foundation.init();\n }\n return this.render(label);\n }\n render(_label) {\n return this.foundation;\n }\n}\nexport const floatingLabel = directive(FloatingLabelDirective);\n//# sourceMappingURL=mwc-floating-label-directive.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssClasses = {\n LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',\n LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',\n};\nexport { cssClasses };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses } from './constants';\nvar MDCLineRippleFoundation = /** @class */ (function (_super) {\n __extends(MDCLineRippleFoundation, _super);\n function MDCLineRippleFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCLineRippleFoundation.defaultAdapter), adapter)) || this;\n _this.transitionEndHandler = function (evt) {\n _this.handleTransitionEnd(evt);\n };\n return _this;\n }\n Object.defineProperty(MDCLineRippleFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCLineRippleFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return false; },\n setStyle: function () { return undefined; },\n registerEventHandler: function () { return undefined; },\n deregisterEventHandler: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCLineRippleFoundation.prototype.init = function () {\n this.adapter.registerEventHandler('transitionend', this.transitionEndHandler);\n };\n MDCLineRippleFoundation.prototype.destroy = function () {\n this.adapter.deregisterEventHandler('transitionend', this.transitionEndHandler);\n };\n MDCLineRippleFoundation.prototype.activate = function () {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n this.adapter.addClass(cssClasses.LINE_RIPPLE_ACTIVE);\n };\n MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) {\n this.adapter.setStyle('transform-origin', xCoordinate + \"px center\");\n };\n MDCLineRippleFoundation.prototype.deactivate = function () {\n this.adapter.addClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n };\n MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) {\n // Wait for the line ripple to be either transparent or opaque\n // before emitting the animation end event\n var isDeactivating = this.adapter.hasClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n if (evt.propertyName === 'opacity') {\n if (isDeactivating) {\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_ACTIVE);\n this.adapter.removeClass(cssClasses.LINE_RIPPLE_DEACTIVATING);\n }\n }\n };\n return MDCLineRippleFoundation;\n}(MDCFoundation));\nexport { MDCLineRippleFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCLineRippleFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { MDCLineRippleFoundation } from '@material/line-ripple/foundation.js';\nimport { directive, Directive, PartType } from 'lit/directive.js';\nconst createAdapter = (lineElement) => {\n return {\n addClass: (className) => lineElement.classList.add(className),\n removeClass: (className) => lineElement.classList.remove(className),\n hasClass: (className) => lineElement.classList.contains(className),\n setStyle: (propertyName, value) => lineElement.style.setProperty(propertyName, value),\n registerEventHandler: (evtType, handler) => {\n lineElement.addEventListener(evtType, handler);\n },\n deregisterEventHandler: (evtType, handler) => {\n lineElement.removeEventListener(evtType, handler);\n },\n };\n};\nexport class LineRippleDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n this.previousPart = null;\n this.foundation = null;\n switch (partInfo.type) {\n case PartType.ATTRIBUTE:\n case PartType.PROPERTY:\n return;\n default:\n throw new Error('LineRipple only support attribute and property parts.');\n }\n }\n /**\n * There is no PropertyPart in Lit 2 so far. For more info see:\n * https://github.com/lit/lit/issues/1863\n */\n update(part, _params) {\n if (this.previousPart !== part) {\n if (this.foundation) {\n this.foundation.destroy();\n }\n this.previousPart = part;\n const lineElement = part.element;\n lineElement.classList.add('mdc-line-ripple');\n const adapter = createAdapter(lineElement);\n this.foundation = new MDCLineRippleFoundation(adapter);\n this.foundation.init();\n }\n return this.render();\n }\n render() {\n return this.foundation;\n }\n}\nexport const lineRipple = directive(LineRippleDirective);\n//# sourceMappingURL=mwc-line-ripple-directive.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n ARIA_CONTROLS: 'aria-controls',\n ARIA_DESCRIBEDBY: 'aria-describedby',\n INPUT_SELECTOR: '.mdc-text-field__input',\n LABEL_SELECTOR: '.mdc-floating-label',\n LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',\n LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',\n OUTLINE_SELECTOR: '.mdc-notched-outline',\n PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',\n SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',\n TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'\n};\nvar cssClasses = {\n DISABLED: 'mdc-text-field--disabled',\n FOCUSED: 'mdc-text-field--focused',\n HELPER_LINE: 'mdc-text-field-helper-line',\n INVALID: 'mdc-text-field--invalid',\n LABEL_FLOATING: 'mdc-text-field--label-floating',\n NO_LABEL: 'mdc-text-field--no-label',\n OUTLINED: 'mdc-text-field--outlined',\n ROOT: 'mdc-text-field',\n TEXTAREA: 'mdc-text-field--textarea',\n WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',\n WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',\n WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',\n};\nvar numbers = {\n LABEL_SCALE: 0.75,\n};\n/**\n * Whitelist based off of\n * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n * under the \"Validation-related attributes\" section.\n */\nvar VALIDATION_ATTR_WHITELIST = [\n 'pattern',\n 'min',\n 'max',\n 'required',\n 'step',\n 'minlength',\n 'maxlength',\n];\n/**\n * Label should always float for these types as they show some UI even if value\n * is empty.\n */\nvar ALWAYS_FLOAT_TYPES = [\n 'color',\n 'date',\n 'datetime-local',\n 'month',\n 'range',\n 'time',\n 'week',\n];\nexport { cssClasses, strings, numbers, VALIDATION_ATTR_WHITELIST, ALWAYS_FLOAT_TYPES };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { ALWAYS_FLOAT_TYPES, cssClasses, numbers, strings, VALIDATION_ATTR_WHITELIST } from './constants';\nvar POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];\nvar INTERACTION_EVENTS = ['click', 'keydown'];\nvar MDCTextFieldFoundation = /** @class */ (function (_super) {\n __extends(MDCTextFieldFoundation, _super);\n /**\n * @param adapter\n * @param foundationMap Map from subcomponent names to their subfoundations.\n */\n function MDCTextFieldFoundation(adapter, foundationMap) {\n if (foundationMap === void 0) { foundationMap = {}; }\n var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;\n _this.isFocused = false;\n _this.receivedUserInput = false;\n _this.valid = true;\n _this.useNativeValidation = true;\n _this.validateOnValueChange = true;\n _this.helperText = foundationMap.helperText;\n _this.characterCounter = foundationMap.characterCounter;\n _this.leadingIcon = foundationMap.leadingIcon;\n _this.trailingIcon = foundationMap.trailingIcon;\n _this.inputFocusHandler = function () {\n _this.activateFocus();\n };\n _this.inputBlurHandler = function () {\n _this.deactivateFocus();\n };\n _this.inputInputHandler = function () {\n _this.handleInput();\n };\n _this.setPointerXOffset = function (evt) {\n _this.setTransformOrigin(evt);\n };\n _this.textFieldInteractionHandler = function () {\n _this.handleTextFieldInteraction();\n };\n _this.validationAttributeChangeHandler = function (attributesList) {\n _this.handleValidationAttributeChange(attributesList);\n };\n return _this;\n }\n Object.defineProperty(MDCTextFieldFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldAlwaysFloat\", {\n get: function () {\n var type = this.getNativeInput().type;\n return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldFloat\", {\n get: function () {\n return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||\n this.isBadInput();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldShake\", {\n get: function () {\n return !this.isFocused && !this.isValid() && !!this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCTextFieldAdapter} for typing information on parameters and\n * return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return true; },\n setInputAttr: function () { return undefined; },\n removeInputAttr: function () { return undefined; },\n registerTextFieldInteractionHandler: function () { return undefined; },\n deregisterTextFieldInteractionHandler: function () { return undefined; },\n registerInputInteractionHandler: function () { return undefined; },\n deregisterInputInteractionHandler: function () { return undefined; },\n registerValidationAttributeChangeHandler: function () {\n return new MutationObserver(function () { return undefined; });\n },\n deregisterValidationAttributeChangeHandler: function () { return undefined; },\n getNativeInput: function () { return null; },\n isFocused: function () { return false; },\n activateLineRipple: function () { return undefined; },\n deactivateLineRipple: function () { return undefined; },\n setLineRippleTransformOrigin: function () { return undefined; },\n shakeLabel: function () { return undefined; },\n floatLabel: function () { return undefined; },\n setLabelRequired: function () { return undefined; },\n hasLabel: function () { return false; },\n getLabelWidth: function () { return 0; },\n hasOutline: function () { return false; },\n notchOutline: function () { return undefined; },\n closeOutline: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCTextFieldFoundation.prototype.init = function () {\n var e_1, _a, e_2, _b;\n if (this.adapter.hasLabel() && this.getNativeInput().required) {\n this.adapter.setLabelRequired(true);\n }\n if (this.adapter.isFocused()) {\n this.inputFocusHandler();\n }\n else if (this.adapter.hasLabel() && this.shouldFloat) {\n this.notchOutline(true);\n this.adapter.floatLabel(true);\n this.styleFloating(true);\n }\n this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {\n var evtType = POINTERDOWN_EVENTS_1_1.value;\n this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {\n var evtType = INTERACTION_EVENTS_1_1.value;\n this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this.validationObserver =\n this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);\n this.setcharacterCounter(this.getValue().length);\n };\n MDCTextFieldFoundation.prototype.destroy = function () {\n var e_3, _a, e_4, _b;\n this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {\n var evtType = POINTERDOWN_EVENTS_2_1.value;\n this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {\n var evtType = INTERACTION_EVENTS_2_1.value;\n this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);\n };\n /**\n * Handles user interactions with the Text Field.\n */\n MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {\n var nativeInput = this.adapter.getNativeInput();\n if (nativeInput && nativeInput.disabled) {\n return;\n }\n this.receivedUserInput = true;\n };\n /**\n * Handles validation attribute changes\n */\n MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {\n var _this = this;\n attributesList.some(function (attributeName) {\n if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {\n _this.styleValidity(true);\n _this.adapter.setLabelRequired(_this.getNativeInput().required);\n return true;\n }\n return false;\n });\n if (attributesList.indexOf('maxlength') > -1) {\n this.setcharacterCounter(this.getValue().length);\n }\n };\n /**\n * Opens/closes the notched outline.\n */\n MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {\n if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {\n return;\n }\n if (openNotch) {\n var labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;\n this.adapter.notchOutline(labelWidth);\n }\n else {\n this.adapter.closeOutline();\n }\n };\n /**\n * Activates the text field focus state.\n */\n MDCTextFieldFoundation.prototype.activateFocus = function () {\n this.isFocused = true;\n this.styleFocused(this.isFocused);\n this.adapter.activateLineRipple();\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (this.helperText &&\n (this.helperText.isPersistent() || !this.helperText.isValidation() ||\n !this.valid)) {\n this.helperText.showToScreenReader();\n }\n };\n /**\n * Sets the line ripple's transform origin, so that the line ripple activate\n * animation will animate out from the user's click location.\n */\n MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {\n if (this.isDisabled() || this.adapter.hasOutline()) {\n return;\n }\n var touches = evt.touches;\n var targetEvent = touches ? touches[0] : evt;\n var targetClientRect = targetEvent.target.getBoundingClientRect();\n var normalizedX = targetEvent.clientX - targetClientRect.left;\n this.adapter.setLineRippleTransformOrigin(normalizedX);\n };\n /**\n * Handles input change of text input and text area.\n */\n MDCTextFieldFoundation.prototype.handleInput = function () {\n this.autoCompleteFocus();\n this.setcharacterCounter(this.getValue().length);\n };\n /**\n * Activates the Text Field's focus state in cases when the input value\n * changes without user input (e.g. programmatically).\n */\n MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {\n if (!this.receivedUserInput) {\n this.activateFocus();\n }\n };\n /**\n * Deactivates the Text Field's focus state.\n */\n MDCTextFieldFoundation.prototype.deactivateFocus = function () {\n this.isFocused = false;\n this.adapter.deactivateLineRipple();\n var isValid = this.isValid();\n this.styleValidity(isValid);\n this.styleFocused(this.isFocused);\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (!this.shouldFloat) {\n this.receivedUserInput = false;\n }\n };\n MDCTextFieldFoundation.prototype.getValue = function () {\n return this.getNativeInput().value;\n };\n /**\n * @param value The value to set on the input Element.\n */\n MDCTextFieldFoundation.prototype.setValue = function (value) {\n // Prevent Safari from moving the caret to the end of the input when the\n // value has not changed.\n if (this.getValue() !== value) {\n this.getNativeInput().value = value;\n }\n this.setcharacterCounter(value.length);\n if (this.validateOnValueChange) {\n var isValid = this.isValid();\n this.styleValidity(isValid);\n }\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n if (this.validateOnValueChange) {\n this.adapter.shakeLabel(this.shouldShake);\n }\n }\n };\n /**\n * @return The custom validity state, if set; otherwise, the result of a\n * native validity check.\n */\n MDCTextFieldFoundation.prototype.isValid = function () {\n return this.useNativeValidation ? this.isNativeInputValid() : this.valid;\n };\n /**\n * @param isValid Sets the custom validity state of the Text Field.\n */\n MDCTextFieldFoundation.prototype.setValid = function (isValid) {\n this.valid = isValid;\n this.styleValidity(isValid);\n var shouldShake = !isValid && !this.isFocused && !!this.getValue();\n if (this.adapter.hasLabel()) {\n this.adapter.shakeLabel(shouldShake);\n }\n };\n /**\n * @param shouldValidate Whether or not validity should be updated on\n * value change.\n */\n MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {\n this.validateOnValueChange = shouldValidate;\n };\n /**\n * @return Whether or not validity should be updated on value change. `true`\n * by default.\n */\n MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {\n return this.validateOnValueChange;\n };\n /**\n * Enables or disables the use of native validation. Use this for custom\n * validation.\n * @param useNativeValidation Set this to false to ignore native input\n * validation.\n */\n MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {\n this.useNativeValidation = useNativeValidation;\n };\n MDCTextFieldFoundation.prototype.isDisabled = function () {\n return this.getNativeInput().disabled;\n };\n /**\n * @param disabled Sets the text-field disabled or enabled.\n */\n MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {\n this.getNativeInput().disabled = disabled;\n this.styleDisabled(disabled);\n };\n /**\n * @param content Sets the content of the helper text.\n */\n MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {\n if (this.helperText) {\n this.helperText.setContent(content);\n }\n };\n /**\n * Sets the aria label of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {\n if (this.leadingIcon) {\n this.leadingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {\n if (this.leadingIcon) {\n this.leadingIcon.setContent(content);\n }\n };\n /**\n * Sets the aria label of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {\n if (this.trailingIcon) {\n this.trailingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {\n if (this.trailingIcon) {\n this.trailingIcon.setContent(content);\n }\n };\n /**\n * Sets character counter values that shows characters used and the total\n * character limit.\n */\n MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {\n if (!this.characterCounter) {\n return;\n }\n var maxLength = this.getNativeInput().maxLength;\n if (maxLength === -1) {\n throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');\n }\n this.characterCounter.setCounterValue(currentLength, maxLength);\n };\n /**\n * @return True if the Text Field input fails in converting the user-supplied\n * value.\n */\n MDCTextFieldFoundation.prototype.isBadInput = function () {\n // The badInput property is not supported in IE 11 💩.\n return this.getNativeInput().validity.badInput || false;\n };\n /**\n * @return The result of native validity checking (ValidityState.valid).\n */\n MDCTextFieldFoundation.prototype.isNativeInputValid = function () {\n return this.getNativeInput().validity.valid;\n };\n /**\n * Styles the component based on the validity state.\n */\n MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {\n var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;\n if (isValid) {\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.addClass(INVALID);\n }\n if (this.helperText) {\n this.helperText.setValidity(isValid);\n // We dynamically set or unset aria-describedby for validation helper text\n // only, based on whether the field is valid\n var helperTextValidation = this.helperText.isValidation();\n if (!helperTextValidation) {\n return;\n }\n var helperTextVisible = this.helperText.isVisible();\n var helperTextId = this.helperText.getId();\n if (helperTextVisible && helperTextId) {\n this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId);\n }\n else {\n this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY);\n }\n }\n };\n /**\n * Styles the component based on the focused state.\n */\n MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {\n var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;\n if (isFocused) {\n this.adapter.addClass(FOCUSED);\n }\n else {\n this.adapter.removeClass(FOCUSED);\n }\n };\n /**\n * Styles the component based on the disabled state.\n */\n MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {\n var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;\n if (isDisabled) {\n this.adapter.addClass(DISABLED);\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.removeClass(DISABLED);\n }\n if (this.leadingIcon) {\n this.leadingIcon.setDisabled(isDisabled);\n }\n if (this.trailingIcon) {\n this.trailingIcon.setDisabled(isDisabled);\n }\n };\n /**\n * Styles the component based on the label floating state.\n */\n MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {\n var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;\n if (isFloating) {\n this.adapter.addClass(LABEL_FLOATING);\n }\n else {\n this.adapter.removeClass(LABEL_FLOATING);\n }\n };\n /**\n * @return The native text input element from the host environment, or an\n * object with the same shape for unit tests.\n */\n MDCTextFieldFoundation.prototype.getNativeInput = function () {\n // this.adapter may be undefined in foundation unit tests. This happens when\n // testdouble is creating a mock object and invokes the\n // shouldShake/shouldFloat getters (which in turn call getValue(), which\n // calls this method) before init() has been called from the MDCTextField\n // constructor. To work around that issue, we return a dummy object.\n var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;\n return nativeInput || {\n disabled: false,\n maxLength: -1,\n required: false,\n type: 'input',\n validity: {\n badInput: false,\n valid: true,\n },\n value: '',\n };\n };\n return MDCTextFieldFoundation;\n}(MDCFoundation));\nexport { MDCTextFieldFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldFoundation;\n//# sourceMappingURL=foundation.js.map","import{noChange as r,nothing as e}from\"../lit-html.js\";import{directive as i,Directive as t,PartType as n}from\"../directive.js\";import{isSingleExpression as o,setCommittedValue as s}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=i(class extends t{constructor(r){if(super(r),r.type!==n.PROPERTY&&r.type!==n.ATTRIBUTE&&r.type!==n.BOOLEAN_ATTRIBUTE)throw Error(\"The `live` directive is not allowed on child or event bindings\");if(!o(r))throw Error(\"`live` bindings can only contain a single expression\")}render(r){return r}update(i,[t]){if(t===r||t===e)return t;const o=i.element,l=i.name;if(i.type===n.PROPERTY){if(t===o[l])return r}else if(i.type===n.BOOLEAN_ATTRIBUTE){if(!!t===o.hasAttribute(l))return r}else if(i.type===n.ATTRIBUTE&&o.getAttribute(l)===t+\"\")return r;return s(i),t}});export{l as live};\n//# sourceMappingURL=live.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport '@material/mwc-notched-outline/mwc-notched-outline.js';\nimport { addHasRemoveClass, FormElement } from '@material/mwc-base/form-element.js';\nimport { observer } from '@material/mwc-base/observer.js';\nimport { floatingLabel } from '@material/mwc-floating-label/mwc-floating-label-directive.js';\nimport { lineRipple } from '@material/mwc-line-ripple/mwc-line-ripple-directive.js';\nimport MDCTextFieldFoundation from '@material/textfield/foundation.js';\nimport { html } from 'lit';\nimport { eventOptions, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nconst passiveEvents = ['touchstart', 'touchmove', 'scroll', 'mousewheel'];\nconst createValidityObj = (customValidity = {}) => {\n /*\n * We need to make ValidityState an object because it is readonly and\n * we cannot use the spread operator. Also, we don't export\n * `CustomValidityState` because it is a leaky implementation and the user\n * already has access to `ValidityState` in lib.dom.ts. Also an interface\n * {a: Type} can be casted to {readonly a: Type} so passing any object\n * should be fine.\n */\n const objectifiedCustomValidity = {};\n // eslint-disable-next-line guard-for-in\n for (const propName in customValidity) {\n /*\n * Casting is needed because ValidityState's props are all readonly and\n * thus cannot be set on `onjectifiedCustomValidity`. In the end, the\n * interface is the same as ValidityState (but not readonly), but the\n * function signature casts the output to ValidityState (thus readonly).\n */\n objectifiedCustomValidity[propName] =\n customValidity[propName];\n }\n return Object.assign({ badInput: false, customError: false, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false, stepMismatch: false, tooLong: false, tooShort: false, typeMismatch: false, valid: true, valueMissing: false }, objectifiedCustomValidity);\n};\n/** @soyCompatible */\nexport class TextFieldBase extends FormElement {\n constructor() {\n super(...arguments);\n this.mdcFoundationClass = MDCTextFieldFoundation;\n this.value = '';\n this.type = 'text';\n this.placeholder = '';\n this.label = '';\n this.icon = '';\n this.iconTrailing = '';\n this.disabled = false;\n this.required = false;\n this.minLength = -1;\n this.maxLength = -1;\n this.outlined = false;\n this.helper = '';\n this.validateOnInitialRender = false;\n this.validationMessage = '';\n this.autoValidate = false;\n this.pattern = '';\n this.min = '';\n this.max = '';\n /**\n * step can be a number or the keyword \"any\".\n *\n * Use `String` typing to pass down the value as a string and let the native\n * input cast internally as needed.\n */\n this.step = null;\n this.size = null;\n this.helperPersistent = false;\n this.charCounter = false;\n this.endAligned = false;\n this.prefix = '';\n this.suffix = '';\n this.name = '';\n this.readOnly = false;\n this.autocapitalize = '';\n this.outlineOpen = false;\n this.outlineWidth = 0;\n this.isUiValid = true;\n this.focused = false;\n this._validity = createValidityObj();\n this.validityTransform = null;\n }\n get validity() {\n this._checkValidity(this.value);\n return this._validity;\n }\n get willValidate() {\n return this.formElement.willValidate;\n }\n get selectionStart() {\n return this.formElement.selectionStart;\n }\n get selectionEnd() {\n return this.formElement.selectionEnd;\n }\n focus() {\n const focusEvt = new CustomEvent('focus');\n this.formElement.dispatchEvent(focusEvt);\n this.formElement.focus();\n }\n blur() {\n const blurEvt = new CustomEvent('blur');\n this.formElement.dispatchEvent(blurEvt);\n this.formElement.blur();\n }\n select() {\n this.formElement.select();\n }\n setSelectionRange(selectionStart, selectionEnd, selectionDirection) {\n this.formElement.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n update(changedProperties) {\n if (changedProperties.has('autoValidate') && this.mdcFoundation) {\n this.mdcFoundation.setValidateOnValueChange(this.autoValidate);\n }\n if (changedProperties.has('value') && typeof this.value !== 'string') {\n this.value = `${this.value}`;\n }\n super.update(changedProperties);\n }\n setFormData(formData) {\n if (this.name) {\n formData.append(this.name, this.value);\n }\n }\n /** @soyTemplate */\n render() {\n const shouldRenderCharCounter = this.charCounter && this.maxLength !== -1;\n const shouldRenderHelperText = !!this.helper || !!this.validationMessage || shouldRenderCharCounter;\n /** @classMap */\n const classes = {\n 'mdc-text-field--disabled': this.disabled,\n 'mdc-text-field--no-label': !this.label,\n 'mdc-text-field--filled': !this.outlined,\n 'mdc-text-field--outlined': this.outlined,\n 'mdc-text-field--with-leading-icon': this.icon,\n 'mdc-text-field--with-trailing-icon': this.iconTrailing,\n 'mdc-text-field--end-aligned': this.endAligned,\n };\n return html `\n \n ${this.renderHelperText(shouldRenderHelperText, shouldRenderCharCounter)}\n `;\n }\n updated(changedProperties) {\n if (changedProperties.has('value') &&\n changedProperties.get('value') !== undefined) {\n this.mdcFoundation.setValue(this.value);\n if (this.autoValidate) {\n this.reportValidity();\n }\n }\n }\n /** @soyTemplate */\n renderRipple() {\n return this.outlined ? '' : html `\n \n `;\n }\n /** @soyTemplate */\n renderOutline() {\n return !this.outlined ? '' : html `\n \n ${this.renderLabel()}\n `;\n }\n /** @soyTemplate */\n renderLabel() {\n return !this.label ?\n '' :\n html `\n ${this.label}\n `;\n }\n /** @soyTemplate */\n renderLeadingIcon() {\n return this.icon ? this.renderIcon(this.icon) : '';\n }\n /** @soyTemplate */\n renderTrailingIcon() {\n return this.iconTrailing ? this.renderIcon(this.iconTrailing, true) : '';\n }\n /** @soyTemplate */\n renderIcon(icon, isTrailingIcon = false) {\n /** @classMap */\n const classes = {\n 'mdc-text-field__icon--leading': !isTrailingIcon,\n 'mdc-text-field__icon--trailing': isTrailingIcon\n };\n return html `${icon}`;\n }\n /** @soyTemplate */\n renderPrefix() {\n return this.prefix ? this.renderAffix(this.prefix) : '';\n }\n /** @soyTemplate */\n renderSuffix() {\n return this.suffix ? this.renderAffix(this.suffix, true) : '';\n }\n /** @soyTemplate */\n renderAffix(content, isSuffix = false) {\n /** @classMap */\n const classes = {\n 'mdc-text-field__affix--prefix': !isSuffix,\n 'mdc-text-field__affix--suffix': isSuffix\n };\n return html `\n ${content}`;\n }\n /** @soyTemplate */\n renderInput(shouldRenderHelperText) {\n const minOrUndef = this.minLength === -1 ? undefined : this.minLength;\n const maxOrUndef = this.maxLength === -1 ? undefined : this.maxLength;\n const autocapitalizeOrUndef = this.autocapitalize ?\n this.autocapitalize :\n undefined;\n const showValidationMessage = this.validationMessage && !this.isUiValid;\n const ariaLabelledbyOrUndef = !!this.label ? 'label' : undefined;\n const ariaControlsOrUndef = shouldRenderHelperText ? 'helper-text' : undefined;\n const ariaDescribedbyOrUndef = this.focused || this.helperPersistent || showValidationMessage ?\n 'helper-text' :\n undefined;\n // TODO: live() directive needs casting for lit-analyzer\n // https://github.com/runem/lit-analyzer/pull/91/files\n // TODO: lit-analyzer labels min/max as (number|string) instead of string\n return html `\n `;\n }\n /** @soyTemplate */\n renderLineRipple() {\n return this.outlined ?\n '' :\n html `\n \n `;\n }\n /** @soyTemplate */\n renderHelperText(shouldRenderHelperText, shouldRenderCharCounter) {\n const showValidationMessage = this.validationMessage && !this.isUiValid;\n /** @classMap */\n const classes = {\n 'mdc-text-field-helper-text--persistent': this.helperPersistent,\n 'mdc-text-field-helper-text--validation-msg': showValidationMessage,\n };\n const ariaHiddenOrUndef = this.focused || this.helperPersistent || showValidationMessage ?\n undefined :\n 'true';\n const helperText = showValidationMessage ? this.validationMessage : this.helper;\n return !shouldRenderHelperText ? '' : html `\n
    \n
    ${helperText}
    \n ${this.renderCharCounter(shouldRenderCharCounter)}\n
    `;\n }\n /** @soyTemplate */\n renderCharCounter(shouldRenderCharCounter) {\n const length = Math.min(this.value.length, this.maxLength);\n return !shouldRenderCharCounter ? '' : html `\n ${length} / ${this.maxLength}`;\n }\n onInputFocus() {\n this.focused = true;\n }\n onInputBlur() {\n this.focused = false;\n this.reportValidity();\n }\n checkValidity() {\n const isValid = this._checkValidity(this.value);\n if (!isValid) {\n const invalidEvent = new Event('invalid', { bubbles: false, cancelable: true });\n this.dispatchEvent(invalidEvent);\n }\n return isValid;\n }\n reportValidity() {\n const isValid = this.checkValidity();\n this.mdcFoundation.setValid(isValid);\n this.isUiValid = isValid;\n return isValid;\n }\n _checkValidity(value) {\n const nativeValidity = this.formElement.validity;\n let validity = createValidityObj(nativeValidity);\n if (this.validityTransform) {\n const customValidity = this.validityTransform(value, validity);\n validity = Object.assign(Object.assign({}, validity), customValidity);\n this.mdcFoundation.setUseNativeValidation(false);\n }\n else {\n this.mdcFoundation.setUseNativeValidation(true);\n }\n this._validity = validity;\n return this._validity.valid;\n }\n setCustomValidity(message) {\n this.validationMessage = message;\n this.formElement.setCustomValidity(message);\n }\n handleInputChange() {\n this.value = this.formElement.value;\n }\n createAdapter() {\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());\n }\n getRootAdapterMethods() {\n return Object.assign({ registerTextFieldInteractionHandler: (evtType, handler) => this.addEventListener(evtType, handler), deregisterTextFieldInteractionHandler: (evtType, handler) => this.removeEventListener(evtType, handler), registerValidationAttributeChangeHandler: (handler) => {\n const getAttributesList = (mutationsList) => {\n return mutationsList.map((mutation) => mutation.attributeName)\n .filter((attributeName) => attributeName);\n };\n const observer = new MutationObserver((mutationsList) => {\n handler(getAttributesList(mutationsList));\n });\n const config = { attributes: true };\n observer.observe(this.formElement, config);\n return observer;\n }, deregisterValidationAttributeChangeHandler: (observer) => observer.disconnect() }, addHasRemoveClass(this.mdcRoot));\n }\n getInputAdapterMethods() {\n return {\n getNativeInput: () => this.formElement,\n // since HelperTextFoundation is not used, aria-describedby a11y logic\n // is implemented in render method instead of these adapter methods\n setInputAttr: () => undefined,\n removeInputAttr: () => undefined,\n isFocused: () => this.shadowRoot ?\n this.shadowRoot.activeElement === this.formElement :\n false,\n registerInputInteractionHandler: (evtType, handler) => this.formElement.addEventListener(evtType, handler, { passive: evtType in passiveEvents }),\n deregisterInputInteractionHandler: (evtType, handler) => this.formElement.removeEventListener(evtType, handler),\n };\n }\n getLabelAdapterMethods() {\n return {\n floatLabel: (shouldFloat) => this.labelElement &&\n this.labelElement.floatingLabelFoundation.float(shouldFloat),\n getLabelWidth: () => {\n return this.labelElement ?\n this.labelElement.floatingLabelFoundation.getWidth() :\n 0;\n },\n hasLabel: () => Boolean(this.labelElement),\n shakeLabel: (shouldShake) => this.labelElement &&\n this.labelElement.floatingLabelFoundation.shake(shouldShake),\n setLabelRequired: (isRequired) => {\n if (this.labelElement) {\n this.labelElement.floatingLabelFoundation.setRequired(isRequired);\n }\n },\n };\n }\n getLineRippleAdapterMethods() {\n return {\n activateLineRipple: () => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.activate();\n }\n },\n deactivateLineRipple: () => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.deactivate();\n }\n },\n setLineRippleTransformOrigin: (normalizedX) => {\n if (this.lineRippleElement) {\n this.lineRippleElement.lineRippleFoundation.setRippleCenter(normalizedX);\n }\n },\n };\n }\n // tslint:disable:ban-ts-ignore\n async getUpdateComplete() {\n var _a;\n // @ts-ignore\n const result = await super.getUpdateComplete();\n await ((_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete);\n return result;\n }\n // tslint:enable:ban-ts-ignore\n firstUpdated() {\n var _a;\n super.firstUpdated();\n this.mdcFoundation.setValidateOnValueChange(this.autoValidate);\n if (this.validateOnInitialRender) {\n this.reportValidity();\n }\n // wait for the outline element to render to update the notch width\n (_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete.then(() => {\n var _a;\n // `foundation.notchOutline()` assumes the label isn't floating and\n // multiplies by a constant, but the label is already is floating at this\n // stage, therefore directly set the outline width to the label width\n this.outlineWidth =\n ((_a = this.labelElement) === null || _a === void 0 ? void 0 : _a.floatingLabelFoundation.getWidth()) || 0;\n });\n }\n getOutlineAdapterMethods() {\n return {\n closeOutline: () => this.outlineElement && (this.outlineOpen = false),\n hasOutline: () => Boolean(this.outlineElement),\n notchOutline: (labelWidth) => {\n const outlineElement = this.outlineElement;\n if (outlineElement && !this.outlineOpen) {\n this.outlineWidth = labelWidth;\n this.outlineOpen = true;\n }\n }\n };\n }\n async layout() {\n await this.updateComplete;\n const labelElement = this.labelElement;\n if (!labelElement) {\n this.outlineOpen = false;\n return;\n }\n const shouldFloat = !!this.label && !!this.value;\n labelElement.floatingLabelFoundation.float(shouldFloat);\n if (!this.outlined) {\n return;\n }\n this.outlineOpen = shouldFloat;\n await this.updateComplete;\n /* When the textfield automatically notches due to a value and label\n * being defined, the textfield may be set to `display: none` by the user.\n * this means that the notch is of size 0px. We provide this function so\n * that the user may manually resize the notch to the floated label's\n * width.\n */\n const labelWidth = labelElement.floatingLabelFoundation.getWidth();\n if (this.outlineOpen) {\n this.outlineWidth = labelWidth;\n await this.updateComplete;\n }\n }\n}\n__decorate([\n query('.mdc-text-field')\n], TextFieldBase.prototype, \"mdcRoot\", void 0);\n__decorate([\n query('input')\n], TextFieldBase.prototype, \"formElement\", void 0);\n__decorate([\n query('.mdc-floating-label')\n], TextFieldBase.prototype, \"labelElement\", void 0);\n__decorate([\n query('.mdc-line-ripple')\n], TextFieldBase.prototype, \"lineRippleElement\", void 0);\n__decorate([\n query('mwc-notched-outline')\n], TextFieldBase.prototype, \"outlineElement\", void 0);\n__decorate([\n query('.mdc-notched-outline__notch')\n], TextFieldBase.prototype, \"notchElement\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"value\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"type\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"placeholder\", void 0);\n__decorate([\n property({ type: String }),\n observer(function (_newVal, oldVal) {\n if (oldVal !== undefined && this.label !== oldVal) {\n this.layout();\n }\n })\n], TextFieldBase.prototype, \"label\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"iconTrailing\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], TextFieldBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"required\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"minLength\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"maxLength\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true }),\n observer(function (_newVal, oldVal) {\n if (oldVal !== undefined && this.outlined !== oldVal) {\n this.layout();\n }\n })\n], TextFieldBase.prototype, \"outlined\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"helper\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"validateOnInitialRender\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"validationMessage\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"autoValidate\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"pattern\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"min\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"max\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"step\", void 0);\n__decorate([\n property({ type: Number })\n], TextFieldBase.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"helperPersistent\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"charCounter\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"endAligned\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"prefix\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"suffix\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"name\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"inputMode\", void 0);\n__decorate([\n property({ type: Boolean })\n], TextFieldBase.prototype, \"readOnly\", void 0);\n__decorate([\n property({ type: String })\n], TextFieldBase.prototype, \"autocapitalize\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"outlineOpen\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"outlineWidth\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"isUiValid\", void 0);\n__decorate([\n state()\n], TextFieldBase.prototype, \"focused\", void 0);\n__decorate([\n eventOptions({ passive: true })\n], TextFieldBase.prototype, \"handleInputChange\", null);\n//# sourceMappingURL=mwc-textfield-base.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-LIcense-Identifier: Apache-2.0\n */\nimport { css } from 'lit';\nexport const styles = css `.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:\"*\"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:\"\"}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:\"\";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:\"\";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex=\"-1\"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, \"Material Icons\");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;\n//# sourceMappingURL=mwc-textfield.css.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\n// Style preference for leading underscores.\n// tslint:disable:strip-private-property-underscore\nimport { customElement } from 'lit/decorators.js';\nimport { TextFieldBase } from './mwc-textfield-base.js';\nimport { styles } from './mwc-textfield.css.js';\n/** @soyCompatible */\nlet TextField = class TextField extends TextFieldBase {\n};\nTextField.styles = [styles];\nTextField = __decorate([\n customElement('mwc-textfield')\n], TextField);\nexport { TextField };\n//# sourceMappingURL=mwc-textfield.js.map","import { Edit } from '@openscd/open-scd-core';\nimport { getReference } from '@openscd/oscd-scl';\n\nexport const privType = 'Transpower-SLD-Vertices';\nexport const sldNs = 'https://transpower.co.nz/SCL/SSD/SLD/v0';\nexport const xmlnsNs = 'http://www.w3.org/2000/xmlns/';\nexport const svgNs = 'http://www.w3.org/2000/svg';\n\nexport const eqTypes = [\n 'CAB',\n 'CAP',\n 'CBR',\n 'CTR',\n 'DIS',\n 'GEN',\n 'IFL',\n 'LIN',\n 'MOT',\n 'REA',\n 'RES',\n 'SAR',\n 'SMC',\n 'VTR',\n] as const;\nexport type EqType = (typeof eqTypes)[number];\nexport function isEqType(str: string): str is EqType {\n return eqTypes.includes(str as EqType);\n}\nexport const ringedEqTypes = new Set(['GEN', 'MOT', 'SMC']);\n\n/* eslint-disable no-bitwise */\nexport function uuid() {\n const digits = new Array(36);\n for (let i = 0; i < 36; i += 1) {\n if ([8, 13, 18, 23].includes(i)) digits[i] = '-';\n else digits[i] = Math.floor(Math.random() * 16);\n }\n digits[14] = 4;\n digits[19] &= ~(1 << 2);\n digits[19] |= 1 << 3;\n return digits.map(x => x.toString(16)).join('');\n}\n/* eslint-enable no-bitwise */\n\nexport type Point = [number, number];\nexport type Attrs = {\n pos: Point;\n dim: Point;\n label: Point;\n flip: boolean;\n rot: 0 | 1 | 2 | 3;\n bus: boolean;\n};\n\nexport function xmlBoolean(value?: string | null) {\n return ['true', '1'].includes(value?.trim() ?? 'false');\n}\n\nexport function isBusBar(element: Element) {\n return (\n element.tagName === 'Bay' &&\n xmlBoolean(element.querySelector('Section[bus]')?.getAttribute('bus'))\n );\n}\n\nexport function attributes(element: Element): Attrs {\n const [x, y, w, h, rotVal, labelX, labelY] = [\n 'x',\n 'y',\n 'w',\n 'h',\n 'rot',\n 'lx',\n 'ly',\n ].map(name => parseFloat(element.getAttributeNS(sldNs, name) ?? '0'));\n const pos = [x, y].map(d => Math.max(0, d)) as Point;\n const dim = [w, h].map(d => Math.max(1, d)) as Point;\n const label = [labelX, labelY].map(d => Math.max(0, d)) as Point;\n\n const bus = xmlBoolean(element.getAttribute('bus'));\n const flip = xmlBoolean(element.getAttributeNS(sldNs, 'flip'));\n\n const rot = (((rotVal % 4) + 4) % 4) as 0 | 1 | 2 | 3;\n\n return { pos, dim, label, flip, rot, bus };\n}\n\nfunction pathString(...args: string[]) {\n return args.join('/');\n}\n\nexport function elementPath(element: Element, ...rest: string[]): string {\n const pedigree = [];\n let child = element;\n while (child.parentElement && child.hasAttribute('name')) {\n pedigree.unshift(child.getAttribute('name')!);\n child = child.parentElement;\n }\n return pathString(...pedigree, ...rest);\n}\n\nfunction collinear(v0: Element, v1: Element, v2: Element) {\n const [[x0, y0], [x1, y1], [x2, y2]] = [v0, v1, v2].map(vertex =>\n ['x', 'y'].map(name => vertex.getAttributeNS(sldNs, name))\n );\n return (x0 === x1 && x1 === x2) || (y0 === y1 && y1 === y2);\n}\n\nexport function removeNode(node: Element): Edit[] {\n const edits = [] as Edit[];\n\n if (xmlBoolean(node.querySelector(`Section[bus]`)?.getAttribute('bus'))) {\n Array.from(node.querySelectorAll('Section:not([bus])')).forEach(section =>\n edits.push({ node: section })\n );\n const sections = Array.from(node.querySelectorAll('Section[bus]'));\n const busSection = sections[0];\n Array.from(busSection.children)\n .slice(1)\n .forEach(vertex => edits.push({ node: vertex }));\n const lastVertex = sections[sections.length - 1].lastElementChild;\n if (lastVertex)\n edits.push({ parent: busSection, node: lastVertex, reference: null });\n sections.slice(1).forEach(section => edits.push({ node: section }));\n } else edits.push({ node });\n\n Array.from(\n node.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${node.getAttribute('pathName')}\"]`\n )\n ).forEach(terminal => edits.push({ node: terminal }));\n\n return edits;\n}\n\nfunction reverseSection(section: Element): Edit[] {\n const edits = [] as Edit[];\n\n Array.from(section.children)\n .reverse()\n .forEach(vertex =>\n edits.push({ parent: section, node: vertex, reference: null })\n );\n\n return edits;\n}\n\nfunction healSectionCut(cut: Element): Edit[] {\n const [x, y] = ['x', 'y'].map(name => cut.getAttributeNS(sldNs, name));\n\n const isCut = (vertex: Element) =>\n vertex !== cut &&\n vertex.getAttributeNS(sldNs, 'x') === x &&\n vertex.getAttributeNS(sldNs, 'y') === y;\n\n const cutVertices = Array.from(\n cut.closest('Private')!.getElementsByTagNameNS(sldNs, 'Section')\n ).flatMap(section => Array.from(section.children).filter(isCut));\n const cutSections = cutVertices.map(v => v.parentElement) as Element[];\n\n if (cutSections.length > 2) return [];\n if (cutSections.length < 2)\n return removeNode(cut.closest('ConnectivityNode')!);\n const [busA, busB] = cutSections.map(section =>\n xmlBoolean(section.getAttribute('bus'))\n );\n if (busA !== busB) return [];\n\n const edits = [] as Edit[];\n const [sectionA, sectionB] = cutSections as [Element, Element];\n if (isCut(sectionA.firstElementChild!)) edits.push(reverseSection(sectionA));\n const sectionBChildren = Array.from(sectionB.children);\n if (isCut(sectionB.lastElementChild!)) sectionBChildren.reverse();\n\n sectionBChildren\n .slice(1)\n .forEach(node => edits.push({ parent: sectionA, node, reference: null }));\n\n const cutA = Array.from(sectionA.children).find(isCut);\n const neighbourA = isCut(sectionA.firstElementChild!)\n ? sectionA.children[1]\n : sectionA.children[sectionA.childElementCount - 2];\n const neighbourB = sectionBChildren[1];\n if (\n neighbourA &&\n cutA &&\n neighbourB &&\n collinear(neighbourA, cutA, neighbourB)\n )\n edits.push({ node: cutA });\n edits.push({ node: sectionB });\n\n return edits;\n}\n\nfunction updateTerminals(\n parent: Element,\n cNode: Element,\n substationName: string,\n voltageLevelName: string,\n bayName: string,\n cNodeName: string,\n connectivityNode: string\n) {\n const updates = [] as Edit[];\n\n const oldPathName = cNode.getAttribute('pathName');\n if (!oldPathName) return [];\n const [oldSubstationName, oldVoltageLevelName, oldBayName, oldCNodeName] =\n oldPathName.split('/');\n\n const terminals = Array.from(\n (cNode.getRootNode() as Document | Element).querySelectorAll(\n `Terminal[substationName=\"${oldSubstationName}\"][voltageLevelName=\"${oldVoltageLevelName}\"][bayName=\"${oldBayName}\"][cNodeName=\"${oldCNodeName}\"], Terminal[connectivityNode=\"${oldPathName}\"]`\n )\n );\n terminals.forEach(terminal => {\n updates.push({\n element: terminal,\n attributes: {\n substationName,\n voltageLevelName,\n bayName,\n connectivityNode,\n cNodeName,\n },\n });\n });\n return updates;\n}\n\nfunction updateConnectivityNodes(\n element: Element,\n parent: Element,\n name: string\n) {\n const updates = [] as Edit[];\n\n const cNodes = Array.from(element.getElementsByTagName('ConnectivityNode'));\n if (element.tagName === 'ConnectivityNode') cNodes.push(element);\n const substationName = parent.closest('Substation')!.getAttribute('name');\n let voltageLevelName = parent.closest('VoltageLevel')?.getAttribute('name');\n if (element.tagName === 'VoltageLevel') voltageLevelName = name;\n\n cNodes.forEach(cNode => {\n let cNodeName = cNode.getAttribute('name');\n if (element === cNode) cNodeName = name;\n let bayName = cNode.parentElement?.getAttribute('name') ?? '';\n if (element.tagName === 'Bay') bayName = name;\n if (parent.tagName === 'Bay' && parent.hasAttribute('name'))\n bayName = parent.getAttribute('name')!;\n\n if (cNodeName && bayName) {\n const pathName = `${substationName}/${voltageLevelName}/${bayName}/${cNodeName}`;\n updates.push({\n element: cNode,\n attributes: {\n pathName,\n },\n });\n if (substationName && voltageLevelName && bayName)\n updates.push(\n ...updateTerminals(\n parent,\n cNode,\n substationName,\n voltageLevelName,\n bayName,\n cNodeName,\n pathName\n )\n );\n }\n });\n return updates;\n}\n\nfunction uniqueName(element: Element, parent: Element): string {\n const children = Array.from(parent.children);\n const oldName = element.getAttribute('name');\n if (\n oldName &&\n !children.find(child => child.getAttribute('name') === oldName)\n )\n return oldName;\n\n const baseName =\n element.getAttribute('name')?.replace(/[0-9]*$/, '') ??\n element.getAttribute('type') ??\n element.tagName.charAt(0);\n let index = 1;\n function hasName(child: Element) {\n return child.getAttribute('name') === baseName + index.toString();\n }\n while (children.find(hasName)) index += 1;\n\n return baseName + index.toString();\n}\n\nexport function reparentElement(element: Element, parent: Element): Edit[] {\n const edits: Edit[] = [];\n edits.push({\n node: element,\n parent,\n reference: getReference(parent, element.tagName),\n });\n const newName = uniqueName(element, parent);\n if (newName !== element.getAttribute('name'))\n edits.push({ element, attributes: { name: newName } });\n edits.push(...updateConnectivityNodes(element, parent, newName));\n return edits;\n}\n\nexport function removeTerminal(terminal: Element): Edit[] {\n const edits = [] as Edit[];\n\n edits.push({ node: terminal });\n const pathName = terminal.getAttribute('connectivityNode');\n const cNode = terminal.ownerDocument.querySelector(\n `ConnectivityNode[pathName=\"${pathName}\"]`\n );\n\n const otherTerminals = Array.from(\n terminal.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${pathName}\"]`\n )\n ).filter(t => t !== terminal);\n\n if (\n cNode &&\n otherTerminals.length &&\n otherTerminals.some(t => t.closest('Bay')) &&\n otherTerminals.every(t => t.closest('Bay') !== cNode.closest('Bay')) &&\n !isBusBar(cNode.closest('Bay')!)\n ) {\n const newParent = otherTerminals\n .find(t => t.closest('Bay'))!\n .closest('Bay');\n if (newParent) edits.push(...reparentElement(cNode, newParent));\n }\n\n const priv = cNode?.querySelector(`Private[type=\"${privType}\"]`);\n const vertex = priv?.querySelector(\n `Vertex[*|uuid=\"${terminal.getAttributeNS(sldNs, 'uuid')}\"]`\n );\n const section = vertex?.parentElement;\n if (!section) return edits;\n edits.push({ node: section });\n\n const cut =\n vertex === section.lastElementChild\n ? section.firstElementChild\n : section.lastElementChild;\n\n if (cut) edits.push(...healSectionCut(cut));\n\n return edits;\n}\n\nexport function connectionStartPoints(equipment: Element): {\n top: { close: Point; far: Point };\n bottom: { close: Point; far: Point };\n} {\n const {\n pos: [x, y],\n rot,\n } = attributes(equipment);\n\n const top = {\n close: [\n [x + 0.5, y],\n [x + 1, y + 0.5],\n [x + 0.5, y + 1],\n [x, y + 0.5],\n ][rot] as Point,\n far: [\n [x + 0.5, y - 0.5],\n [x + 1.5, y + 0.5],\n [x + 0.5, y + 1.5],\n [x - 0.5, y + 0.5],\n ][rot] as Point,\n };\n const bottom = {\n close: [\n [x + 0.5, y + 1],\n [x, y + 0.5],\n [x + 0.5, y],\n [x + 1, y + 0.5],\n ][rot] as Point,\n far: [\n [x + 0.5, y + 1.5],\n [x - 0.5, y + 0.5],\n [x + 0.5, y - 0.5],\n [x + 1.5, y + 0.5],\n ][rot] as Point,\n };\n\n return { top, bottom };\n}\n\nexport type ResizeDetail = {\n w: number;\n h: number;\n element: Element;\n};\nexport type ResizeEvent = CustomEvent;\nexport function newResizeEvent(detail: ResizeDetail): ResizeEvent {\n return new CustomEvent('oscd-sld-resize', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type PlaceLabelDetail = {\n x: number;\n y: number;\n element: Element;\n};\nexport type PlaceDetail = {\n x: number;\n y: number;\n element: Element;\n parent: Element;\n};\nexport type PlaceEvent = CustomEvent;\nexport function newPlaceEvent(detail: PlaceDetail): PlaceEvent {\n return new CustomEvent('oscd-sld-place', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type PlaceLabelEvent = CustomEvent;\nexport function newPlaceLabelEvent(detail: PlaceLabelDetail): PlaceLabelEvent {\n return new CustomEvent('oscd-sld-place-label', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\nexport type ConnectDetail = {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n connectTo: Element;\n toTerminal?: 'top' | 'bottom';\n};\nexport type ConnectEvent = CustomEvent;\nexport function newConnectEvent(detail: ConnectDetail): ConnectEvent {\n return new CustomEvent('oscd-sld-connect', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport type StartEvent = CustomEvent;\nexport function newRotateEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-rotate', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartResizeEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-resize', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartPlaceEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-place', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport function newStartPlaceLabelEvent(detail: Element): StartEvent {\n return new CustomEvent('oscd-sld-start-place-label', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\nexport type StartConnectDetail = {\n equipment: Element;\n terminal: 'top' | 'bottom';\n};\nexport type StartConnectEvent = CustomEvent;\nexport function newStartConnectEvent(\n detail: StartConnectDetail\n): StartConnectEvent {\n return new CustomEvent('oscd-sld-start-connect', {\n bubbles: true,\n composed: true,\n detail,\n });\n}\n\ndeclare global {\n interface ElementEventMap {\n ['oscd-sld-resize']: ResizeEvent;\n ['oscd-sld-place']: PlaceEvent;\n ['oscd-sld-place-label']: PlaceLabelEvent;\n ['oscd-sld-connect']: ConnectEvent;\n ['oscd-sld-rotate']: StartEvent;\n ['oscd-sld-start-resize']: StartEvent;\n ['oscd-sld-start-place']: StartEvent;\n ['oscd-sld-start-place-label']: StartEvent;\n ['oscd-sld-start-connect']: StartConnectEvent;\n }\n}\n","import { html, nothing, svg, TemplateResult } from 'lit';\nimport { EqType, eqTypes, isEqType, ringedEqTypes } from './util.js';\n\nexport const resizePath = svg``;\n\nexport const movePath = svg``;\n\nconst voltageLevelPath = svg``;\n\nconst bayPath = svg`\n \n \n \n \n \n \n `;\n\nexport const voltageLevelIcon = html`\n ${voltageLevelPath}\n`;\n\nexport const voltageLevelGraphic = html`\n ${voltageLevelPath}\n`;\n\nexport const bayIcon = html`\n ${bayPath}\n`;\n\nexport const bayGraphic = html`\n ${bayPath}\n`;\n\nconst equipmentPaths: Record> = {\n CAB: svg`\n \n \n \n \n \n `,\n CAP: svg`\n \n \n \n \n `,\n CBR: svg`\n \n \n \n \n \n `,\n CTR: svg`\n \n \n `,\n DIS: svg`\n \n \n \n \n `,\n GEN: svg`\n \n `,\n IFL: svg`\n \n \n \n `,\n LIN: svg`\n \n \n \n `,\n MOT: svg`\n \n `,\n REA: svg`\n \n \n \n `,\n RES: svg`\n \n \n \n `,\n SAR: svg`\n \n \n \n \n \n `,\n SMC: svg`\n \n `,\n VTR: svg`\n \n \n \n`,\n};\n\nexport const eqRingPath = svg`\n \n \n `;\n\nconst defaultEquipmentPath = svg`\n \n \n \n \n \n`;\n\nexport function equipmentPath(equipmentType: string | null): TemplateResult<2> {\n if (equipmentType && isEqType(equipmentType))\n return equipmentPaths[equipmentType]!;\n return defaultEquipmentPath;\n}\n\nexport function equipmentGraphic(\n equipmentType: string | null\n): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n ${equipmentType && ringedEqTypes.has(equipmentType) ? eqRingPath : nothing}\n `;\n}\n\nexport function equipmentIcon(equipmentType: string): TemplateResult<1> {\n return html`\n ${equipmentPath(equipmentType)}\n ${ringedEqTypes.has(equipmentType) ? eqRingPath : nothing}\n `;\n}\n\nfunction equipmentSymbol(equipmentType: string): TemplateResult<2> {\n return svg`\n ${equipmentPath(equipmentType)}\n `;\n}\n\nexport const connectivityNodeMarker = svg`\n \n`;\n\nexport const groundedMarker = svg`\n \n \n \n`;\n\nexport const powerTransformerTwoWindingSymbol = svg`\n \n \n \n \n`;\n\nexport const symbols = svg`\n \n \n \n \n \n \n \n \n \n \n \n \n \n ${eqTypes.map(eqType => equipmentSymbol(eqType))}\n ${equipmentSymbol('ConductingEquipment')}\n ${connectivityNodeMarker}\n ${groundedMarker}\n \n`;\n","import { css, html, nothing, LitElement, svg, TemplateResult } from 'lit';\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { createRef, Ref, ref } from 'lit/directives/ref.js';\n\nimport { Edit, newEditEvent } from '@openscd/open-scd-core';\n\nimport type { Dialog } from '@material/mwc-dialog';\nimport type { SingleSelectedEvent } from '@material/mwc-list';\nimport type { TextField } from '@material/mwc-textfield';\n\nimport '@material/mwc-dialog';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item.js';\nimport '@material/mwc-textfield';\n\nimport { getReference, identity } from '@openscd/oscd-scl';\nimport {\n bayGraphic,\n eqRingPath,\n equipmentGraphic,\n movePath,\n resizePath,\n symbols,\n voltageLevelGraphic,\n} from './icons.js';\nimport {\n attributes,\n connectionStartPoints,\n elementPath,\n isBusBar,\n isEqType,\n newConnectEvent,\n newPlaceEvent,\n newPlaceLabelEvent,\n newResizeEvent,\n newRotateEvent,\n newStartConnectEvent,\n newStartPlaceEvent,\n newStartPlaceLabelEvent,\n newStartResizeEvent,\n Point,\n privType,\n removeNode,\n removeTerminal,\n ringedEqTypes,\n sldNs,\n svgNs,\n uuid,\n xmlBoolean,\n} from './util.js';\n\nconst parentTags: Partial> = {\n ConductingEquipment: 'Bay',\n Bay: 'VoltageLevel',\n VoltageLevel: 'Substation',\n};\n\nconst singleTerminal = new Set([\n 'BAT',\n 'EFN',\n 'FAN',\n 'GEN',\n 'IFL',\n 'MOT',\n 'PMP',\n 'RRC',\n 'SAR',\n 'SMC',\n 'VTR',\n]);\n\ntype EditWizardDetial = { element: Element };\n\nfunction newEditWizardEvent(element: Element): CustomEvent {\n return new CustomEvent('oscd-edit-wizard-request', {\n bubbles: true,\n composed: true,\n detail: { element },\n });\n}\n\ntype MenuItem = { handler: () => void; content: TemplateResult };\n\ntype Rect = [number, number, number, number];\n\nfunction contains([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n return x1 <= x2 && y1 <= y2 && x1 + w1 >= x2 + w2 && y1 + h1 >= y2 + h2;\n}\n\nfunction overlaps([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n if (x1 >= x2 + w2 || x2 >= x1 + w1) return false;\n if (y1 >= y2 + h2 || y2 >= y1 + h1) return false;\n return true;\n}\n\nfunction containsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return contains([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction overlapsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return overlaps([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction cleanPath(path: Point[]) {\n let i = path.length - 2;\n while (i > 0) {\n const [x, y] = path[i];\n const [nx, ny] = path[i + 1];\n const [px, py] = path[i - 1];\n\n if (\n (x === nx && y === ny) ||\n (x === nx && x === px) ||\n (y === ny && y === py)\n )\n path.splice(i, 1);\n i -= 1;\n }\n}\n\nfunction isBay(element: Element) {\n return element.tagName === 'Bay' && !isBusBar(element);\n}\n\nfunction preventDefault(e: Event) {\n e.preventDefault();\n}\n\nfunction copy(element: Element, nsp: string): Element {\n const clone = element.cloneNode(true) as Element;\n const terminals = new Set(\n Array.from(element.querySelectorAll('Terminal'))\n );\n const cNodes = new Set();\n terminals.forEach(terminal => {\n const cNode = element.ownerDocument.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode) cNodes.add(cNode);\n });\n const foreignCNodes = new Set();\n cNodes.forEach(cNode => {\n const foreignTerminal = Array.from(\n element.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute('pathName')}\"]`\n )\n ).find(terminal => !terminals.has(terminal));\n if (foreignTerminal) foreignCNodes.add(cNode);\n });\n foreignCNodes.forEach(cNode => {\n if (cNode.closest(element.tagName) === element) {\n clone\n .querySelector(\n `ConnectivityNode[pathName=\"${cNode.getAttribute('pathName')}\"]`\n )\n ?.remove();\n }\n terminals.forEach(terminal => {\n if (\n terminal.getAttribute('connectivityNode') ===\n cNode.getAttribute('pathName')\n )\n clone\n .querySelector(`[*|uuid=\"${terminal.getAttributeNS(sldNs, 'uuid')}\"]`)\n ?.remove();\n });\n });\n Array.from(clone.querySelectorAll('Terminal')).forEach(terminal => {\n const oldUUID = terminal.getAttributeNS(sldNs, 'uuid');\n const newUUID = uuid();\n Array.from(clone.querySelectorAll(`Vertex[*|uuid=\"${oldUUID}\"`)).forEach(\n vertex => vertex.setAttributeNS(sldNs, `${nsp}:uuid`, newUUID)\n );\n terminal.setAttributeNS(sldNs, `${nsp}:uuid`, newUUID);\n });\n return clone;\n}\n\nfunction renderMenuFooter(element: Element) {\n const name = element.getAttribute('name');\n let detail: string | null | TemplateResult<1> = element.getAttribute('desc');\n const type = element.getAttribute('type');\n if (type) {\n if (detail) detail = html`${type} — ${detail}`;\n else detail = type;\n }\n let footerGraphic = equipmentGraphic(null);\n if (element.tagName === 'ConductingEquipment')\n footerGraphic = equipmentGraphic(element.getAttribute('type'));\n else if (element.tagName === 'Bay' && isBusBar(element))\n footerGraphic = html`horizontal_rule`;\n else if (element.tagName === 'Bay') footerGraphic = bayGraphic;\n else if (element.tagName === 'VoltageLevel')\n footerGraphic = voltageLevelGraphic;\n return html`\n ${name}\n ${detail\n ? html`\n ${detail}\n `\n : nothing}\n ${footerGraphic}\n `;\n}\n\n@customElement('sld-editor')\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class SLDEditor extends LitElement {\n @property()\n doc!: XMLDocument;\n\n @property()\n substation!: Element;\n\n @property()\n editCount = -1;\n\n @property()\n gridSize = 32;\n\n @property()\n nsp = 'esld';\n\n @property()\n resizing?: Element;\n\n @property()\n placing?: Element;\n\n @property()\n placingLabel?: Element;\n\n @property()\n connecting?: {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n };\n\n @query('#resizeSubstationUI')\n resizeSubstationUI!: Dialog;\n\n @query('#substationWidthUI')\n substationWidthUI!: TextField;\n\n @query('#substationHeightUI')\n substationHeightUI!: TextField;\n\n @query('svg#sld')\n sld!: SVGGraphicsElement;\n\n @state()\n mouseX = 0;\n\n @state()\n mouseY = 0;\n\n @state()\n mouseX2 = 0;\n\n @state()\n mouseY2 = 0;\n\n @state()\n menu?: { element: Element; top: number; left: number };\n\n coordinatesRef: Ref = createRef();\n\n positionCoordinates(e: MouseEvent) {\n const coordinatesDiv = this.coordinatesRef?.value;\n if (coordinatesDiv) {\n coordinatesDiv.style.top = `${e.clientY}px`;\n coordinatesDiv.style.left = `${e.clientX + 16}px`;\n }\n }\n\n openMenu(element: Element, e: MouseEvent) {\n if (\n !this.placing &&\n !this.resizing &&\n !this.placingLabel &&\n !this.connecting\n )\n this.menu = { element, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }\n\n svgCoordinates(clientX: number, clientY: number) {\n const p = new DOMPoint(clientX, clientY);\n const { x, y } = p.matrixTransform(this.sld.getScreenCTM()!.inverse());\n return [x, y].map(coord => Math.max(0, coord));\n }\n\n canPlaceAt(element: Element, x: number, y: number, w: number, h: number) {\n if (element.tagName === 'Substation') return true;\n\n const overlappingSibling = Array.from(\n this.substation.querySelectorAll(element.tagName)\n ).find(\n sibling =>\n sibling !== element &&\n overlapsRect(sibling, x, y, w, h) &&\n !isBusBar(sibling)\n );\n if (overlappingSibling && !isBusBar(element)) {\n return false;\n }\n\n const containingParent =\n element.tagName === 'VoltageLevel'\n ? containsRect(this.substation, x, y, w, h)\n : Array.from(\n this.substation.querySelectorAll(parentTags[element.tagName]!)\n ).find(parent => containsRect(parent, x, y, w, h));\n if (containingParent) return true;\n return false;\n }\n\n canResizeTo(element: Element, w: number, h: number) {\n const {\n pos: [x, y],\n dim: [oldW, oldH],\n } = attributes(element);\n\n if (\n !this.canPlaceAt(element, x, y, w, h) &&\n this.canPlaceAt(element, x, y, oldW, oldH)\n )\n return false;\n\n const lostChild = Array.from(element.children).find(child => {\n if (parentTags[child.tagName] !== element.tagName) return false;\n const {\n pos: [cx, cy],\n dim: [cw, ch],\n } = attributes(child);\n\n return !contains([x, y, w, h], [cx, cy, cw, ch]);\n });\n if (lostChild) return false;\n\n return true;\n }\n\n renderedLabelPosition(element: Element): Point {\n let {\n label: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n if (this.placingLabel === element) {\n x = this.mouseX2;\n y = this.mouseY2 + 0.5;\n }\n return [x, y];\n }\n\n renderedPosition(element: Element): Point {\n let {\n pos: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n return [x, y];\n }\n\n handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') this.menu = undefined;\n };\n\n handleClick = (e: MouseEvent) => {\n if (\n this.menu &&\n !e\n .composedPath()\n .find(elm => 'id' in elm && elm.id === 'sld-context-menu')\n ) {\n e.stopImmediatePropagation();\n this.menu = undefined;\n }\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.handleKeydown);\n window.addEventListener('click', this.handleClick, true);\n window.addEventListener('click', this.positionCoordinates);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('keydown', this.handleKeydown);\n window.removeEventListener('click', this.handleClick);\n window.removeEventListener('click', this.positionCoordinates);\n }\n\n nearestOpenTerminal(equipment?: Element): 'top' | 'bottom' | undefined {\n if (!equipment) return undefined;\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n const oneSided = singleTerminal.has(equipment.getAttribute('type')!);\n if (topTerminal && bottomTerminal) return undefined;\n if (oneSided && (topTerminal || bottomTerminal)) return undefined;\n if (oneSided) return 'top';\n if (topTerminal) return 'bottom';\n if (bottomTerminal) return 'top';\n\n const [mX2, mY2] = [this.mouseX2, this.mouseY2].map(n => n % 1);\n const { rot } = attributes(equipment);\n if (rot === 0 && mY2 === 0.5) return 'bottom';\n if (rot === 1 && mX2 === 0) return 'bottom';\n if (rot === 2 && mY2 === 0) return 'bottom';\n if (rot === 3 && mX2 === 0.5) return 'bottom';\n return 'top';\n }\n\n groundTerminal(equipment: Element, name: 'T1' | 'T2') {\n const bay = equipment.closest('Bay')!;\n const edits: Edit[] = [];\n let grounded = bay.querySelector(\n ':scope > ConnectivityNode[name=\"grounded\"]'\n );\n let pathName = grounded?.getAttribute('pathName');\n if (!pathName) {\n pathName = elementPath(equipment.closest('Bay')!, 'grounded');\n grounded = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'ConnectivityNode'\n );\n grounded.setAttribute('name', 'grounded');\n grounded.setAttribute('pathName', pathName);\n edits.push({\n parent: bay,\n node: grounded,\n reference: getReference(bay, 'ConnectivityNode'),\n });\n }\n const terminal = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Terminal'\n );\n terminal.setAttribute('name', name);\n terminal.setAttribute('cNodeName', 'grounded');\n const sName = equipment.closest('Substation')!.getAttribute('name');\n if (sName) terminal.setAttribute('substationName', sName);\n const vlName = equipment.closest('VoltageLevel')!.getAttribute('name');\n if (vlName) terminal.setAttribute('voltageLevelName', vlName);\n const bName = equipment.closest('Bay')!.getAttribute('name');\n if (bName) terminal.setAttribute('bayName', bName);\n terminal.setAttribute('connectivityNode', pathName);\n edits.push({\n parent: equipment,\n node: terminal,\n reference: getReference(equipment, 'Terminal'),\n });\n this.dispatchEvent(newEditEvent(edits));\n }\n\n flipElement(element: Element) {\n const { flip } = attributes(element);\n this.dispatchEvent(\n newEditEvent({\n element,\n attributes: {\n [`${this.nsp}:flip`]: {\n namespaceURI: sldNs,\n value: flip ? null : 'true',\n },\n },\n })\n );\n }\n\n equipmentMenuItems(equipment: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Mirror\n flip\n `,\n handler: () => this.flipElement(equipment),\n },\n {\n content: html`\n Rotate\n rotate_90_degrees_cw\n `,\n handler: () => {\n this.dispatchEvent(newRotateEvent(equipment));\n },\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(equipment)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(equipment)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(equipment)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(equipment.querySelectorAll('Terminal')).forEach(terminal =>\n edits.push(...removeTerminal(terminal))\n );\n edits.push({ node: equipment });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n\n const { rot } = attributes(equipment);\n const icons = {\n connect: ['north', 'east', 'south', 'west'],\n ground: ['expand_less', 'chevron_right', 'expand_more', 'chevron_left'],\n disconnect: [\n 'arrow_drop_up',\n 'arrow_right',\n 'arrow_drop_down',\n 'arrow_left',\n ],\n };\n const texts = {\n connect: [\n 'Connect top',\n 'Connect right',\n 'Connect bottom',\n 'Connect left',\n ],\n ground: ['Ground top', 'Ground right', 'Ground bottom', 'Ground left'],\n disconnect: [\n 'Detach top',\n 'Detach right',\n 'Detach bottom',\n 'Detach left',\n ],\n };\n const icon = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n icons[kind][top ? rot % 4 : (rot + 2) % 4];\n const text = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n texts[kind][top ? rot % 4 : (rot + 2) % 4];\n const item = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n html`\n ${text(kind, top)}\n ${icon(kind, top)}\n `;\n\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n\n if (!singleTerminal.has(equipment.getAttribute('type')!)) {\n if (bottomTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(bottomTerminal))),\n content: item('disconnect', false),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({\n equipment,\n terminal: 'bottom',\n })\n ),\n content: item('connect', false),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T2'),\n content: item('ground', false),\n }\n );\n }\n if (topTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(topTerminal))),\n content: item('disconnect', true),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({ equipment, terminal: 'top' })\n ),\n content: item('connect', true),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T1'),\n content: item('ground', true),\n }\n );\n return items;\n }\n\n busBarMenuItems(busBar: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(busBar)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(busBar)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(busBar)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(busBar)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const node = busBar.querySelector('ConnectivityNode')!;\n this.dispatchEvent(\n newEditEvent([...removeNode(node), { node: busBar }])\n );\n },\n },\n ];\n return items;\n }\n\n containerMenuItems(bayOrVL: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(bayOrVL)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(bayOrVL)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(bayOrVL)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(bayOrVL)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(bayOrVL.getElementsByTagName('ConnectivityNode')).forEach(\n cNode => {\n if (\n Array.from(\n this.doc.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute(\n 'pathName'\n )}\"]`\n )\n ).find(\n terminal => terminal.closest(bayOrVL.tagName) !== bayOrVL\n )\n )\n edits.push(...removeNode(cNode));\n }\n );\n Array.from(bayOrVL.getElementsByTagName('Terminal')).forEach(\n terminal => {\n const cNode = this.doc.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode && cNode.closest(bayOrVL.tagName) !== bayOrVL)\n edits.push(...removeNode(cNode));\n }\n );\n edits.push({ node: bayOrVL });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n return items;\n }\n\n renderMenu() {\n if (!this.menu) return html``;\n const { element } = this.menu;\n\n let items: MenuItem[] = [];\n if (element.tagName === 'ConductingEquipment')\n items = this.equipmentMenuItems(element);\n else if (element.tagName === 'Bay' && isBusBar(element))\n items = this.busBarMenuItems(element);\n else if (element.tagName === 'Bay' || element.tagName === 'VoltageLevel')\n items = this.containerMenuItems(element);\n\n return html`\n {\n if (!(menu instanceof HTMLElement)) return;\n const nav = (\n this.parentElement!.getRootNode() as ShadowRoot\n ).querySelector('nav')!;\n const navHeight = nav.offsetHeight + 8;\n await this.updateComplete;\n const { bottom, right } = menu.getBoundingClientRect();\n if (bottom > window.innerHeight - navHeight) {\n menu.style.removeProperty('top');\n // eslint-disable-next-line no-param-reassign\n menu.style.bottom = `${navHeight}px`;\n // eslint-disable-next-line no-param-reassign\n menu.style.maxHeight = `calc(100vh - ${navHeight + 68}px)`;\n }\n if (right > window.innerWidth) {\n menu.style.removeProperty('left');\n // eslint-disable-next-line no-param-reassign\n menu.style.right = '0px';\n }\n })}\n >\n {\n items[index]?.handler();\n this.menu = undefined;\n }}\n >\n ${items.map(i => i.content)}\n
  • \n ${renderMenuFooter(element)}\n \n \n `;\n }\n\n render() {\n const {\n dim: [w, h],\n } = attributes(this.substation);\n\n const placingTarget =\n this.placing?.tagName === 'VoltageLevel'\n ? svg``\n : nothing;\n\n const placingLabelTarget = this.placingLabel\n ? svg` {\n const element = this.placingLabel!;\n const [x, y] = this.renderedLabelPosition(element);\n this.dispatchEvent(newPlaceLabelEvent({ element, x, y }));\n }}\n />`\n : nothing;\n\n let placingElement = svg``;\n if (this.placing) {\n if (this.placing.tagName === 'VoltageLevel' || isBay(this.placing))\n placingElement = svg`${this.renderContainer(this.placing, true)}`;\n else if (this.placing.tagName === 'ConductingEquipment')\n placingElement = this.renderEquipment(this.placing, { preview: true });\n else if (isBusBar(this.placing))\n placingElement = this.renderBusBar(this.placing);\n }\n\n let coordinates = html``;\n let invalid = false;\n let hidden = true;\n if (this.placing) {\n const {\n dim: [w0, h0],\n } = attributes(this.placing);\n hidden = false;\n invalid = !this.canPlaceAt(\n this.placing,\n this.mouseX,\n this.mouseY,\n w0,\n h0\n );\n coordinates = html`${this.mouseX},${this.mouseY}`;\n }\n\n if (this.resizing && !isBusBar(this.resizing)) {\n const {\n pos: [x, y],\n } = attributes(this.resizing);\n const newW = Math.max(1, this.mouseX - x + 1);\n const newH = Math.max(1, this.mouseY - y + 1);\n hidden = false;\n invalid = !this.canResizeTo(this.resizing, newW, newH);\n coordinates = html`${newW}×${newH}`;\n }\n const coordinateTooltip = html`
    `;\n }\n\n renderLabel(element: Element) {\n const [x, y] = this.renderedLabelPosition(element);\n const name = element.getAttribute('name');\n const fontSize = element.tagName === 'ConductingEquipment' ? 0.45 : 0.6;\n let cursor = 'default';\n let handleClick: (() => void) | symbol = nothing;\n if (this.placingLabel === element)\n handleClick = () =>\n this.dispatchEvent(newPlaceLabelEvent({ element, x, y }));\n else if (!this.placing && !this.resizing) {\n cursor = 'move';\n handleClick = () => this.dispatchEvent(newStartPlaceLabelEvent(element));\n }\n const id = identity(element);\n return svg`\n \n ${name}\n `;\n }\n\n renderContainer(bayOrVL: Element, preview = false): TemplateResult<2> {\n const isVL = bayOrVL.tagName === 'VoltageLevel';\n if (this.placing === bayOrVL && !preview) return svg``;\n\n const [x, y] = this.renderedPosition(bayOrVL);\n let {\n dim: [w, h],\n } = attributes(bayOrVL);\n let handleClick: (() => void) | undefined;\n let invalid = false;\n\n if (this.resizing === bayOrVL) {\n w = Math.max(1, this.mouseX - x + 1);\n h = Math.max(1, this.mouseY - y + 1);\n if (this.canResizeTo(bayOrVL, w, h))\n handleClick = () => {\n this.dispatchEvent(\n newResizeEvent({\n w,\n h,\n element: bayOrVL,\n })\n );\n };\n else invalid = true;\n }\n\n if (this.placing === bayOrVL) {\n let parent: Element | undefined;\n if (isVL) parent = this.substation;\n else\n parent = Array.from(\n this.substation.querySelectorAll(':root > Substation > VoltageLevel')\n ).find(vl => containsRect(vl, x, y, w, h));\n if (parent && this.canPlaceAt(bayOrVL, x, y, w, h))\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: bayOrVL,\n parent: parent!,\n })\n );\n };\n else invalid = true;\n }\n\n let moveHandle = svg``;\n let resizeHandle = svg``;\n let placingTarget = svg``;\n let resizingTarget = svg``;\n if (\n this.resizing === bayOrVL ||\n (isVL && this.placing?.tagName === 'Bay') ||\n (!isVL && this.placing?.tagName === 'ConductingEquipment')\n )\n placingTarget = svg``;\n\n if (\n this.resizing &&\n isBusBar(this.resizing) &&\n this.resizing.parentElement === bayOrVL\n )\n resizingTarget = svg``;\n\n if (!this.placing && !this.resizing && !this.connecting) {\n moveHandle = svg`\n\n this.dispatchEvent(newStartPlaceEvent(bayOrVL))}>\n \n \n ${movePath}\n \n\n `;\n resizeHandle = svg`\n\n this.dispatchEvent(newStartResizeEvent(bayOrVL))}>\n \n \n ${resizePath}\n \n\n `;\n }\n\n return svg`\n {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: bayOrVL, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }}\n @click=${handleClick || nothing}\n fill=\"white\" stroke-dasharray=\"${isVL ? nothing : '0.18'}\"\n stroke=\"${\n // eslint-disable-next-line no-nested-ternary\n invalid ? '#BB1326' : isVL ? '#F5E214' : '#12579B'\n }\" />\n ${moveHandle}\n ${Array.from(bayOrVL.children)\n .filter(isBay)\n .map(bay => this.renderContainer(bay))}\n ${Array.from(bayOrVL.children)\n .filter(child => child.tagName === 'ConductingEquipment')\n .map(equipment => this.renderEquipment(equipment))}\n ${\n preview\n ? Array.from(bayOrVL.querySelectorAll('ConnectivityNode'))\n .filter(child => child.getAttribute('name') !== 'grounded')\n .map(cNode => this.renderConnectivityNode(cNode))\n : nothing\n }\n ${placingTarget}\n ${resizeHandle}\n ${resizingTarget}\n `;\n }\n\n renderEquipment(\n equipment: Element,\n { preview = false, connect = false } = {}\n ) {\n if (this.placing === equipment && !preview) return svg``;\n if (\n this.connecting?.equipment.closest('Substation') === this.substation &&\n !connect\n )\n return svg``;\n\n const [x, y] = this.renderedPosition(equipment);\n const { flip, rot } = attributes(equipment);\n const deg = 90 * rot;\n\n const eqType = equipment.getAttribute('type')!;\n const symbol = ['CBR', 'CTR', 'VTR', 'DIS', 'IFL'].includes(eqType)\n ? eqType\n : 'ConductingEquipment';\n\n let handleClick = () => {\n this.dispatchEvent(newStartPlaceEvent(equipment));\n };\n\n if (this.placing === equipment) {\n const parent = Array.from(\n this.substation.querySelectorAll(\n ':root > Substation > VoltageLevel > Bay'\n )\n ).find(vl => containsRect(vl, x, y, 1, 1));\n if (parent && this.canPlaceAt(equipment, x, y, 1, 1))\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: equipment,\n parent,\n })\n );\n };\n }\n\n const terminals = Array.from(equipment.children).filter(\n c => c.tagName === 'Terminal'\n );\n const topTerminal = terminals.find(t => t.getAttribute('name') === 'T1');\n const bottomTerminal = terminals.find(t => t.getAttribute('name') !== 'T1');\n\n const topConnector =\n topTerminal || this.placing || this.resizing || this.connecting\n ? nothing\n : svg`\n this.dispatchEvent(newStartConnectEvent({ equipment, terminal: 'top' }))}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n e.preventDefault();\n this.groundTerminal(equipment, 'T1');\n }}\n />`;\n\n const topIndicator =\n !this.connecting ||\n this.connecting.equipment === equipment ||\n (this.connecting &&\n this.mouseX === x &&\n this.mouseY === y &&\n this.nearestOpenTerminal(equipment) === 'top') ||\n topTerminal\n ? nothing\n : svg``;\n\n const topGrounded =\n topTerminal?.getAttribute('cNodeName') === 'grounded'\n ? svg``\n : nothing;\n\n const bottomConnector =\n bottomTerminal ||\n this.placing ||\n this.resizing ||\n this.connecting ||\n singleTerminal.has(eqType)\n ? nothing\n : svg`\n this.dispatchEvent(\n newStartConnectEvent({ equipment, terminal: 'bottom' })\n )}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n e.preventDefault();\n this.groundTerminal(equipment, 'T2');\n }}\n />`;\n\n const bottomIndicator =\n !this.connecting ||\n this.connecting.equipment === equipment ||\n (this.connecting &&\n this.mouseX === x &&\n this.mouseY === y &&\n this.nearestOpenTerminal(equipment) === 'bottom') ||\n bottomTerminal ||\n singleTerminal.has(eqType)\n ? nothing\n : svg``;\n\n const bottomGrounded =\n bottomTerminal?.getAttribute('cNodeName') === 'grounded'\n ? svg``\n : nothing;\n\n return svg`\n ${equipment.getAttribute('name')}\n \n {\n if (e.button === 1) {\n // middle mouse button\n this.dispatchEvent(newRotateEvent(equipment));\n e.preventDefault();\n }\n }}\n @contextmenu=${(e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: equipment, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }}\n />\n ${topConnector}\n ${topIndicator}\n ${topGrounded}\n ${bottomConnector}\n ${bottomIndicator}\n ${bottomGrounded}\n `;\n }\n\n renderBusBar(busBar: Element) {\n const [x, y] = this.renderedPosition(busBar);\n const {\n dim: [w, h],\n } = attributes(busBar);\n let placingTarget = svg``;\n if (this.placing === busBar)\n placingTarget = svg` {\n const parent = Array.from(\n this.substation.querySelectorAll(\n ':root > Substation > VoltageLevel'\n )\n ).find(vl => containsRect(vl, x, y, w, h));\n if (parent)\n this.dispatchEvent(\n newPlaceEvent({\n x,\n y,\n element: busBar,\n parent: parent!,\n })\n );\n }}\n />`;\n return svg`\n ${busBar.getAttribute('name')}\n ${this.renderConnectivityNode(busBar.querySelector('ConnectivityNode')!)}\n ${placingTarget}\n `;\n }\n\n renderConnectivityNode(cNode: Element) {\n const priv = cNode.querySelector(`Private[type=\"${privType}\"]`);\n if (!priv) return nothing;\n const circles = [] as TemplateResult<2>[];\n const intersections = Object.entries(\n Array.from(priv.querySelectorAll('Vertex'))\n .map(v => this.renderedPosition(v))\n .reduce((obj, pos) => {\n const ret = obj;\n const key = JSON.stringify(pos);\n if (ret[key]) ret[key].count += 1;\n else ret[key] = { val: pos, count: 1 };\n return ret;\n }, {} as Record)\n )\n .filter(([_, { count }]) => count > 2)\n .map(([_, { val }]) => val);\n intersections.forEach(([x, y]) =>\n circles.push(svg``)\n );\n const lines = [] as TemplateResult<2>[];\n const sections = Array.from(priv.getElementsByTagNameNS(sldNs, 'Section'));\n const bay = cNode.closest('Bay');\n sections.forEach(section => {\n const busBar = xmlBoolean(section.getAttribute('bus'));\n const vertices = Array.from(\n section.getElementsByTagNameNS(sldNs, 'Vertex')\n ).map(vertex => this.renderedPosition(vertex));\n let i = 0;\n while (i < vertices.length - 1) {\n const [x1, y1] = vertices[i];\n let [x2, y2] = vertices[i + 1];\n let handleClick: (() => void) | symbol = nothing;\n let handleAuxClick: ((e: MouseEvent) => void) | symbol = nothing;\n let handleContextMenu: ((e: MouseEvent) => void) | symbol = nothing;\n if (busBar && bay) {\n handleClick = () => this.dispatchEvent(newStartPlaceEvent(bay));\n handleAuxClick = ({ button }: MouseEvent) => {\n if (button === 1) this.dispatchEvent(newStartResizeEvent(bay));\n };\n handleContextMenu = (e: MouseEvent) => {\n if (e.getModifierState('Shift')) return;\n this.menu = { element: bay, left: e.clientX, top: e.clientY };\n e.preventDefault();\n };\n }\n if (busBar && this.resizing === bay) {\n if (section !== sections.find(s => xmlBoolean(s.getAttribute('bus'))))\n return;\n circles.length = 0;\n const {\n pos: [vX, vY],\n dim: [vW, vH],\n } = attributes(bay.parentElement!);\n const maxX = vX + vW - 0.5;\n const maxY = vY + vH - 0.5;\n if (i === 0) {\n const dx = Math.max(this.mouseX - x1, 0);\n const dy = Math.max(this.mouseY - y1, 0);\n if (dx > dy) {\n x2 = Math.max(x1, Math.min(maxX, this.mouseX + 0.5));\n y2 = y1;\n } else {\n y2 = Math.max(y1, Math.min(maxY, this.mouseY + 0.5));\n x2 = x1;\n }\n if (x1 === x2 && y1 === y2)\n if (x2 >= maxX) y2 += 1;\n else x2 += 1;\n }\n handleClick = () => {\n this.dispatchEvent(\n newPlaceEvent({\n parent: section,\n element: section.getElementsByTagNameNS(sldNs, 'Vertex')[\n vertices.length - 1\n ],\n x: x2,\n y: y2,\n })\n );\n };\n lines.push(svg``);\n }\n if (this.connecting)\n handleClick = () => {\n const { equipment, path, terminal } = this.connecting!;\n if (\n equipment.querySelector(\n `Terminal[connectivityNode=\"${cNode.getAttribute('pathName')}\"]`\n )\n )\n return;\n const [[oldX1, _y], [oldX2, oldY2]] = path.slice(-2);\n const vertical = oldX1 === oldX2;\n\n const x3 = this.mouseX + 0.5;\n const y3 = this.mouseY + 0.5;\n\n const newX2 = vertical ? oldX2 : x3;\n const newY2 = vertical ? y3 : oldY2;\n\n path[path.length - 1] = [newX2, newY2];\n path.push([x3, y3]);\n cleanPath(path);\n this.dispatchEvent(\n newConnectEvent({\n equipment,\n terminal,\n path,\n connectTo: cNode,\n })\n );\n };\n\n lines.push(\n svg``\n );\n lines.push(\n svg``\n );\n if (![x1, y1].find(n => Number.isInteger(n)))\n lines.push(\n svg``\n );\n if (![x2, y2].find(n => Number.isInteger(n)))\n lines.push(\n svg``\n );\n i += 1;\n }\n });\n const id = cNode.parentElement!.parentElement ? identity(cNode) : nothing;\n return svg`\n ${cNode.getAttribute('pathName')}\n ${circles}\n ${lines}\n `;\n }\n\n static styles = css`\n h2 {\n font-family: Roboto;\n font-weight: 300;\n font-size: 24px;\n margin-bottom: 4px;\n --mdc-icon-button-size: 28px;\n --mdc-icon-size: 24px;\n }\n `;\n}\n"]} \ No newline at end of file +{"version":3,"file":"sld-editor.js","sourceRoot":"","sources":["../sld-editor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC1E,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAO,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAQ,YAAY,EAAE,MAAM,wBAAw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AAC,CAAC,OAAO,CAAC;QACd,OAAO,GAAG,CAAA,uBAAuB,EAAE;iBACtB,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC;UACrC,OAAO;UACP,KAAK;WACJ,CAAC;IACV,CAAC;;AAEM,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiClB,CAAC;AA//CF;IADC,QAAQ,EAAE;sCACO;AAGlB;IADC,QAAQ,EAAE;6CACU;AAGrB;IADC,QAAQ,EAAE;4CACI;AAGf;IADC,QAAQ,EAAE;2CACG;AAGd;IADC,QAAQ,EAAE;sCACE;AAGb;IADC,QAAQ,EAAE;2CACQ;AAGnB;IADC,QAAQ,EAAE;0CACO;AAGlB;IADC,QAAQ,EAAE;+CACY;AAGvB;IADC,QAAQ,EAAE;6CAKT;AAGF;IADC,KAAK,CAAC,qBAAqB,CAAC;qDACD;AAG5B;IADC,KAAK,CAAC,oBAAoB,CAAC;oDACE;AAG9B;IADC,KAAK,CAAC,qBAAqB,CAAC;qDACE;AAG/B;IADC,KAAK,CAAC,SAAS,CAAC;sCACQ;AAGzB;IADC,KAAK,EAAE;yCACG;AAGX;IADC,KAAK,EAAE;yCACG;AAGX;IADC,KAAK,EAAE;0CACI;AAGZ;IADC,KAAK,EAAE;0CACI;AAGZ;IADC,KAAK,EAAE;uCAC+C;AAzD5C,SAAS;IAFrB,aAAa,CAAC,YAAY,CAAC;IAC5B,gEAAgE;GACnD,SAAS,CAkgDrB;SAlgDY,SAAS","sourcesContent":["import { css, html, nothing, LitElement, svg, TemplateResult } from 'lit';\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { createRef, Ref, ref } from 'lit/directives/ref.js';\n\nimport { Edit, newEditEvent } from '@openscd/open-scd-core';\n\nimport type { Dialog } from '@material/mwc-dialog';\nimport type { SingleSelectedEvent } from '@material/mwc-list';\nimport type { TextField } from '@material/mwc-textfield';\n\nimport '@material/mwc-dialog';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item.js';\nimport '@material/mwc-textfield';\n\nimport { getReference, identity } from '@openscd/oscd-scl';\nimport {\n bayGraphic,\n eqRingPath,\n equipmentGraphic,\n movePath,\n resizePath,\n symbols,\n voltageLevelGraphic,\n} from './icons.js';\nimport {\n attributes,\n connectionStartPoints,\n elementPath,\n isBusBar,\n isEqType,\n newConnectEvent,\n newPlaceEvent,\n newPlaceLabelEvent,\n newResizeEvent,\n newRotateEvent,\n newStartConnectEvent,\n newStartPlaceEvent,\n newStartPlaceLabelEvent,\n newStartResizeEvent,\n Point,\n privType,\n removeNode,\n removeTerminal,\n ringedEqTypes,\n sldNs,\n svgNs,\n uuid,\n xmlBoolean,\n} from './util.js';\n\nconst parentTags: Partial> = {\n ConductingEquipment: 'Bay',\n Bay: 'VoltageLevel',\n VoltageLevel: 'Substation',\n};\n\nconst singleTerminal = new Set([\n 'BAT',\n 'EFN',\n 'FAN',\n 'GEN',\n 'IFL',\n 'MOT',\n 'PMP',\n 'RRC',\n 'SAR',\n 'SMC',\n 'VTR',\n]);\n\ntype EditWizardDetial = { element: Element };\n\nfunction newEditWizardEvent(element: Element): CustomEvent {\n return new CustomEvent('oscd-edit-wizard-request', {\n bubbles: true,\n composed: true,\n detail: { element },\n });\n}\n\ntype MenuItem = { handler: () => void; content: TemplateResult };\n\ntype Rect = [number, number, number, number];\n\nfunction contains([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n return x1 <= x2 && y1 <= y2 && x1 + w1 >= x2 + w2 && y1 + h1 >= y2 + h2;\n}\n\nfunction overlaps([x1, y1, w1, h1]: Rect, [x2, y2, w2, h2]: Rect) {\n if (x1 >= x2 + w2 || x2 >= x1 + w1) return false;\n if (y1 >= y2 + h2 || y2 >= y1 + h1) return false;\n return true;\n}\n\nfunction containsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return contains([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction overlapsRect(\n element: Element,\n x0: number,\n y0: number,\n w0: number,\n h0: number\n): boolean {\n const {\n pos: [x, y],\n dim: [w, h],\n } = attributes(element);\n return overlaps([x, y, w, h], [x0, y0, w0, h0]);\n}\n\nfunction cleanPath(path: Point[]) {\n let i = path.length - 2;\n while (i > 0) {\n const [x, y] = path[i];\n const [nx, ny] = path[i + 1];\n const [px, py] = path[i - 1];\n\n if (\n (x === nx && y === ny) ||\n (x === nx && x === px) ||\n (y === ny && y === py)\n )\n path.splice(i, 1);\n i -= 1;\n }\n}\n\nfunction isBay(element: Element) {\n return element.tagName === 'Bay' && !isBusBar(element);\n}\n\nfunction preventDefault(e: Event) {\n e.preventDefault();\n}\n\nfunction copy(element: Element, nsp: string): Element {\n const clone = element.cloneNode(true) as Element;\n const terminals = new Set(\n Array.from(element.querySelectorAll('Terminal'))\n );\n const cNodes = new Set();\n terminals.forEach(terminal => {\n const cNode = element.ownerDocument.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode) cNodes.add(cNode);\n });\n const foreignCNodes = new Set();\n cNodes.forEach(cNode => {\n const foreignTerminal = Array.from(\n element.ownerDocument.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute('pathName')}\"]`\n )\n ).find(terminal => !terminals.has(terminal));\n if (foreignTerminal) foreignCNodes.add(cNode);\n });\n foreignCNodes.forEach(cNode => {\n if (cNode.closest(element.tagName) === element) {\n clone\n .querySelector(\n `ConnectivityNode[pathName=\"${cNode.getAttribute('pathName')}\"]`\n )\n ?.remove();\n }\n terminals.forEach(terminal => {\n if (\n terminal.getAttribute('connectivityNode') ===\n cNode.getAttribute('pathName')\n )\n clone\n .querySelector(`[*|uuid=\"${terminal.getAttributeNS(sldNs, 'uuid')}\"]`)\n ?.remove();\n });\n });\n Array.from(clone.querySelectorAll('Terminal')).forEach(terminal => {\n const oldUUID = terminal.getAttributeNS(sldNs, 'uuid');\n const newUUID = uuid();\n Array.from(clone.querySelectorAll(`Vertex[*|uuid=\"${oldUUID}\"`)).forEach(\n vertex => vertex.setAttributeNS(sldNs, `${nsp}:uuid`, newUUID)\n );\n terminal.setAttributeNS(sldNs, `${nsp}:uuid`, newUUID);\n });\n return clone;\n}\n\nfunction renderMenuFooter(element: Element) {\n const name = element.getAttribute('name');\n let detail: string | null | TemplateResult<1> = element.getAttribute('desc');\n const type = element.getAttribute('type');\n if (type) {\n if (detail) detail = html`${type} — ${detail}`;\n else detail = type;\n }\n let footerGraphic = equipmentGraphic(null);\n if (element.tagName === 'ConductingEquipment')\n footerGraphic = equipmentGraphic(element.getAttribute('type'));\n else if (element.tagName === 'Bay' && isBusBar(element))\n footerGraphic = html`horizontal_rule`;\n else if (element.tagName === 'Bay') footerGraphic = bayGraphic;\n else if (element.tagName === 'VoltageLevel')\n footerGraphic = voltageLevelGraphic;\n return html`\n ${name}\n ${detail\n ? html`\n ${detail}\n `\n : nothing}\n ${footerGraphic}\n `;\n}\n\n@customElement('sld-editor')\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class SLDEditor extends LitElement {\n @property()\n doc!: XMLDocument;\n\n @property()\n substation!: Element;\n\n @property()\n editCount = -1;\n\n @property()\n gridSize = 32;\n\n @property()\n nsp = 'esld';\n\n @property()\n resizing?: Element;\n\n @property()\n placing?: Element;\n\n @property()\n placingLabel?: Element;\n\n @property()\n connecting?: {\n equipment: Element;\n path: Point[];\n terminal: 'top' | 'bottom';\n };\n\n @query('#resizeSubstationUI')\n resizeSubstationUI!: Dialog;\n\n @query('#substationWidthUI')\n substationWidthUI!: TextField;\n\n @query('#substationHeightUI')\n substationHeightUI!: TextField;\n\n @query('svg#sld')\n sld!: SVGGraphicsElement;\n\n @state()\n mouseX = 0;\n\n @state()\n mouseY = 0;\n\n @state()\n mouseX2 = 0;\n\n @state()\n mouseY2 = 0;\n\n @state()\n menu?: { element: Element; top: number; left: number };\n\n coordinatesRef: Ref = createRef();\n\n positionCoordinates(e: MouseEvent) {\n const coordinatesDiv = this.coordinatesRef?.value;\n if (coordinatesDiv) {\n coordinatesDiv.style.top = `${e.clientY}px`;\n coordinatesDiv.style.left = `${e.clientX + 16}px`;\n }\n }\n\n openMenu(element: Element, e: MouseEvent) {\n if (\n !this.placing &&\n !this.resizing &&\n !this.placingLabel &&\n !this.connecting\n )\n this.menu = { element, left: e.clientX, top: e.clientY };\n e.preventDefault();\n }\n\n svgCoordinates(clientX: number, clientY: number) {\n const p = new DOMPoint(clientX, clientY);\n const { x, y } = p.matrixTransform(this.sld.getScreenCTM()!.inverse());\n return [x, y].map(coord => Math.max(0, coord));\n }\n\n canPlaceAt(element: Element, x: number, y: number, w: number, h: number) {\n if (element.tagName === 'Substation') return true;\n\n const overlappingSibling = Array.from(\n this.substation.querySelectorAll(element.tagName)\n ).find(\n sibling =>\n sibling !== element &&\n overlapsRect(sibling, x, y, w, h) &&\n !isBusBar(sibling)\n );\n if (overlappingSibling && !isBusBar(element)) {\n return false;\n }\n\n const containingParent =\n element.tagName === 'VoltageLevel'\n ? containsRect(this.substation, x, y, w, h)\n : Array.from(\n this.substation.querySelectorAll(parentTags[element.tagName]!)\n ).find(parent => containsRect(parent, x, y, w, h));\n if (containingParent) return true;\n return false;\n }\n\n canResizeTo(element: Element, w: number, h: number) {\n const {\n pos: [x, y],\n dim: [oldW, oldH],\n } = attributes(element);\n\n if (\n !this.canPlaceAt(element, x, y, w, h) &&\n this.canPlaceAt(element, x, y, oldW, oldH)\n )\n return false;\n\n const lostChild = Array.from(element.children).find(child => {\n if (parentTags[child.tagName] !== element.tagName) return false;\n const {\n pos: [cx, cy],\n dim: [cw, ch],\n } = attributes(child);\n\n return !contains([x, y, w, h], [cx, cy, cw, ch]);\n });\n if (lostChild) return false;\n\n return true;\n }\n\n renderedLabelPosition(element: Element): Point {\n let {\n label: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n if (this.placingLabel === element) {\n x = this.mouseX2;\n y = this.mouseY2 + 0.5;\n }\n return [x, y];\n }\n\n renderedPosition(element: Element): Point {\n let {\n pos: [x, y],\n } = attributes(element);\n if (\n this.placing &&\n element.closest(this.placing.tagName) === this.placing\n ) {\n const {\n pos: [parentX, parentY],\n } = attributes(this.placing);\n x += this.mouseX - parentX;\n y += this.mouseY - parentY;\n }\n return [x, y];\n }\n\n handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') this.menu = undefined;\n };\n\n handleClick = (e: MouseEvent) => {\n if (\n this.menu &&\n !e\n .composedPath()\n .find(elm => 'id' in elm && elm.id === 'sld-context-menu')\n ) {\n e.stopImmediatePropagation();\n this.menu = undefined;\n }\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.handleKeydown);\n window.addEventListener('click', this.handleClick, true);\n window.addEventListener('click', this.positionCoordinates);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('keydown', this.handleKeydown);\n window.removeEventListener('click', this.handleClick);\n window.removeEventListener('click', this.positionCoordinates);\n }\n\n nearestOpenTerminal(equipment?: Element): 'top' | 'bottom' | undefined {\n if (!equipment) return undefined;\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n const oneSided = singleTerminal.has(equipment.getAttribute('type')!);\n if (topTerminal && bottomTerminal) return undefined;\n if (oneSided && (topTerminal || bottomTerminal)) return undefined;\n if (oneSided) return 'top';\n if (topTerminal) return 'bottom';\n if (bottomTerminal) return 'top';\n\n const [mX2, mY2] = [this.mouseX2, this.mouseY2].map(n => n % 1);\n const { rot } = attributes(equipment);\n if (rot === 0 && mY2 === 0.5) return 'bottom';\n if (rot === 1 && mX2 === 0) return 'bottom';\n if (rot === 2 && mY2 === 0) return 'bottom';\n if (rot === 3 && mX2 === 0.5) return 'bottom';\n return 'top';\n }\n\n groundTerminal(equipment: Element, name: 'T1' | 'T2') {\n const bay = equipment.closest('Bay')!;\n const edits: Edit[] = [];\n let grounded = bay.querySelector(\n ':scope > ConnectivityNode[name=\"grounded\"]'\n );\n let pathName = grounded?.getAttribute('pathName');\n if (!pathName) {\n pathName = elementPath(equipment.closest('Bay')!, 'grounded');\n grounded = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'ConnectivityNode'\n );\n grounded.setAttribute('name', 'grounded');\n grounded.setAttribute('pathName', pathName);\n edits.push({\n parent: bay,\n node: grounded,\n reference: getReference(bay, 'ConnectivityNode'),\n });\n }\n const terminal = this.doc.createElementNS(\n this.doc.documentElement.namespaceURI,\n 'Terminal'\n );\n terminal.setAttribute('name', name);\n terminal.setAttribute('cNodeName', 'grounded');\n const sName = equipment.closest('Substation')!.getAttribute('name');\n if (sName) terminal.setAttribute('substationName', sName);\n const vlName = equipment.closest('VoltageLevel')!.getAttribute('name');\n if (vlName) terminal.setAttribute('voltageLevelName', vlName);\n const bName = equipment.closest('Bay')!.getAttribute('name');\n if (bName) terminal.setAttribute('bayName', bName);\n terminal.setAttribute('connectivityNode', pathName);\n edits.push({\n parent: equipment,\n node: terminal,\n reference: getReference(equipment, 'Terminal'),\n });\n this.dispatchEvent(newEditEvent(edits));\n }\n\n flipElement(element: Element) {\n const { flip } = attributes(element);\n this.dispatchEvent(\n newEditEvent({\n element,\n attributes: {\n [`${this.nsp}:flip`]: {\n namespaceURI: sldNs,\n value: flip ? null : 'true',\n },\n },\n })\n );\n }\n\n equipmentMenuItems(equipment: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Mirror\n flip\n `,\n handler: () => this.flipElement(equipment),\n },\n {\n content: html`\n Rotate\n rotate_90_degrees_cw\n `,\n handler: () => {\n this.dispatchEvent(newRotateEvent(equipment));\n },\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(equipment)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(equipment)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(equipment)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(equipment.querySelectorAll('Terminal')).forEach(terminal =>\n edits.push(...removeTerminal(terminal))\n );\n edits.push({ node: equipment });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n\n const { rot } = attributes(equipment);\n const icons = {\n connect: ['north', 'east', 'south', 'west'],\n ground: ['expand_less', 'chevron_right', 'expand_more', 'chevron_left'],\n disconnect: [\n 'arrow_drop_up',\n 'arrow_right',\n 'arrow_drop_down',\n 'arrow_left',\n ],\n };\n const texts = {\n connect: [\n 'Connect top',\n 'Connect right',\n 'Connect bottom',\n 'Connect left',\n ],\n ground: ['Ground top', 'Ground right', 'Ground bottom', 'Ground left'],\n disconnect: [\n 'Detach top',\n 'Detach right',\n 'Detach bottom',\n 'Detach left',\n ],\n };\n const icon = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n icons[kind][top ? rot % 4 : (rot + 2) % 4];\n const text = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n texts[kind][top ? rot % 4 : (rot + 2) % 4];\n const item = (kind: 'connect' | 'ground' | 'disconnect', top: boolean) =>\n html`\n ${text(kind, top)}\n ${icon(kind, top)}\n `;\n\n const topTerminal = equipment.querySelector('Terminal[name=\"T1\"]');\n const bottomTerminal = equipment.querySelector('Terminal:not([name=\"T1\"])');\n\n if (!singleTerminal.has(equipment.getAttribute('type')!)) {\n if (bottomTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(bottomTerminal))),\n content: item('disconnect', false),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({\n equipment,\n terminal: 'bottom',\n })\n ),\n content: item('connect', false),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T2'),\n content: item('ground', false),\n }\n );\n }\n if (topTerminal)\n items.unshift({\n handler: () =>\n this.dispatchEvent(newEditEvent(removeTerminal(topTerminal))),\n content: item('disconnect', true),\n });\n else\n items.unshift(\n {\n handler: () =>\n this.dispatchEvent(\n newStartConnectEvent({ equipment, terminal: 'top' })\n ),\n content: item('connect', true),\n },\n {\n handler: () => this.groundTerminal(equipment, 'T1'),\n content: item('ground', true),\n }\n );\n return items;\n }\n\n busBarMenuItems(busBar: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(busBar)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(busBar)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(busBar)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(busBar)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const node = busBar.querySelector('ConnectivityNode')!;\n this.dispatchEvent(\n newEditEvent([...removeNode(node), { node: busBar }])\n );\n },\n },\n ];\n return items;\n }\n\n containerMenuItems(bayOrVL: Element) {\n const items: MenuItem[] = [\n {\n content: html`\n Resize\n \n ${resizePath}\n \n `,\n handler: () => this.dispatchEvent(newStartResizeEvent(bayOrVL)),\n },\n {\n content: html`\n Move\n \n ${movePath}\n \n `,\n handler: () => this.dispatchEvent(newStartPlaceEvent(bayOrVL)),\n },\n {\n content: html`\n Move Label\n text_rotation_none\n `,\n handler: () => this.dispatchEvent(newStartPlaceLabelEvent(bayOrVL)),\n },\n {\n content: html`\n Edit\n edit\n `,\n handler: () => this.dispatchEvent(newEditWizardEvent(bayOrVL)),\n },\n {\n content: html`\n Delete\n delete\n `,\n handler: () => {\n const edits: Edit[] = [];\n Array.from(bayOrVL.getElementsByTagName('ConnectivityNode')).forEach(\n cNode => {\n if (\n Array.from(\n this.doc.querySelectorAll(\n `Terminal[connectivityNode=\"${cNode.getAttribute(\n 'pathName'\n )}\"]`\n )\n ).find(\n terminal => terminal.closest(bayOrVL.tagName) !== bayOrVL\n )\n )\n edits.push(...removeNode(cNode));\n }\n );\n Array.from(bayOrVL.getElementsByTagName('Terminal')).forEach(\n terminal => {\n const cNode = this.doc.querySelector(\n `ConnectivityNode[pathName=\"${terminal.getAttribute(\n 'connectivityNode'\n )}\"]`\n );\n if (cNode && cNode.closest(bayOrVL.tagName) !== bayOrVL)\n edits.push(...removeNode(cNode));\n }\n );\n edits.push({ node: bayOrVL });\n this.dispatchEvent(newEditEvent(edits));\n },\n },\n ];\n return items;\n }\n\n renderMenu() {\n if (!this.menu) return html``;\n const { element } = this.menu;\n\n let items: MenuItem[] = [];\n if (element.tagName === 'ConductingEquipment')\n items = this.equipmentMenuItems(element);\n else if (element.tagName === 'Bay' && isBusBar(element))\n items = this.busBarMenuItems(element);\n else if (element.tagName === 'Bay' || element.tagName === 'VoltageLevel')\n items = this.containerMenuItems(element);\n\n return html`\n {\n if (!(menu instanceof HTMLElement)) return;\n const nav = (\n this.parentElement!.getRootNode() as ShadowRoot\n ).querySelector('nav')!;\n const navHeight = nav.offsetHeight + 8;\n await this.updateComplete;\n const { bottom, right } = menu.getBoundingClientRect();\n if (bottom > window.innerHeight - navHeight) {\n menu.style.removeProperty('top');\n // eslint-disable-next-line no-param-reassign\n menu.style.bottom = `${navHeight}px`;\n // eslint-disable-next-line no-param-reassign\n menu.style.maxHeight = `calc(100vh - ${navHeight + 68}px)`;\n }\n if (right > window.innerWidth) {\n menu.style.removeProperty('left');\n // eslint-disable-next-line no-param-reassign\n menu.style.right = '0px';\n }\n })}\n >\n {\n items[index]?.handler();\n this.menu = undefined;\n }}\n >\n ${items.map(i => i.content)}\n
  • \n ${renderMenuFooter(element)}\n \n \n `;\n }\n\n render() {\n const {\n dim: [w, h],\n } = attributes(this.substation);\n\n const placingTarget =\n this.placing?.tagName === 'VoltageLevel'\n ? svg``\n : nothing;\n\n const placingLabelTarget = this.placingLabel\n ? svg` {\n const element = this.placingLabel!;\n const [x, y] = this.renderedLabelPosition(element);\n this.dispatchEvent(newPlaceLabelEvent({ element, x, y }));\n }}\n />`\n : nothing;\n\n let placingElement = svg``;\n if (this.placing) {\n if (this.placing.tagName === 'VoltageLevel' || isBay(this.placing))\n placingElement = svg`${this.renderContainer(this.placing, true)}`;\n else if (this.placing.tagName === 'ConductingEquipment')\n placingElement = this.renderEquipment(this.placing, { preview: true });\n else if (isBusBar(this.placing))\n placingElement = this.renderBusBar(this.placing);\n }\n\n let coordinates = html``;\n let invalid = false;\n let hidden = true;\n if (this.placing) {\n const {\n dim: [w0, h0],\n } = attributes(this.placing);\n hidden = false;\n invalid = !this.canPlaceAt(\n this.placing,\n this.mouseX,\n this.mouseY,\n w0,\n h0\n );\n coordinates = html`${this.mouseX},${this.mouseY}`;\n }\n\n if (this.resizing && !isBusBar(this.resizing)) {\n const {\n pos: [x, y],\n } = attributes(this.resizing);\n const newW = Math.max(1, this.mouseX - x + 1);\n const newH = Math.max(1, this.mouseY - y + 1);\n hidden = false;\n invalid = !this.canResizeTo(this.resizing, newW, newH);\n coordinates = html`${newW}×${newH}`;\n }\n const coordinateTooltip = html`