(self.AMP=self.AMP||[]).push({n:"amp-form",v:"1903070012530",f:(function(AMP,_){
var l,aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ba;if("function"==typeof Object.setPrototypeOf)ba=Object.setPrototypeOf;else{var ca;a:{var da={a:!0},ea={};try{ea.__proto__=da;ca=ea.a;break a}catch(a){}ca=!1}ba=ca?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var fa=ba;
function n(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(fa)fa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.xa=b.prototype};function ga(){var a,b;this.promise=new Promise(function(c,d){a=c;b=d});this.resolve=a;this.reject=b}function ha(a){return new Promise(function(b){b(a())})}function ia(){var a,b,c;this.aa=new Promise(function(a,d){b=a;c=d});this.na=b;this.la=c;this.S=0;if(a)for(var d=0;d<a.length;d++)this.add(a[d])}ia.prototype.add=function(a){var b=this,c=++this.S;Promise.resolve(a).then(function(a){b.S===c&&b.na(a)},function(a){b.S===c&&b.la(a)});return this.aa};
ia.prototype.then=function(a,b){return this.aa.then(a,b)};function ja(a,b){b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(c){return b}};var ka=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;var la=Object.prototype.toString;function ma(a){return a?Array.prototype.slice.call(a):[]}function na(a){return"[object Object]"===la.call(a)};self.log=self.log||{user:null,dev:null,userForEmbed:null};var p=self.log;function q(){if(!p.user)throw Error("failed to call initLogConstructor");return p.user}function r(){if(p.dev)return p.dev;throw Error("failed to call initLogConstructor");}function t(a,b,c,d){q().assert(a,b,c,d,void 0,void 0,void 0,void 0,void 0,void 0,void 0)};function u(a,b){var c,d=a.ownerDocument.defaultView,e=d!=(d.__AMP_TOP||d);if(e){if(oa(d,b)){var g=v(d,b);if(g)return g}if(!c)return null}a=w(a);a=x(a);return oa(a,b)?v(a,b):null}function y(a,b){a=a.__AMP_TOP||a;return v(a,b)}function z(a,b){var c=w(a);c=x(c);return v(c,b)}function pa(a,b){return qa(x(a),b)}function w(a){return a.nodeType?y((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}function x(a){a=w(a);return a.isSingleDoc()?a.win:a}
function v(a,b){oa(a,b);var c=ra(a);a=c[b];a.obj||(a.obj=new a.ctor(a.context),a.ctor=null,a.context=null,a.resolve&&a.resolve(a.obj));return a.obj}function qa(a,b){var c=ra(a)[b];if(c){if(c.promise)return c.promise;v(a,b);return c.promise=Promise.resolve(c.obj)}return null}function ra(a){var b=a.services;b||(b=a.services={});return b}function oa(a,b){a=a.services&&a.services[b];return!(!a||!a.ctor&&!a.obj)}
function sa(){var a=new ga,b=a,c=b.promise,d=b.resolve;b=b.reject;c.catch(function(){});return{obj:null,promise:c,resolve:d,reject:b,context:null,ctor:null}};/*
 https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
var ta=/(\0)|^(-)$|([\x01-\x1f\x7f]|^-?[0-9])|([\x80-\uffff0-9a-zA-Z_-]+)|[^]/g;function ua(a,b,c,d,e){return e?e:b?"\ufffd":d?a.slice(0,-1)+"\\"+a.slice(-1).charCodeAt(0).toString(16)+" ":"\\"+a};var va;var wa=Object.prototype.hasOwnProperty;function A(){var a,b=Object.create(null);a&&Object.assign(b,a);return b}function B(a){return a||{}}
function ya(a,b){var c=void 0===c?10:c;var d=[],e=[];e.push({t:a,s:b,d:0});for(a={};0<e.length;){b=e.shift();a.t=b.t;a.s=b.s;a.d=b.d;if(d.includes(a.s))throw Error("Source object has a circular reference.");d.push(a.s);a.t!==a.s&&(a.d>c?Object.assign(a.t,a.s):(Object.keys(a.s).forEach(function(a){return function(b){var c=a.s[b];if(wa.call(a.t,b)){var d=a.t[b];if(na(c)&&na(d)){e.push({t:d,s:c,d:a.d+1});return}}a.t[b]=c}}(a)),a={s:a.s,t:a.t,d:a.d}))}};function za(a,b){return b.length>a.length?!1:0==a.lastIndexOf(b,0)};function Aa(a,b){for(var c=[],d=a.parentElement;d;d=d.parentElement)b(d)&&c.push(d);return c}function Ba(a){var b="fieldset";/^[\w-]+$/.test(b);b=b.toUpperCase();return Aa(a,function(a){return a.tagName==b})}function C(a,b){for(var c=a.length,d=0;d<c;d++)b(a[d],d)};function Ca(a,b,c){var d=pa(a,b);if(d)return d;var e=w(a);return e.whenBodyAvailable().then(function(){var a=e.win;var b=e.win.document.head;if(b){var d=[];b=b.querySelectorAll("script[custom-element]");for(var k=0;k<b.length;k++)d.push(b[k].getAttribute("custom-element"))}else d=[];a=d.includes(c)?y(a,"extensions").waitForExtension(a,c):Promise.resolve();return a}).then(function(){var d=e.win;if(d.ampExtendedElements&&d.ampExtendedElements[c]){d=x(a);var f=qa(d,b);f?d=f:(d=ra(d),d[b]=sa(),d=d[b].promise)}else d=
null;return d})};function D(a){return z(a,"resources")};var E,Da="Webkit webkit Moz moz ms O o".split(" ");function Ea(a,b,c){var d;var e=a.style;if(!za(b,"--")){E||(E=A());var g=E[b];if(!g){g=b;if(void 0===e[b]){var f=b.charAt(0).toUpperCase()+b.slice(1);b:{for(var h=0;h<Da.length;h++){var k=Da[h]+f;if(void 0!==e[k]){f=k;break b}}f=""}void 0!==e[f]&&(g=f)}E[b]=g}b=g}b&&(a.style[b]=d?c+d:c)}function Fa(a,b){void 0===b&&(b=a.hasAttribute("hidden"));b?a.removeAttribute("hidden"):a.setAttribute("hidden","")};var F;function Ga(a,b,c){var d=void 0,e=a,g=c;var f=function(a){try{return g(a)}catch(I){throw self.reportError(I),I;}};var h=Ha(),k=!1;d&&(k=d.capture);e.addEventListener(b,f,h?d:k);return function(){e&&e.removeEventListener(b,f,h?d:k);f=e=g=null}}function Ha(){if(void 0!==F)return F;F=!1;try{var a={get capture(){F=!0}};self.addEventListener("test-options",null,a);self.removeEventListener("test-options",null,a)}catch(b){}return F};function Ia(a,b,c,d){var e={detail:c};Object.assign(e,d);if("function"==typeof a.CustomEvent)return new a.CustomEvent(b,e);a=a.document.createEvent("CustomEvent");a.initCustomEvent(b,!!e.bubbles,!!e.cancelable,c);return a}function Ja(a,b,c){return Ga(a,b,c)}function Ka(a,b){var c=b,d=Ga(a,"mouseup",function(a){try{c(a)}finally{c=null,d()}});return d}function La(a){var b,c,d=new Promise(function(b){c=Ka(a,b)});d.then(c,c);b&&b(c);return d};function Ma(a,b){var c=100;function d(d){f=null;g=a.setTimeout(e,c);b.apply(null,d)}function e(){g=0;f&&d(f)}var g=0,f=null;return function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];g?f=b:d(b)}};function Na(a){var b=a.getRootNode();this.ia=b.ownerDocument||b;this.j=this.ia.defaultView;this.Y=z(a,"viewport");this.H=[];this.H.push(Ja(b,"input",function(a){a=a.target;"TEXTAREA"==a.tagName&&a.hasAttribute("autoexpand")&&Oa(a)}));this.H.push(Ja(b,"mousedown",function(a){1==a.which&&(a=a.target,"TEXTAREA"==a.tagName&&a.hasAttribute("autoexpand")&&Pa(a))}));var c=b.querySelectorAll("textarea");this.H.push(Ja(b,"amp:dom-update",function(){c=b.querySelectorAll("textarea")}));var d=Ma(this.j,function(a){a.relayoutAll&&
Qa(c)});this.H.push(this.Y.onResize(d));C(c,function(a){Ra(a).then(function(b){b&&(q().warn("AMP-FORM",'"textarea[autoexpand]" with initially scrolling content will not autoexpand.\nSee https://github.com/ampproject/amphtml/issues/20839'),a.removeAttribute("autoexpand"))})})}function Sa(a){function b(){var b=c.querySelector("textarea[autoexpand]");b&&!d?d=new Na(a):!b&&d&&(d.dispose(),d=null)}var c=a.getRootNode(),d=null;Ga(c,"amp:dom-update",b);b()}Na.prototype.dispose=function(){this.H.forEach(function(a){return a()})};
function Ra(a){var b=D(a);return b.measureElement(function(){return a.scrollHeight>a.clientHeight})}function Qa(a){C(a,function(a){"TEXTAREA"==a.tagName&&a.hasAttribute("autoexpand")&&Oa(a)})}function Pa(a){var b=D(a);Promise.all([b.measureElement(function(){return a.scrollHeight}),La(a)]).then(function(c){var d=c[0],e=0;return b.measureMutateElement(a,function(){e=a.scrollHeight},function(){d!=e&&a.removeAttribute("autoexpand")})})}
function Oa(a){var b=D(a),c=a.ownerDocument.defaultView,d=0,e=0,g=0,f=Ta(a);b.measureMutateElement(a,function(){var b=c.getComputedStyle(a)||A();e=a.scrollHeight;var k=parseInt(b.getPropertyValue("max-height"),10);g=isNaN(k)?Infinity:k;d="content-box"==b.getPropertyValue("box-sizing")?-parseInt(b.getPropertyValue("padding-top"),10)+-parseInt(b.getPropertyValue("padding-bottom"),10):parseInt(b.getPropertyValue("border-top-width"),10)+parseInt(b.getPropertyValue("border-bottom-width"),10)},function(){return f.then(function(b){a.classList.toggle("i-amphtml-textarea-max",
b+d>g);var c="iAmphtmlHasExpanded"in a.dataset,f=c||e<=b;f&&(a.dataset.iAmphtmlHasExpanded="",Ea(a,"height",b+d+"px"))})})}
function Ta(a){var b=a.ownerDocument,c=b.defaultView,d=b.body,e=D(a),g=a.cloneNode(!1);g.classList.add("i-amphtml-textarea-clone");var f=0,h=!1;return e.measureMutateElement(d,function(){var b=c.getComputedStyle(a)||A();b=parseInt(b.getPropertyValue("max-height"),10);h=isNaN(b)||a.scrollHeight<b},function(){h&&(a.scrollTop=0);b.body.appendChild(g)}).then(function(){return e.measureMutateElement(d,function(){f=g.scrollHeight},function(){var a=g;a.parentElement&&a.parentElement.removeChild(a)})}).then(function(){return f})}
;function Ua(a,b){return a.hasAttribute("verify-xhr")?new Va(a,b):new Xa(a)}function G(a){this.h=a}G.prototype.onCommit=function(){Ya(this);return Za(this)?this.ea():Promise.resolve({updatedElements:[],errors:[]})};G.prototype.ea=function(){return Promise.resolve({updatedElements:[],errors:[]})};
function Za(a){a=a.h.elements;for(var b=0;b<a.length;b++){var c=a[b];if(!c.disabled)switch(c.type){case "select-multiple":case "select-one":c=c.options;for(var d=0;d<c.length;d++)if(c[d].selected!==c[d].defaultSelected)return!0;break;case "checkbox":case "radio":if(c.checked!==c.defaultChecked)return!0;break;default:if(c.value!==c.defaultValue)return!0}}return!1}function Ya(a){(a=a.h.elements)&&C(a,function(a){a.setCustomValidity("")})}function Xa(a){G.apply(this,arguments)}n(Xa,G);
function Va(a,b){this.h=a;this.M=b;this.J=null;this.$=[]}n(Va,G);Va.prototype.ea=function(){var a=this,b=this.M().then(function(){return[]},function(a){return $a(a)});return ab(this,b).then(function(b){return bb(a,b)})};function ab(a,b){if(!a.J){a.J=new ia;var c=function(){return a.J=null};a.J.then(c,c)}return a.J.add(b)}
function bb(a,b){function c(a){return b.every(function(b){return a.name!==b.name})}var d=[],e=a.$;a.$=b;for(var g=0;g<b.length;g++){var f=b[g],h=q().assertString(f.name,"Verification errors must have a name property");f=q().assertString(f.message,"Verification errors must have a message property");h=q().assertElement(a.h.querySelector('[name="'+h+'"]'),"Verification error name property must match a field name");h.checkValidity()&&(h.setCustomValidity(f),d.push(h))}var k=e.filter(c).map(function(b){return a.h.querySelector('[name="'+
b.name+'"]')});return{updatedElements:d.concat(k),errors:b}}function $a(a){return(a=a.response)?a.json().then(function(a){return a.verifyErrors||[]},function(){return[]}):Promise.resolve([])};function cb(){this.l=null}l=cb.prototype;l.add=function(a){var b=this;this.l||(this.l=[]);this.l.push(a);return function(){b.remove(a)}};l.remove=function(a){this.l&&(a=this.l.indexOf(a),-1<a&&this.l.splice(a,1))};l.removeAll=function(){this.l&&(this.l.length=0)};l.fire=function(a){if(this.l)for(var b=this.l,c=0;c<b.length;c++)(0,b[c])(a)};l.getHandlerCount=function(){return this.l?this.l.length:0};function db(){this.Z=new cb}db.prototype.beforeSubmit=function(a){return this.Z.add(a)};db.prototype.fire=function(a){this.Z.fire(a)};function H(){var a=100;this.ha=a;this.R=this.X=0;this.L=Object.create(null)}H.prototype.has=function(a){return!!this.L[a]};H.prototype.get=function(a){var b=this.L[a];if(b)return b.access=++this.R,b.payload};H.prototype.put=function(a,b){this.has(a)||this.X++;this.L[a]={payload:b,access:this.R};if(!(this.X<=this.ha)){r().warn("lru-cache","Trimming LRU cache");a=this.L;var c=this.R+1,d;for(d in a){var e=a[d].access;if(e<c){c=e;var g=d}}void 0!==g&&(delete a[g],this.X--)}};var J=self.AMP_CONFIG||{},eb={thirdParty:J.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:J.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdn:J.cdnUrl||"https://cdn.ampproject.org",cdnProxyRegex:("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,
errorReporting:J.errorReportingUrl||"https://amp-error-reporting.appspot.com/r",localDev:J.localDev||!1};var fb=B({c:!0,v:!0,a:!0,ad:!0,action:!0}),gb,hb,ib=/[?&]amp_js[^&]*/,jb=/[?&]amp_gsa[^&]*/,kb=/[?&]amp_r[^&]*/,lb=/[?&]amp_kit[^&]*/,mb=/[?&]usqp[^&]*/;
function K(a){var b;gb||(gb=self.document.createElement("a"),hb=self.UrlCache||(self.UrlCache=new H));var c=b?null:hb,d=gb;if(c&&c.has(a))a=c.get(a);else{d.href=a;d.protocol||(d.href=d.href);var e={href:d.href,protocol:d.protocol,host:d.host,hostname:d.hostname,port:"0"==d.port?"":d.port,pathname:d.pathname,search:d.search,hash:d.hash,origin:null};"/"!==e.pathname[0]&&(e.pathname="/"+e.pathname);if("http:"==e.protocol&&80==e.port||"https:"==e.protocol&&443==e.port)e.port="",e.host=e.hostname;e.origin=
d.origin&&"null"!=d.origin?d.origin:"data:"!=e.protocol&&e.host?e.protocol+"//"+e.host:e.href;c&&c.put(a,e);a=e}return a}function nb(a,b,c){if(!b)return a;var d=a.split("#",2),e=d[0].split("?",2),g=e[0]+(e[1]?c?"?"+b+"&"+e[1]:"?"+e[1]+"&"+b:"?"+b);return g+=d[1]?"#"+d[1]:""}
function ob(a){var b=[],c;for(c in a){var d=a[c];if(null!=d)if(Array.isArray(d))for(var e=0;e<d.length;e++){var g=d[e];b.push(encodeURIComponent(c)+"="+encodeURIComponent(g))}else e=d,b.push(encodeURIComponent(c)+"="+encodeURIComponent(e))}return b.join("&")}
function pb(a){"string"==typeof a&&(a=K(a));var b=a;"string"==typeof b&&(b=K(b));if(!eb.cdnProxyRegex.test(b.origin))return a.href;b=a.pathname.split("/");t(fb[b[1]],"Unknown path prefix in url %s",a.href);var c=b[2],d="s"==c?"https://"+decodeURIComponent(b[3]):"http://"+decodeURIComponent(c);t(0<d.indexOf("."),"Expected a . in origin %s",d);b.splice(1,"s"==c?3:2);b=d+b.join("/");var e;e=(e=a.search)&&"?"!=e?(e=e.replace(ib,"").replace(jb,"").replace(kb,"").replace(lb,"").replace(mb,"").replace(/^[?&]/,
""))?"?"+e:"":"";return b+e+(a.hash||"")};function L(a){var b=a.elements;a=a.ownerDocument;for(var c={},d=/^(?:input|select|textarea|button)$/i,e=/^(?:button|image|file|reset)$/i,g=/^(?:checkbox|radio)$/i,f={},h=0;h<b.length;f={name:f.name},h++){var k=b[h],m=k,I=m.checked;f.name=m.name;var Tb=m.multiple,Ub=m.options,Wa=m.tagName,xa=m.type;m=m.value;!f.name||qb(k)||!d.test(Wa)||e.test(xa)||g.test(xa)&&!I||(void 0===c[f.name]&&(c[f.name]=[]),Tb?C(Ub,function(a){return function(b){b.selected&&c[a.name].push(b.value)}}(f)):("submit"!=xa&&"BUTTON"!=
Wa||k==a.activeElement)&&c[f.name].push(m))}Object.keys(c).forEach(function(a){0==c[a].length&&delete c[a]});return c}function qb(a){if(a.disabled)return!0;a=Ba(a);for(var b=0;b<a.length;b++)if(a[b].disabled)return!0;return!1};function rb(a,b){var c=y(a,"platform");return c.isIos()&&11==c.getMajorVersion()?new sb(b):FormData.prototype.entries&&FormData.prototype.delete?new M(b):new N(b)}function N(a){this.o=a?L(a):A()}N.prototype.append=function(a,b){var c=String(a);this.o[c]=this.o[c]||[];this.o[c].push(String(b))};N.prototype.delete=function(a){delete this.o[a]};
N.prototype.entries=function(){var a=this,b=[];Object.keys(this.o).forEach(function(c){a.o[c].forEach(function(a){return b.push([c,a])})});var c=0;return{next:function(){return c<b.length?{value:b[c++],done:!1}:{value:void 0,done:!0}}}};N.prototype.getFormData=function(){var a=this,b=new FormData;Object.keys(this.o).forEach(function(c){a.o[c].forEach(function(a){return b.append(c,a)})});return b};function M(a){this.w=new FormData(a)}M.prototype.append=function(a,b){this.w.append(a,b)};
M.prototype.delete=function(a){this.w.delete(a)};M.prototype.entries=function(){return this.w.entries()};M.prototype.getFormData=function(){return this.w};function sb(a){M.call(this,a);var b=this;a&&C(a.elements,function(a){"file"==a.type&&0==a.files.length&&(b.w.delete(a.name),b.w.append(a.name,new Blob([]),""))})}n(sb,M);sb.prototype.append=function(a,b,c){b&&"object"==typeof b&&""==b.name&&0==b.size?this.w.append(a,new Blob([]),c||""):this.w.append(a,b)};var tb=["GET","POST"];
function ub(a,b){t(na(a),"Object expected: %s",a);var c="document"==b;if(!c)return new Response(a.body,a.init);var d=A(),e={status:200,statusText:"OK",getResponseHeader:function(a){return d[String(a).toLowerCase()]||null}};if(a.init){var g=a.init;Array.isArray(g.headers)&&g.headers.forEach(function(a){var b=a[0],c=a[1];d[String(b).toLowerCase()]=String(c)});g.status&&(e.status=parseInt(g.status,10));g.statusText&&(e.statusText=String(g.statusText))}return new Response(a.body?String(a.body):"",e)}
;function O(a,b){var c="amp-form";this.F=a;this.m=b;this.oa=c}O.prototype.isSupported=function(){var a=this.F.ampdoc;return a.isSingleDoc()&&a.getRootNode().documentElement.hasAttribute("allow-viewer-render-template")?this.F.hasCapability("viewerRenderTemplate"):!1};O.prototype.fetchAndRenderTemplate=function(a,b,c,d){c=void 0===c?null:c;d=void 0===d?{}:d;var e;c||(e=this.m.maybeFindTemplate(a));return this.F.sendMessageAwaitResponse("viewerRenderTemplate",vb(this,b,e,c,d))};
O.prototype.renderTemplate=function(a,b){if(this.isSupported()){t("string"===typeof b.html,"Server side html response must be defined");var c=this.m.findAndSetHtmlForTemplate(a,b.html)}else c=Array.isArray(b)?this.m.findAndRenderTemplateArray(a,b):this.m.findAndRenderTemplate(a,b);return c};
function vb(a,b,c,d,e){e=void 0===e?{}:e;var g=B({type:a.oa}),f="successTemplate",h=d&&d[f]?d[f]:c;h&&(g[f]={type:"amp-mustache",payload:h.innerHTML});var k="errorTemplate",m=d&&d[k]?d[k]:null;m&&(g[k]={type:"amp-mustache",payload:m.innerHTML});e&&Object.assign(g,e);a=b.xhrUrl;c=b.fetchOpt;b=Object.assign({},c);if((d=c.body)&&"function"==typeof d.getFormData){c=c.body;b.headers["Content-Type"]="multipart/form-data;charset=utf-8";c=c.entries();d=[];for(e=c.next();!e.done;e=c.next())d.push(e.value);
b.body=d}return B({originalRequest:{input:a,init:b},ampComponent:g})}O.prototype.verifySsrResponse=function(a,b,c){b=ub(b,c.fetchOpt.responseType);c=c.fetchOpt;(b=b.headers.get("AMP-Access-Control-Allow-Source-Origin"))?(a=K(pb(a.location.href)).origin,t(b==a,"Returned AMP-Access-Control-Allow-Source-Origin is not equal to the current: "+b+(" vs "+a))):c.requireAmpResponseSourceOrigin&&t(!1,"Response must contain the AMP-Access-Control-Allow-Source-Origin header")};function P(a,b){this.W=b;this.Y=z(a,"viewport");this.fa=y(a.win,"vsync");this.U=null;this.T="";this.O=!1;this.C=a.win.document.createElement("div");Fa(this.C,!1);this.C.classList.add("i-amphtml-validation-bubble");this.C.__BUBBLE_OBJ=this;a.getBody().appendChild(this.C)}P.prototype.isActiveOn=function(a){return this.O&&a==this.U};P.prototype.hide=function(){this.O&&(this.O=!1,this.U=null,this.T="",this.fa.run({measure:void 0,mutate:wb},{bubbleElement:this.C}))};
P.prototype.show=function(a,b){if(!this.isActiveOn(a)||b!=this.T){this.O=!0;this.U=a;this.T=b;var c={message:b,targetElement:a,bubbleElement:this.C,viewport:this.Y,id:this.W};this.fa.run({measure:xb,mutate:yb},c)}};function wb(a){a.bubbleElement.removeAttribute("aria-alert");a.bubbleElement.removeAttribute("role");for(var b=a.bubbleElement;b.firstChild;)b.removeChild(b.firstChild);Fa(a.bubbleElement,!1)}function xb(a){a.targetRect=a.viewport.getLayoutRect(a.targetElement)}
function yb(a){for(var b=a.bubbleElement;b.firstChild;)b.removeChild(b.firstChild);var c=a.bubbleElement.ownerDocument.createElement("div");c.id="bubble-message-"+a.id;c.textContent=a.message;a.bubbleElement.setAttribute("aria-labeledby",c.id);a.bubbleElement.setAttribute("role","alert");a.bubbleElement.setAttribute("aria-live","assertive");a.bubbleElement.appendChild(c);Fa(a.bubbleElement,!0);b=a.bubbleElement;a={top:a.targetRect.top-10+"px",left:a.targetRect.left+a.targetRect.width/2+"px"};for(var d in a)Ea(b,
d,a[d])};var zb,Ab,Bb=0;function Q(a){this.form=a;this.ampdoc=w(a);this.resources=D(a);this.root=this.ampdoc.getRootNode();this.N=null}l=Q.prototype;l.report=function(){};l.onBlur=function(){};l.onInput=function(){};l.inputs=function(){return this.form.querySelectorAll("input,select,textarea")};
l.checkInputValidity=function(a){if("TEXTAREA"===a.tagName&&a.hasAttribute("pattern")&&(a.checkValidity()||"Please match the requested format."===a.validationMessage)){var b=a.getAttribute("pattern"),c=new RegExp("^"+b+"$","m"),d=c.test(a.value);a.setCustomValidity(d?"":"Please match the requested format.")}return a.checkValidity()};l.checkFormValidity=function(a){Cb(this,a);return a.checkValidity()};l.reportFormValidity=function(a){Cb(this,a);return a.reportValidity()};
function Cb(a,b){C(b.elements,function(b){"TEXTAREA"==b.tagName&&a.checkInputValidity(b)})}l.fireValidityEventIfNecessary=function(){var a=this.N;this.N=this.checkFormValidity(this.form);if(a!==this.N){var b=Ia(this.form.ownerDocument.defaultView,this.N?"valid":"invalid",null,{bubbles:!0});this.form.dispatchEvent(b)}};function Db(a){Q.apply(this,arguments)}n(Db,Q);Db.prototype.report=function(){this.reportFormValidity(this.form);this.fireValidityEventIfNecessary()};
function R(a){Q.call(this,a);var b="i-amphtml-validation-bubble-"+Bb++;this.I=new P(this.ampdoc,b)}n(R,Q);R.prototype.report=function(){for(var a=this.inputs(),b=0;b<a.length;b++)if(!this.checkInputValidity(a[b])){a[b].focus();this.I.show(a[b],a[b].validationMessage);break}this.fireValidityEventIfNecessary()};R.prototype.onBlur=function(a){"submit"!=a.target.type&&this.I.hide()};
R.prototype.onInput=function(a){a=a.target;this.I.isActiveOn(a)&&(this.checkInputValidity(a)?(a.removeAttribute("aria-invalid"),this.I.hide()):(a.setAttribute("aria-invalid","true"),this.I.show(a,a.validationMessage)))};function S(a){Q.call(this,a)}n(S,Q);l=S.prototype;l.reportInput=function(a){var b=Eb(a);b&&this.showValidationFor(a,b)};l.hideAllValidations=function(){for(var a=this.inputs(),b=0;b<a.length;b++)this.hideValidationFor(a[b])};
l.getValidationFor=function(a,b){if(!a.id)return null;"TEXTAREA"===a.tagName&&(b="patternMismatch");var c="__AMP_VALIDATION_"+b;c in a||(a[c]=this.root.querySelector("[visible-when-invalid="+b+"]"+("[validation-for="+a.id+"]")));return a[c]};
l.showValidationFor=function(a,b){var c=this.getValidationFor(a,b);c&&(c.textContent.trim()||(c.textContent=a.validationMessage),a.__AMP_VISIBLE_VALIDATION=c,this.resources.mutateElement(a,function(){return a.setAttribute("aria-invalid","true")}),this.resources.mutateElement(c,function(){return c.classList.add("visible")}))};
l.hideValidationFor=function(a){var b=this.getVisibleValidationFor(a);b&&(delete a.__AMP_VISIBLE_VALIDATION,this.resources.mutateElement(a,function(){return a.removeAttribute("aria-invalid")}),this.resources.mutateElement(b,function(){return b.classList.remove("visible")}))};l.getVisibleValidationFor=function(a){return a.__AMP_VISIBLE_VALIDATION};l.shouldValidateOnInteraction=function(){throw Error("Not Implemented");};
l.onInteraction=function(a){a=a.target;var b=!!a.checkValidity&&this.shouldValidateOnInteraction(a);this.hideValidationFor(a);b&&!this.checkInputValidity(a)&&this.reportInput(a)};l.onBlur=function(a){this.onInteraction(a)};l.onInput=function(a){this.onInteraction(a)};function Fb(a){S.apply(this,arguments)}n(Fb,S);Fb.prototype.report=function(){this.hideAllValidations();for(var a=this.inputs(),b=0;b<a.length;b++)if(!this.checkInputValidity(a[b])){this.reportInput(a[b]);a[b].focus();break}this.fireValidityEventIfNecessary()};
Fb.prototype.shouldValidateOnInteraction=function(a){return!!this.getVisibleValidationFor(a)};function T(a){S.apply(this,arguments)}n(T,S);T.prototype.report=function(){this.hideAllValidations();for(var a=null,b=this.inputs(),c=0;c<b.length;c++)this.checkInputValidity(b[c])||(a=a||b[c],this.reportInput(b[c]));a&&a.focus();this.fireValidityEventIfNecessary()};T.prototype.shouldValidateOnInteraction=function(a){return!!this.getVisibleValidationFor(a)};function Gb(a){S.apply(this,arguments)}n(Gb,S);
Gb.prototype.shouldValidateOnInteraction=function(){return!0};Gb.prototype.onInteraction=function(a){S.prototype.onInteraction.call(this,a);this.fireValidityEventIfNecessary()};function Hb(a){T.apply(this,arguments)}n(Hb,T);Hb.prototype.shouldValidateOnInteraction=function(){return!0};Hb.prototype.onInteraction=function(a){T.prototype.onInteraction.call(this,a);this.fireValidityEventIfNecessary()};
function Ib(a){var b=a.getAttribute("custom-validation-reporting");switch(b){case "as-you-go":return new Gb(a);case "show-all-on-submit":return new T(a);case "interact-and-submit":return new Hb(a);case "show-first-on-submit":return new Fb(a)}a.ownerDocument&&void 0===zb&&(zb=!!document.createElement("form").reportValidity);return zb?new Db(a):new R(a)}
function Eb(a){var b=["badInput"];for(c in a.validity)b.includes(c)||b.push(c);var c=b.filter(function(b){return!0===a.validity[b]});return c.length?c[0]:null};function Jb(a){var b=a.ownerDocument.defaultView;b.FormProxy||(b.FormProxy=Kb(b));var c=b.FormProxy,d=new c(a);"action"in d||Lb(a,d);a.$p=d}
function Kb(a){function b(a){this.h=a}var c=b.prototype,d=a.Object,e=d.prototype,g=[a.HTMLFormElement,a.EventTarget],f=g.reduce(function(a,b){for(b=b&&b.prototype;b&&b!==e&&!(0<=a.indexOf(b));)a.push(b),b=d.getPrototypeOf(b);return a},[]);f.forEach(function(b){var d={},g;for(g in b)if(d.property=a.Object.getOwnPropertyDescriptor(b,g),d.property&&g.toUpperCase()!=g&&!za(g,"on")&&!e.hasOwnProperty.call(c,g)){if("function"==typeof d.property.value)d.method=d.property.value,c[g]=function(a){return function(){return a.method.apply(this.h,
arguments)}}(d);else{var f={};d.property.get&&(f.get=function(a){return function(){return a.property.get.call(this.h)}}(d));d.property.set&&(f.set=function(a){return function(b){return a.property.set.call(this.h,b)}}(d));a.Object.defineProperty(c,g,f)}d={method:d.method,property:d.property}}});return b}
function Lb(a,b){var c=a.ownerDocument.defaultView.HTMLFormElement.prototype.cloneNode.call(a,!1),d={},e;for(e in c)if(d.name=e,!(d.name in b||d.name.toUpperCase()==d.name||za(d.name,"on"))){d.desc=Mb[d.name];var g=a[d.name];if(d.desc)if(d.desc.access==U){d.actual=void 0;if(g&&g.nodeType){var f=c=g,h=f.nextSibling;f=f.parentNode;f.removeChild(c);try{d.actual=a[d.name]}finally{f.insertBefore(c,h)}}else d.actual=g;Object.defineProperty(b,d.name,{get:function(a){return function(){return a.actual}}(d)})}else d.desc.access==
V&&(d.attr=d.desc.attr||d.name,Object.defineProperty(b,d.name,{get:function(c){return function(){var d=b.getAttribute(c.attr);return null==d&&void 0!==c.desc.def?c.desc.def:c.desc.type==Nb?"true"===d:c.desc.type==Ob?null!=d:c.desc.type==Pb?(d=d||"",u(a,"url").parse(d).href):d}}(d),set:function(a){return function(c){a.desc.type==Ob&&(c=c?"":null);null!=c?b.setAttribute(a.attr,c):b.removeAttribute(a.attr)}}(d)}));else Object.defineProperty(b,d.name,{get:function(b){return function(){return a[b.name]}}(d),
set:function(b){return function(c){a[b.name]=c}}(d)});d={actual:d.actual,attr:d.attr,desc:d.desc,name:d.name}}}
var V=1,U=2,Pb=1,Nb=2,Ob=3,Mb={acceptCharset:{access:V,attr:"accept-charset"},accessKey:{access:V,attr:"accesskey"},action:{access:V,type:Pb},attributes:{access:U},autocomplete:{access:V,def:"on"},children:{access:U},dataset:{access:U},dir:{access:V},draggable:{access:V,type:Nb,def:!1},elements:{access:U},encoding:{access:U},enctype:{access:V},hidden:{access:V,type:Ob,def:!1},id:{access:V,def:""},lang:{access:V},localName:{access:U},method:{access:V,def:"get"},name:{access:V},noValidate:{access:V,
attr:"novalidate",type:Ob,def:!1},prefix:{access:U},spellcheck:{access:V},style:{access:U},target:{access:V,def:""},title:{access:V},translate:{access:V}};function Qb(a,b){var c='form.amp-form-submit-error [submit-error],form.amp-form-submit-success [submit-success],form.amp-form-submitting [submitting]{display:block}textarea[autoexpand]:not(.i-amphtml-textarea-max){overflow:hidden!important}.i-amphtml-textarea-clone{visibility:hidden;position:absolute;top:-9999px;left:-9999px;height:0!important}.i-amphtml-validation-bubble{-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%);background-color:#fff;box-shadow:0 5px 15px 0 rgba(0,0,0,0.5);max-width:200px;position:absolute;display:block;box-sizing:border-box;padding:10px;border-radius:5px}.i-amphtml-validation-bubble:after{content:" ";position:absolute;bottom:-8px;left:30px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}[visible-when-invalid]{color:red}\n/*# sourceURL=/extensions/amp-form/0.1/amp-form.css*/',
d=!1,e="amp-form",g=a.getHeadNode(),f=Rb(g,Sb(g,c),d||!1,e||null);if(b){var h=a.getRootNode();if(Vb(h,f))b(f);else var k=setInterval(function(){Vb(h,f)&&(clearInterval(k),b(f))},4)}}
function Rb(a,b,c,d){var e=a.__AMP_CSS_SM;e||(e=a.__AMP_CSS_SM=A());var g=!c&&d&&"amp-custom"!=d&&"amp-keyframes"!=d,f=c?"amp-runtime":g?"amp-extension="+d:null;if(f){var h=Wb(a,e,f);if(h)return h.textContent!==b&&(h.textContent=b),h}var k=(a.ownerDocument||a).createElement("style");k.textContent=b;var m=null;c?k.setAttribute("amp-runtime",""):g?(k.setAttribute("amp-extension",d||""),m=Wb(a,e,"amp-runtime")):(d&&k.setAttribute(d,""),m=a.lastChild);b=m;a.insertBefore(k,b?b.nextSibling:a.firstChild);
f&&(e[f]=k);return k}function Wb(a,b,c){return b[c]?b[c]:(a=a.querySelector("style["+c+"]"))?b[c]=a:null}function Sb(a,b){return(a=a.__AMP_CSS_TR)?a(b):b}function Vb(a,b){var c=a.styleSheets;for(a=0;a<c.length;a++){var d=c[a];if(d.ownerNode==b)return!0}return!1};function Xb(a,b,c){Ca(a,"amp-analytics-instrumentation","amp-analytics").then(function(d){d&&d.triggerEventForTarget(a,b,c)})};var Yb=["amp-selector"];
function Zb(a,b){var c=this;try{Jb(a)}catch(g){r().error("amp-form","form proxy failed to install",g)}a.__AMP_FORM=this;this.W=b;this.j=a.ownerDocument.defaultView;this.qa=y(this.j,"timer");this.da=u(a,"url-replace");this.V=null;this.h=a;this.m=y(this.j,"templates");this.va=y(this.j,"xhr");this.K=u(this.h,"action");this.ba=D(this.h);this.F=z(this.h,"viewer");this.D=new O(this.F,this.m);this.A=(this.h.getAttribute("method")||"GET").toUpperCase();this.pa=this.h.getAttribute("target");this.G=$b(this,
"action-xhr");this.ua=$b(this,"verify-xhr");this.ca=!this.h.hasAttribute("novalidate");this.h.setAttribute("novalidate","");this.ca||this.h.setAttribute("amp-novalidate","");this.h.classList.add("i-amphtml-form");this.B="initial";b=this.h.elements;for(var d=0;d<b.length;d++){var e=b[d].name;t("__amp_source_origin"!=e&&"__amp_form_verify"!=e,"Illegal input name, %s found: %s",e,b[d])}this.P=Ib(this.h);this.ra=Ua(this.h,function(){return ac(c)});this.K.installActionHandler(this.h,this.ga.bind(this),
100);bc(this);cc(this);this.ma=this.ta=null;this.ja=z(a,"form-submit-service")}function $b(a,b){var c=a.h.getAttribute(b);if(c){var d=u(a.h,"url");d.assertHttpsUrl(c,a.h,b);t(!d.isProxyOrigin(c),"form %s should not be on AMP CDN: %s",b,a.h)}return c}l=Zb.prototype;
l.requestForFormFetch=function(a,b,c,d){var e="GET"==b||"HEAD"==b;if(e){dc(this);var g=L(this.h);d&&d.forEach(function(a){delete g[a]});c&&ya(g,c);var f=nb(a,ob(g))}else{f=a;var h=rb(this.j,this.h);d&&d.forEach(function(a){h.delete(a)});for(var k in c)h.append(k,c[k])}return{xhrUrl:f,fetchOpt:B({body:h,method:b,credentials:"include",headers:B({Accept:"application/json"})})}};l.setXhrAction=function(a){this.G=a};
l.ga=function(a){var b=this;if("submit"==a.method)return ec(this).then(function(){var c=a;return"submitting"!=b.B&&fc(b)?gc(b,c.trust,null):Promise.resolve(null)});"clear"===a.method&&hc(this);return null};function ec(a){if(a.V)return a.V;var b=a.h.querySelectorAll(Yb.join(",")),c=ma(b).map(function(a){return a.whenBuilt()});return a.V=ic(a,c,2E3)}
function bc(a){a.F.whenNextVisible().then(function(){var b=a.h.querySelector("[autofocus]");if(b)try{b.focus()}catch(c){}});a.h.addEventListener("submit",a.ka.bind(a),!0);a.h.addEventListener("blur",function(b){jc(b.target);a.P.onBlur(b)},!0);a.D.isSupported()||a.h.addEventListener("change",function(b){a.ra.onCommit().then(function(c){var d=c.updatedElements,e=c.errors;d.forEach(jc);a.P.onBlur(b);"verifying"===a.B&&(e.length?(W(a,"verify-error"),X(a,{verifyErrors:e}).then(function(){Y(a,"verify-error",
e)})):W(a,"initial"))})});a.h.addEventListener("input",function(b){jc(b.target);a.P.onInput(b)})}function cc(a){Ca(a.h,"inputmask","amp-inputmask").then(function(a){a&&a.install()})}function kc(a,b){lc(a,"Form analytics not supported");var c=B({}),d=L(a.h),e;for(e in d)Object.prototype.hasOwnProperty.call(d,e)&&(c["formFields["+e+"]"]=d[e].join(","));c.formId=a.h.id;Xb(a.h,b,c)}
function hc(a){a.h.reset();W(a,"initial");a.h.classList.remove("user-valid");a.h.classList.remove("user-invalid");var b=a.h.querySelectorAll(".user-valid, .user-invalid");C(b,function(a){a.classList.remove("user-valid");a.classList.remove("user-invalid")});var c=a.h.querySelectorAll(".visible[validation-for]");C(c,function(a){a.classList.remove("visible")});mc(a.h)}
l.ka=function(a){if("submitting"==this.B||!fc(this))return a.stopImmediatePropagation(),a.preventDefault(),Promise.resolve(null);(this.G||"POST"==this.A)&&a.preventDefault();return gc(this,100,a)};
function gc(a,b,c){try{var d={form:a.h,actionXhrMutator:a.setXhrAction.bind(a)};a.ja.fire(d)}catch(k){r().error("amp-form","Form submit service failed: %s",k)}var e=nc(a),g=a.h.getElementsByClassName("i-amphtml-async-input");if(!a.G&&"GET"==a.A){lc(a,"Non-XHR GETs not supported.");dc(a);if(0===g.length){for(d=0;d<e.length;d++)a.da.expandInputValueSync(e[d]);var f=!c;oc(a,f);return Promise.resolve()}c&&c.preventDefault()}W(a,"submitting");var h=[];h.push(pc(a,e));C(g,function(b){h.push(qc(a,b))});
return ic(a,h,1E4).then(function(){if(a.G)var c=rc(a,b);else"POST"==a.A?t(!1,"Only XHR based (via action-xhr attribute) submissions are supported for POST requests. %s",a.h):"GET"==a.A&&oc(a,!0),c=Promise.resolve();return c},function(b){return sc(a,b)})}function nc(a){return a.h.querySelectorAll('[type="hidden"][data-amp-replace]')}function sc(a,b){W(a,"submit-error");r().error("amp-form","Form submission failed: %s",b);var c=B({error:b.message});X(a,c).then(function(){Y(a,"submit-error",b)})}
function ac(a){if("submitting"===a.B)return Promise.resolve();W(a,"verifying");Y(a,"verify",null);return pc(a,nc(a)).then(function(){return tc(a)})}function rc(a,b){a.D.isSupported()?b=uc(a,b):(vc(a,b),b=a.M(a.G,a.A).then(function(b){return wc(a,b)},function(b){return xc(a,b)}));return b}
function uc(a,b){var c,d=L(a.h);return X(a,d).then(function(){a.K.trigger(a.h,"submit",null,b)}).then(function(){var b=c=a.requestForFormFetch(a.G,a.A),d=c.fetchOpt||{};var f=d.method;void 0===f?f="GET":(f=f.toUpperCase(),tb.includes(f));d.method=f;d.headers=d.headers||B({});b.fetchOpt=d;b=c;var h=a.j;f=c.xhrUrl;d=c.fetchOpt;!1===d.ampCors&&(d.requireAmpResponseSourceOrigin=!1);!0===d.requireAmpResponseSourceOrigin&&r().error("XHR","requireAmpResponseSourceOrigin is deprecated, use ampCors instead");
void 0===d.requireAmpResponseSourceOrigin&&(d.requireAmpResponseSourceOrigin=!0);h=h.origin||K(h.location.href).origin;f=K(f).origin;h==f&&(d.headers=d.headers||{},d.headers["AMP-Same-Origin"]="true");b.fetchOpt=d;b=c;d=c.xhrUrl;if(!1!==c.fetchOpt.ampCors){f=a.j;h=K(d).search;var k=Object.create(null);if(h)for(var m;m=ka.exec(h);){var I=ja(m[1],m[1]);m=m[2]?ja(m[2],m[2]):"";k[I]=m}t(!("__amp_source_origin"in k),"Source origin is not allowed in %s",d);f=K(pb(f.location.href)).origin;f=encodeURIComponent("__amp_source_origin")+
"="+encodeURIComponent(f);d=nb(d,f,void 0)}b.xhrUrl=d;return a.D.fetchAndRenderTemplate(a.h,c,yc(a))}).then(function(b){return zc(a,b,c)},function(b){return Ac(a,b)})}function yc(a){var b=a.h.querySelector("div[submit-success]"),c=a.h.querySelector("div[submit-error]"),d,e;b&&(d=a.m.maybeFindTemplate(b));c&&(e=a.m.maybeFindTemplate(c));return{successTemplate:d,errorTemplate:e}}
function Ac(a,b){W(a,"submit-error");q().error("amp-form","Form submission failed: %s",b);return ha(function(){X(a,b||{}).then(function(){Y(a,"submit-error",b)})})}function vc(a,b){kc(a,"amp-form-submit");var c=L(a.h);X(a,c).then(function(){a.K.trigger(a.h,"submit",null,b)})}function pc(a,b){for(var c=[],d=0;d<b.length;d++)c.push(a.da.expandInputValueAsync(b[d]));return ic(a,c,100)}
function qc(a,b){return b.getImpl().then(function(a){return a.getValue()}).then(function(c){var d=b.getAttribute("name");d=a.h.querySelector("input[name="+String(d).replace(ta,ua)+"]");if(!d){d=B({name:b.getAttribute("name"),hidden:"true"});var e=a.j.document.createElement("input"),g;for(g in d)e.setAttribute(g,d[g]);d=e}d.setAttribute("value",c);a.h.appendChild(d)})}
function tc(a){var b=ma(a.h.querySelectorAll("["+"no-verify".replace(ta,ua)+"]")),c=b.map(function(a){return a.name||a.id}),d={};return a.M(a.ua,a.A,(d.__amp_form_verify=!0,d),c)}l.M=function(a,b,c,d){lc(this,"XHRs should be proxied.");a=this.requestForFormFetch(a,b,c,d);return this.va.fetch(a.xhrUrl,a.fetchOpt)};function zc(a,b,c){a.D.verifySsrResponse(a.j,b,c);return Bc(a,ha(function(){return b}))}function wc(a,b){return Bc(a,b.json()).then(function(){kc(a,"amp-form-submit-success");Cc(a,b)})}
function Bc(a,b){return b.then(function(b){W(a,"submit-success");X(a,b||{}).then(function(){Y(a,"submit-success",b)})},function(a){q().error("amp-form","Failed to parse response JSON: %s",a)})}function xc(a,b){return(b&&b.response?b.response.json().catch(function(){return null}):Promise.resolve(null)).then(function(c){kc(a,"amp-form-submit-error");W(a,"submit-error");X(a,c||{}).then(function(){Y(a,"submit-error",c)});Cc(a,b.response);q().error("amp-form","Form submission failed: %s",b)})}
function oc(a,b){kc(a,"amp-form-submit");b&&a.h.submit();W(a,"initial")}function lc(a,b){var c=a.D.isSupported();t(!1===c,"[amp-form]: viewerRenderTemplate | %s",b)}function dc(a){var b=a.h.querySelectorAll("input[type=password],input[type=file]");t(0==b.length,"input[type=password] or input[type=file] may only appear in form[method=post]")}function fc(a){void 0===Ab&&(Ab=!!a.j.document.createElement("input").checkValidity);if(Ab){var b=Dc(a.h);if(a.ca)return a.P.report(),b}return!0}
function Cc(a,b){lc(a,"Redirects not supported.");if(b&&b.headers){var c=b.headers.get("AMP-Redirect-To");if(c){t("_blank"!=a.pa,"Redirecting to target=_blank using AMP-Redirect-To is currently not supported, use target=_top instead. %s",a.h);try{var d=u(a.h,"url");d.assertAbsoluteHttpOrHttpsUrl(c);d.assertHttpsUrl(c,"AMP-Redirect-To","Url")}catch(e){t(!1,"The `AMP-Redirect-To` header value must be an absolute URL starting with https://. Found %s",c)}z(a.h,"navigation").navigateTo(a.j,c,"AMP-Redirect-To")}}}
function Y(a,b,c){c=Ia(a.j,"amp-form."+b,B({response:c}));a.K.trigger(a.h,b,c,100)}function ic(a,b,c){return Promise.race([Promise.all(b),a.qa.promise(c)])}
function W(a,b){var c=a.B;a.h.classList.remove("amp-form-"+c);a.h.classList.add("amp-form-"+b);var d=a.h.querySelector("["+c+"]");if(d){/^[\w-]+$/.test("i-amphtml-rendered");if(void 0!==va)var e=va;else{try{var g=d.ownerDocument,f=g.createElement("div"),h=g.createElement("div");f.appendChild(h);e=f.querySelector(":scope div")===h}catch(k){e=!1}e=va=e}e?d=d.querySelector("> [i-amphtml-rendered]".replace(/^|,/g,"$&:scope ")):(d.classList.add("i-amphtml-scoped"),e="> [i-amphtml-rendered]".replace(/^|,/g,
"$&.i-amphtml-scoped "),e=d.querySelectorAll(e),d.classList.remove("i-amphtml-scoped"),d=void 0===e[0]?null:e[0]);d&&d.parentElement&&d.parentElement.removeChild(d)}a.B=b}
function X(a,b){var c=a.h.querySelector("["+a.B+"]"),d=Promise.resolve();if(c){var e="rendered-message-"+a.W;c.setAttribute("role","alert");c.setAttribute("aria-labeledby",e);c.setAttribute("aria-live","assertive");a.m.hasTemplate(c)?d=a.D.renderTemplate(c,b).then(function(b){b.id=e;b.setAttribute("i-amphtml-rendered","");return a.ba.mutateElement(c,function(){c.appendChild(b);var d=Ia(a.j,"amp:dom-update",null,{bubbles:!0});c.dispatchEvent(d)})}):a.ba.mutateElement(c,function(){})}return d}
l.wa=function(){return this.ma};l.ya=function(){return this.ta};function Dc(a){C(a.querySelectorAll("input,select,textarea,fieldset"),function(a){return Z(a)});return Z(a)}function mc(a){var b=document.createElement("input"),c={},d;for(d in b.validity){c.validityState=d;var e=a.querySelectorAll("."+String(c.validityState).replace(ta,ua));C(e,function(a){return function(b){b.classList.remove(a.validityState)}}(c));c={validityState:c.validityState}}}
function Z(a,b){b=void 0===b?!1:b;if(!a.checkValidity)return!0;var c=!1,d=a.classList.contains("user-valid")?"valid":a.classList.contains("user-invalid")?"invalid":"none",e=a.checkValidity();"valid"!=d&&e?(a.classList.add("user-valid"),a.classList.remove("user-invalid"),c="invalid"==d):"invalid"==d||e||(a.classList.add("user-invalid"),a.classList.remove("user-valid"),c=!0);if(a.validity)for(var g in a.validity)a.classList.toggle(g,a.validity[g]);if(b&&c){g=Ba(a);for(var f=0;f<g.length;f++)Z(g[f]);
a.form&&Z(a.form)}return e}function jc(a){Z(a,!0)}function Ec(a){this.sa=Fc(a).then(function(){return Gc(a)})}Ec.prototype.whenInitialized=function(){return this.sa};function Fc(a){var b=new ga;Qb(a,b.resolve);return b.promise}function Gc(a){return a.whenReady().then(function(){var b=a.getRootNode();Hc(b.querySelectorAll("form"));Sa(a);Ic(b)})}function Hc(a){a&&C(a,function(a,c){var b=a.__AMP_FORM||null;b||new Zb(a,"amp-form-"+c)})}
function Ic(a){a.addEventListener("amp:dom-update",function(){Hc(a.querySelectorAll("form"))})}(function(a){a.registerServiceForDoc("form-submit-service",db);a.registerServiceForDoc("amp-form",Ec)})(self.AMP);
})});
//# sourceMappingURL=amp-form-0.1.js.map

