@ptp-us/power-the-polls-form
Advanced tools
Comparing version 1.1.2-beta.1 to 1.1.2-beta.2
@@ -200,3 +200,3 @@ 'use strict'; | ||
version() { | ||
return Promise.resolve("1.1.2-beta.1"); | ||
return Promise.resolve("1.1.2-beta.2"); | ||
} | ||
@@ -390,3 +390,5 @@ render() { | ||
? (index.h("section", null, index.h("h4", null, "Further Notes"), index.h("p", null, j.further_notes), j.trusted_notes && ( // "trusted" | ||
index.h("div", null, index.h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") }))))) : null, !WorkElections.allNullOrEmpty(j === null || j === void 0 ? void 0 : j.telephone, j === null || j === void 0 ? void 0 : j.email, j === null || j === void 0 ? void 0 : j.office_address) | ||
index.h("div", null, index.h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: '<head><link href="/build/app.css" rel="stylesheet"></head><body>' + | ||
j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") + | ||
"</body>" }))))) : null, !WorkElections.allNullOrEmpty(j === null || j === void 0 ? void 0 : j.telephone, j === null || j === void 0 ? void 0 : j.email, j === null || j === void 0 ? void 0 : j.office_address) | ||
? (index.h("section", null, index.h("h4", null, "Contact Information"), index.h("p", null, index.h("strong", null, "Phone: "), index.h("a", { href: `tel:${j.telephone}` }, j.telephone)), index.h("p", null, index.h("strong", null, "Email: "), index.h("a", { href: `mailto:${j.email}` }, j.email)), (j === null || j === void 0 ? void 0 : j.office_address) && | ||
@@ -393,0 +395,0 @@ index.h("p", null, index.h("strong", null, "Office Address: "), index.h("a", { target: "_blank", href: `https://www.google.com/maps/search/${encodeURIComponent(j === null || j === void 0 ? void 0 : j.office_address)}` }, j === null || j === void 0 ? void 0 : j.office_address)))) : null, j.website && (index.h("a", { class: "poll-worker-action", href: j.website, target: "_blank" }, "Poll Worker Information")), j.student_website && (index.h("a", { class: "poll-worker-action", href: j.student_website, target: "_blank" }, "Student Poll Worker Information")), (j === null || j === void 0 ? void 0 : j.application) !== "" && index.h(CompleteApplicationButton, Object.assign({}, j)))); |
@@ -26,3 +26,3 @@ import { Component, Event, h, Host, Method, Prop, State } from "@stencil/core"; | ||
version() { | ||
return Promise.resolve("1.1.2-beta.1"); | ||
return Promise.resolve("1.1.2-beta.2"); | ||
} | ||
@@ -29,0 +29,0 @@ render() { |
@@ -110,3 +110,5 @@ import { Component, h, Host, Prop, State } from "@stencil/core"; | ||
h("div", null, | ||
h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") }))))) : null, | ||
h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: '<head><link href="/build/app.css" rel="stylesheet"></head><body>' + | ||
j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") + | ||
"</body>" }))))) : null, | ||
!allNullOrEmpty(j === null || j === void 0 ? void 0 : j.telephone, j === null || j === void 0 ? void 0 : j.email, j === null || j === void 0 ? void 0 : j.office_address) | ||
@@ -113,0 +115,0 @@ ? (h("section", null, |
@@ -1,1 +0,1 @@ | ||
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{l(i.next(t))}catch(e){r(e)}}function s(t){try{l(i["throw"](t))}catch(e){r(e)}}function l(t){t.done?n(t.value):o(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};import{r as registerInstance,h,H as Host,c as createEvent}from"./index-3aecbc63.js";import{t as toQueryString,b as Fragment,F as FormSubmissionThankYou,P as PtpLink,d as data,f as findJurisdictionId,T as TextInput,c as fetchJurisdictionInfo,e as fetchJurisdictionGeoJson,a as allNullOrEmpty,i as isNullOrEmpty,g as findStateId,h as fetchStateJurisdictionsList,j as fetchStateInfo}from"./WorkElections-ecf24a25.js";import{A as ActiveRouter}from"./active-router-807869c2.js";var ZipGeocode=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=new URL("https"+"://smartystreet.powerthepolls.org/dev/zip");e.searchParams.append("zipcode",t);return[2,fetch(e.toString()).then((function(t){return t.json()}),(function(t){return console.log("SmartyStreets Error:",t)})).then((function(t){var e=t[0];if(e.reason){return{error:e.reason}}var n=new Set;var i=new Set;var o=new Map;var r=e.zipcodes[0];if(e.city_states){e.city_states.forEach((function(t){return n.add(t.city)}))}i.add(r.county_name);o.set(r.state_abbreviation,r.state);if(r.alternate_counties){r.alternate_counties.forEach((function(t){i.add(t.county_name);o.set(t.state_abbreviation,t.state)}))}return{zip:r.zipcode,cities:n,counties:i,states:o}}))]}))}))};var AddressInput=function(){function t(t){registerInstance(this,t);this.zipValue="";this.cityValue="";this.countyValue="";this.stateValue="";this.cityOptions=new Set;this.countyOptions=new Set;this.stateOptions=new Map}t.prototype.render=function(){var t=this;var e=/^\d{5}$/;var n=function(n){t.zipValue=n.target.value;if(e.test(t.zipValue)){ZipGeocode(t.zipValue).then((function(e){if("error"in e){console.log(e.error)}else{t.cityOptions=e.cities;t.cityValue=t.cityOptions.values().next().value;t.countyOptions=e.counties;t.countyValue=t.countyOptions.values().next().value;t.stateOptions=e.states;t.stateValue=t.stateOptions.keys().next().value}}))}};return h(Host,null,h("label",null,"ZIP",h("input",{name:"zip",required:true,value:this.zipValue,pattern:"\\d{5}",maxLength:5,title:"Please enter a valid ZIP code",onInput:n})),h("input-possibly-hidden-select",{fieldLabel:"City",name:"city",selected:this.cityValue,options:this.cityOptions}),h("input-possibly-hidden-select",{fieldLabel:"County",name:"user_county",selected:this.countyValue,options:this.countyOptions}),h("input-possibly-hidden-select",{fieldLabel:"State",name:"state",selected:this.stateValue,options:this.stateOptions}))};return t}();var PossiblyHiddenSelect=function(){function t(t){registerInstance(this,t);this.fieldLabel="";this.name="";this.selected="";this.options=new Set}t.prototype.render=function(){var t=this;if(this.options.size<=1){return h("input",{name:this.name,type:"hidden",value:this.selected})}else{return h("label",null,this.fieldLabel,h("select",{name:this.name,required:true},__spreadArrays(this.options.entries()).map((function(e){var n=e[0],i=e[1];return h("option",{value:n,selected:t.selected===n},i)}))))}};return t}();var submitToActionKit=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;var i;return __generator(this,(function(o){switch(o.label){case 0:return[4,fetch("https"+"://ptp.actionkit.com/rest/v1/action/",{method:"POST",body:toQueryString(t),mode:"no-cors",headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:e=o.sent();if(!(e.status===200||e.status===201||e.status===0))return[3,2];return[2,true];case 2:o.trys.push([2,4,,5]);i={statusText:e.statusText,status:e.status};return[4,e.json()];case 3:return[2,(i.data=o.sent(),i)];case 4:n=o.sent();return[2,{statusText:e.statusText,status:e.status}];case 5:return[2]}}))}))};var MichiganAdditionalInfoForm=function(t){var e=t.data,n=t.formSubmitted,i=t.onSubmit;var o=function(t){try{var e=t.target;var n=__spreadArrays(e.getElementsByTagName("input"),e.getElementsByTagName("select"));submitToActionKit(n.reduce((function(t,e){t[e.name]=e.value;return t}),{})).then((function(t){if(t!==true){console.error(t)}}));i()}catch(t){console.error(t)}finally{t.preventDefault();return false}};var r=["Not willing to travel","Less than 10 miles","Less than 50 miles","I'll go wherever I'm needed"];return e.state==="MI"&&!n?h(Fragment,null,h("p",null,"We are sharing your information with election administrators and our state partners who will follow up to help you be placed as a poll worker! ",h("strong",null,"We just need a few more pieces of information from you to help with your application:")),h("form",{onSubmit:o,style:{padding:"0"}},h("input",{type:"hidden",name:"city",value:e===null||e===void 0?void 0:e.city}),h("input",{type:"hidden",name:"state",value:e===null||e===void 0?void 0:e.state}),h("input",{type:"hidden",name:"zip",value:e===null||e===void 0?void 0:e.zip}),h("label",null,"Street address",h("input",{type:"text",required:true,name:"address1"})),h("label",null,"Are you fluent in a language besides English?",h("input",{type:"text",required:true,name:"user_additional_language",value:"English only"})),h("label",null,"In Michigan, eligible poll workers can serve anywhere in the state. Are you willing to travel, and if so, how far can you travel?",h("select",{name:"user_mi_travel",required:true},r.map((function(t){return h("option",{value:t},t)})))),h("input",{type:"hidden",name:"page",value:"mi-extra"}),h("input",{type:"hidden",name:"email",value:e===null||e===void 0?void 0:e.email}),h("button",{type:"submit",class:"button"},"Complete application")),h("hr",null)):null};var powerThePollsFormCss='power-the-polls-form{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form *{-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form h3{margin-top:1em}power-the-polls-form button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}power-the-polls-form button:hover{opacity:0.8}power-the-polls-form button:focus{opacity:0.6}power-the-polls-form button:active{opacity:0.4}power-the-polls-form form{font-size:1rem;padding:1em 0;letter-spacing:0}power-the-polls-form form input,power-the-polls-form form select{width:100%;padding:0.5em 0.75em;display:block}power-the-polls-form form select{padding:0.75em;height:auto}power-the-polls-form form label{margin-bottom:0.75em;display:block;font-size:0.9rem}power-the-polls-form form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}power-the-polls-form form label .checkbox:first-of-type{margin-top:1.5em}power-the-polls-form form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}power-the-polls-form p.disclaimer{font-size:0.9rem;font-weight:normal}power-the-polls-form .next-steps p{clear:left}power-the-polls-form .next-steps p .number{margin:0 0.5em 0.5em 0;border-style:solid;border-width:2px;padding:0.25em;display:block;width:2.2em;text-align:center;font-size:1.6em;font-weight:bold;float:left}@media only screen and (max-width: 620px){power-the-polls-form .next-steps p .number{float:none}}power-the-polls-form .next-steps::after{content:"";display:block;clear:both}';var PowerThePollsForm=function(){function t(t){registerInstance(this,t);this.submitCompleted=createEvent(this,"submitCompleted",6);this.submitError=createEvent(this,"submitError",6);this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false}t.prototype.reset=function(){this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false;return Promise.resolve()};t.prototype.version=function(){return Promise.resolve("1.1.2-beta.1")};t.prototype.render=function(){var t=this;var e=this.partnerId;var n=this.optUserOutOfChase===true||this.optUserOutOfChase==="true"?false:true;var i=this.customFormFieldLabel;var o=this.formData.state&&this.formData.state in data?data[this.formData.state]:null;var r="(?:\\+1)?[-.\\s]?\\(?([0-9]{3})\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}";var a=function(e){try{var n=e.target;var i=__spreadArrays(n.getElementsByTagName("input"),n.getElementsByTagName("select"));var o=i.reduce((function(t,e){t[e.name]=e.value;return t}),{});var r=o.city||"";var a=o.user_county||"";var s=o.state||"";var l=o.name||"";var u=o.email||"";var c=o.mobile_phone||"";var p=o.zip||"";t.formStatus="submitting";submitToActionKit(o).then((function(e){if(e===true){var n=t.submitCompleted.emit();if(!n.defaultPrevented){t.formStatus="completed";t.formData=Object.assign(Object.assign({},t.formData),{city:r,county:a,state:s,name:l,email:u,phone:c,zip:p,jurisdictionId:findJurisdictionId(s,a,r)+""})}}else{t.submitError.emit(e)}})).catch((function(e){t.submitError.emit(e)}))}catch(e){t.submitError.emit(e)}finally{e.preventDefault();return false}};var s=this.formData.state==="ME"?[function(){return h(Fragment,null,"We are sharing your information with our state partners who will be following up to help you connect with your local administrators. ",h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Maine.")},function(){return"In the meantime, please review the state requirements and compensation below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:this.formData.state==="MI"?[function(){return h(Fragment,null,h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Michigan.")},function(){return"In the meantime, learn more about hours, compensation, and requirements for your community below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:[function(){return h(Fragment,null,h("strong",null,"Complete your official application to be a poll worker!")," Learn more about hours, compensation, and requirements for your community below and be sure to complete your official application!")},o==null||!o.semiPartner?function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."}:function(){return"We’ll be reaching out in the next week to answer any questions you have and make sure you’ve completed your application so we can help you become a poll worker. Be on the lookout for a call from our team!"},function(){return"Help us recruit more poll workers! Please encourage your friends and family to sign up to help ensure a safe and fair election!"}];return h(Host,null,this.formStatus==="completed"?h("article",null,h(FormSubmissionThankYou,{stateInfo:o}),(o===null||o===void 0?void 0:o.noPollWorkersNeeded)!==true&&h("ptp-info-poll-worker",{city:this.formData.city,county:this.formData.county,state:this.formData.state,formData:this.formData},h("div",null,h(MichiganAdditionalInfoForm,{formSubmitted:this.michiganFormSubmitted,data:this.formData,onSubmit:function(){return t.michiganFormSubmitted=true}}),h("div",{class:"next-steps"},s.map((function(t,e){return h("p",null,h("span",{class:"number"},e+1),t())}))),h("hr",null)))):h(Fragment,null,h("h3",null,"Help your community and sign up to Power the Polls!"),h("form",{onSubmit:a},h("label",null,"Name",h("input",{type:"text",required:true,name:"name"})),h("label",null,"Email address",h("input",{type:"email",required:true,name:"email"})),h("label",null,"Mobile phone",h("input",{type:"tel",required:true,name:"mobile_phone",pattern:r,title:"Please enter a valid US phone number"})),i?h("label",null,i,h("input",{type:"text",name:"user_partner_field"})):null,h("input-address",null),h("input",{type:"hidden",name:"source",id:"id_source",value:e}),h("input",{type:"hidden",name:"user_chase_enabled",value:n?"true":""}),h("input",{type:"hidden",name:"country",value:"United States"}),h("input",{type:"hidden",name:"page",value:"join"}),h("input",{type:"hidden",name:"utf8",value:"ሴ"}),h("input",{type:"hidden",name:"js",value:"1"}),h("button",{type:"submit",class:"button",disabled:this.formStatus!=="incomplete"},"Sign Up To Get Started"),h("p",{class:"disclaimer"},"By signing up, you agree to receive occasional emails or text messages from Power the Polls and ",!n&&this.partnerName&&this.partnerName+" and ","accept our ",h(PtpLink,{path:"/privacy"},"Privacy Policy"),". You can unsubscribe at any time. For texts, message and data rates may apply. Text HELP for Info. Text STOP to quit.")),h("footer",null,h("p",{class:"disclaimer"},h("a",{href:"https://www.workelections.com/",target:"_blank",rel:"noopener"},"Powered by Work Elections.")))))};return t}();PowerThePollsForm.style=powerThePollsFormCss;var EmailApplicationForm=function(t){var e=t.jurisdiction,n=t.data,i=t.onComplete;var o=e;if((o===null||o===void 0?void 0:o.application)!=null&&o.application!==""||((o===null||o===void 0?void 0:o.email)==null||o.email==="")){return}var r=function(t){try{fetch("https://smartystreet.powerthepolls.org/dev/electmail",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(t){console.log("Email sending "+t.statusText+" ("+t.status+")");i()})).catch((function(t){return console.error(t)}))}finally{t.preventDefault();return false}};var a=["18 and under","19 to 25","26 to 35","36 to 50","51 to 64","65 and older"];return h(Fragment,null,h("h3",null,"Complete your application"),h("p",null,"You need to email your local jurisdiction directly in order to apply to be a poll worker. This form generates an email that is sent to your local election administrator on your behalf."),h("form",{onSubmit:r,style:{padding:"0"}},h("label",null,"Name",h(TextInput,{data:n,field:"name",required:true})),h("label",null,"City",h(TextInput,{data:n,field:"city",required:true})),h("label",null,"County",h(TextInput,{data:n,field:"county",required:true})),h("label",null,"Email",h(TextInput,{data:n,field:"email",required:true})),h("label",null,"Phone Number",h(TextInput,{data:n,field:"phone",required:true})),h("label",null,"What languages do you speak other than English?",h(TextInput,{data:n,field:"languages",initialValue:"English only",required:true})),h("label",null,"Age",h("select",{name:"age",required:true},h("option",null,"Please select"),a.map((function(t){return h("option",{value:t,selected:n.age===t},t)})))),h("input",{type:"hidden",value:n.state,name:"state"}),h("button",{type:"submit",class:"button"},"Submit Application")),h("p",null,"Or you can send an email yourself to ",h("a",{href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},o.email),". Be sure to include your first and last name, city and county of residence, email, phone number, age, and any additional languages you speak other than English."),h("a",{class:"poll-worker-action",href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},"Email your poll administrator directly"),h("hr",null))};var ptpInfoJurisdictionCss="ptp-info-jurisdiction button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}ptp-info-jurisdiction button:hover{opacity:0.8}ptp-info-jurisdiction button:focus{opacity:0.6}ptp-info-jurisdiction button:active{opacity:0.4}ptp-info-jurisdiction form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-jurisdiction form input,ptp-info-jurisdiction form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-jurisdiction form select{padding:0.75em;height:auto}ptp-info-jurisdiction form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-jurisdiction form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-jurisdiction form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-jurisdiction form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-jurisdiction a.poll-worker-action{border:2px solid;padding:0.5em 1em;margin:2rem 0;font-size:1.2em;letter-spacing:0.05rem;display:block;text-align:center;font-weight:bold;text-decoration:none;text-transform:uppercase}ptp-info-jurisdiction a.poll-worker-action:hover{opacity:0.8}ptp-info-jurisdiction a.poll-worker-action:focus{opacity:0.6}ptp-info-jurisdiction a.poll-worker-action:active{opacity:0.4}ptp-info-jurisdiction a.poll-worker-action.cta{border:0;background-color:#444BFD;color:#F5F3F1}";var CompleteApplicationButton=function(t){return(t===null||t===void 0?void 0:t.application)&&(t===null||t===void 0?void 0:t.application)!==""&&h("a",{class:"poll-worker-action cta",href:t.application,target:"_blank"},"Complete your application")};var JurisdictionInfoComponent=function(){function t(t){registerInstance(this,t);this.formData={};this.mailToFormComplete=false}t.prototype.componentWillLoad=function(){var t=this;this.formData=this.addtl||{};if(this.jurisdictionId){fetchJurisdictionInfo(this.jurisdictionId).then((function(e){return t.jurisdiction=e}));fetchJurisdictionGeoJson(this.jurisdictionId).then((function(e){return t.jurisdictionShape=e}))}};t.prototype.render=function(){var t=this;var e=this.jurisdiction;if(e==null){return h(Host,null,h("slot",null),h("ui-loading-spinner",null))}if(!e.name){return h(Host,null,h("h3",null,"Uh oh!"),h("p",null,"Unfortunately we're not able to retrieve jurisdiction"," ",h("strong",null,"#",this.jurisdictionId)," ","at this time"),h("p",null,"Please contact ",h("a",{href:"mailto:info@powerthepolls.org?subject=Error%20with%20jurisdiction%20"+this.jurisdictionId},"info@powerthepolls.org")," ","and let us know the zip code you've entered."))}return h(Host,null,h("div",{style:{display:"flex",alignItems:"start",flexDirection:"column"}},h("ui-geojson-to-svg",{geoJson:this.jurisdictionShape,height:180,width:250})),h("h2",null,e.name,", ",e.state.alpha),e.jurisdiction_link_text&&e.jurisdiction_link&&h("p",null,e.jurisdiction_link_text," ",h(PtpLink,{path:"/jurisdiction/"+e.jurisdiction_link.id},"click here"),"."),h(CompleteApplicationButton,Object.assign({},e)),!this.mailToFormComplete&&h(EmailApplicationForm,{jurisdiction:e,data:this.formData,onComplete:function(){return t.mailToFormComplete=true}}),h("slot",null),h("section",null,h("h4",null,"Hours and Compensation"),!allNullOrEmpty(e===null||e===void 0?void 0:e.hours_start,e===null||e===void 0?void 0:e.hours_end,e===null||e===void 0?void 0:e.compensation,e===null||e===void 0?void 0:e.full_day_req)?h("ul",null,e.hours_start&&h("li",null,h("strong",null,"Start Time: "),e.hours_start),e.hours_end&&h("li",null,h("strong",null,"End Time: "),e.hours_end),e.compensation&&h("li",null,h("strong",null,"Compensation: "),e.compensation),e.full_day_req==="Y"?h("li",null,"You must work the full day"):null,e.full_day_req==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.full_day_req.length>1&&h("li",null,e.full_day_req)):h("p",null,"Please contact your local election official for more information")),!isNullOrEmpty(e.registration_status)?h("section",null,h("h4",null,"Voter Registration Requirements"),h("ul",null,h("li",null,e.registration_status==="S"?"You can be registered to vote anywhere in the state to work on Election Day in "+e.name+".":e.registration_status==="J"?"You must be registered to vote in "+e.name+" to work on Election Day":e.registration_status))):null,h("section",null,h("h4",null,"Work Requirements"),!allNullOrEmpty(e===null||e===void 0?void 0:e.minimum_age,e===null||e===void 0?void 0:e.training,e===null||e===void 0?void 0:e.complete_training,e===null||e===void 0?void 0:e.training_note)?h("ul",null,e.minimum_age&&h("li",null,h("strong",null,"Minimum Age: "),e.minimum_age),e.training==="Y"&&h("li",null,"You must attend a training session."),e.training.length>1&&h("li",null,e.training),e.complete_training==="Y"&&h("li",null,"You must work the full day."),e.complete_training==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.complete_training.length>1&&h("li",null,e.complete_training),e.training_note&&h("li",null,h("strong",null,"Training Details: "),e.training_note)):h("p",null,"Please contact your local election official for more information")),!allNullOrEmpty(e===null||e===void 0?void 0:e.further_notes,e===null||e===void 0?void 0:e.trusted_notes)?h("section",null,h("h4",null,"Further Notes"),h("p",null,e.further_notes),e.trusted_notes&&h("div",null,h("iframe",{sandbox:"allow-popups",width:"100%",height:"100%",frameBorder:"0",srcDoc:e.trusted_notes.replace(/\<a/g,'<a target="_blank"')}))):null,!allNullOrEmpty(e===null||e===void 0?void 0:e.telephone,e===null||e===void 0?void 0:e.email,e===null||e===void 0?void 0:e.office_address)?h("section",null,h("h4",null,"Contact Information"),h("p",null,h("strong",null,"Phone: "),h("a",{href:"tel:"+e.telephone},e.telephone)),h("p",null,h("strong",null,"Email: "),h("a",{href:"mailto:"+e.email},e.email)),(e===null||e===void 0?void 0:e.office_address)&&h("p",null,h("strong",null,"Office Address: "),h("a",{target:"_blank",href:"https://www.google.com/maps/search/"+encodeURIComponent(e===null||e===void 0?void 0:e.office_address)},e===null||e===void 0?void 0:e.office_address))):null,e.website&&h("a",{class:"poll-worker-action",href:e.website,target:"_blank"},"Poll Worker Information"),e.student_website&&h("a",{class:"poll-worker-action",href:e.student_website,target:"_blank"},"Student Poll Worker Information"),(e===null||e===void 0?void 0:e.application)!==""&&h(CompleteApplicationButton,Object.assign({},e)))};return t}();JurisdictionInfoComponent.style=ptpInfoJurisdictionCss;function injectHistory(t){ActiveRouter.injectProps(t,["history","location"])}var PollWorkerInfo=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=this,e=t.state,n=t.county,i=t.city;var o=e?findJurisdictionId(e,n,i):null;if(!e&&this.history){return this.history.replace("/search")}return o!=null?h("ptp-info-jurisdiction",{jurisdictionId:o,addtl:this.formData||{city:i,state:e,county:n,jurisdictionId:o+""}},h("slot",null)):h("ptp-info-state",{state:e},h("slot",null))};return t}();injectHistory(PollWorkerInfo);var ptpInfoStateCss="ptp-info-state button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}ptp-info-state button:hover{opacity:0.8}ptp-info-state button:focus{opacity:0.6}ptp-info-state button:active{opacity:0.4}ptp-info-state form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-state form input,ptp-info-state form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-state form select{padding:0.75em;height:auto}ptp-info-state form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-state form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-state form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-state form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-state .jurisdictions{display:grid;grid-template-columns:50% 50%}ptp-info-state .jurisdictions a.jurisdiction{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0.5em;text-align:center;text-decoration:none;border:2px solid;padding:0.75em 0.5em}@media only screen and (max-width: 620px){ptp-info-state .jurisdictions{grid-template-columns:100%}}";var StateInfoComponent=function(){function t(t){registerInstance(this,t);this.stateId=null;this.stateJurisdictions=[]}t.prototype.componentWillLoad=function(){this.resetState()};t.prototype.onStateChanged=function(){this.resetState()};t.prototype.render=function(){var t=this.state;var e=this.stateInfo;if(t==="ME"){return h(Host,null,h("h2",null,"Maine"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"In Maine, eligible poll workers can serve anywhere in the state, but requirements and compensation vary across the state."),h("h4",null,"Voter Registration Requirements"),h("p",null,"You must be a registered voter to work on Election Day."),h("h4",null,"Work Requirements"),h("ul",null,h("li",null,h("strong",null,"Minimum Age:")," 17 years of age"),h("li",null,"Candidates and family members of candidates cannot be poll workers")),h("h4",null,"Compensation"),h("p",null,"Compensation varies depending on city or town, and is at least the state minimum wage of $12 per hour."))}if(t==="MI"){return h(Host,null,h("h2",null,"Michigan"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"Requirements vary and are determined by cities and towns in Michigan, but all poll workers must be a registered Michigan voter or 16 or 17 years old residing in Michigan. While you can vote with a felony record, you cannot serve as a poll worker in Michigan if you have a felony or any infraction related to voting."),h("h4",null,"Hours & Compensation"),h("ul",null,h("li",null,"Serving as a poll worker is a paid position with a flat daily rate. Many cities are also providing hazard pay for poll workers who serve during the 2020 election."),h("li",null,"While hours vary, both by city and by position worked, most poll workers should expect to work long days, beginning before polls open at 7am and concluding after polls close at 8pm.")))}return e==null?h("ui-loading-spinner",null):h("div",null,h("h2",null,e.name),e.notes&&h("p",null,e.notes),h("div",{class:"jurisdictions"},this.stateJurisdictions.map((function(t){var e=t.id,n=t.name;return h(PtpLink,{path:"/jurisdiction/"+e,anchorClass:"jurisdiction"},n)}))))};t.prototype.resetState=function(){var t=this;this.stateId=this.state?findStateId(this.state):null;if(this.stateId){fetchStateJurisdictionsList(this.stateId).then((function(e){return t.stateJurisdictions=e}));fetchStateInfo(this.stateId).then((function(e){return t.stateInfo=e}))}else{this.stateInfo=undefined;this.stateJurisdictions=[]}};Object.defineProperty(t,"watchers",{get:function(){return{state:["onStateChanged"]}},enumerable:false,configurable:true});return t}();StateInfoComponent.style=ptpInfoStateCss;var explode=function(t){return t&&t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e,crs:t.crs}}))};var translateCoordinates=function(t,e,n){return t.map((function(t){return[(t[0]-n.xMin)*e,(n.yMax-t[1])*e]}))};function convertCoordinatesToPathString(t,e,n){return translateCoordinates(t,e,n).map((function(t){return t[0]+","+t[1]})).join(" ")}function Point(t,e,n,i){var o=i&&i.pointRadius?i.pointRadius:1;var r=!!(i&&i.pointAsCircle);var a=convertCoordinatesToPathString([t.coordinates],e,n);return r?[a]:["M"+a+" m"+-o+",0"+" a"+o+","+o+" 0 1,1 "+2*o+","+0+" a"+o+","+o+" 0 1,1 "+-2*o+","+0]}function MultiPoint(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Point(t,e,n,i)[0]}));return!o?[r.join(" ")]:r}function LineString(t,e,n,i){return["M"+convertCoordinatesToPathString(t.coordinates,e,n)]}function MultiLineString(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return LineString(t,e,n)[0]}));return!o?[r.join(" ")]:r}function Polygon(t,e,n,i){var o=convertCoordinatesToPathString(t.coordinates[0],e,n);if(t.coordinates.length>1){var r=t.coordinates.slice(1,t.coordinates.length);if(r){for(var a=0;a<r.length;a++){o+=" M"+convertCoordinatesToPathString(r[a],e,n)}}}return["M"+o+"Z"]}function MultiPolygon(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Polygon(t,e,n)[0]}));return!o?[r.join(" ").replace(/Z/g,"")+"Z"]:r}var GeoJsonToPath=Object.freeze({__proto__:null,Point:Point,MultiPoint:MultiPoint,LineString:LineString,MultiLineString:MultiLineString,Polygon:Polygon,MultiPolygon:MultiPolygon});var GeoJsonRenderer=function(){function t(t){if(t===void 0){t={scale:1}}this.options=t;this.options.bounds=this.options.bounds||{xMin:-20037508.342789244,xMax:20037508.342789244,yMin:-20037508.342789244,yMax:20037508.342789244}}t.prototype.convert=function(t,e){var n=Object.assign(Object.assign({},this.options),e||{});var i=[];switch(t.type){case"FeatureCollection":for(var o=0;o<t.features.length;o++){i=__spreadArrays(i,this.convertFeature(t.features[o],n))}break;case"Feature":i=this.convertFeature(t,n);break;case"GeometryCollection":for(var o=0;o<t.geometries.length;o++){i=__spreadArrays(i,this.convertGeometry(t.geometries[o],n))}break;default:i=this.convertGeometry(t,n);break}return i};t.prototype.convertFeature=function(t,e){var n=t===null||t===void 0?void 0:t.geometry;if(n==null){return[]}var i=Object.assign(Object.assign({},this.options),e||{});if(i.attributes&&i.attributes instanceof Array){i.attributes=i.attributes.reduce((function(e,n){if(typeof n==="string"){var i=void 0;var o=n.split(".").pop();try{i=valueAt(t,n)}catch(r){i=false}if(i){e[o]=i}}else if(typeof n==="object"&&n.type&&n.property){if(n.type==="dynamic"){var i=void 0;var o=n.key?n.key:n.property.split(".").pop();try{i=valueAt(t,n.property)}catch(r){i=false}if(i){e[o]=i}}else if(n.type==="static"&&n.value){e[n.property]=n.value}}return e}),{})}else{i.attributes=i.attributes||{}}var o=i.attributes;var r=o.id||t.id||(t.properties&&t.properties.id?t.properties.id:null);if(r){o.id=r}i.attributes=o;return this.convertGeometry(n,i)};t.prototype.convertGeometry=function(t,e){if(isDrawable(t)){var n=Object.assign(Object.assign({},this.options),e||{});var i=n.output||"svg";var o=GeoJsonToPath[t.type](t,this.options.scale,this.options.bounds,n);if(i==="svg"){var r=o.map((function(e){return pathToSvgJson(e,t.type,n.attributes,n)}));var a=r.map((function(e){return jsonToSvgElement(e,t.type,n)}));return a}else{return o}}return[]};return t}();function isDrawable(t){return t.type in GeoJsonToPath}function pathToSvgJson(t,e,n,i){var o={};var r=!!(i&&i.pointAsCircle);if((e==="Point"||e==="MultiPoint")&&r){o.cx=t.split(",")[0];o.cy=t.split(",")[1];o.r=i&&i.pointRadius?i.pointRadius:"1"}else{o={d:t};if(e==="Polygon"||e==="MultiPolygon"){o["fill-rule"]="evenodd"}}for(var a in n){if(n.hasOwnProperty(a)){o[a]=n[a]}}return o}function jsonToSvgElement(t,e,n){var i=!!(n&&n.pointAsCircle);var o=(e==="Point"||e==="MultiPoint")&&i?"<circle":"<path";for(var r in t){if(t.hasOwnProperty(r)){o+=" "+r+'="'+t[r]+'"'}}o+="/>";return o}function valueAt(t,e){return e.split(".").reduce((function(t,e,n,i){if(t.hasOwnProperty(e)){return t[e]}else{throw new Error(i.slice(0,n+1).join(".")+" is not a valid property path")}}),t)}var mercator=function(t,e){var n=6378137;var i=85.0511287798;var o=Math.PI/180;var r={x:n*t*o,y:Math.max(Math.min(i,e),-i)*o};r.y=n*Math.log(Math.tan(Math.PI/4+r.y/2));return r};var uiGeojsonToSvgCss="path{fill:rgba(204, 204, 204, 0.8);stroke-width:1px}";var UiGeojsonToSvg=function(){function t(t){registerInstance(this,t);this.width=200;this.height=200;if(this.geoJson==null){this.renderer=new GeoJsonRenderer(this.options)}else{this.updateProjectedGeoJson();this.resetRenderer()}}t.prototype.render=function(){try{var t=this.projectedGeoJson;return t&&h(Host,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="'+this.width+'" height="'+this.height+'">\n '+this.renderer.convert(t,this.options).join("\n")+"\n </svg>"})}catch(e){console.error(e);return null}};t.prototype.geoJsonChanged=function(){this.updateProjectedGeoJson();this.resetRenderer()};t.prototype.widthChanged=function(){this.resetRenderer()};t.prototype.heightChanged=function(){this.resetRenderer()};t.prototype.optionsChanged=function(){this.resetRenderer()};t.prototype.resetRenderer=function(){var t=this.projectedGeoJson;if(t!=null){var e=this.getBoundingBox(t);var n=this.calculateScale(e,{width:this.width,height:this.height});this.renderer=new GeoJsonRenderer(Object.assign(Object.assign({},this.options),{bounds:{yMax:e.yMax,xMax:e.xMax,yMin:e.yMin,xMin:e.xMin},scale:n}))}};t.prototype.updateProjectedGeoJson=function(){var t=this.geoJson;if(t!=null){var e=explode(t)[0];var n=e.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];var a=mercator(o,r);n[i]=[a.x,a.y]}this.projectedGeoJson=e}};t.prototype.getBoundingBox=function(t){var e={xMin:Number.MAX_VALUE,xMax:Number.MIN_SAFE_INTEGER,yMin:Number.MAX_VALUE,yMax:Number.MIN_SAFE_INTEGER};var n=t.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];e.xMin=e.xMin<o?e.xMin:o;e.xMax=e.xMax>o?e.xMax:o;e.yMin=e.yMin<r?e.yMin:r;e.yMax=e.yMax>r?e.yMax:r}return e};t.prototype.calculateScale=function(t,e,n){var i=e.width/Math.abs(t.xMax-t.xMin);var o=e.height/Math.abs(t.yMax-t.yMin);if(n){return n==="width"?i:n==="height"?o:n==="larger"?Math.max(i,i):Math.min(i,o)}return Math.min(i,o)};Object.defineProperty(t,"watchers",{get:function(){return{geoJson:["geoJsonChanged"],width:["widthChanged"],height:["heightChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return t}();UiGeojsonToSvg.style=uiGeojsonToSvgCss;var uiLoadingSpinnerCss=":host .sk-cube-grid{width:40px;height:40px;margin:100px auto}:host .sk-cube-grid .sk-cube{width:33%;height:33%;float:left;background-color:#000;-webkit-animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}:host .sk-cube-grid .sk-cube1{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .sk-cube-grid .sk-cube2{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .sk-cube-grid .sk-cube3{-webkit-animation-delay:0.4s;animation-delay:0.4s}:host .sk-cube-grid .sk-cube4{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .sk-cube-grid .sk-cube5{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .sk-cube-grid .sk-cube6{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .sk-cube-grid .sk-cube7{-webkit-animation-delay:0s;animation-delay:0s}:host .sk-cube-grid .sk-cube8{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .sk-cube-grid .sk-cube9{-webkit-animation-delay:0.2s;animation-delay:0.2s}@-webkit-keyframes sk-cubeGridScaleDelay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}@keyframes sk-cubeGridScaleDelay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}";var LoadingSpinner=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return h("div",{class:{"sk-cube-grid":true}},__spreadArrays(new Array(9).keys()).map((function(t){return h("div",{class:"sk-cube sk-cube"+t,part:"cube"})})))};return t}();LoadingSpinner.style=uiLoadingSpinnerCss;export{AddressInput as input_address,PossiblyHiddenSelect as input_possibly_hidden_select,PowerThePollsForm as power_the_polls_form,JurisdictionInfoComponent as ptp_info_jurisdiction,PollWorkerInfo as ptp_info_poll_worker,StateInfoComponent as ptp_info_state,UiGeojsonToSvg as ui_geojson_to_svg,LoadingSpinner as ui_loading_spinner}; | ||
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{l(i.next(t))}catch(e){r(e)}}function s(t){try{l(i["throw"](t))}catch(e){r(e)}}function l(t){t.done?n(t.value):o(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};import{r as registerInstance,h,H as Host,c as createEvent}from"./index-3aecbc63.js";import{t as toQueryString,b as Fragment,F as FormSubmissionThankYou,P as PtpLink,d as data,f as findJurisdictionId,T as TextInput,c as fetchJurisdictionInfo,e as fetchJurisdictionGeoJson,a as allNullOrEmpty,i as isNullOrEmpty,g as findStateId,h as fetchStateJurisdictionsList,j as fetchStateInfo}from"./WorkElections-ecf24a25.js";import{A as ActiveRouter}from"./active-router-807869c2.js";var ZipGeocode=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=new URL("https"+"://smartystreet.powerthepolls.org/dev/zip");e.searchParams.append("zipcode",t);return[2,fetch(e.toString()).then((function(t){return t.json()}),(function(t){return console.log("SmartyStreets Error:",t)})).then((function(t){var e=t[0];if(e.reason){return{error:e.reason}}var n=new Set;var i=new Set;var o=new Map;var r=e.zipcodes[0];if(e.city_states){e.city_states.forEach((function(t){return n.add(t.city)}))}i.add(r.county_name);o.set(r.state_abbreviation,r.state);if(r.alternate_counties){r.alternate_counties.forEach((function(t){i.add(t.county_name);o.set(t.state_abbreviation,t.state)}))}return{zip:r.zipcode,cities:n,counties:i,states:o}}))]}))}))};var AddressInput=function(){function t(t){registerInstance(this,t);this.zipValue="";this.cityValue="";this.countyValue="";this.stateValue="";this.cityOptions=new Set;this.countyOptions=new Set;this.stateOptions=new Map}t.prototype.render=function(){var t=this;var e=/^\d{5}$/;var n=function(n){t.zipValue=n.target.value;if(e.test(t.zipValue)){ZipGeocode(t.zipValue).then((function(e){if("error"in e){console.log(e.error)}else{t.cityOptions=e.cities;t.cityValue=t.cityOptions.values().next().value;t.countyOptions=e.counties;t.countyValue=t.countyOptions.values().next().value;t.stateOptions=e.states;t.stateValue=t.stateOptions.keys().next().value}}))}};return h(Host,null,h("label",null,"ZIP",h("input",{name:"zip",required:true,value:this.zipValue,pattern:"\\d{5}",maxLength:5,title:"Please enter a valid ZIP code",onInput:n})),h("input-possibly-hidden-select",{fieldLabel:"City",name:"city",selected:this.cityValue,options:this.cityOptions}),h("input-possibly-hidden-select",{fieldLabel:"County",name:"user_county",selected:this.countyValue,options:this.countyOptions}),h("input-possibly-hidden-select",{fieldLabel:"State",name:"state",selected:this.stateValue,options:this.stateOptions}))};return t}();var PossiblyHiddenSelect=function(){function t(t){registerInstance(this,t);this.fieldLabel="";this.name="";this.selected="";this.options=new Set}t.prototype.render=function(){var t=this;if(this.options.size<=1){return h("input",{name:this.name,type:"hidden",value:this.selected})}else{return h("label",null,this.fieldLabel,h("select",{name:this.name,required:true},__spreadArrays(this.options.entries()).map((function(e){var n=e[0],i=e[1];return h("option",{value:n,selected:t.selected===n},i)}))))}};return t}();var submitToActionKit=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;var i;return __generator(this,(function(o){switch(o.label){case 0:return[4,fetch("https"+"://ptp.actionkit.com/rest/v1/action/",{method:"POST",body:toQueryString(t),mode:"no-cors",headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:e=o.sent();if(!(e.status===200||e.status===201||e.status===0))return[3,2];return[2,true];case 2:o.trys.push([2,4,,5]);i={statusText:e.statusText,status:e.status};return[4,e.json()];case 3:return[2,(i.data=o.sent(),i)];case 4:n=o.sent();return[2,{statusText:e.statusText,status:e.status}];case 5:return[2]}}))}))};var MichiganAdditionalInfoForm=function(t){var e=t.data,n=t.formSubmitted,i=t.onSubmit;var o=function(t){try{var e=t.target;var n=__spreadArrays(e.getElementsByTagName("input"),e.getElementsByTagName("select"));submitToActionKit(n.reduce((function(t,e){t[e.name]=e.value;return t}),{})).then((function(t){if(t!==true){console.error(t)}}));i()}catch(t){console.error(t)}finally{t.preventDefault();return false}};var r=["Not willing to travel","Less than 10 miles","Less than 50 miles","I'll go wherever I'm needed"];return e.state==="MI"&&!n?h(Fragment,null,h("p",null,"We are sharing your information with election administrators and our state partners who will follow up to help you be placed as a poll worker! ",h("strong",null,"We just need a few more pieces of information from you to help with your application:")),h("form",{onSubmit:o,style:{padding:"0"}},h("input",{type:"hidden",name:"city",value:e===null||e===void 0?void 0:e.city}),h("input",{type:"hidden",name:"state",value:e===null||e===void 0?void 0:e.state}),h("input",{type:"hidden",name:"zip",value:e===null||e===void 0?void 0:e.zip}),h("label",null,"Street address",h("input",{type:"text",required:true,name:"address1"})),h("label",null,"Are you fluent in a language besides English?",h("input",{type:"text",required:true,name:"user_additional_language",value:"English only"})),h("label",null,"In Michigan, eligible poll workers can serve anywhere in the state. Are you willing to travel, and if so, how far can you travel?",h("select",{name:"user_mi_travel",required:true},r.map((function(t){return h("option",{value:t},t)})))),h("input",{type:"hidden",name:"page",value:"mi-extra"}),h("input",{type:"hidden",name:"email",value:e===null||e===void 0?void 0:e.email}),h("button",{type:"submit",class:"button"},"Complete application")),h("hr",null)):null};var powerThePollsFormCss='power-the-polls-form{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form *{-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form h3{margin-top:1em}power-the-polls-form button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}power-the-polls-form button:hover{opacity:0.8}power-the-polls-form button:focus{opacity:0.6}power-the-polls-form button:active{opacity:0.4}power-the-polls-form form{font-size:1rem;padding:1em 0;letter-spacing:0}power-the-polls-form form input,power-the-polls-form form select{width:100%;padding:0.5em 0.75em;display:block}power-the-polls-form form select{padding:0.75em;height:auto}power-the-polls-form form label{margin-bottom:0.75em;display:block;font-size:0.9rem}power-the-polls-form form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}power-the-polls-form form label .checkbox:first-of-type{margin-top:1.5em}power-the-polls-form form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}power-the-polls-form p.disclaimer{font-size:0.9rem;font-weight:normal}power-the-polls-form .next-steps p{clear:left}power-the-polls-form .next-steps p .number{margin:0 0.5em 0.5em 0;border-style:solid;border-width:2px;padding:0.25em;display:block;width:2.2em;text-align:center;font-size:1.6em;font-weight:bold;float:left}@media only screen and (max-width: 620px){power-the-polls-form .next-steps p .number{float:none}}power-the-polls-form .next-steps::after{content:"";display:block;clear:both}';var PowerThePollsForm=function(){function t(t){registerInstance(this,t);this.submitCompleted=createEvent(this,"submitCompleted",6);this.submitError=createEvent(this,"submitError",6);this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false}t.prototype.reset=function(){this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false;return Promise.resolve()};t.prototype.version=function(){return Promise.resolve("1.1.2-beta.2")};t.prototype.render=function(){var t=this;var e=this.partnerId;var n=this.optUserOutOfChase===true||this.optUserOutOfChase==="true"?false:true;var i=this.customFormFieldLabel;var o=this.formData.state&&this.formData.state in data?data[this.formData.state]:null;var r="(?:\\+1)?[-.\\s]?\\(?([0-9]{3})\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}";var a=function(e){try{var n=e.target;var i=__spreadArrays(n.getElementsByTagName("input"),n.getElementsByTagName("select"));var o=i.reduce((function(t,e){t[e.name]=e.value;return t}),{});var r=o.city||"";var a=o.user_county||"";var s=o.state||"";var l=o.name||"";var u=o.email||"";var c=o.mobile_phone||"";var p=o.zip||"";t.formStatus="submitting";submitToActionKit(o).then((function(e){if(e===true){var n=t.submitCompleted.emit();if(!n.defaultPrevented){t.formStatus="completed";t.formData=Object.assign(Object.assign({},t.formData),{city:r,county:a,state:s,name:l,email:u,phone:c,zip:p,jurisdictionId:findJurisdictionId(s,a,r)+""})}}else{t.submitError.emit(e)}})).catch((function(e){t.submitError.emit(e)}))}catch(e){t.submitError.emit(e)}finally{e.preventDefault();return false}};var s=this.formData.state==="ME"?[function(){return h(Fragment,null,"We are sharing your information with our state partners who will be following up to help you connect with your local administrators. ",h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Maine.")},function(){return"In the meantime, please review the state requirements and compensation below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:this.formData.state==="MI"?[function(){return h(Fragment,null,h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Michigan.")},function(){return"In the meantime, learn more about hours, compensation, and requirements for your community below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:[function(){return h(Fragment,null,h("strong",null,"Complete your official application to be a poll worker!")," Learn more about hours, compensation, and requirements for your community below and be sure to complete your official application!")},o==null||!o.semiPartner?function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."}:function(){return"We’ll be reaching out in the next week to answer any questions you have and make sure you’ve completed your application so we can help you become a poll worker. Be on the lookout for a call from our team!"},function(){return"Help us recruit more poll workers! Please encourage your friends and family to sign up to help ensure a safe and fair election!"}];return h(Host,null,this.formStatus==="completed"?h("article",null,h(FormSubmissionThankYou,{stateInfo:o}),(o===null||o===void 0?void 0:o.noPollWorkersNeeded)!==true&&h("ptp-info-poll-worker",{city:this.formData.city,county:this.formData.county,state:this.formData.state,formData:this.formData},h("div",null,h(MichiganAdditionalInfoForm,{formSubmitted:this.michiganFormSubmitted,data:this.formData,onSubmit:function(){return t.michiganFormSubmitted=true}}),h("div",{class:"next-steps"},s.map((function(t,e){return h("p",null,h("span",{class:"number"},e+1),t())}))),h("hr",null)))):h(Fragment,null,h("h3",null,"Help your community and sign up to Power the Polls!"),h("form",{onSubmit:a},h("label",null,"Name",h("input",{type:"text",required:true,name:"name"})),h("label",null,"Email address",h("input",{type:"email",required:true,name:"email"})),h("label",null,"Mobile phone",h("input",{type:"tel",required:true,name:"mobile_phone",pattern:r,title:"Please enter a valid US phone number"})),i?h("label",null,i,h("input",{type:"text",name:"user_partner_field"})):null,h("input-address",null),h("input",{type:"hidden",name:"source",id:"id_source",value:e}),h("input",{type:"hidden",name:"user_chase_enabled",value:n?"true":""}),h("input",{type:"hidden",name:"country",value:"United States"}),h("input",{type:"hidden",name:"page",value:"join"}),h("input",{type:"hidden",name:"utf8",value:"ሴ"}),h("input",{type:"hidden",name:"js",value:"1"}),h("button",{type:"submit",class:"button",disabled:this.formStatus!=="incomplete"},"Sign Up To Get Started"),h("p",{class:"disclaimer"},"By signing up, you agree to receive occasional emails or text messages from Power the Polls and ",!n&&this.partnerName&&this.partnerName+" and ","accept our ",h(PtpLink,{path:"/privacy"},"Privacy Policy"),". You can unsubscribe at any time. For texts, message and data rates may apply. Text HELP for Info. Text STOP to quit.")),h("footer",null,h("p",{class:"disclaimer"},h("a",{href:"https://www.workelections.com/",target:"_blank",rel:"noopener"},"Powered by Work Elections.")))))};return t}();PowerThePollsForm.style=powerThePollsFormCss;var EmailApplicationForm=function(t){var e=t.jurisdiction,n=t.data,i=t.onComplete;var o=e;if((o===null||o===void 0?void 0:o.application)!=null&&o.application!==""||((o===null||o===void 0?void 0:o.email)==null||o.email==="")){return}var r=function(t){try{fetch("https://smartystreet.powerthepolls.org/dev/electmail",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(t){console.log("Email sending "+t.statusText+" ("+t.status+")");i()})).catch((function(t){return console.error(t)}))}finally{t.preventDefault();return false}};var a=["18 and under","19 to 25","26 to 35","36 to 50","51 to 64","65 and older"];return h(Fragment,null,h("h3",null,"Complete your application"),h("p",null,"You need to email your local jurisdiction directly in order to apply to be a poll worker. This form generates an email that is sent to your local election administrator on your behalf."),h("form",{onSubmit:r,style:{padding:"0"}},h("label",null,"Name",h(TextInput,{data:n,field:"name",required:true})),h("label",null,"City",h(TextInput,{data:n,field:"city",required:true})),h("label",null,"County",h(TextInput,{data:n,field:"county",required:true})),h("label",null,"Email",h(TextInput,{data:n,field:"email",required:true})),h("label",null,"Phone Number",h(TextInput,{data:n,field:"phone",required:true})),h("label",null,"What languages do you speak other than English?",h(TextInput,{data:n,field:"languages",initialValue:"English only",required:true})),h("label",null,"Age",h("select",{name:"age",required:true},h("option",null,"Please select"),a.map((function(t){return h("option",{value:t,selected:n.age===t},t)})))),h("input",{type:"hidden",value:n.state,name:"state"}),h("button",{type:"submit",class:"button"},"Submit Application")),h("p",null,"Or you can send an email yourself to ",h("a",{href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},o.email),". Be sure to include your first and last name, city and county of residence, email, phone number, age, and any additional languages you speak other than English."),h("a",{class:"poll-worker-action",href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},"Email your poll administrator directly"),h("hr",null))};var ptpInfoJurisdictionCss="ptp-info-jurisdiction button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}ptp-info-jurisdiction button:hover{opacity:0.8}ptp-info-jurisdiction button:focus{opacity:0.6}ptp-info-jurisdiction button:active{opacity:0.4}ptp-info-jurisdiction form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-jurisdiction form input,ptp-info-jurisdiction form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-jurisdiction form select{padding:0.75em;height:auto}ptp-info-jurisdiction form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-jurisdiction form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-jurisdiction form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-jurisdiction form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-jurisdiction a.poll-worker-action{border:2px solid;padding:0.5em 1em;margin:2rem 0;font-size:1.2em;letter-spacing:0.05rem;display:block;text-align:center;font-weight:bold;text-decoration:none;text-transform:uppercase}ptp-info-jurisdiction a.poll-worker-action:hover{opacity:0.8}ptp-info-jurisdiction a.poll-worker-action:focus{opacity:0.6}ptp-info-jurisdiction a.poll-worker-action:active{opacity:0.4}ptp-info-jurisdiction a.poll-worker-action.cta{border:0;background-color:#444BFD;color:#F5F3F1}";var CompleteApplicationButton=function(t){return(t===null||t===void 0?void 0:t.application)&&(t===null||t===void 0?void 0:t.application)!==""&&h("a",{class:"poll-worker-action cta",href:t.application,target:"_blank"},"Complete your application")};var JurisdictionInfoComponent=function(){function t(t){registerInstance(this,t);this.formData={};this.mailToFormComplete=false}t.prototype.componentWillLoad=function(){var t=this;this.formData=this.addtl||{};if(this.jurisdictionId){fetchJurisdictionInfo(this.jurisdictionId).then((function(e){return t.jurisdiction=e}));fetchJurisdictionGeoJson(this.jurisdictionId).then((function(e){return t.jurisdictionShape=e}))}};t.prototype.render=function(){var t=this;var e=this.jurisdiction;if(e==null){return h(Host,null,h("slot",null),h("ui-loading-spinner",null))}if(!e.name){return h(Host,null,h("h3",null,"Uh oh!"),h("p",null,"Unfortunately we're not able to retrieve jurisdiction"," ",h("strong",null,"#",this.jurisdictionId)," ","at this time"),h("p",null,"Please contact ",h("a",{href:"mailto:info@powerthepolls.org?subject=Error%20with%20jurisdiction%20"+this.jurisdictionId},"info@powerthepolls.org")," ","and let us know the zip code you've entered."))}return h(Host,null,h("div",{style:{display:"flex",alignItems:"start",flexDirection:"column"}},h("ui-geojson-to-svg",{geoJson:this.jurisdictionShape,height:180,width:250})),h("h2",null,e.name,", ",e.state.alpha),e.jurisdiction_link_text&&e.jurisdiction_link&&h("p",null,e.jurisdiction_link_text," ",h(PtpLink,{path:"/jurisdiction/"+e.jurisdiction_link.id},"click here"),"."),h(CompleteApplicationButton,Object.assign({},e)),!this.mailToFormComplete&&h(EmailApplicationForm,{jurisdiction:e,data:this.formData,onComplete:function(){return t.mailToFormComplete=true}}),h("slot",null),h("section",null,h("h4",null,"Hours and Compensation"),!allNullOrEmpty(e===null||e===void 0?void 0:e.hours_start,e===null||e===void 0?void 0:e.hours_end,e===null||e===void 0?void 0:e.compensation,e===null||e===void 0?void 0:e.full_day_req)?h("ul",null,e.hours_start&&h("li",null,h("strong",null,"Start Time: "),e.hours_start),e.hours_end&&h("li",null,h("strong",null,"End Time: "),e.hours_end),e.compensation&&h("li",null,h("strong",null,"Compensation: "),e.compensation),e.full_day_req==="Y"?h("li",null,"You must work the full day"):null,e.full_day_req==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.full_day_req.length>1&&h("li",null,e.full_day_req)):h("p",null,"Please contact your local election official for more information")),!isNullOrEmpty(e.registration_status)?h("section",null,h("h4",null,"Voter Registration Requirements"),h("ul",null,h("li",null,e.registration_status==="S"?"You can be registered to vote anywhere in the state to work on Election Day in "+e.name+".":e.registration_status==="J"?"You must be registered to vote in "+e.name+" to work on Election Day":e.registration_status))):null,h("section",null,h("h4",null,"Work Requirements"),!allNullOrEmpty(e===null||e===void 0?void 0:e.minimum_age,e===null||e===void 0?void 0:e.training,e===null||e===void 0?void 0:e.complete_training,e===null||e===void 0?void 0:e.training_note)?h("ul",null,e.minimum_age&&h("li",null,h("strong",null,"Minimum Age: "),e.minimum_age),e.training==="Y"&&h("li",null,"You must attend a training session."),e.training.length>1&&h("li",null,e.training),e.complete_training==="Y"&&h("li",null,"You must work the full day."),e.complete_training==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.complete_training.length>1&&h("li",null,e.complete_training),e.training_note&&h("li",null,h("strong",null,"Training Details: "),e.training_note)):h("p",null,"Please contact your local election official for more information")),!allNullOrEmpty(e===null||e===void 0?void 0:e.further_notes,e===null||e===void 0?void 0:e.trusted_notes)?h("section",null,h("h4",null,"Further Notes"),h("p",null,e.further_notes),e.trusted_notes&&h("div",null,h("iframe",{sandbox:"allow-popups",width:"100%",height:"100%",frameBorder:"0",srcDoc:'<head><link href="/build/app.css" rel="stylesheet"></head><body>'+e.trusted_notes.replace(/\<a/g,'<a target="_blank"')+"</body>"}))):null,!allNullOrEmpty(e===null||e===void 0?void 0:e.telephone,e===null||e===void 0?void 0:e.email,e===null||e===void 0?void 0:e.office_address)?h("section",null,h("h4",null,"Contact Information"),h("p",null,h("strong",null,"Phone: "),h("a",{href:"tel:"+e.telephone},e.telephone)),h("p",null,h("strong",null,"Email: "),h("a",{href:"mailto:"+e.email},e.email)),(e===null||e===void 0?void 0:e.office_address)&&h("p",null,h("strong",null,"Office Address: "),h("a",{target:"_blank",href:"https://www.google.com/maps/search/"+encodeURIComponent(e===null||e===void 0?void 0:e.office_address)},e===null||e===void 0?void 0:e.office_address))):null,e.website&&h("a",{class:"poll-worker-action",href:e.website,target:"_blank"},"Poll Worker Information"),e.student_website&&h("a",{class:"poll-worker-action",href:e.student_website,target:"_blank"},"Student Poll Worker Information"),(e===null||e===void 0?void 0:e.application)!==""&&h(CompleteApplicationButton,Object.assign({},e)))};return t}();JurisdictionInfoComponent.style=ptpInfoJurisdictionCss;function injectHistory(t){ActiveRouter.injectProps(t,["history","location"])}var PollWorkerInfo=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){var t=this,e=t.state,n=t.county,i=t.city;var o=e?findJurisdictionId(e,n,i):null;if(!e&&this.history){return this.history.replace("/search")}return o!=null?h("ptp-info-jurisdiction",{jurisdictionId:o,addtl:this.formData||{city:i,state:e,county:n,jurisdictionId:o+""}},h("slot",null)):h("ptp-info-state",{state:e},h("slot",null))};return t}();injectHistory(PollWorkerInfo);var ptpInfoStateCss="ptp-info-state button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer}ptp-info-state button:hover{opacity:0.8}ptp-info-state button:focus{opacity:0.6}ptp-info-state button:active{opacity:0.4}ptp-info-state form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-state form input,ptp-info-state form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-state form select{padding:0.75em;height:auto}ptp-info-state form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-state form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-state form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-state form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-state .jurisdictions{display:grid;grid-template-columns:50% 50%}ptp-info-state .jurisdictions a.jurisdiction{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0.5em;text-align:center;text-decoration:none;border:2px solid;padding:0.75em 0.5em}@media only screen and (max-width: 620px){ptp-info-state .jurisdictions{grid-template-columns:100%}}";var StateInfoComponent=function(){function t(t){registerInstance(this,t);this.stateId=null;this.stateJurisdictions=[]}t.prototype.componentWillLoad=function(){this.resetState()};t.prototype.onStateChanged=function(){this.resetState()};t.prototype.render=function(){var t=this.state;var e=this.stateInfo;if(t==="ME"){return h(Host,null,h("h2",null,"Maine"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"In Maine, eligible poll workers can serve anywhere in the state, but requirements and compensation vary across the state."),h("h4",null,"Voter Registration Requirements"),h("p",null,"You must be a registered voter to work on Election Day."),h("h4",null,"Work Requirements"),h("ul",null,h("li",null,h("strong",null,"Minimum Age:")," 17 years of age"),h("li",null,"Candidates and family members of candidates cannot be poll workers")),h("h4",null,"Compensation"),h("p",null,"Compensation varies depending on city or town, and is at least the state minimum wage of $12 per hour."))}if(t==="MI"){return h(Host,null,h("h2",null,"Michigan"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"Requirements vary and are determined by cities and towns in Michigan, but all poll workers must be a registered Michigan voter or 16 or 17 years old residing in Michigan. While you can vote with a felony record, you cannot serve as a poll worker in Michigan if you have a felony or any infraction related to voting."),h("h4",null,"Hours & Compensation"),h("ul",null,h("li",null,"Serving as a poll worker is a paid position with a flat daily rate. Many cities are also providing hazard pay for poll workers who serve during the 2020 election."),h("li",null,"While hours vary, both by city and by position worked, most poll workers should expect to work long days, beginning before polls open at 7am and concluding after polls close at 8pm.")))}return e==null?h("ui-loading-spinner",null):h("div",null,h("h2",null,e.name),e.notes&&h("p",null,e.notes),h("div",{class:"jurisdictions"},this.stateJurisdictions.map((function(t){var e=t.id,n=t.name;return h(PtpLink,{path:"/jurisdiction/"+e,anchorClass:"jurisdiction"},n)}))))};t.prototype.resetState=function(){var t=this;this.stateId=this.state?findStateId(this.state):null;if(this.stateId){fetchStateJurisdictionsList(this.stateId).then((function(e){return t.stateJurisdictions=e}));fetchStateInfo(this.stateId).then((function(e){return t.stateInfo=e}))}else{this.stateInfo=undefined;this.stateJurisdictions=[]}};Object.defineProperty(t,"watchers",{get:function(){return{state:["onStateChanged"]}},enumerable:false,configurable:true});return t}();StateInfoComponent.style=ptpInfoStateCss;var explode=function(t){return t&&t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e,crs:t.crs}}))};var translateCoordinates=function(t,e,n){return t.map((function(t){return[(t[0]-n.xMin)*e,(n.yMax-t[1])*e]}))};function convertCoordinatesToPathString(t,e,n){return translateCoordinates(t,e,n).map((function(t){return t[0]+","+t[1]})).join(" ")}function Point(t,e,n,i){var o=i&&i.pointRadius?i.pointRadius:1;var r=!!(i&&i.pointAsCircle);var a=convertCoordinatesToPathString([t.coordinates],e,n);return r?[a]:["M"+a+" m"+-o+",0"+" a"+o+","+o+" 0 1,1 "+2*o+","+0+" a"+o+","+o+" 0 1,1 "+-2*o+","+0]}function MultiPoint(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Point(t,e,n,i)[0]}));return!o?[r.join(" ")]:r}function LineString(t,e,n,i){return["M"+convertCoordinatesToPathString(t.coordinates,e,n)]}function MultiLineString(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return LineString(t,e,n)[0]}));return!o?[r.join(" ")]:r}function Polygon(t,e,n,i){var o=convertCoordinatesToPathString(t.coordinates[0],e,n);if(t.coordinates.length>1){var r=t.coordinates.slice(1,t.coordinates.length);if(r){for(var a=0;a<r.length;a++){o+=" M"+convertCoordinatesToPathString(r[a],e,n)}}}return["M"+o+"Z"]}function MultiPolygon(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Polygon(t,e,n)[0]}));return!o?[r.join(" ").replace(/Z/g,"")+"Z"]:r}var GeoJsonToPath=Object.freeze({__proto__:null,Point:Point,MultiPoint:MultiPoint,LineString:LineString,MultiLineString:MultiLineString,Polygon:Polygon,MultiPolygon:MultiPolygon});var GeoJsonRenderer=function(){function t(t){if(t===void 0){t={scale:1}}this.options=t;this.options.bounds=this.options.bounds||{xMin:-20037508.342789244,xMax:20037508.342789244,yMin:-20037508.342789244,yMax:20037508.342789244}}t.prototype.convert=function(t,e){var n=Object.assign(Object.assign({},this.options),e||{});var i=[];switch(t.type){case"FeatureCollection":for(var o=0;o<t.features.length;o++){i=__spreadArrays(i,this.convertFeature(t.features[o],n))}break;case"Feature":i=this.convertFeature(t,n);break;case"GeometryCollection":for(var o=0;o<t.geometries.length;o++){i=__spreadArrays(i,this.convertGeometry(t.geometries[o],n))}break;default:i=this.convertGeometry(t,n);break}return i};t.prototype.convertFeature=function(t,e){var n=t===null||t===void 0?void 0:t.geometry;if(n==null){return[]}var i=Object.assign(Object.assign({},this.options),e||{});if(i.attributes&&i.attributes instanceof Array){i.attributes=i.attributes.reduce((function(e,n){if(typeof n==="string"){var i=void 0;var o=n.split(".").pop();try{i=valueAt(t,n)}catch(r){i=false}if(i){e[o]=i}}else if(typeof n==="object"&&n.type&&n.property){if(n.type==="dynamic"){var i=void 0;var o=n.key?n.key:n.property.split(".").pop();try{i=valueAt(t,n.property)}catch(r){i=false}if(i){e[o]=i}}else if(n.type==="static"&&n.value){e[n.property]=n.value}}return e}),{})}else{i.attributes=i.attributes||{}}var o=i.attributes;var r=o.id||t.id||(t.properties&&t.properties.id?t.properties.id:null);if(r){o.id=r}i.attributes=o;return this.convertGeometry(n,i)};t.prototype.convertGeometry=function(t,e){if(isDrawable(t)){var n=Object.assign(Object.assign({},this.options),e||{});var i=n.output||"svg";var o=GeoJsonToPath[t.type](t,this.options.scale,this.options.bounds,n);if(i==="svg"){var r=o.map((function(e){return pathToSvgJson(e,t.type,n.attributes,n)}));var a=r.map((function(e){return jsonToSvgElement(e,t.type,n)}));return a}else{return o}}return[]};return t}();function isDrawable(t){return t.type in GeoJsonToPath}function pathToSvgJson(t,e,n,i){var o={};var r=!!(i&&i.pointAsCircle);if((e==="Point"||e==="MultiPoint")&&r){o.cx=t.split(",")[0];o.cy=t.split(",")[1];o.r=i&&i.pointRadius?i.pointRadius:"1"}else{o={d:t};if(e==="Polygon"||e==="MultiPolygon"){o["fill-rule"]="evenodd"}}for(var a in n){if(n.hasOwnProperty(a)){o[a]=n[a]}}return o}function jsonToSvgElement(t,e,n){var i=!!(n&&n.pointAsCircle);var o=(e==="Point"||e==="MultiPoint")&&i?"<circle":"<path";for(var r in t){if(t.hasOwnProperty(r)){o+=" "+r+'="'+t[r]+'"'}}o+="/>";return o}function valueAt(t,e){return e.split(".").reduce((function(t,e,n,i){if(t.hasOwnProperty(e)){return t[e]}else{throw new Error(i.slice(0,n+1).join(".")+" is not a valid property path")}}),t)}var mercator=function(t,e){var n=6378137;var i=85.0511287798;var o=Math.PI/180;var r={x:n*t*o,y:Math.max(Math.min(i,e),-i)*o};r.y=n*Math.log(Math.tan(Math.PI/4+r.y/2));return r};var uiGeojsonToSvgCss="path{fill:rgba(204, 204, 204, 0.8);stroke-width:1px}";var UiGeojsonToSvg=function(){function t(t){registerInstance(this,t);this.width=200;this.height=200;if(this.geoJson==null){this.renderer=new GeoJsonRenderer(this.options)}else{this.updateProjectedGeoJson();this.resetRenderer()}}t.prototype.render=function(){try{var t=this.projectedGeoJson;return t&&h(Host,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="'+this.width+'" height="'+this.height+'">\n '+this.renderer.convert(t,this.options).join("\n")+"\n </svg>"})}catch(e){console.error(e);return null}};t.prototype.geoJsonChanged=function(){this.updateProjectedGeoJson();this.resetRenderer()};t.prototype.widthChanged=function(){this.resetRenderer()};t.prototype.heightChanged=function(){this.resetRenderer()};t.prototype.optionsChanged=function(){this.resetRenderer()};t.prototype.resetRenderer=function(){var t=this.projectedGeoJson;if(t!=null){var e=this.getBoundingBox(t);var n=this.calculateScale(e,{width:this.width,height:this.height});this.renderer=new GeoJsonRenderer(Object.assign(Object.assign({},this.options),{bounds:{yMax:e.yMax,xMax:e.xMax,yMin:e.yMin,xMin:e.xMin},scale:n}))}};t.prototype.updateProjectedGeoJson=function(){var t=this.geoJson;if(t!=null){var e=explode(t)[0];var n=e.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];var a=mercator(o,r);n[i]=[a.x,a.y]}this.projectedGeoJson=e}};t.prototype.getBoundingBox=function(t){var e={xMin:Number.MAX_VALUE,xMax:Number.MIN_SAFE_INTEGER,yMin:Number.MAX_VALUE,yMax:Number.MIN_SAFE_INTEGER};var n=t.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];e.xMin=e.xMin<o?e.xMin:o;e.xMax=e.xMax>o?e.xMax:o;e.yMin=e.yMin<r?e.yMin:r;e.yMax=e.yMax>r?e.yMax:r}return e};t.prototype.calculateScale=function(t,e,n){var i=e.width/Math.abs(t.xMax-t.xMin);var o=e.height/Math.abs(t.yMax-t.yMin);if(n){return n==="width"?i:n==="height"?o:n==="larger"?Math.max(i,i):Math.min(i,o)}return Math.min(i,o)};Object.defineProperty(t,"watchers",{get:function(){return{geoJson:["geoJsonChanged"],width:["widthChanged"],height:["heightChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return t}();UiGeojsonToSvg.style=uiGeojsonToSvgCss;var uiLoadingSpinnerCss=":host .sk-cube-grid{width:40px;height:40px;margin:100px auto}:host .sk-cube-grid .sk-cube{width:33%;height:33%;float:left;background-color:#000;-webkit-animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}:host .sk-cube-grid .sk-cube1{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .sk-cube-grid .sk-cube2{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .sk-cube-grid .sk-cube3{-webkit-animation-delay:0.4s;animation-delay:0.4s}:host .sk-cube-grid .sk-cube4{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .sk-cube-grid .sk-cube5{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .sk-cube-grid .sk-cube6{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .sk-cube-grid .sk-cube7{-webkit-animation-delay:0s;animation-delay:0s}:host .sk-cube-grid .sk-cube8{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .sk-cube-grid .sk-cube9{-webkit-animation-delay:0.2s;animation-delay:0.2s}@-webkit-keyframes sk-cubeGridScaleDelay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}@keyframes sk-cubeGridScaleDelay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}";var LoadingSpinner=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return h("div",{class:{"sk-cube-grid":true}},__spreadArrays(new Array(9).keys()).map((function(t){return h("div",{class:"sk-cube sk-cube"+t,part:"cube"})})))};return t}();LoadingSpinner.style=uiLoadingSpinnerCss;export{AddressInput as input_address,PossiblyHiddenSelect as input_possibly_hidden_select,PowerThePollsForm as power_the_polls_form,JurisdictionInfoComponent as ptp_info_jurisdiction,PollWorkerInfo as ptp_info_poll_worker,StateInfoComponent as ptp_info_state,UiGeojsonToSvg as ui_geojson_to_svg,LoadingSpinner as ui_loading_spinner}; |
@@ -196,3 +196,3 @@ import { r as registerInstance, h, H as Host, c as createEvent } from './index-3aecbc63.js'; | ||
version() { | ||
return Promise.resolve("1.1.2-beta.1"); | ||
return Promise.resolve("1.1.2-beta.2"); | ||
} | ||
@@ -386,3 +386,5 @@ render() { | ||
? (h("section", null, h("h4", null, "Further Notes"), h("p", null, j.further_notes), j.trusted_notes && ( // "trusted" | ||
h("div", null, h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") }))))) : null, !allNullOrEmpty(j === null || j === void 0 ? void 0 : j.telephone, j === null || j === void 0 ? void 0 : j.email, j === null || j === void 0 ? void 0 : j.office_address) | ||
h("div", null, h("iframe", { sandbox: "allow-popups", width: "100%", height: "100%", frameBorder: "0", srcDoc: '<head><link href="/build/app.css" rel="stylesheet"></head><body>' + | ||
j.trusted_notes.replace(/\<a/g, "<a target=\"_blank\"") + | ||
"</body>" }))))) : null, !allNullOrEmpty(j === null || j === void 0 ? void 0 : j.telephone, j === null || j === void 0 ? void 0 : j.email, j === null || j === void 0 ? void 0 : j.office_address) | ||
? (h("section", null, h("h4", null, "Contact Information"), h("p", null, h("strong", null, "Phone: "), h("a", { href: `tel:${j.telephone}` }, j.telephone)), h("p", null, h("strong", null, "Email: "), h("a", { href: `mailto:${j.email}` }, j.email)), (j === null || j === void 0 ? void 0 : j.office_address) && | ||
@@ -389,0 +391,0 @@ h("p", null, h("strong", null, "Office Address: "), h("a", { target: "_blank", href: `https://www.google.com/maps/search/${encodeURIComponent(j === null || j === void 0 ? void 0 : j.office_address)}` }, j === null || j === void 0 ? void 0 : j.office_address)))) : null, j.website && (h("a", { class: "poll-worker-action", href: j.website, target: "_blank" }, "Poll Worker Information")), j.student_website && (h("a", { class: "poll-worker-action", href: j.student_website, target: "_blank" }, "Student Poll Worker Information")), (j === null || j === void 0 ? void 0 : j.application) !== "" && h(CompleteApplicationButton, Object.assign({}, j)))); |
{ | ||
"name": "@ptp-us/power-the-polls-form", | ||
"version": "1.1.2-beta.1", | ||
"version": "1.1.2-beta.2", | ||
"description": "Power the Polls Volunteer Form", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-60043418.system.js"],(function(t,e){"use strict";var r,o,s,i,n,a;return{setters:[function(t){r=t.p;o=t.w;s=t.d;i=t.N;n=t.a;a=t.b}],execute:function(){var t=function(t){return"__sc_import_"+t.replace(/\s|-/g,"_")};var c=function(){{r.$cssShim$=o.__cssshim}var t=Array.from(s.querySelectorAll("script")).find((function(t){return new RegExp("/"+i+"(\\.esm)?\\.js($|\\?|#)").test(t.src)||t.getAttribute("data-stencil-namespace")===i}));var a={};if("onbeforeload"in t&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(t.getAttribute("data-resources-url")||t.src,o.location.href)).href;{l(a.resourcesUrl,t)}if(!o.customElements){return e.import("./p-2c95e033.system.js").then((function(){return a}))}}return n(a)};var l=function(e,r){var n=t(i);try{o[n]=new Function("w","return import(w);//"+Math.random())}catch(c){var a=new Map;o[n]=function(t){var i=new URL(t,e).href;var c=a.get(i);if(!c){var l=s.createElement("script");l.type="module";l.crossOrigin=r.crossOrigin;l.src=URL.createObjectURL(new Blob(["import * as m from '"+i+"'; window."+n+".m = m;"],{type:"application/javascript"}));c=new Promise((function(t){l.onload=function(){t(o[n].m);l.remove()}}));a.set(i,c);s.head.appendChild(l)}return c}}};c().then((function(t){return a([["p-051e59ac.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-222a9ace.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-8d3b9d3b.system",[[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]],["p-9ba04e69.system",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}]]],["p-51661930.system",[[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}]]],["p-9543f851.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-55a921d9.system",[[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}]]],["p-fc914ea3.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-08412973.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-605f86d1.system",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],history:[16]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],addtl:[16],jurisdiction:[32],jurisdictionShape:[32],formData:[32],mailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner"]]]],t)}))}}})); | ||
System.register(["./p-60043418.system.js"],(function(t,e){"use strict";var r,o,s,i,n,a;return{setters:[function(t){r=t.p;o=t.w;s=t.d;i=t.N;n=t.a;a=t.b}],execute:function(){var t=function(t){return"__sc_import_"+t.replace(/\s|-/g,"_")};var c=function(){{r.$cssShim$=o.__cssshim}var t=Array.from(s.querySelectorAll("script")).find((function(t){return new RegExp("/"+i+"(\\.esm)?\\.js($|\\?|#)").test(t.src)||t.getAttribute("data-stencil-namespace")===i}));var a={};if("onbeforeload"in t&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(t.getAttribute("data-resources-url")||t.src,o.location.href)).href;{l(a.resourcesUrl,t)}if(!o.customElements){return e.import("./p-2c95e033.system.js").then((function(){return a}))}}return n(a)};var l=function(e,r){var n=t(i);try{o[n]=new Function("w","return import(w);//"+Math.random())}catch(c){var a=new Map;o[n]=function(t){var i=new URL(t,e).href;var c=a.get(i);if(!c){var l=s.createElement("script");l.type="module";l.crossOrigin=r.crossOrigin;l.src=URL.createObjectURL(new Blob(["import * as m from '"+i+"'; window."+n+".m = m;"],{type:"application/javascript"}));c=new Promise((function(t){l.onload=function(){t(o[n].m);l.remove()}}));a.set(i,c);s.head.appendChild(l)}return c}}};c().then((function(t){return a([["p-051e59ac.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-222a9ace.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-8d3b9d3b.system",[[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]],["p-9ba04e69.system",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}]]],["p-51661930.system",[[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}]]],["p-9543f851.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-55a921d9.system",[[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}]]],["p-fc914ea3.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-08412973.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-239dd7cb.system",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],history:[16]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],addtl:[16],jurisdiction:[32],jurisdictionShape:[32],formData:[32],mailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner"]]]],t)}))}}})); |
@@ -1,1 +0,1 @@ | ||
import{p as t,w as e,d as o,N as s,a as r,b as i}from"./p-0ed6012d.js";(()=>{t.t=e.__cssshim;const i=Array.from(o.querySelectorAll("script")).find(t=>new RegExp(`/${s}(\\.esm)?\\.js($|\\?|#)`).test(t.src)||t.getAttribute("data-stencil-namespace")===s),a={};return"onbeforeload"in i&&!history.scrollRestoration?{then(){}}:(a.resourcesUrl=new URL(".",new URL(i.getAttribute("data-resources-url")||i.src,e.location.href)).href,((t,r)=>{const i="__sc_import_"+s.replace(/\s|-/g,"_");try{e[i]=new Function("w","return import(w);//"+Math.random())}catch(a){const s=new Map;e[i]=a=>{const n=new URL(a,t).href;let c=s.get(n);if(!c){const t=o.createElement("script");t.type="module",t.crossOrigin=r.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${i}.m = m;`],{type:"application/javascript"})),c=new Promise(o=>{t.onload=()=>{o(e[i].m),t.remove()}}),s.set(n,c),o.head.appendChild(t)}return c}}})(a.resourcesUrl,i),e.customElements?r(a):__sc_import_power_the_polls_form("./p-78109d72.js").then(()=>a))})().then(t=>i([["p-ec77ffb1",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-5f2083cd",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-9beb79ed",[[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]],["p-23b4c1b1",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}]]],["p-bc66e487",[[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}]]],["p-b8b437f9",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-e836bf14",[[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}]]],["p-d4ff0dd8",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-4ef9b89d",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-85b63071",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],history:[16]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],addtl:[16],jurisdiction:[32],jurisdictionShape:[32],formData:[32],mailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner"]]]],t)); | ||
import{p as t,w as e,d as o,N as s,a as r,b as i}from"./p-0ed6012d.js";(()=>{t.t=e.__cssshim;const i=Array.from(o.querySelectorAll("script")).find(t=>new RegExp(`/${s}(\\.esm)?\\.js($|\\?|#)`).test(t.src)||t.getAttribute("data-stencil-namespace")===s),a={};return"onbeforeload"in i&&!history.scrollRestoration?{then(){}}:(a.resourcesUrl=new URL(".",new URL(i.getAttribute("data-resources-url")||i.src,e.location.href)).href,((t,r)=>{const i="__sc_import_"+s.replace(/\s|-/g,"_");try{e[i]=new Function("w","return import(w);//"+Math.random())}catch(a){const s=new Map;e[i]=a=>{const n=new URL(a,t).href;let c=s.get(n);if(!c){const t=o.createElement("script");t.type="module",t.crossOrigin=r.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${i}.m = m;`],{type:"application/javascript"})),c=new Promise(o=>{t.onload=()=>{o(e[i].m),t.remove()}}),s.set(n,c),o.head.appendChild(t)}return c}}})(a.resourcesUrl,i),e.customElements?r(a):__sc_import_power_the_polls_form("./p-78109d72.js").then(()=>a))})().then(t=>i([["p-ec77ffb1",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-5f2083cd",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-9beb79ed",[[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]],["p-23b4c1b1",[[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}]]],["p-bc66e487",[[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}]]],["p-b8b437f9",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-e836bf14",[[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}]]],["p-d4ff0dd8",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-4ef9b89d",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-a9c3f8e7",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],history:[16]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],addtl:[16],jurisdiction:[32],jurisdictionShape:[32],formData:[32],mailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner"]]]],t)); |
Sorry, the diff of this file is too big to display
2126906
28987