!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/if-defined.js"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js")):e(t.lit,t["lit/decorators.js"],t["lit/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i)=>(()=>{"use strict";var r,o={9147(t,e,i){i.r(e),i.d(e,{Form:()=>r});var r,o=i(7704),n=i(7161),s=i(429),a=i(291),l=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};!function(t){let e=class extends((0,o.TS)(n.LitElement)){constructor(){super(...arguments),this.rel="",this.name="",this.action="",this.label="",this.method="get",this.target="_self",this.enctype="application/x-www-form-urlencoded",this.novalidate=!1,this.charset="UTF-8",this.isvalid=!1,this.token="on",this.allowRedirect=!1,this.autofillname="input-name",this.formElement=[],this.handleSubmit=t=>{t.preventDefault(),this.validated()&&this.submitForm()},this.handleFormSubmit=t=>{this.allowRedirect||t.preventDefault(),this.dispatchEvent(new CustomEvent("form-submitted",{composed:!0,bubbles:!0}))}}get formMethod(){return"GET"===this.method?"get":"POST"===this.method?"post":this.method}isSubmittable(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement}isDisabled(t){return t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")}findSubmittable(t,e){const i=Array.from(t.children);for(const t of i)if(!this.isDisabled(t))if(this.isSubmittable(t)&&e.add(t),t.shadowRoot)this.findSubmittable(t.shadowRoot,e);else if("SLOT"===t.tagName){const i=t.assignedElements();if(i.length){const{parentElement:t}=i[0];t&&this.findSubmittable(t,e)}}else this.findSubmittable(t,e);return[...e]}validated(){return!!this.novalidate||this.isvalid}submitForm(){const{form:t}=this;t.requestSubmit?t.requestSubmit():t.submit()}get submitButton(){return this.querySelector("button[type='submit']")||this.querySelector("input[type='submit']")||this.querySelector("md-button[type='submit']")}disconnectedCallback(){super.disconnectedCallback(),this.cleanupWrappedForms(),this.teardownEvents()}deleteWrappedForm(t){t.removeEventListener("submit",this.handleFormSubmit)}cleanupWrappedForms(){const{formElement:t}=this;if(t.length)for(const e of t)this.deleteWrappedForm(e);this.formElement=[]}createWrappedForm(t){const e=document.createElement("form");e.addEventListener("submit",this.handleFormSubmit);const{parentNode:i}=t;t.autocomplete=this.token,t.id||(t.id=this.autofillname),t.name||(t.name=this.autofillname),i&&(this.formElement.push(e),i.insertBefore(e,t),e.append(t))}teardownEvents(){this.submitButton&&this.submitButton.removeEventListener("click",this.handleSubmit)}setupEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.handleSubmit)}setupSubmittable(){const t=this.findSubmittable(this.form,new Set);if(t.length)for(const e of t)this.createWrappedForm(e)}slottedChanged(){this.setupSubmittable(),this.setupEvents()}render(){return n.html`
        <form
          class="md-form"
          role="form"
          name=${(0,a.ifDefined)(this.name||void 0)}
          rel=${(0,a.ifDefined)(this.rel||void 0)}
          action=${(0,a.ifDefined)(this.action||void 0)}
          accept-charset=${this.charset}
          enctype=${this.enctype}
          aria-label=${(0,a.ifDefined)(this.label||void 0)}
          ?novalidate=${this.novalidate}
          method=${this.formMethod}
          target=${this.target}
          part="form"
          @submit=${this.handleFormSubmit}
        >
          <slot></slot>
        </form>
      `}};l([(0,s.property)({type:String})],e.prototype,"rel",void 0),l([(0,s.property)({type:String})],e.prototype,"name",void 0),l([(0,s.property)({type:String})],e.prototype,"action",void 0),l([(0,s.property)({type:String})],e.prototype,"label",void 0),l([(0,s.property)({type:String})],e.prototype,"method",void 0),l([(0,s.property)({type:String})],e.prototype,"target",void 0),l([(0,s.property)({type:String})],e.prototype,"enctype",void 0),l([(0,s.property)({type:Boolean,reflect:!0,attribute:"no-validate"})],e.prototype,"novalidate",void 0),l([(0,s.property)({type:String,reflect:!0,attribute:"accept-charset"})],e.prototype,"charset",void 0),l([(0,s.property)({type:Boolean,reflect:!0,attribute:"is-valid"})],e.prototype,"isvalid",void 0),l([(0,s.property)({type:String,attribute:"autofill-token"})],e.prototype,"token",void 0),l([(0,s.property)({type:Boolean,attribute:"allow-redirect"})],e.prototype,"allowRedirect",void 0),l([(0,s.property)({type:String,attribute:"autofill-name"})],e.prototype,"autofillname",void 0),l([(0,s.query)(".md-form")],e.prototype,"form",void 0),e=l([(0,o.wW)("md-form")],e),t.ELEMENT=e}(r||(r={}))},7161(e){e.exports=t},429(t){t.exports=e},291(t){t.exports=i}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return o[t](i,i.exports,s),i.exports}s.m=o,r=[],s.O=(t,e,i,o)=>{if(!e){var n=1/0;for(p=0;p<r.length;p++){for(var[e,i,o]=r[p],a=!0,l=0;l<e.length;l++)(!1&o||n>=o)&&Object.keys(s.O).every(t=>s.O[t](e[l]))?e.splice(l--,1):(a=!1,o<n&&(n=o));if(a){r.splice(p--,1);var d=i();void 0!==d&&(t=d)}}return t}o=o||0;for(var p=r.length;p>0&&r[p-1][2]>o;p--)r[p]=r[p-1];r[p]=[e,i,o]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={6494:0};s.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[n,a,l]=i,d=0;if(n.some(e=>0!==t[e])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)var p=l(s)}for(e&&e(i);d<n.length;d++)o=n[d],s.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return s.O(p)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var a=s.O(void 0,[9609,2364,9938,4781,5201,608,3203,5757,8180],()=>s(9147));return s.O(a)})());