1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80830,e=>{"use strict";var r,t,a,l,n,s,o;(n=r||(r={})).Final="final",n.Shared="shared",(s=t||(t={})).Open="open",s.Close="close",(o=a||(a={})).Normal="library",o.Metadata="library-metadata",(l||(l={})).Variant="variant",e.s(["DesignLibraryMode",0,a,"DesignLibraryVariantGeneration",0,l,"LayoutKind",0,r,"MetadataKind",0,t])},82780,38373,9090,e=>{"use strict";var r=e.i(1514),r=r;let t="jss-hrz-editing",a="Sitecore.Horizon.ResetChromes";class l{static isActive(){return!(0,r.default)()&&(window.location.search.indexOf("sc_headless_mode=edit")>-1||!!window.document.getElementById(t))}static resetChromes(){!(0,r.default)()&&window[a]&&window[a]()}}e.s(["DEFAULT_PLACEHOLDER_UID",0,"00000000-0000-0000-0000-000000000000","EDITING_ALLOWED_ORIGINS",0,["https://pages.sitecorecloud.io","https://xmapps.sitecorecloud.io","https://designlibrary.sitecorecloud.io","https://app.sitecorecloud.io"],"INVALID_SECRET_HTML_MESSAGE",0,"<html><body>Missing or invalid secret</body></html>","PAGES_EDITING_MARKER",0,t,"PREVIEW_KEY",0,"sc_preview","PagesEditor",0,l,"QUERY_PARAM_EDITING_SECRET",0,"secret","getContentSdkPagesClientData",0,()=>{let e={};return e[t]={},e},"isEditorActive",0,()=>l.isActive(),"resetEditorChromes",0,()=>{l.isActive()&&l.resetChromes()}],82780);var n=e.i(91788);let s=e=>{let r=e.rendering&&e.rendering.componentName?e.rendering.componentName:"Unnamed Component";e.errorOverride||console.log(`Component props for unimplemented '${r}' component`,e);let t=e.errorOverride||"Content SDK component is missing React implementation. See the developer console for more information.";return n.default.createElement("div",{style:{background:"darkorange",outline:"5px solid orange",padding:"10px",color:"white",maxWidth:"500px"}},n.default.createElement("h2",null,r),n.default.createElement("p",null,t))};s.displayName="MissingComponent",e.s(["MissingComponent",0,s],38373),e.s(["DEFAULT_EXPORT_NAME",0,"Default"],9090)},78995,e=>{"use strict";e.s(["getDynamicPlaceholderPattern",0,e=>RegExp(`^${e.replace(/\{\*\}+/i,"\\d+")}$`),"getFieldValue",0,function(e,r,t){if(!e||!r)return t;let a=e[r];return a&&void 0!==a.value?a.value:e.fields&&e.fields[r]&&void 0!==e.fields[r].value?e.fields[r].value:t},"isDynamicPlaceholder",0,e=>-1!==e.indexOf("{*}"),"isFieldValueEmpty",0,function(e){if(!e)return!0;let r=e=>"string"==typeof e?"0001-01-01T00:00:00Z"===e:!("function"==typeof(null==e?void 0:e.getMonth)&&!isNaN(null==e?void 0:e.getMonth())),t=e=>null==e||("object"==typeof e?!e.src&&!e.src&&!e.href&&r(e):"number"!=typeof e&&"boolean"!=typeof e&&(!e||r(e)));return t(void 0!==e.value?e.value:e)}])},36381,e=>{"use strict";let r="_default",t="_variantId_";function a(e){let t={variantId:r,componentVariantIds:[]};return e.forEach(e=>{var r;e.includes("_")?null==(r=t.componentVariantIds)||r.push(e):t.variantId=e}),t}e.s(["CdpHelper",0,class{static getPageVariantId(e,t,a,l){let n=e.replace(/[{}-]/g,""),s=t.replace("-","_"),o=l?`${this.normalizeScope(l)}_`:"",i=a;return a&&a!==r||(i="default"),`${o}${n}_${s}_${i}`.toLowerCase()}static getPageFriendlyId(e,r,t){let a=e.replace(/[{}-]/g,""),l=r.replace("-","_"),n=t?`${this.normalizeScope(t)}_`:"";return`embedded_${n}${a}_${l}`.toLowerCase()}static getComponentFriendlyId(e,r,t,a){let l=e.replace(/[{}-]/g,""),n=r.replace(/[{}-]/g,""),s=t.replace("-","_"),o=a?`${this.normalizeScope(a)}_`:"";return`component_${o}${l}_${n}_${s}*`.toLowerCase()}static normalizeScope(e){return(null==e?void 0:e.replace(/[^a-zA-Z0-9]+/g,""))||""}},"getGroomedVariantIds",0,a,"getPersonalizedRewrite",0,function(e,r){let a=e.endsWith("/")?e.slice(0,-1):e;return`${a}${r.map(e=>`/${t}${e}`).join("")}`},"getPersonalizedRewriteData",0,function(e){let r=e.split("/"),l=[];return r.forEach(e=>{let r=e.match(`${t}(.*$)`);r&&l.push(r[1])}),a(l)},"normalizePersonalizedRewrite",0,function(e){if(!e.includes(t))return e;let r=e.split("/");return(r=r.filter(e=>!e.includes(t))).join("/")||"/"}])},28385,e=>{"use strict";let r=JSON,t=/\r\n|[\n\r]/g;function a(e,r){let a=0,l=1;for(let n of e.body.matchAll(t)){if("number"==typeof n.index||function(e){if(!e)throw Error("Unexpected invariant triggered.")}(!1),n.index>=r)break;a=n.index+n[0].length,l+=1}return{line:l,column:r+1-a}}function l(e,r){let t=e.locationOffset.column-1,a="".padStart(t)+e.body,l=r.line-1,s=e.locationOffset.line-1,o=r.line+s,i=1===r.line?t:0,d=r.column+i,u=`${e.name}:${o}:${d} 2`,c=a.split(/\r\n|[\n\r]/g),m=c[l];if(m.length>120){let e=Math.floor(d/80),r=[];for(let e=0;e<m.length;e+=80)r.push(m.slice(e,e+80));return u+n([[`${o} |`,r[0]],...r.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(d%80)],["|",r[e+1]]])}return u+n([[`${o-1}
2 |`,c[l-1]],[`${o} |`,m],["|","^".padStart(d)],[`${o+1} |`,c[l+1]]])}function n(e){let r=e.filter(([e,r])=>void 0!==r),t=Math.max(...r.map(([e])=>e.length));return r.map(([e,r])=>e.padStart(t)+(r?" "+r:"")).join("\n")}class s extends Error{constructor(e,...r){var t,l,n;const{nodes:i,source:d,positions:u,path:c,originalError:m,extensions:h}=function(e){let r=e[0];return null==r||"kind"in r||"length"in r?{nodes:r,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:r}(r);super(e),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=m?m:void 0,this.nodes=o(Array.isArray(i)?i:i?[i]:void 0);const p=o(null==(t=this.nodes)?void 0:t.map(e=>e.loc).filter(e=>null!=e));this.source=null!=d?d:null==p||null==(l=p[0])?void 0:l.source,this.positions=null!=u?u:null==p?void 0:p.map(e=>e.start),this.locations=u&&d?u.map(e=>a(d,e)):null==p?void 0:p.map(e=>a(e.source,e.start));const g=!function(e){return"object"==typeof e&&null!==e}(null==m?void 0:m.extensions)||null==m?void 0:m.extensions;this.extensions=null!=(n=null!=h?h:g)?n:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=m&&m.stack?Object.defineProperty(this,"stack",{value:m.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes){var r;t.loc&&(e+="\n\n"+l((r=t.loc).source,a(r.source,r.start)))}else if(this.source&&this.locations)for(let r of this.locations)e+="\n\n"+l(this.source,r);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function o(e){return void 0===e||0===e.length?void 0:e}function i(e,r,t){return new s(`Syntax Error: ${t}`,{source:e,positions:[r]})}class d{constructor(e,r,t){this.start=e.start,this.end=r.end,this.startToken=e,this.endToken=r,this.source=t}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class u{constructor(e,r,t,a,l,n){this.kind=e,this.start=r,this.end=t,this.line=a,this.column=l,this.value=n,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let c={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},m=new Set(Object.keys(c));function h(e){let r=null==e?void 0:e.kind;return"string"==typeof r&&m.has(r)}function p(e){return 9===e||32===e}function g(e){return e>=48&&e<=57}function f(e){return e>=97&&e<=122||e>=65&&e<=90}function b(e){return f(e)||95===e}(G=J||(J={})).QUERY="query",G.MUTATION="mutation",G.SUBSCRIPTION="subscription",(Q=X||(X={})).QUERY="QUERY",Q.MUTATION="MUTATION",Q.SUBSCRIPTION="SUBSCRIPTION",Q.FIELD="FIELD",Q.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",Q.FRAGMENT_SPREAD="FRAGMENT_SPREAD",Q.INLINE_FRAGMENT="INLINE_FRAGMENT",Q.
2VARIABLE_DEFINITION="VARIABLE_DEFINITION",Q.SCHEMA="SCHEMA",Q.SCALAR="SCALAR",Q.OBJECT="OBJECT",Q.FIELD_DEFINITION="FIELD_DEFINITION",Q.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",Q.INTERFACE="INTERFACE",Q.UNION="UNION",Q.ENUM="ENUM",Q.ENUM_VALUE="ENUM_VALUE",Q.INPUT_OBJECT="INPUT_OBJECT",Q.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",Q.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION",(W=ee||(ee={})).NAME="Name",W.DOCUMENT="Document",W.OPERATION_DEFINITION="OperationDefinition",W.VARIABLE_DEFINITION="VariableDefinition",W.SELECTION_SET="SelectionSet",W.FIELD="Field",W.ARGUMENT="Argument",W.FRAGMENT_SPREAD="FragmentSpread",W.INLINE_FRAGMENT="InlineFragment",W.FRAGMENT_DEFINITION="FragmentDefinition",W.VARIABLE="Variable",W.INT="IntValue",W.FLOAT="FloatValue",W.STRING="StringValue",W.BOOLEAN="BooleanValue",W.NULL="NullValue",W.ENUM="EnumValue",W.LIST="ListValue",W.OBJECT="ObjectValue",W.OBJECT_FIELD="ObjectField",W.DIRECTIVE="Directive",W.NAMED_TYPE="NamedType",W.LIST_TYPE="ListType",W.NON_NULL_TYPE="NonNullType",W.SCHEMA_DEFINITION="SchemaDefinition",W.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",W.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",W.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",W.FIELD_DEFINITION="FieldDefinition",W.INPUT_VALUE_DEFINITION="InputValueDefinition",W.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",W.UNION_TYPE_DEFINITION="UnionTypeDefinition",W.ENUM_TYPE_DEFINITION="EnumTypeDefinition",W.ENUM_VALUE_DEFINITION="EnumValueDefinition",W.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",W.DIRECTIVE_DEFINITION="DirectiveDefinition",W.SCHEMA_EXTENSION="SchemaExtension",W.DIRECTIVE_EXTENSION="DirectiveExtension",W.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",W.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",W.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",W.UNION_TYPE_EXTENSION="UnionTypeExtension",W.ENUM_TYPE_EXTENSION="EnumTypeExtension",W.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",W.TYPE_COORDINATE="TypeCoordinate",W.MEMBER_COORDINATE="MemberCoordinate",W.ARGUMENT_COORDINATE="ArgumentCoordinate",W.DIRECTIVE_COORDINATE="DirectiveCoordinate",W.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate",(K=er||(er={})).SOF="<SOF>",K.EOF="<EOF>",K.BANG="!",K.DOLLAR="$",K.AMP="&",K.PAREN_L="(",K.PAREN_R=")",K.DOT=".",K.SPREAD="...",K.COLON=":",K.EQUALS="=",K.AT="@",K.BRACKET_L="[",K.BRACKET_R="]",K.BRACE_L="{",K.PIPE="|",K.BRACE_R="}",K.NAME="Name",K.INT="Int",K.FLOAT="Float",K.STRING="String",K.BLOCK_STRING="BlockString",K.COMMENT="Comment";class x{constructor(e){const r=new u(er.SOF,0,0,0,0);this.source=e,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==er.EOF)do if(e.next)e=e.next;else{let r=function(e,r){let t=e.source.body,a=t.length,l=r;for(;l<a;){let r=t.charCodeAt(l);switch(r){case 65279:case 9:case 32:case 44:++l;continue;case 10:++l,++e.line,e.lineStart=l;continue;case 13:10===t.charCodeAt(l+1)?l+=2:++l,++e.line,e.lineStart=l;continue;case 35:return function(e,r){let t=e.source.body,a=t.length,l=r+1;for(;l<a;){let e=t.charCodeAt(l);if(10===e||13===e)break;if(v(e))++l;else if(y(t,l))l+=2;else break}return I(e,er.COMMENT,r,l,t.slice(r+1,l))}(e,l);case 33:return I(e,er.BANG,l,l+1);case 36:return I(e,er.DOLLAR,l,l+1);case 38:return I(e,er.AMP,l,l+1);case 40:return I(e,er.PAREN_L,l,l+1);case 41:return I(e,er.PAREN_R,l,l+1);case 46:if(46===t.charCodeAt(l+1)&&46===t.charCodeAt(l+2))return I(e,er.SPREAD,l,l+3);break;case 58:return I(e,er.COLON,l,l+1);case 61:return I(e,er.EQUALS,l,l+1);case 64:return I(e,er.AT,l,l+1);case 91:return I(e,er.BRACKET_L,l,l+1);case 93:return I(e,er.BRACKET_R,l,l+1);case 123:return I(e,er.BRACE_L,l,l+1);case 124:return I(e,er.PIPE,l,l+1);case 125:return I(e,er.BRACE_R,l,l+1);case 34:if(34===t.charCodeAt(l+1)&&34===t.charCodeAt(l+2))return function(e,r){let t=e.source.body,a=t.length,l=e.lineStart,n=r+3,s=n,o="",d=[];for(;n<a;){let a=t.charCodeAt(n);if(34===a&&34===t.charCodeAt(n+1)&&34===t.charCodeAt(n+2)){o+=t.slice(s,n),d.push(o);let a=I(e,er.BLOCK_STRING,r,n+3,(function(e){var r,t;let a=Number.MAX_SAFE_INTEGER,l=null,n=-1;for(let r=0;r<e.length;++r){let s=e[r],o=function(e){let r=0;for(;r<e.length&&p(e.charCodeAt(r));)++r;return r}(s);o!==s.length&&(l=null!=(t=l)?t:r,n=r,0!==r&&o<a&&(a=o))}return e.map((e,r)=>0===r?e:e.slice(a)).slice(null!=(r=l)?r:0,n+1)})(d).join("\n"));return e.line+=d.length-1,e.lineStart=l,a}if(92===a&&34===t.charCodeAt(n+1)&&34===t.charCodeAt(n+2)&&34===t.charCodeAt(n+3)){o+=t.slice(s,n),s=n+1,n+=4;continue}if(10===a||13===a){o+=t.slice(s,n),d.push(o),13===a&&10===t.charCodeAt(n+1)?n+=2:++n,o="",s=n,l=n;continue}if(v(a))++n;else if(y(t,n))n+=2;else throw i(e.source,n,`Invalid character within String: ${E(e,n
2)}.`)}throw i(e.source,n,"Unterminated string.")}(e,l);return function(e,r){let t=e.source.body,a=t.length,l=r+1,n=l,s="";for(;l<a;){let a=t.charCodeAt(l);if(34===a)return s+=t.slice(n,l),I(e,er.STRING,r,l+1,s);if(92===a){s+=t.slice(n,l);let r=117===t.charCodeAt(l+1)?123===t.charCodeAt(l+2)?function(e,r){let t=e.source.body,a=0,l=3;for(;l<12;){let e=t.charCodeAt(r+l++);if(125===e){if(l<5||!v(a))break;return{value:String.fromCodePoint(a),size:l}}if((a=a<<4|j(e))<0)break}throw i(e.source,r,`Invalid Unicode escape sequence: "${t.slice(r,r+l)}".`)}(e,l):function(e,r){let t=e.source.body,a=_(t,r+2);if(v(a))return{value:String.fromCodePoint(a),size:6};if(R(a)&&92===t.charCodeAt(r+6)&&117===t.charCodeAt(r+7)){let e=_(t,r+8);if(N(e))return{value:String.fromCodePoint(a,e),size:12}}throw i(e.source,r,`Invalid Unicode escape sequence: "${t.slice(r,r+6)}".`)}(e,l):function(e,r){let t=e.source.body;switch(t.charCodeAt(r+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw i(e.source,r,`Invalid character escape sequence: "${t.slice(r,r+2)}".`)}(e,l);s+=r.value,l+=r.size,n=l;continue}if(10===a||13===a)break;if(v(a))++l;else if(y(t,l))l+=2;else throw i(e.source,l,`Invalid character within String: ${E(e,l)}.`)}throw i(e.source,l,"Unterminated string.")}(e,l)}if(g(r)||45===r)return function(e,r,t){let a=e.source.body,l=r,n=t,s=!1;if(45===n&&(n=a.charCodeAt(++l)),48===n){if(g(n=a.charCodeAt(++l)))throw i(e.source,l,`Invalid number, unexpected digit after 0: ${E(e,l)}.`)}else l=C(e,l,n),n=a.charCodeAt(l);if(46===n&&(s=!0,n=a.charCodeAt(++l),l=C(e,l,n),n=a.charCodeAt(l)),(69===n||101===n)&&(s=!0,(43===(n=a.charCodeAt(++l))||45===n)&&(n=a.charCodeAt(++l)),l=C(e,l,n),n=a.charCodeAt(l)),46===n||b(n))throw i(e.source,l,`Invalid number, expected digit but got: ${E(e,l)}.`);return I(e,s?er.FLOAT:er.INT,r,l,a.slice(r,l))}(e,l,r);if(b(r))return function(e,r){let t=e.source.body,a=t.length,l=r+1;for(;l<a;){var n;if(f(n=t.charCodeAt(l))||g(n)||95===n)++l;else break}return I(e,er.NAME,r,l,t.slice(r,l))}(e,l);throw i(e.source,l,39===r?"Unexpected single quote character ('), did you mean to use a double quote (\")?":v(r)||y(t,l)?`Unexpected character: ${E(e,l)}.`:`Invalid character: ${E(e,l)}.`)}return I(e,er.EOF,a,a)}(this,e.end);e.next=r,r.prev=e,e=r}while(e.kind===er.COMMENT)return e}}function v(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function y(e,r){return R(e.charCodeAt(r))&&N(e.charCodeAt(r+1))}function R(e){return e>=55296&&e<=56319}function N(e){return e>=56320&&e<=57343}function E(e,r){let t=e.source.body.codePointAt(r);if(void 0===t)return er.EOF;if(t>=32&&t<=126){let e=String.fromCodePoint(t);return'"'===e?"'\"'":`"${e}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function I(e,r,t,a,l){let n=e.line,s=1+t-e.lineStart;return new u(r,t,a,n,s,l)}function C(e,r,t){if(!g(t))throw i(e.source,r,`Invalid number, expected digit but got: ${E(e,r)}.`);let a=e.source.body,l=r+1;for(;g(a.charCodeAt(l));)++l;return l}function _(e,r){return j(e.charCodeAt(r))<<12|j(e.charCodeAt(r+1))<<8|j(e.charCodeAt(r+2))<<4|j(e.charCodeAt(r+3))}function j(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function S(e,r){if(!e)throw Error(r)}function D(e,r){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,r){let t;if(null===e)return"null";if(r.includes(e))return"[Circular]";let a=[...r,e];if("function"==typeof e.toJSON){let r=e.toJSON();if(r!==e)return"string"==typeof r?r:D(r,a)}else if(Array.isArray(e)){var l,n,s=e,o=a;if(0===s.length)return"[]";if(o.length>2)return"[Array]";let r=Math.min(10,s.length),t=s.length-r,i=[];for(let e=0;e<r;++e)i.push(D(s[e],o));return 1===t?i.push("... 1 more item"):t>1&&i.push(`... ${t} more items`),"["+i.join(", ")+"]"}return l=e,n=a,0===(t=Object.entries(l)).length?"{}":n.length>2?"["+function(e){let r=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===r&&"function"==typeof e.constructor){let r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return r}(l)+"]":"{ "+t.map(([e,r])=>e+": "+D(r,n)).join(", ")+" }"}(e,r);default:return String(e)}}let T=globalThis.process&&1?function(e,r){return e instanceof r}:function(e,r){if(e instanceof r)return!0;
2if("object"==typeof e&&null!==e){var t;let a=r.prototype[Symbol.toStringTag];if(a===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null==(t=e.constructor)?void 0:t.name)){let r=D(e,[]);throw Error(`Cannot use ${a} "${r}" from another module or realm. 3 4Ensure that there is only one instance of "graphql" in the node_modules 5directory. If different versions of "graphql" are the dependencies of other 6relied on modules, use "resolutions" to ensure only one version is installed. 7 8https://yarnpkg.com/en/docs/selective-version-resolutions 9 10Duplicate "graphql" modules cannot be used at the same time since different 11versions may have different capabilities and behavior. The data from one 12version used in the function from another could produce confusing and 13spurious results.`)}}return!1};class A{constructor(e,r="GraphQL request",t={line:1,column:1}){"string"==typeof e||S(!1,`Body must be a string. Received: ${function(e){return D(e,[])}(e)}.`),this.body=e,this.name=r,this.locationOffset=t,this.locationOffset.line>0||S(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||S(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class F{constructor(e,r={}){const{lexer:t,...a}=r;if(t)this._lexer=t;else{const r=!function(e){return T(e,A)}(e)?new A(e):e;this._lexer=new x(r)}this._options=a,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(er.NAME);return this.node(e,{kind:ee.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:ee.DOCUMENT,definitions:this.many(er.SOF,this.parseDefinition,er.EOF)})}parseDefinition(){if(this.peek(er.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(e&&r.kind===er.BRACE_L)throw i(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(r.kind===er.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw i(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===r.value)return this.parseTypeSystemExtension()}throw this.unexpected(r)}parseOperationDefinition(){let e,r=this._lexer.token;if(this.peek(er.BRACE_L))return this.node(r,{kind:ee.OPERATION_DEFINITION,operation:J.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),a=this.parseOperationType();return this.peek(er.NAME)&&(e=this.parseName()),this.node(r,{kind:ee.OPERATION_DEFINITION,operation:a,description:t,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(er.NAME);switch(e.value){case"query":return J.QUERY;case"mutation":return J.MUTATION;case"subscription":return J.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(er.PAREN_L,this.parseVariableDefinition,er.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ee.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(er.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(er.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(er.DOLLAR),this.node(e,{kind:ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ee.SELECTION_SET,selections:this.many(er.BRACE_L,this.parseSelection,er.BRACE_R)})}parseSelection(){return this.peek(er.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,r,t=this._lexer.token,a=this.parseName();return this.expectOptionalToken(er.COLON)?(e=a,r=this.parseName()):r=a,this.node(t,{kind:ee.FIELD,alias:e,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(er.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(er.PAREN_L,r,er.PAREN_R)}parseArgument(e=!1){let r=this._lexer.token,t=this.parseName();return this.expectToken(er.COLON),this.node(r,{kind:ee.ARGUMENT,name:t,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(er.SPREAD);let r=this.expectOptionalKeyword("on");return!r&&this.peek(er.NAME)?this.node(e,{kind:ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:ee.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,r=this.parseDescription();return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:ee.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:ee.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let r=this._lexer.token;switch(r.kind){case er.BRACKET_L:return this.parseList(e);case er.BRACE_L:return this.parseObject(e);case er.INT:return this.advanceLexer(),this.node(r,{kind:ee.INT,value:r.value});case er.FLOAT:return this.advanceLexer(),this.node(r,{kind:ee.FLOAT,value:r.value});case er.STRING:case er.BLOCK_STRING:return this.parseStringLiteral();case er.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:ee.BOOLEAN,value:!0});case"false":return this.node(r,{kind:ee.BOOLEAN,value:!1});case"null":return this.node(r,{kind:ee.NULL});default:return this.node(r,{kind:ee.ENUM,value:r.value})}case er.DOLLAR:if(e){if(this.expectToken(er.DOLLAR),this._lexer.token.kind===er.NAME){let e=this._lexer.token.value;throw i(this._lexer.source,r.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(r)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:ee.STRING,value:e.value,block:e.kind===er.BLOCK_STRING})}parseList(e){let r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:ee.LIST,values:this.any(er.BRACKET_L,r,er.BRACKET_R)})}parseObject(e){let r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:ee.OBJECT,fields:this.any(er.BRACE_L,r,er.BRACE_R)})}parseObjectField(e){let r=this._lexer.token,t=this.parseName();return this.expectToken(er.COLON),this.node(r,{kind:ee.OBJECT_FIELD,name:t,value:this.parseValueLiteral(e)})}parseDirectives(e){let r=[];for(;this.peek(er.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let r=this._lexer.token;return this.expectToken(er.AT),this.node(r,{kind:ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e,r=this._lexer.token;if(this.expectOptionalToken(er.BRACKET_L)){let t=this.parseTypeReference();this.expectToken(er.BRACKET_R),e=this.node(r,{kind:ee.LIST_TYPE,type:t})}else e=this.parseNamedType();return this.expectOptionalToken(er.BANG)?this.node(r,{kind:ee.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(er.STRING)||this.peek(er.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");let t=this.parseConstDirectives(),a=this.many(er.BRACE_L,this.parseOperationTypeDefinition,er.BRACE_R);
13return this.node(e,{kind:ee.SCHEMA_DEFINITION,description:r,directives:t,operationTypes:a})}parseOperationTypeDefinition(){let e=this._lexer.token,r=this.parseOperationType();this.expectToken(er.COLON);let t=this.parseNamedType();return this.node(e,{kind:ee.OPERATION_TYPE_DEFINITION,operation:r,type:t})}parseScalarTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");let t=this.parseName(),a=this.parseConstDirectives();return this.node(e,{kind:ee.SCALAR_TYPE_DEFINITION,description:r,name:t,directives:a})}parseObjectTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");let t=this.parseName(),a=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),n=this.parseFieldsDefinition();return this.node(e,{kind:ee.OBJECT_TYPE_DEFINITION,description:r,name:t,interfaces:a,directives:l,fields:n})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(er.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(er.BRACE_L,this.parseFieldDefinition,er.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,r=this.parseDescription(),t=this.parseName(),a=this.parseArgumentDefs();this.expectToken(er.COLON);let l=this.parseTypeReference(),n=this.parseConstDirectives();return this.node(e,{kind:ee.FIELD_DEFINITION,description:r,name:t,arguments:a,type:l,directives:n})}parseArgumentDefs(){return this.optionalMany(er.PAREN_L,this.parseInputValueDef,er.PAREN_R)}parseInputValueDef(){let e,r=this._lexer.token,t=this.parseDescription(),a=this.parseName();this.expectToken(er.COLON);let l=this.parseTypeReference();this.expectOptionalToken(er.EQUALS)&&(e=this.parseConstValueLiteral());let n=this.parseConstDirectives();return this.node(r,{kind:ee.INPUT_VALUE_DEFINITION,description:t,name:a,type:l,defaultValue:e,directives:n})}parseInterfaceTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");let t=this.parseName(),a=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),n=this.parseFieldsDefinition();return this.node(e,{kind:ee.INTERFACE_TYPE_DEFINITION,description:r,name:t,interfaces:a,directives:l,fields:n})}parseUnionTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");let t=this.parseName(),a=this.parseConstDirectives(),l=this.parseUnionMemberTypes();return this.node(e,{kind:ee.UNION_TYPE_DEFINITION,description:r,name:t,directives:a,types:l})}parseUnionMemberTypes(){return this.expectOptionalToken(er.EQUALS)?this.delimitedMany(er.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");let t=this.parseName(),a=this.parseConstDirectives(),l=this.parseEnumValuesDefinition();return this.node(e,{kind:ee.ENUM_TYPE_DEFINITION,description:r,name:t,directives:a,values:l})}parseEnumValuesDefinition(){return this.optionalMany(er.BRACE_L,this.parseEnumValueDefinition,er.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,r=this.parseDescription(),t=this.parseEnumValueName(),a=this.parseConstDirectives();return this.node(e,{kind:ee.ENUM_VALUE_DEFINITION,description:r,name:t,directives:a})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw i(this._lexer.source,this._lexer.token.start,`${O(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");let t=this.parseName(),a=this.parseConstDirectives(),l=this.parseInputFieldsDefinition();return this.node(e,{kind:ee.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:t,directives:a,fields:l})}parseInputFieldsDefinition(){return this.optionalMany(er.BRACE_L,this.parseInputValueDef,er.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===er.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let r=this.parseConstDirectives(),t=this.optionalMany(er.BRACE_L,this.parseOperationTypeDefinition,er.BRACE_R);if(0===r.length&&0===t.length)throw this.unexpected();
13return this.node(e,{kind:ee.SCHEMA_EXTENSION,directives:r,operationTypes:t})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let r=this.parseName(),t=this.parseConstDirectives();if(0===t.length)throw this.unexpected();return this.node(e,{kind:ee.SCALAR_TYPE_EXTENSION,name:r,directives:t})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let r=this.parseName(),t=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(0===t.length&&0===a.length&&0===l.length)throw this.unexpected();return this.node(e,{kind:ee.OBJECT_TYPE_EXTENSION,name:r,interfaces:t,directives:a,fields:l})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let r=this.parseName(),t=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(0===t.length&&0===a.length&&0===l.length)throw this.unexpected();return this.node(e,{kind:ee.INTERFACE_TYPE_EXTENSION,name:r,interfaces:t,directives:a,fields:l})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let r=this.parseName(),t=this.parseConstDirectives(),a=this.parseUnionMemberTypes();if(0===t.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:ee.UNION_TYPE_EXTENSION,name:r,directives:t,types:a})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let r=this.parseName(),t=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();if(0===t.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:ee.ENUM_TYPE_EXTENSION,name:r,directives:t,values:a})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let r=this.parseName(),t=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();if(0===t.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:ee.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:t,fields:a})}parseDirectiveDefinitionExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(er.AT);let r=this.parseName(),t=this.parseConstDirectives();if(0===t.length)throw this.unexpected();return this.node(e,{kind:ee.DIRECTIVE_EXTENSION,name:r,directives:t})}parseDirectiveDefinition(){let e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(er.AT);let t=this.parseName(),a=this.parseArgumentDefs(),l=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],n=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:ee.DIRECTIVE_DEFINITION,description:r,name:t,arguments:a,directives:l,repeatable:n,locations:s})}parseDirectiveLocations(){return this.delimitedMany(er.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(X,r.value))return r;throw this.unexpected(e)}parseSchemaCoordinate(){let e,r,t=this._lexer.token,a=this.expectOptionalToken(er.AT),l=this.parseName();return(!a&&this.expectOptionalToken(er.DOT)&&(e=this.parseName()),(a||e)&&this.expectOptionalToken(er.PAREN_L)&&(r=this.parseName(),this.expectToken(er.COLON),this.expectToken(er.PAREN_R)),a)?r?this.node(t,{kind:ee.DIRECTIVE_ARGUMENT_COORDINATE,name:l,argumentName:r}):this.node(t,{kind:ee.DIRECTIVE_COORDINATE,name:l}):e?r?this.node(t,{kind:ee.ARGUMENT_COORDINATE,name:l,fieldName:e,argumentName:r}):this.node(t,{kind:ee.MEMBER_COORDINATE,name:l,memberName:e}):this.node(t,{kind:ee.TYPE_COORDINATE,name:l})}node(e,r){return!0!==this._options.noLocation&&(r.loc=new d(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){let r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw i(this._lexer.source,r.start,`Expected ${w(e)}, found ${O(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let r=this._lexer.token;if(r.kind===er.NAME&&r.value===e)this.advanceLexer();else throw i(this._lexer.source,r.start,`Expected "${e}", found ${O(r)}.`)}expectOptionalKeyword(e){let r=this._lexer.token;return r.kind===er.NAME&&r.value===e&&(this.advanceLexer(),!0)}unexpected(e){let r=null!=e?e:this._lexer.token;return i(this._lexer.source,r.start,`Unexpected ${O(r)}.`)}any(e,r,t){this.expectToken(e);let a=[];for(;!this.expectOptionalToken(t);)a.push(r.call(this));return a}optionalMany(e,r,t){if(this.expectOptionalToken(e)){let e=[];do e.push(r.call(this));while(!this.expectOptionalToken(t))return e}return[]}many(e,r,t){this.expectToken(e);let a=[];do a.push(r.call(this));while(!this.expectOptionalToken(t))return a}delimitedMany(e,r){this.expectOptionalToken(e);let t=[];do t.push(r.call(this));while(this.expectOptionalToken(e))return t}advanceLexer(){let{maxTokens:e}=this._options,r=this._lexer.advance();if(r.kind!==er.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw i(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function O(e){let r=e.value;return w(e.kind)+(null!=r?` "${r}"`:"")}function w(e){return e===er.BANG||e===er.DOLLAR||e===er.AMP||e===er.PAREN_L||e===er.PAREN_R||e===er.DOT||e===er.SPREAD||e===er.COLON||e===er.EQUALS||e===er.AT||e===er.BRACKET_L||e===er.BRACKET_R||e===er.BRACE_L||e===er.PIPE||e===er.BRACE_R?`"${e}"`:e}let L=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function P(e){return k[e.charCodeAt(0)]}let k=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],M=Object.freeze({}),V={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>B(e.definitions,"\n\n")},OperationDefinition:{leave(e){let r=Z(e.variableDefinitions)?U("(\n",B(e.variableDefinitions,"\n"),"\n)"):U("(",B(e.variableDefinitions,", "),")"),t=U("",e.de
13scription,"\n")+B([e.operation,B([e.name,r]),B(e.directives," ")]," ");return("query"===t?"":t+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:r,defaultValue:t,directives:a,description:l})=>U("",l,"\n")+e+": "+r+U(" = ",t)+U(" ",B(a," "))},SelectionSet:{leave:({selections:e})=>Y(e)},Field:{leave({alias:e,name:r,arguments:t,directives:a,selectionSet:l}){let n=U("",e,": ")+r,s=n+U("(",B(t,", "),")");return s.length>80&&(s=n+U("(\n",z(B(t,"\n")),"\n)")),B([s,B(a," "),l]," ")}},Argument:{leave:({name:e,value:r})=>e+": "+r},FragmentSpread:{leave:({name:e,directives:r})=>"..."+e+U(" ",B(r," "))},InlineFragment:{leave:({typeCondition:e,directives:r,selectionSet:t})=>B(["...",U("on ",e),B(r," "),t]," ")},FragmentDefinition:{leave:({name:e,typeCondition:r,variableDefinitions:t,directives:a,selectionSet:l,description:n})=>U("",n,"\n")+`fragment ${e}${U("(",B(t,", "),")")} `+`on ${r} ${U("",B(a," ")," ")}`+l},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:r})=>{let t,a,l,n,s,o,i,d,u,c,m;return r?(l=1===(a=(t=e.replace(/"""/g,'\\"""')).split(/\r\n|[\n\r]/g)).length,n=a.length>1&&a.slice(1).every(e=>0===e.length||p(e.charCodeAt(0))),s=t.endsWith('\\"""'),o=e.endsWith('"')&&!s,i=e.endsWith("\\"),d=o||i,u=!l||e.length>70||d||n||s,c="",m=l&&p(e.charCodeAt(0)),(u&&!m||n)&&(c+="\n"),c+=t,(u||d)&&(c+="\n"),'"""'+c+'"""'):`"${e.replace(L,P)}"`}},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+B(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+B(e,", ")+"}"},ObjectField:{leave:({name:e,value:r})=>e+": "+r},Directive:{leave:({name:e,arguments:r})=>"@"+e+U("(",B(r,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:r,operationTypes:t})=>U("",e,"\n")+B(["schema",B(r," "),Y(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:r})=>e+": "+r},ScalarTypeDefinition:{leave:({description:e,name:r,directives:t})=>U("",e,"\n")+B(["scalar",r,B(t," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:r,interfaces:t,directives:a,fields:l})=>U("",e,"\n")+B(["type",r,U("implements ",B(t," & ")),B(a," "),Y(l)]," ")},FieldDefinition:{leave:({description:e,name:r,arguments:t,type:a,directives:l})=>U("",e,"\n")+r+(Z(t)?U("(\n",z(B(t,"\n")),"\n)"):U("(",B(t,", "),")"))+": "+a+U(" ",B(l," "))},InputValueDefinition:{leave:({description:e,name:r,type:t,defaultValue:a,directives:l})=>U("",e,"\n")+B([r+": "+t,U("= ",a),B(l," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:r,interfaces:t,directives:a,fields:l})=>U("",e,"\n")+B(["interface",r,U("implements ",B(t," & ")),B(a," "),Y(l)]," ")},UnionTypeDefinition:{leave:({description:e,name:r,directives:t,types:a})=>U("",e,"\n")+B(["union",r,B(t," "),U("= ",B(a," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:r,directives:t,values:a})=>U("",e,"\n")+B(["enum",r,B(t," "),Y(a)]," ")},EnumValueDefinition:{leave:({description:e,name:r,directives:t})=>U("",e,"\n")+B([r,B(t," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:r,directives:t,fields:a})=>U("",e,"\n")+B(["input",r,B(t," "),Y(a)]," ")},DirectiveDefinition:{leave:({description:e,name:r,arguments:t,directives:a,repeatable:l,locations:n})=>U("",e,"\n")+"directive @"+r+(Z(t)?U("(\n",z(B(t,"\n")),"\n)"):U("(",B(t,", "),")"))+U(" ",B(a," "))+(l?" repeatable":"")+" on "+B(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:r})=>B(["extend schema",B(e," "),Y(r)]," ")},ScalarTypeExtension:{leave:({name:e,directives:r})=>B(["extend scalar",e,B(r," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:r,directives:t,fields:a})=>B(["extend type",e,U("implements ",B(r," & ")),B(t," "),Y(a)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:r,directives:t,fields:a})=>B(["extend interface",e,U("implements ",B(r," & ")),B(t," "),Y(a)]," ")},UnionTypeExtension:{leave:({name:e,directives:r,types:t})=>B(["extend union",e,B(r," "),U("= ",B(t," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:r,values:t})=>B(["extend enum",e,B(r," "),Y(t)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:r,fields:t})=>B(["extend input",e,B(r," "),Y(t)]," ")},DirectiveExtension:{leave:({name:e,directives:r})=>B(["extend directive @"+e,B(r," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:r})=>B([e,U(".",r)])},ArgumentCoordinate:{leave:({name:e,fieldName:r,argumentName:t})=>B([e,U(".",r),U("(",t,":)")])},DirectiveCoordinate:{leave:({name:e})=>B(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:r})=>B(["@",e,U("(",r,":)")])}};function B(e,r=""){var t;return null!=(t=null==e?void 0:e.filter(e=>e).join(r))?t:""}function Y(e){return U("{\n",z(B(e,"\n")),"\n}")}function U(e,r,t=""){return null!=r&&""!==r?e+r+t:""}function z(e){return U(" ",e.replace(/\n/g,"\n "))}function Z(e){var r;return null!=(r=null==e?void 0:e.some(e=>e.includes("\n")))&&r}let q=e=>{let r,t=e.definitions.filter(e=>"OperationDefinition"===e.kind);return 1===t.length&&(r=t[0]?.name?.value),r},H=e=>{if("string"==typeof e){let r;try{let t,a,l=(a=(t=new F(e,void 0)).parseDocument(),Object.defineProperty(a,"tokenCount",{enumerable:!1,value:t.tokenCount}),a);r=q(l)}catch(e){}return{query:e,operationName:r}}let r=q(e);return{query:function(e,r,t=c){let a,l,n,s=new Map;for(let e of Object.values(ee))s.set(e,function(e,r){let t=e[r];return"object"==typeof t?t:"function"==typeof t?{enter:t,leave:void 0}:{enter:e.enter,leave:e.leave}}(r,e));let o=Array.isArray(e),i=[e],d=-1,u=[],m=e,p=[],g=[];do{var f,b,x;let e,c=++d===i.length,v=c&&0!==u.length;if(c){if(l=0===g.length?void 0:p[p.length-1],m=n,n=g.pop(),v)if(o){m=m.slice();let e=0;for(let[r,t]of u){let a=r-e;null===t?(m.splice(a,1),e++):m[a]=t}}else for(let[e,r]of(m={...m},u))m[e]=r;d=a.index,i=a.keys,u=a.edits,o=a.inArray,a=a.prev}else if(n){if(null==(m=n[l=o?d:i[d]]))continue;p.push(l)}if(!Array.isArray(m)){h(m)||S(!1,`Invalid AST Node: ${D(m,[])}.`);let t=c?null==(f=s.get(m.kind))?void 0:f.leave:null==(b=s.get(m.kind))?void 0:b.enter;if((e=null==t?void 0:t.call(r,m,l,n,p,g))===M)break;if(!1===e){if(!c){p.pop();continue}}else if(void 0!==e&&(u.push([l,e]),!c))if(h(e))m=e;else{p.pop();continue}}void 0===e&&v&&u.push([l,m]),c?p.pop():(a={inArray:o,index:d,keys:i,edits:u,prev:a},i=(o=Array.isArray(m))?m:null!=(x=t[m.kind])?x:[],d=-1,u=[],n&&g.push(n),n=m)}while(void 0!==a)return 0!==u.length?u[u.length-1][1]:e}(e,V),operationName:r}};
13class $ extends Error{constructor(e,r){super(`${$.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`),Object.setPrototypeOf(this,$.prototype),this.response=e,this.request=r,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,$)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${e.status})`}}var G,Q,W,K,J,X,ee,er,et=e.i(9625);let ea=e=>{let r={};if(e)if("u">typeof Headers&&e instanceof Headers||et&&et.Headers&&e instanceof et.Headers){let t;t={},e.forEach((e,r)=>{t[r]=e}),r=t}else Array.isArray(e)?e.forEach(([e,t])=>{e&&void 0!==t&&(r[e]=t)}):r=e;return r},el=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class en{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=async(...e)=>{let[r,t,a]=e,l=r.query?r:{query:r,variables:t,requestHeaders:a,signal:void 0},{headers:n,fetch:s=et.default,method:o="POST",requestMiddleware:i,responseMiddleware:d,...u}=this.requestConfig,{url:c}=this;void 0!==l.signal&&(u.signal=l.signal);let{operationName:m}=H(l.query);return es({url:c,query:l.query,variables:l.variables,headers:{...ea(ed(n)),...ea(l.requestHeaders)},operationName:m,fetch:s,method:o,fetchOptions:u,middleware:i}).then(e=>(d&&d(e),e)).catch(e=>{throw d&&d(e),e})}}async request(e,...r){let[t,a]=r,l=e.document?e:{document:e,variables:t,requestHeaders:a,signal:void 0},{headers:n,fetch:s=et.default,method:o="POST",requestMiddleware:i,responseMiddleware:d,...u}=this.requestConfig,{url:c}=this;void 0!==l.signal&&(u.signal=l.signal);let{query:m,operationName:h}=H(l.document);return es({url:c,query:m,variables:l.variables,headers:{...ea(ed(n)),...ea(l.requestHeaders)},operationName:h,fetch:s,method:o,fetchOptions:u,middleware:i}).then(e=>(d&&d(e),e.data)).catch(e=>{throw d&&d(e),e})}batchRequests(e,r){let t=e.documents?e:{documents:e,requestHeaders:r,signal:void 0},{headers:a,...l}=this.requestConfig;void 0!==t.signal&&(l.signal=t.signal);let n=t.documents.map(({document:e})=>H(e).query),s=t.documents.map(({variables:e})=>e);return es({url:this.url,query:n,variables:s,headers:{...ea(ed(a)),...ea(t.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??et.default,method:this.requestConfig.method||"POST",fetchOptions:l,middleware:this.requestConfig.requestMiddleware}).then(e=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e.data)).catch(e=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){let{headers:t}=this.requestConfig;return t?t[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}}let es=async e=>{let t,{query:a,variables:l,fetchOptions:n}=e,s=(t=(e.method??"post").toUpperCase(),async e=>{let a,{url:l,query:n,variables:s,operationName:o,fetch:i,fetchOptions:d,middleware:u}=e,c={...e.headers},m="";"POST"===t?"string"==typeof(a=eo(n,s,o,d.jsonSerializer))&&(c["Content-Type"]="application/json"):m=(e=>{if(!Array.isArray(e.query)){let r=[`query=${encodeURIComponent(el(e.query))}`];return e.variables&&r.push(`variables=${encodeURIComponent(e.jsonSerializer.stringify(e.variables))}`),e.operationName&&r.push(`operationName=${encodeURIComponent(e.operationName)}`),r.join("&")}if(void 0!==e.variables&&!Array.isArray(e.variables))throw Error("Cannot create query with given variable type, array expected");let r=e.query.reduce((r,t,a)=>(r.push({query:el(t),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`})({query:n,variables:s,operationName:o,jsonSerializer:d.jsonSerializer??r});let h={method:t,headers:c,body:a,...d},p=l,g=h;if(u){let{url:e,...r}=await Promise.resolve(u({...h,url:l,operationName:o,variables:s}));p=e,g=r}return m&&(p=`${p}?${m}`),await i(p,g)}),o=Array.isArray(e.query),i=await s(e),d=await ei(i,n.jsonSerializer??r),u=Array.isArray(d)?!d.some(({data:e})=>!e):!!d.data,c=Array.isArray(d)||!d.errors||Array.isArray(d.errors)&&!d.errors.length||"all"===n.errorPolicy||"ignore"===n.errorPolicy;
13if(i.ok&&c&&u){let{errors:e,...r}=(Array.isArray(d),d),t="ignore"===n.errorPolicy?r:d;return{...o?{data:t}:t,headers:i.headers,status:i.status}}throw new $({..."string"==typeof d?{error:d}:d,status:i.status,headers:i.headers},{query:a,variables:l})},eo=(e,t,a,l)=>{let n=l??r;if(!Array.isArray(e))return n.stringify({query:e,variables:t,operationName:a});if(void 0!==t&&!Array.isArray(t))throw Error("Cannot create request body with given variable type, array expected");let s=e.reduce((e,r,a)=>(e.push({query:r,variables:t?t[a]:void 0}),e),[]);return n.stringify(s)},ei=async(e,r)=>{let t;return(e.headers.forEach((e,r)=>{"content-type"===r.toLowerCase()&&(t=e)}),t&&(t.toLowerCase().startsWith("application/json")||t.toLowerCase().startsWith("application/graphql+json")||t.toLowerCase().startsWith("application/graphql-response+json")))?r.parse(await e.text()):e.text()},ed=e=>"function"==typeof e?e():e;var eu=e.i(7095),ec=e.i(10026),em=e.i(50060),eh=e.i(61791),ep=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};e.s(["GraphQLRequestClient",0,class e{constructor(e,r={}){var t;if(this.endpoint=e,this.headers={},r.apiKey&&(this.headers.sc_apikey=r.apiKey),r.headers&&(this.headers=Object.assign(Object.assign({},this.headers),r.headers)),r.contextId&&(this.headers["x-sitecore-contextid"]=r.contextId),!e||!(0,eu.default)(e).hostname)throw Error(`Invalid GraphQL endpoint '${e}'. Verify that appropriate environment variable is set`);this.timeout=r.timeout,this.retries=null!=(t=r.retries)?t:3,this.retryStrategy=r.retryStrategy||new eh.DefaultRetryStrategy({statusCodes:[429,502,503,504,520,521,522,523,524]}),this.client=new en(e,{headers:this.headers,fetch:r.fetch}),this.debug=r.debugger||ec.default.http}static createClientFactory(r){var{endpoint:t}=r,a=ep(r,["endpoint"]);return (r={})=>new e(t,Object.assign(Object.assign({},a),r))}async request(e,r,t){let a=1,l=async()=>{let n=(null==t?void 0:t.retries)||this.retries,s=(null==t?void 0:t.retryStrategy)||this.retryStrategy,o=(null==t?void 0:t.debugger)||this.debug;o("request: %o",{url:this.endpoint,headers:Object.assign(Object.assign({},this.headers),null==t?void 0:t.headers),query:e,variables:r,timeout:this.timeout});let i=Object.assign(Object.assign({},this.headers),null==t?void 0:t.headers),d=performance.now(),u=[this.client.request(e,r,i)];return this.timeout&&(this.abortTimeout=new em.default(this.timeout),u.push(this.abortTimeout.start)),Promise.race(u).then(e=>{var r;return null==(r=this.abortTimeout)||r.clear(),this.debug("response in %dms: %o",performance.now()-d,e),Promise.resolve(e)},async e=>{var r,t;null==(r=this.abortTimeout)||r.clear(),o("response error: %o",e.response||e.message||e);let i=(null==(t=e.response)?void 0:t.status)||e.code;if(!s.shouldRetry(e,a,n))return Promise.reject(e);{let r=s.getDelay(e,a);return o("Error: %s. Retrying in %dms (attempt %d).",i,r,a),a++,new Promise(e=>setTimeout(e,r)).then(l)}})};return l()}}],28385)},14216,87334,67875,9305,e=>{"use strict";var r=e.i(50461),t=e.i(91788),a=e.i(41158),l=e.i(78995),n=e.i(80830);let s=e=>{let r=JSON.stringify(e.metadata),a={type:"text/sitecore",chrometype:"field",className:"scpm"},l=Object.assign(Object.assign({},a),{kind:n.MetadataKind.Open}),s=Object.assign(Object.assign({},a),{kind:n.MetadataKind.Close});return t.default.createElement(t.default.Fragment,null,t.default.createElement("code",Object.assign({},l),r),e.children,t.default.createElement("code",Object.assign({},s)))};function o(e,r=!1){return r?r=>{var a;let{editable:l=!0}=r,n=null==(a=r.field)?void 0:a.metadata;return n&&l?t.default.createElement(s,{metadata:n},t.default.createElement(e,Object.assign({},r))):t.default.createElement(e,Object.assign({},r))}:r=>{var a;let{editable:l=!0}=r,n=null==(a=r.field)?void 0:a.metadata;return n&&l?t.default.createElement(s,{metadata:n},t.default.createElement(e,Object.assign({},r))):t.default.createElement(e,Object.assign({},r))}}function i(e,r){let a=e=>{var a;let{editable:n=!0}=e;if((null==(a=e.field)?void 0:a.metadata)&&n&&(0,l.isFieldValueEmpty)(e.field)){let a=e.emptyFieldEditingComponent||r.defaultEmptyFieldEditingComponent,l=e;return e.emptyFieldEditingComponent||(l=Object.assign(Object.assign({},e),{editable:void 0,field:void 0})),t.default.createElement(a,Object.assign({},l,{suppressHydrationWarning:!0}))}return null};return r.isForwardRef?r=>a(r)||t.default.createElement(e,Object.assign({},r)):r=>a(r)||t.default.createElement(e,Object.assign({},r))}s.displayName="FieldMetadata",e.s(["withFieldMetadata",0,o],87334),e.s(["withEmptyFieldEditingComponent",0,i],67875);let d=e=>{let r=e.tag||"span";return t.default.createElement(r,Object.assign({},e,{suppressHydrationWarning:!0}),"[No text in field]")};e.s(["DefaultEmptyFieldEditingComponentImage",0,e=>t.default.createElement("img",Object.assign({},e,{suppressContentEditableWarning:!0,alt:"",src:'data:image/svg+xml,%3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 240 240" style="enable-background:new 0 0 240 240;" xml:space="preserve"%3E%3Cstyle type="text/css"%3E .st0%7Bfill:none;%7D .st1%7Bfill:%23969696;%7D .st2%7Bfill:%23FFFFFF;%7D .st3%7Bfill:%23FFFFFF;stroke:%23FFFFFF;stroke-width:0.75;stroke-miterlimit:10;%7D%0A%3C/style%3E%3Cg%3E%3Crect class="st0" width="240" height="240"/%3E%3Cg%3E%3Cg%3E%3Crect x="20" y="20" class="st1" width="200" height="200"/%3E%3C/g%3E%3Cg%3E%3Ccircle class="st2" cx="174" cy="67" r="14"/%3E%3Cpath class="st2" d="M174,54c7.17,0,13,5.83,13,13s-5.83,13-13,13s-13-5.83-13-13S166.83,54,174,54 M174,52 c-8.28,0-15,6.72-15,15s6.72,15,15,15s15-6.72,15-15S182.28,52,174,52L174,52z"/%3E%3C/g%3E%3Cpolyline class="st3" points="29.5,179.25 81.32,122.25 95.41,137.75 137.23,91.75 209.5,179.75 "/%3E%3C/g%3E%3C/g%3E%3C/svg%3E',className:`scEmptyImage ${e.className||""}`,style:{minWidth:"48px",minHeight:"48px",maxWidth:"400px",maxHeight:"400px",cursor:"pointer"}})),"DefaultEmptyFieldEditingComponentText",0,d],9305);var u=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let c=o(i(e=>{var{field:r,showLinkTextWithChildrenPresent:a,ref:n}=e,s=u(e,["field","showLinkTextWithChildrenPresent","ref"]);let o=s.children;if(delete s.editable,(0,l.isFieldValueEmpty)(r))return null;let i=r.href?r:r.value;if(!i)return null;let d="anchor"!==i.linktype&&i.anchor?`#${i.anchor}`:"",c=i.querystring?`?${i.querystring}`:"",m={href:`${i.href}${c}${d}`,className:i.class,title:i.title,target:i.target};"_blank"!==m.target||m.rel||(m.rel="noopener noreferrer");let h=a||!o?i.text||i.href:null;return t.default.createElement("a",Object.assign({},m,s,{key:"link",ref:n}),h,o)},{defaultEmptyFieldEditingComponent:d}));c.displayName="Link";var m=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let h=["as","onNavigate","passHref","prefetch","replace","scroll","shallow"],p=/^\/.*\.\w+$/,g=(0,t.forwardRef)((e,l)=>{let{field:n,editable:s=!0,children:o,internalLinkMatcher:i=/^\//g,showLinkTextWithChildrenPresent:d}=e,u=m(e,["field","editable","children","internalLinkMatcher","showLinkTextWithChildrenPresent"]);if(!n||!n.value&&!n.href&&!n.metadata)return null;let g=n.href?n:n.value,{href:f,querystring:b,anchor:x}=g||{},v=s&&n.metadata;if(f&&!v){let n=d||!o?g.text||g.href:null,s=i.test(f),c=p.test(f);if(s&&!c)return t.default.createElement(a.default,Object.assign({href:{pathname:f,query:b,hash:x},key:"link",title:g.title,target:g.target,className:g.class},u,{locale:!1,ref:l},r.default.env.TEST?{"data-nextjs-link":!0,"data-nextjs-prefetch":e.prefetch}:{}),n,o)}let y=function(e){let r=Object.assign({},e);for(let e of[...h,"internalLinkMatcher"])delete r[e];return r}(e);return t.default.createElement(c,Object.assign({},y,{ref:l},r.default.env.TEST?{"data-react-link":!0}:{}))});g.displayName="NextLink",e.s(["Link",0,g],14216)},78652,43490,e=>{"use strict";var r=e.i(50461),t=e.i(7095);let a=/\/([-~]{1})\/media\//i,l=e=>{let{rev:r,db:t,la:a,vs:l,ts:n}=e;return{rev:r,db:t,la:a,vs:l,ts:n}},n=(e,r=a)=>{let l=(0,t.default)(e,{},!0),n=r.exec(l.pathname);return n&&n.length>1&&l.set("pathname",l.pathname.replace(r,`/${n[1]}/jssmedia/`)),l.toString()},s=(e,r,s=a)=>{if(!r||0===Object.keys(r).length)return e;"u">typeof window&&!window.global&&(window.global={});let o=(0,t.default)(n(e,s),{}
13,!0),i=l(o.query),d=Object.assign({},r);return Object.entries(i).forEach(([e,r])=>{r&&(d[e]=r)}),o.set("query",d),o.toString()};e.s(["getRequiredParams",0,l,"getSrcSet",0,(e,r,t,a)=>r.map(r=>{let l=Object.assign(Object.assign({},t),r),n=l.w||l.mw;return n?`${s(e,l,a)} ${n}w`:null}).filter(e=>e).join(", "),"replaceMediaUrlPrefix",0,n,"updateImageUrl",0,s],98957);var o=e.i(98957);e.s(["mediaApi",0,o],43490);var o=o,i=e.i(91788),d=e.i(87334),u=e.i(28562),c=e.i(9305),m=e.i(67875),h=e.i(26019),p=e.i(78995),g=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let f=(0,d.withFieldMetadata)((0,m.withEmptyFieldEditingComponent)(e=>{var{editable:t=!0,imageParams:a,field:l,mediaUrlPrefix:n,fill:s,priority:d}=e,c=g(e,["editable","imageParams","field","mediaUrlPrefix","fill","priority"]);let m=i.default.useContext(u.SitecoreProviderReactContext);if(c.src)throw Error("Detected src prop. If you wish to use src, use next/image directly.");if((0,p.isFieldValueEmpty)(l))return null;let f=l.src?l:l.value;if(!f)return null;let b=c.unoptimized||!m.page.mode.isNormal,x=Object.assign(Object.assign(Object.assign({},f),c),{fill:s,priority:d,src:o.updateImageUrl(f.src,a,n),unoptimized:b}),v=Object.assign(Object.assign({},x),{src:o.replaceMediaUrlPrefix(x.src,n)});return(v.fill&&(delete v.width,delete v.height),x)?i.default.createElement(h.default,Object.assign({alt:""},v,r.default.env.TEST?{"data-unoptimized":b}:{})):null},{defaultEmptyFieldEditingComponent:c.DefaultEmptyFieldEditingComponentImage}));f.displayName="NextImage",e.s(["NextImage",0,f],78652)},86629,57886,45360,73953,e=>{"use strict";var r=e.i(91788),t=e.i(82780),a=e.i(91844),l=e.i(28562),n=e.i(42364),s=e.i(57289),o=e.i(34915),i=e.i(78995),d=e.i(80830);let u=({rendering:e,placeholderName:a,children:l,componentRuntime:n})=>{let s=({kind:r,id:a,placeholderName:l})=>{var s;let o=l?"placeholder":"rendering",u={type:"text/sitecore",chrometype:o,className:"scpm",kind:r};if(r===d.MetadataKind.Open){if("placeholder"===o&&l){let r="";for(let n of Object.keys(null!=(s=e.placeholders)?s:{})){if(l===n){r=a?`${l}_${a}`:`${l}_${t.DEFAULT_PLACEHOLDER_UID}`;break}if((0,i.isDynamicPlaceholder)(n)&&(0,i.getDynamicPlaceholderPattern)(n).test(l)){r=a?`${n}_${a}`:`${n}_${t.DEFAULT_PLACEHOLDER_UID}`;break}}u.id=r}else u.id=a;"rendering"===o&&n&&(u["data-csdk-component-runtime"]=n)}return u};return r.default.createElement(r.default.Fragment,null,r.default.createElement("code",Object.assign({},s({kind:d.MetadataKind.Open,id:e.uid,placeholderName:a}))),l,r.default.createElement("code",Object.assign({},s({kind:d.MetadataKind.Close,placeholderName:a}))))};e.s(["PlaceholderMetadata",0,u],57886);let c=e=>{let r=e.rendering,t=e.page.mode.isEditing,l=(0,a.getPlaceholderRenderings)(r,e.name,t),n=!l.length,s=m(e,l);if(n){let r=s;return e.renderEmpty&&(r=e.renderEmpty(s)),t?(0,a.renderEmptyPlaceholder)(r):r}return e.render?e.render(s,l,e):s},m=(e,t)=>{let{name:l,rendering:i,passThroughComponentProps:d,missingComponentComponent:c,hiddenRenderingComponent:m,errorComponent:h,componentLoadingMessage:p,renderEach:g,modifyComponentProps:f,componentMap:b,page:x}=e,v=x.mode.isEditing,y=o.rsc?"server":"client",R=t.map((t,i)=>{let{component:R,isEmpty:N,componentType:E,dynamic:I}=(0,a.getComponentForRendering)(t,l,b,m,c),C=t.uid||`component-${i}`,_=f?f((0,a.getChildComponentProps)(e,t)):(0,a.getChildComponentProps)(e,t),j="client"===E&&o.rsc&&!N?r.default.createElement(s.ClientComponentWrapper,{rendering:_.rendering,componentProps:Object.assign(Object.assign({},_),d),placeholderName:l,key:C}):r.default.createElement(R,Object.assign({key:C},_,d,{page:x,componentMap:b}));if(g&&(j=g(j,i)),!N){let t=j.type+"-"+i;j=r.default.createElement(n.default,{"data-testid":"error-boundary",key:t,errorComponent:h,componentLoadingMessage:p,isDynamic:I,disableSuspense:e.disableSuspense,rendering:j.props.rendering},j)}return v?r.default.createElement(u,{key:C,rendering:t,componentRuntime:y},j):j}).filter(e=>e);return v?[r.default.createElement(u,{key:i.uid,placeholderName:l,rendering:i},R)]:R}
13,h=e=>r.default.createElement(n.default,{errorComponent:e.errorComponent},r.default.createElement(c,Object.assign({},e))),p=e=>{let{page:n,componentMap:s}=(0,l.useSitecore)(),o=!(0,a.getPlaceholderRenderings)(e.rendering,e.name,n.mode.isEditing).length;(0,r.useEffect)(()=>{o&&t.PagesEditor.isActive()&&t.PagesEditor.resetChromes()},[]);let i=Object.assign(Object.assign({},e),{page:n,componentMap:s});return r.default.createElement(h,Object.assign({},i))};e.s(["Placeholder",0,p],45360);let g=(0,r.createContext)({});e.s(["ComponentPropsContext",0,({children:e,value:t})=>r.default.createElement(g.Provider,{value:t},e),"ComponentPropsReactContext",0,g,"useComponentProps",0,function(e){if(e)return(0,r.useContext)(g)[e]}],73953),e.s(["Placeholder",0,e=>{let t=(0,r.useContext)(g);return r.default.createElement(p,Object.assign({},e,{modifyComponentProps:e=>{if(!e.rendering.uid)return e;let r=t[e.rendering.uid];return Object.assign(Object.assign({},e),r)}}))}],86629)},54974,e=>{"use strict";var r=e.i(91788),t=e.i(87334),a=e.i(67875),l=e.i(9305),n=e.i(78995),s=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let o=(0,t.withFieldMetadata)((0,a.withEmptyFieldEditingComponent)(e=>{let t;var{field:a,tag:l,render:o}=e,i=s(e,["field","tag","render"]);return(0,n.isFieldValueEmpty)(a)?null:(delete i.editable,t=o?o(a.value?new Date(a.value):null):a.value,l)?r.default.createElement(l||"span",Object.assign({},i),t):r.default.createElement(r.default.Fragment,null,t)},{defaultEmptyFieldEditingComponent:l.DefaultEmptyFieldEditingComponentText}));o.displayName="Date",e.s(["DateField",0,o])},96523,e=>{"use strict";var r=e.i(43490),t=e.i(91788),a=e.i(67490),l=e.i(87334),n=e.i(67875),s=e.i(9305),o=e.i(78995),i=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let d=(0,l.withFieldMetadata)((0,n.withEmptyFieldEditingComponent)(e=>{var{imageParams:l,field:n,mediaUrlPrefix:s}=e,d=i(e,["imageParams","field","mediaUrlPrefix"]);if((0,o.isFieldValueEmpty)(n))return null;delete d.editable;let u=n.src?n:n.value;if(!u)return null;u.metadata&&delete u.metadata;let c=((e,t,l)=>{var{src:n,srcSet:s}=e,o=i(e,["src","srcSet"]);if(!n)return null;(0,a.addClassName)(o);let d=Object.assign({},o),u=r.mediaApi.updateImageUrl(n,t,l);return s&&(d.srcSet=r.mediaApi.getSrcSet(u,s,t,l)),d.src=u,d})(Object.assign(Object.assign({},u),d),l,s);return c?t.default.createElement("img",Object.assign({},c)):null},{defaultEmptyFieldEditingComponent:s.DefaultEmptyFieldEditingComponentImage}));d.displayName="Image",e.s(["Image",0,d])},91844,70710,67490,36159,55817,42364,57289,34915,e=>{"use strict";var r=e.i(91788),t=e.i(38373),a=e.i(9090),l=e.i(78995);let n="Hidden Rendering";e.s(["HIDDEN_RENDERING_NAME",0,n],70710);let s={backgroundSize:"3px 3px",display:"flex",justifyContent:"center",alignItems:"center",padding:"30px",color:"#aaa"},o={backgroundImage:"linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%)"},i=()=>{let e=Object.assign(Object.assign({},s),o);return r.default.createElement("div",{style:e},"The component is hidden")};var d=e.i(71089);let u=e=>{let r={};return Object.entries(e).reduce((r,[t])=>(r[t]=(0,l.getFieldValue)(e,t),r),r)};e.s(["addClassName",0,e=>{if(e.class){if(e.className){let r=e.className;r+=` ${e.class}`,e.className=r}else e.className=e.class;delete e.class}},"getDataFromFields",0,u],67490);let c=e=>{var t,a,l,n,s,o,i,c,m;let h=(null==(t=e.params)?void 0:t.ComponentRevision)||e.revisionFallback;if(!e.template&&(!e.params||!e.params.LibraryId||!e.params.ComponentId||!e.params.ComponentVersion||!e.params.ComponentHostName||!h))return null;let p=Object.assign(Object.assign({},e.fetchedData),{_:u(null!=(a=e.fields)?a:{})});return r.default.createElement(d.Component,{data:p,template:e.template,cdn:null==(l=e.params)?void 0:l.ComponentHostName,library:null!=(s=null==(n=e.params)?void 0:n.LibraryId)?s:"",version:null==(o=e.params)?void 0:o.ComponentVersion,component:null!=(c=null==(i=e.params)?void 0:i.ComponentId)?c:"",instance:null==(m=e.params)?void 0:m.ComponentInstanceId,revision:h,fetch:[]})},m=e=>{var t,a;let l=`component feaas ${null==(t=e.params)?void 0:t.styles}`.trimEnd(),n=null==(a=e.params)?void 0:a.RenderingIdentifier;return r.default.createElement("div",{className:l,id:n||void 0},r.default.createElement("div",{className:"component-content"},r.default.createElement(c,Object.assign({},e))))};e.s(["FEaaSComponent",0,c,"FEaaSWrapper",0,m],36159);var h=r,p=e.i(70837);e.s(["Component",()=>d.Component,"ComponentProps",()=>d.ComponentProps,"Context",()=>d.Context,"ControlledPromise",()=>d.ControlledPromise,"DEFAULT_CDN_URL",()=>d.DEFAULT_CDN_URL,"DOM",()=>d.DOM,"DataPath",()=>d.DataPath,"DataScope",()=>d.DataScope,"DataSettings",()=>d.DataSettings,"Element",()=>d.Element,"External",()=>d.External,"ExternalComponent",()=>d.ExternalComponent,"ExternalComponentBundle",()=>d.ExternalComponentBundle,"FEAASComponent",()=>d.FEAASComponent,"FEAASComponentsProps",()=>d.FEAASComponentsProps,"FEAASContext",()=>d.FEAASContext,"FEAASContextProps",()=>d.FEAASContextProps,"FEAASEditor",()=>d.FEAASEditor,"FEAASEditorProps",()=>d.FEAASEditorProps,"FEAASElement",()=>d.FEAASElement,"FEAASExternalPropsObject",()=>d.FEAASExternalPropsObject,"FEAASLoader",()=>d.FEAASLoader,"FEAASLoaderProps",()=>d.FEAASLoaderProps,"FEAASPicker",()=>d.FEAASPicker,"FEAASPickerProps",()=>d.FEAASPickerProps,"FEAASReactComponent",()=>d.FEAASReactComponent,"FEAASReactServerComponent",()=>d.FEAASReactServerComponent,"FEAASReactStylesheet",()=>d.FEAASReactStylesheet,"FEAASStylesheet",()=>d.FEAASStylesheet,"FEAASStylesheetProps",()=>d.FEAASStylesheetProps,"HTMLNodeToReact",()=>d.HTMLNodeToReact,"InvalidResponse",()=>d.InvalidResponse,"JSONPath",()=>d.JSONPath,"Loader",()=>d.Loader,"MyComponent",()=>
13d.MyComponent,"NextExternalComponent",()=>d.NextExternalComponent,"Picker",()=>d.Picker,"ReactExternalComponent",()=>d.ReactExternalComponent,"ServerComponent",()=>d.ServerComponent,"Stylesheet",()=>d.Stylesheet,"Thumbnail",()=>d.Thumbnail,"WebComponent",()=>d.WebComponent,"adjustNumbers",()=>d.adjustNumbers,"autoloadScripts",()=>d.autoloadScripts,"cleanCollectionBit",()=>d.cleanCollectionBit,"clearFetchCache",()=>d.clearFetchCache,"createStylesheet",()=>d.createStylesheet,"customizeDataSettings",()=>p.customizeDataSettings,"enableNextClientsideComponents",()=>d.enableNextClientsideComponents,"fetchAndRevalidate",()=>d.fetchAndRevalidate,"fetchAndRevalidateComponent",()=>d.fetchAndRevalidateComponent,"fetchAndRevalidateStylesheet",()=>d.fetchAndRevalidateStylesheet,"fetchBypassingCache",()=>d.fetchBypassingCache,"fetchCache",()=>d.fetchCache,"fetchComponent",()=>d.fetchComponent,"fetchData",()=>d.fetchData,"fetchToValidateCache",()=>d.fetchToValidateCache,"fetchWithCacheAwareness",()=>d.fetchWithCacheAwareness,"findStylesheet",()=>d.findStylesheet,"getComponent",()=>p.getComponent,"getComponentSource",()=>d.getComponentSource,"getComponentURL",()=>d.getComponentURL,"getFetchCache",()=>d.getFetchCache,"getFramePosition",()=>d.getFramePosition,"getHumanizedLabel",()=>d.getHumanizedLabel,"getLastPathBit",()=>d.getLastPathBit,"getQualifier",()=>d.getQualifier,"getStylesheetSource",()=>d.getStylesheetSource,"getStylesheetURL",()=>d.getStylesheetURL,"linkComponents",()=>d.linkComponents,"loadScript",()=>d.loadScript,"loadStylesheet",()=>d.loadStylesheet,"loadStylesheetAllowStale",()=>d.loadStylesheetAllowStale,"normalizeCollectionScope",()=>d.normalizeCollectionScope,"normalizeFetchAttribute",()=>d.normalizeFetchAttribute,"observeDOMElement",()=>d.observeDOMElement,"parseComponentSource",()=>d.parseComponentSource,"parseLimit",()=>d.parseLimit,"parseRange",()=>d.parseRange,"parseStylesheetSource",()=>d.parseStylesheetSource,"queryObject",()=>d.queryObject,"queryObjectRaw",()=>d.queryObjectRaw,"queryScopes",()=>d.queryScopes,"registerComponent",()=>p.registerComponent,"registerDatasource",()=>p.registerDatasource,"renderComponent",()=>d.renderComponent,"renderComponentElement",()=>d.renderComponentElement,"renderComponentPromise",()=>d.renderComponentPromise,"renderDOMContent",()=>d.renderDOMContent,"renderDOMElement",()=>d.renderDOMElement,"renderHTMLContent",()=>d.renderHTMLContent,"renderStylesheet",()=>d.renderStylesheet,"renderStylesheetPromise",()=>d.renderStylesheetPromise,"serializeCH1RichText",()=>d.serializeCH1RichText,"setContextProperties",()=>d.setContextProperties,"setDOMAttribute",()=>d.setDOMAttribute,"setElementImplementation",()=>d.setElementImplementation],25170);let{ExternalComponent:g}=e.i(25170),f=e=>{var r;return h.default.createElement("div",null,"A rendering error occurred: ",null==(r=e.error)?void 0:r.message,".")};class b extends h.default.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){this.setState({error:e})}render(){var e,r,a;let l=this.props;if(this.state.error)return this.props.errorComponent?h.default.createElement(this.props.errorComponent,{error:this.state.error}):h.default.createElement(f,{error:this.state.error});let{ComponentName:n}=l.params||{};if(!n){let e={errorOverride:"BYOC: The ComponentName for this rendering is missing"},r=this.props.missingComponentComponent;return r?h.default.createElement(r,Object.assign({},e)):h.default.createElement(t.MissingComponent,Object.assign({},e))}let s={rendering:{componentName:n},errorOverride:"BYOC: This component was not registered."},o=this.props.missingComponentComponent?h.default.createElement(this.props.missingComponentComponent,Object.assign({},s)):h.default.createElement(t.MissingComponent,Object.assign({},s)),i=this.props.errorComponent,d={};if(null==(e=l.params)?void 0:e.ComponentProps)try{d=null!=(r=JSON.parse(l.params.ComponentProps))?r:{}}catch(e){return console.error(`Parsing props for ${n} component from rendering params failed. Error: ${e}`),i?h.default.createElement(i,{error:e}):h.default.createElement(f,{error:e})}let c=Object.assign(Object.assign({},l.fetchedData),{_:u(null!=(a=l.fields)?a:{})});return h.default.createElement(g,Object.assign({},l.rendering,{componentName:n,clientFallback:o,datasources:c},d))}}let x=e=>{var r,t,a;let l=null==(t=null==(r=e.params)?void 0:r.styles)?void 0:t.trimEnd(),n=null==(a=e.params)?void 0:a.RenderingIdentifier;return h.default.createElement("div",{className:l||void 0,id:n||void 0},h.default.createElement("div",{className:"component-content"},h.default.createElement(b,Object.assign({},e))))};e.s(["BYOCComponent",0,b,"BYOCWrapper",0,x],55817);let v="BYOCWrapper",y=(e,l,s,o,d)=>{var u,h;let p=r=>{console.error(`Placeholder ${l} contains unknown component ${e.componentName}${r?` (${r})`:""}. Ensure that a React component exists for it, and that it is registered in your component-map file.`)};if(e.componentName===n)return{component:null!=o?o:i,isEmpty:!0,componentType:"universal"};
13if(!e.componentName)return{component:()=>r.default.createElement(r.default.Fragment,null),isEmpty:!0,componentType:"universal"};let g=null;if(s&&0!==s.size?g=s.get(e.componentName):console.warn(`No components were available in component map to service request for component ${e}`),!g){if("FEaaSComponent"===e.componentName)return{component:c,isEmpty:!1,componentType:"universal"};if("FEaaSWrapper"===e.componentName)return{component:m,isEmpty:!1,componentType:"universal"};if("BYOCComponent"===e.componentName)return{component:b,isEmpty:!1,componentType:"universal"};else if(e.componentName===v)return{component:x,dynamic:!0,componentType:"universal",isEmpty:!1};return p(),{component:null!=d?d:t.MissingComponent,isEmpty:!0,componentType:"universal"}}let f=null==(u=e.params)?void 0:u.FieldNames,y=f&&f!==a.DEFAULT_EXPORT_NAME?g[f]:g.default||g.Default||g;if(!y)return p(f!==a.DEFAULT_EXPORT_NAME?f:void 0),{component:null!=d?d:t.MissingComponent,isEmpty:!0,componentType:"universal"};let R=!!(null==(h=y.render)?void 0:h.preload)||e.componentName===v;return{component:y,dynamic:R,componentType:g.componentType,isEmpty:!1}};e.s(["getChildComponentProps",0,function(e,r){return{fields:Object.assign(Object.assign({},e.fields||{}),r.fields||{}),params:Object.assign(Object.assign({},Object.assign(Object.assign({},e.params||{}),r.params||{})),(e=>{if(!e.params)return{styles:""};let{GridParameters:r,Styles:t}=e.params;return(r||t)&&{styles:`${r||""} ${t||""}`}})(r)),rendering:r}},"getComponentForRendering",0,y,"getPlaceholderRenderings",0,(e,r,t)=>{let a,n=r.slice();return((null==e?void 0:e.placeholders)&&Object.entries(e.placeholders).forEach(([r,a])=>{let s=(0,l.isDynamicPlaceholder)(r)?(0,l.getDynamicPlaceholderPattern)(r):null;s&&s.test(n)&&(t?n=r:(e.placeholders[n]=a,delete e.placeholders[r]))}),a=e&&e.placeholders&&Object.keys(e.placeholders).length>0?e.placeholders[n]:null)?a:(console.warn(`Placeholder '${n}' was not found in the current rendering data`,JSON.stringify(e,null,2)),[])},"renderEmptyPlaceholder",0,e=>r.default.createElement("div",{className:"sc-jss-empty-placeholder"},e)],91844);var R=r,N=e.i(28562);let E=e=>R.default.createElement("div",{className:"sc-content-sdk-placeholder-error"},e.message?e.message:e.children);class I extends R.default.Component{constructor(e){super(e),this.defaultErrorMessage="There was a problem loading this section.",this.defaultLoadingMessage="Loading component...",this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){var t,a;this.showErrorDetails()&&console.error(`An error occurred in component ${null==(t=this.props.rendering)?void 0:t.componentName} (${null==(a=this.props.rendering)?void 0:a.uid}): `),console.error({error:e,errorInfo:r})}isInDevMode(){return!1}showErrorDetails(){return this.isInDevMode()||this.props.page.mode.isEditing||this.props.page.mode.isPreview}render(){var e,r;if(this.state.error)if(this.props.errorComponent)return R.default.createElement(this.props.errorComponent,{error:this.state.error});else if(this.showErrorDetails())return R.default.createElement("div",null,R.default.createElement(E,null,"A rendering error occurred in component"," ",R.default.createElement("em",null,null==(e=this.props.rendering)?void 0:e.componentName),R.default.createElement("br",null),"Error: ",R.default.createElement("em",null,this.state.error.message||JSON.stringify(this.state.error))));else return R.default.createElement("div",null,R.default.createElement(E,{message:this.defaultErrorMessage}));return null==(r=this.props.disableSuspense)||r||this.props.isDynamic?this.props.children:R.default.createElement(R.Suspense,{fallback:R.default.createElement("h4",null,this.props.componentLoadingMessage||this.defaultLoadingMessage)},this.props.children)}}e.s(["ErrorComponent",0,E,"default",0,e=>{let{page:r}=(0,N.useSitecore)(),t=Object.assign(Object.assign({},e),{page:r});return R.default.createElement(I,Object.assign({},t))}],42364),e.s(["ClientComponentWrapper",0,e=>{let{page:t,componentMap:a}=(0,N.useSitecore)(),l=Object.assign(Object.assign({},e.componentProps),{rendering:e.rendering,componentMap:a,page:t}),{component:n}=y(e.rendering,e.placeholderName,a);return r.default.createElement(n,Object.assign({},l))}],57289),e.s(["rsc",0,!1],34915)},91592,5939,e=>{"use strict";var r=e.i(91788),t=e.i(78995),a=e.i(87334),l=e.i(67875),n=e.i(9305),s=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let o=(0,a.withFieldMetadata)((0,l.withEmptyFieldEditingComponent)(e=>{var{field:a,tag:l,editable:n=!0,encode:o=!0}=e,i=s(e,["field","tag","editable","encode"]);if((0,t.isFieldValueEmpty)(a))return null;let d=void 0===a.value?"":a.value,u=String(d).split("\n");if(u.length){let e=[];u.forEach((t,a)=>{let l=a===u.length-1;e.push(t),l||e.push(r.default.createElement("br",{key:a}))}),d=e}let c=null,m=Object.assign({},i);o?c=d:m.dangerouslySetInnerHTML={__html:d};let h=l||"span";return a.metadata?r.default.createElement(h,Object.assign({},m,{suppressHydrationWarning:!0}),c):l||!o?r.default.createElement(h,Object.assign({},m),c):r.default.createElement(r.default.Fragment,null,c)},{defaultEmptyFieldEditingComponent:n.DefaultEmptyFieldEditingComponentText}));o.displayName="Text",e.s(["Text",0,o],91592);var i=e.i(48888),d=e.i(17837),u=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let c=(0,a.withFieldMetadata)((0,l.withEmptyFieldEditingComponent)(e=>{var{field:a,tag:l="div",ref:n}=e,s=u(e,["field","tag","ref"]);if((0,t.isFieldValueEmpty)(a))return null;delete s.editable;let o=Object.assign({dangerouslySetInnerHTML:{__html:a.value},ref:n,suppressHydrationWarning:!!a.metadata||void 0},s);return r.default.createElement(l||"div",Object.assign({},o))},{defaultEmptyFieldEditingComponent:n.DefaultEmptyFieldEditingComponentText}));c.displayName="RichText";var m=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)0>r.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(t[a[l]]=e[a[l]]);return t};let h={},p=e=>{let{internalLinksSelector:t='a[href^="/"]',prefetchLinks:a=!0,editable:l=!0}=e,n=m(e,["internalLinksSelector","prefetchLinks","editable"]),s=e.field&&e.field.value,o=l&&e.field&&e.field.metadata,{pageRouter:u,appRouter:p}={pageRouter:(0,i.useRouter)(),appRouter:(()=>{try{return(0,d.useRouter)()}catch(e){return null}})()},g=(0,r.useRef)(null);(0,r.useEffect)(()=>{s&&!o&&b()},[s]);let f=e=>{if(!e.currentTarget)return;e.preventDefault();let r=e.currentTarget.href;u?u.push(r,r,{locale:!1}):p&&p.push(r)},b=()=>{let e=g.current,r=e&&e.querySelectorAll(t);
13r&&r.length&&r.forEach(e=>{if("_blank"===e.target)return;let r=()=>{u?u.prefetch(e.pathname,void 0,{locale:!1}):p&&p.prefetch(e.pathname),h[e.pathname]=!0};if(!h[e.pathname]&&!1!==a&&(!0===a&&r(),"hover"===a)){let t=()=>{r(),e.removeEventListener("mouseover",t)};e.addEventListener("mouseover",t,!1)}e.addEventListener("click",f,!1)})};return r.default.createElement(c,Object.assign({ref:g,editable:l},n))};p.displayName="NextRichText",e.s(["RichText",0,p],5939)},4392,e=>{"use strict";var r=e.i(91788),t=e.i(28562);let a=()=>r.default.createElement("div",{className:"sc-jss-editing-error",role:"alert"},"Datasource is required. Please choose a content item for this component.");e.s(["withDatasourceCheck",0,function(e){return function(l){return n=>{var s,o;let{page:i}=(0,t.useSitecore)(),d=null!=(s=null==e?void 0:e.editingErrorComponent)?s:a;return i.mode.isDesignLibrary||(null==(o=n.rendering)?void 0:o.dataSource)?r.default.createElement(l,Object.assign({},n)):i.mode.isEditing?r.default.createElement(d,null):null}}}])},9625,(e,r,t)=>{var a="u">typeof globalThis&&globalThis||"u">typeof self&&self||e.g,l=function(){function e(){this.fetch=!1,this.DOMException=a.DOMException}return e.prototype=a,new e}();(function(r){var t=void 0!==l&&l||"u">typeof self&&self||e.g||{},a={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(a.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var r={next:function(){var r=e.shift();return{done:void 0===r,value:r}}};return a.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(e){this.map={},e instanceof u?e.forEach(function(e,r){this.append(r,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(r){this.append(r,e[r])},this)}function c(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function m(e){return new Promise(function(r,t){e.onload=function(){r(e.result)},e.onerror=function(){t(e.error)}})}function h(e){var r=new FileReader,t=m(r);return r.readAsArrayBuffer(e),t}function p(e){if(e.slice)return e.slice(0);var r=new Uint8Array(e.byteLength);return r.set(new Uint8Array(e)),r.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(a.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(a.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var r;a.arrayBuffer&&a.blob&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=c(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}
13if(a.blob)return this.blob().then(h);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,r,t,a,l,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=m(r=new FileReader),l=(a=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?a[1]:"utf-8",r.readAsText(e,l),t;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var r=new Uint8Array(e),t=Array(r.length),a=0;a<r.length;a++)t[a]=String.fromCharCode(r[a]);return t.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},a.formData&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,r){e=o(e),r=i(r);var t=this.map[e];this.map[e]=t?t+", "+r:r},u.prototype.delete=function(e){delete this.map[o(e)]},u.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},u.prototype.set=function(e,r){this.map[o(e)]=i(r)},u.prototype.forEach=function(e,r){for(var t in this.map)this.map.hasOwnProperty(t)&&e.call(r,this.map[t],t,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(r,t){e.push(t)}),d(e)},u.prototype.values=function(){var e=[];return this.forEach(function(r){e.push(r)}),d(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(r,t){e.push([t,r])}),d(e)},a.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var f=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function b(e,r){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var a,l,n=(r=r||{}).body;if(e instanceof b){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,r.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=r.credentials||this.credentials||"same-origin",(r.headers||!this.headers)&&(this.headers=new u(r.headers)),this.method=(l=(a=r.method||this.method||"GET").toUpperCase(),f.indexOf(l)>-1?l:a),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in t)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function x(e){var r=new FormData;return e.trim().split("&").forEach(function(e){if(e){var t=e.split("="),a=t.shift().replace(/\+/g," "),l=t.join("=").replace(/\+/g," ");r.append(decodeURIComponent(a),decodeURIComponent(l))}}),r}function v(e,r){if(!(this instanceof v))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(r||(r={}),this.type="default",this.status=void 0===r.status?200:r.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===r.statusText?"":""+r.statusText,this.headers=new u(r.headers),this.url=r.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var y=[301,302,303,307,308];v.redirect=function(e,r){if(-1===y.indexOf(r))throw RangeError("Invalid status code");return new v(null,{status:r,headers:{location:e}})},r.DOMException=t.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,r){this.message=e,this.name=r;var t=Error(e);this.stack=t.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function R(e,l){return new Promise(function(n,s){var d=new b(e,l);if(d.signal&&d.signal.aborted)return s(new r.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function m(){c.abort()}if(c.onload=function(){var e,r,t={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",r=new u,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}
13).forEach(function(e){var t=e.split(":"),a=t.shift().trim();if(a){var l=t.join(":").trim();try{r.append(a,l)}catch(e){console.warn("Response "+e.message)}}}),r)};0===d.url.indexOf("file://")&&(c.status<200||c.status>599)?t.status=200:t.status=c.status,t.url="responseURL"in c?c.responseURL:t.headers.get("X-Request-URL");var a="response"in c?c.response:c.responseText;setTimeout(function(){n(new v(a,t))},0)},c.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){s(new r.DOMException("Aborted","AbortError"))},0)},c.open(d.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(r){return e}}(d.url),!0),"include"===d.credentials?c.withCredentials=!0:"omit"===d.credentials&&(c.withCredentials=!1),"responseType"in c&&(a.blob?c.responseType="blob":a.arrayBuffer&&(c.responseType="arraybuffer")),l&&"object"==typeof l.headers&&!(l.headers instanceof u||t.Headers&&l.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(l.headers).forEach(function(e){h.push(o(e)),c.setRequestHeader(e,i(l.headers[e]))}),d.headers.forEach(function(e,r){-1===h.indexOf(r)&&c.setRequestHeader(r,e)})}else d.headers.forEach(function(e,r){c.setRequestHeader(r,e)});d.signal&&(d.signal.addEventListener("abort",m),c.onreadystatechange=function(){4===c.readyState&&d.signal.removeEventListener("abort",m)}),c.send(void 0===d._bodyInit?null:d._bodyInit)})}R.polyfill=!0,t.fetch||(t.fetch=R,t.Headers=u,t.Request=b,t.Response=v),r.Headers=u,r.Request=b,r.Response=v,r.fetch=R,Object.defineProperty(r,"__esModule",{value:!0})})({}),l.fetch.ponyfill=!0,delete l.fetch.polyfill;var n=a.fetch?a:l;(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,r.exports=t},24660,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return n}});let a=e.r(91788),l=e.r(25479);function n(){return(0,a.useContext)(l.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},48888,(e,r,t)=>{r.exports=e.r(24660)},8514,(e,r,t)=>{"use strict";let a,l;Object.defineProperty(t,"__esModule",{value:!0});var n={useDynamicRouteParams:function(){return a},useDynamicSearchParams:function(){return l}};for(var s in n)Object.defineProperty(t,s,{enumerable:!0,get:n[s]});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},63933,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={ServerInsertedHTMLContext:function(){return s},useServerInsertedHTML:function(){return o}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(52456)._(e.r(91788)),s=n.default.createContext(null);function o(e){let r=(0,n.useContext)(s);r&&r(e)}},12098,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={UnrecognizedActionError:function(){return n},unstable_isUnrecognizedActionError:function(){return s}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});class n extends Error{constructor(...e){super(...e),this.name="UnrecognizedActionError"}}function s(e){return!!(e&&"object"==typeof e&&e instanceof n)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},32075,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return n}});let a=e.r(91622),l=`${a.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function n(){let e=Object.defineProperty(Error(l),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,
13configurable:!0});throw e.digest=l,e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},69790,(e,r,t)=>{"use strict";function a(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"forbidden",{enumerable:!0,get:function(){return a}}),e.r(91622).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},4047,(e,r,t)=>{"use strict";function a(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unauthorized",{enumerable:!0,get:function(){return a}}),e.r(91622).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},89490,(e,r,t)=>{"use strict";let a,l,n;Object.defineProperty(t,"__esModule",{value:!0});var s={actionAsyncStorage:function(){return a},workAsyncStorage:function(){return l},workUnitAsyncStorage:function(){return n}};for(var o in s)Object.defineProperty(t,o,{enumerable:!0,get:s[o]});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},53656,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return h},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return c},permanentRedirect:function(){return u},redirect:function(){return d}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(40184),s=e.r(1939),o=e.r(89490);function i(e,r,t=n.RedirectStatusCode.TemporaryRedirect){let a=Object.defineProperty(Error(s.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a.digest=`${s.REDIRECT_ERROR_CODE};${r};${e};${t};`,a}function d(e,r){throw i(e,r??=o.actionAsyncStorage?.getStore()?.isAction?"push":"replace",n.RedirectStatusCode.TemporaryRedirect)}function u(e,r="replace"){throw i(e,r,n.RedirectStatusCode.PermanentRedirect)}function c(e){return(0,s.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function m(e){if(!(0,s.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function h(e){if(!(0,s.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},96132,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return function e(r){if((0,l.isNextRouterError)(r)||(0,a.isBailoutToCSRError)(r))throw r;r instanceof Error&&"cause"in r&&e(r.cause)}}});let a=e.r(14760),l=e.r(68934);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
13dule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},83531,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={ReadonlyURLSearchParams:function(){return n.ReadonlyURLSearchParams},RedirectType:function(){return m},forbidden:function(){return i.forbidden},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect},unauthorized:function(){return d.unauthorized},unstable_isUnrecognizedActionError:function(){return c},unstable_rethrow:function(){return u.unstable_rethrow}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(31430),s=e.r(53656),o=e.r(32075),i=e.r(69790),d=e.r(4047),u=e.r(96132);function c(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let m={push:"push",replace:"replace"};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},29844,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0});var a={ReadonlyURLSearchParams:function(){return o.ReadonlyURLSearchParams},RedirectType:function(){return m.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},forbidden:function(){return m.forbidden},notFound:function(){return m.notFound},permanentRedirect:function(){return m.permanentRedirect},redirect:function(){return m.redirect},unauthorized:function(){return m.unauthorized},unstable_isUnrecognizedActionError:function(){return c.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return m.unstable_rethrow},useParams:function(){return v},usePathname:function(){return b},useRouter:function(){return x},useSearchParams:function(){return f},useSelectedLayoutSegment:function(){return R},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(52456)._(e.r(91788)),s=e.r(1085),o=e.r(70008),i=e.r(77915),d=e.r(8514),u=e.r(63933),c=e.r(12098),m=e.r(83531),{instrumentParamsForClientValidation:h,instrumentSearchParamsForClientValidation:p,expectCompleteParamsInClientValidation:g}={};function f(){d.useDynamicSearchParams?.("useSearchParams()");let e=(0,n.useContext)(o.SearchParamsContext);return(0,n.useMemo)(()=>e?new o.ReadonlyURLSearchParams(e):null,[e])}function b(){return d.useDynamicRouteParams?.("usePathname()"),(0,n.useContext)(o.PathnameContext)}function x(){let e=(0,n.useContext)(s.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});let r=(0,n.useContext)(s.LayoutRouterContext),t=r?.parentCacheNode.bfcacheId??0;return(0,n.useMemo)(()=>({back:e.back,forward:e.forward,refresh:e.refresh,hmrRefresh:e.hmrRefresh,push:e.push,replace:e.replace,prefetch:e.prefetch,experimental_gesturePush:e.experimental_gesturePush,bfcacheId:"_b_"+t+"_"}),[e,t])}function v(){return d.useDynamicRouteParams?.("useParams()"),(0,n.useContext)(o.PathParamsContext)}function y(e="children"){d.useDynamicRouteParams?.("useSelectedLayoutSegments()");let r=(0,n.useContext)(s.LayoutRouterContext);return r?(0,i.getSelectedLayoutSegmentPath)(r.parentTree,e):null}function R(e="children"){d.useDynamicRouteParams?.("useSelectedLayoutSegment()"),(0,n.useContext)(o.NavigationPromisesContext);let r=y(e);return(0,i.computeSelectedLayoutSegment)(r,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},17837,(e,r,t)=>{r.exports=e.r(29844)},54471,(e,r,t)=>{"use strict";function a(e,r,t,a){return!1}e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return a}}),e.r(70090),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
13dule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},49194,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return R}});let a=e.r(41705),l=e.r(52456),n=e.r(91398),s=l._(e.r(91788)),o=a._(e.r(30943)),i=a._(e.r(80963)),d=e.r(66785),u=e.r(15125),c=e.r(13521),m=e.r(25479),h=a._(e.r(3866)),p=e.r(63230),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function f(e,r,t,a,l,n,s){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==r&&l(!0),t?.current){let r=new Event("load");Object.defineProperty(r,"target",{writable:!1,value:e});let a=!1,l=!1;t.current({...r,nativeEvent:r,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>l,persist:()=>{},preventDefault:()=>{a=!0,r.preventDefault()},stopPropagation:()=>{l=!0,r.stopPropagation()}})}a?.current&&a.current(e)}}))}function b(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let x="u"<typeof window?s.useEffect:s.useLayoutEffect,v=(0,s.forwardRef)(({src:e,srcSet:r,sizes:t,height:a,width:l,decoding:o,className:i,style:d,fetchPriority:u,placeholder:c,loading:m,unoptimized:h,fill:g,onLoadRef:v,onLoadingCompleteRef:y,setBlurComplete:R,setShowAltText:N,sizesInput:E,onLoad:I,onError:C,..._},j)=>{let S=(0,s.useRef)(!1),D=(0,s.useRef)(null);x(()=>{let{current:e}=S,{current:r}=D;e||null===r||(C&&(r.src=r.src),r.complete&&f(r,c,v,y,R,h,E),S.current=!0)},[e,c,v,y,C,h,E]);let T=(0,p.useMergedRef)(j,D);return(0,n.jsx)("img",{..._,...b(u),loading:m,width:l,height:a,decoding:o,"data-nimg":g?"fill":"1",className:i,style:d,sizes:t,srcSet:r,src:e,ref:T,onLoad:e=>{f(e.currentTarget,c,v,y,R,h,E)},onError:e=>{N(!0),"empty"!==c&&R(!0),C&&C(e)}})});function y({isAppRouter:e,imgAttributes:r}){let t={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...b(r.fetchPriority)};return e&&o.default.preload?(o.default.preload(r.src,t),null):(0,n.jsx)(i.default,{children:(0,n.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...t},"__nimg-"+r.src+r.srcSet+r.sizes)})}let R=(0,s.forwardRef)((e,r)=>{let t=(0,s.useContext)(m.RouterContext),a=(0,s.useContext)(c.ImageConfigContext),l=(0,s.useMemo)(()=>{let e=g||a||u.imageConfigDefault,r=[...e.deviceSizes,...e.imageSizes].sort((e,r)=>e-r),t=e.deviceSizes.sort((e,r)=>e-r),l=e.qualities?.sort((e,r)=>e-r);return{...e,allSizes:r,deviceSizes:t,qualities:l,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:o,onLoadingComplete:i}=e,p=(0,s.useRef)(o);(0,s.useEffect)(()=>{p.current=o},[o]);let f=(0,s.useRef)(i);(0,s.useEffect)(()=>{f.current=i},[i]);
13let[b,x]=(0,s.useState)(!1),[R,N]=(0,s.useState)(!1),{props:E,meta:I}=(0,d.getImgProps)(e,{defaultLoader:h.default,imgConf:l,blurComplete:b,showAltText:R});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{...E,unoptimized:I.unoptimized,placeholder:I.placeholder,fill:I.fill,onLoadRef:p,onLoadingCompleteRef:f,setBlurComplete:x,setShowAltText:N,sizesInput:e.sizes,ref:r}),I.preload?(0,n.jsx)(y,{isAppRouter:!t,imgAttributes:E}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},88961,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0});var a={default:function(){return u},getImageProps:function(){return d}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(41705),s=e.r(66785),o=e.r(49194),i=n._(e.r(3866));function d(e){let{props:r}=(0,s.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,t]of Object.entries(r))void 0===t&&delete r[e];return{props:r}}let u=o.Image},26019,(e,r,t)=>{r.exports=e.r(88961)},39149,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0});var a={default:function(){return I},useLinkStatus:function(){return E}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let n=e.r(52456),s=e.r(91398),o=n._(e.r(91788)),i=e.r(60472),d=e.r(71112),u=e.r(28169),c=e.r(89129),m=e.r(14862),h=e.r(25479),p=e.r(71914),g=e.r(54471),f=e.r(18726),b=e.r(63230),x=new Set;function v(e,r,t,a){if(!("u"<typeof window)&&(0,d.isLocalURL)(r)){if(!a.bypassPrefetchedCheck){let l=r+"%"+t+"%"+(void 0!==a.locale?a.locale:"locale"in e?e.locale:void 0);if(x.has(l))return;x.add(l)}e.prefetch(r,t,a).catch(e=>{})}}function y(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}let R=o.default.forwardRef(function(e,r){let t,a,{href:l,as:n,children:u,prefetch:x=null,passHref:R,replace:N,shallow:E,scroll:I,locale:C,onClick:_,onNavigate:j,onMouseEnter:S,onTouchStart:D,legacyBehavior:T=!1,transitionTypes:A,...F}=e;t=u,T&&("string"==typeof t||"number"==typeof t)&&(t=(0,s.jsx)("a",{children:t}));let O=o.default.useContext(h.RouterContext),w=!1!==x,{href:L,as:P}=o.default.useMemo(()=>{if(!O){let e=y(l);return{href:e,as:n?y(n):e}}let[e,r]=(0,i.resolveHref)(O,l,!0);return{href:e,as:n?(0,i.resolveHref)(O,n):r||e}},[O,l,n]),k=o.default.useRef(L),M=o.default.useRef(P);T&&(a=o.default.Children.only(t));let V=T?a&&"object"==typeof a&&a.ref:r,[B,Y,U]=(0,p.useIntersection)({rootMargin:"200px"}),z=o.default.useCallback(e=>{(M.current!==P||k.current!==L)&&(U(),M.current=P,k.current=L),B(e)},[P,L,U,B]),Z=(0,b.useMergedRef)(z,V);o.default.useEffect(()=>{!O||Y&&w&&v(O,L,P,{bypassPrefetchedCheck:!1,locale:C})},[P,L,Y,C,w,O?.locale,O]);let q={ref:Z,onClick(e){T||"function"!=typeof _||_(e),T&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),!O||e.defaultPrevented||function(e,r,t,a,l,n,s,o,i){let u,{nodeName:c}=e.currentTarget;if(!("A"===c.toUpperCase()&&((u=e.currentTarget.getAttribute("target"))&&"_self"!==u||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))){if(!(0,d.isLocalURL)(t)){l&&(e.preventDefault(),location.replace(t));return}e.preventDefault(),(()=>{if(i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let e=s??!0;"beforePopState"in r?r[l?"replace":"push"](t,a,{shallow:n,locale:o,scroll:e}):r[l?"replace":"push"](a||t,{scroll:e})})()}}(e,O,L,P,N,E,I,C,j)},onMouseEnter(e){T||"function"!=typeof S||S(e),T&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),O&&v(O,L,P,{locale:C,priority:!0,bypassPrefetchedCheck:!0})},onTouchStart:function(e){T||"function"!=typeof D||D(e),T&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),O&&v(O,L,P,{locale:C,priority:!0,bypassPrefetchedCheck:!0})}};if((0,c.isAbsoluteUrl)(P))q.href=P;else if(!T||R||"a"===a.type&&!("href"in a.props)){let e=void 0!==C?C:O?.locale;q.href=O?.isLocaleDomain&&(0,g.getDomainLocale)(P,e,O?.locales,O?.domainLocales)||
13(0,f.addBasePath)((0,m.addLocale)(P,e,O?.defaultLocale))}return T?o.default.cloneElement(a,q):(0,s.jsx)("a",{...F,...q,children:t})}),N=(0,o.createContext)({pending:!1}),E=()=>(0,o.useContext)(N),I=R;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},41158,(e,r,t)=>{r.exports=e.r(39149)},71914,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return i}});let a=e.r(91788),l=e.r(99604),n="function"==typeof IntersectionObserver,s=new Map,o=[];function i({rootRef:e,rootMargin:r,disabled:t}){let d=t||!n,[u,c]=(0,a.useState)(!1),m=(0,a.useRef)(null),h=(0,a.useCallback)(e=>{m.current=e},[]);return(0,a.useEffect)(()=>{if(n){if(d||u)return;let t=m.current;if(t&&t.tagName)return function(e,r,t){let{id:a,observer:l,elements:n}=function(e){let r,t={root:e.root||null,margin:e.rootMargin||""},a=o.find(e=>e.root===t.root&&e.margin===t.margin);if(a&&(r=s.get(a)))return r;let l=new Map;return r={id:t,observer:new IntersectionObserver(e=>{e.forEach(e=>{let r=l.get(e.target),t=e.isIntersecting||e.intersectionRatio>0;r&&t&&r(t)})},e),elements:l},o.push(t),s.set(t,r),r}(t);return n.set(e,r),l.observe(e),function(){if(n.delete(e),l.unobserve(e),0===n.size){l.disconnect(),s.delete(a);let e=o.findIndex(e=>e.root===a.root&&e.margin===a.margin);e>-1&&o.splice(e,1)}}}(t,e=>e&&c(e),{root:e?.current,rootMargin:r})}else if(!u){let e=(0,l.requestIdleCallback)(()=>c(!0));return()=>(0,l.cancelIdleCallback)(e)}},[d,r,e,u,m.current]),[h,u,(0,a.useCallback)(()=>{c(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},63230,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return l}});let a=e.r(91788);function l(e,r){let t=(0,a.useRef)(null),l=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=t.current;e&&(t.current=null,e());let r=l.current;r&&(l.current=null,r())}else e&&(t.current=n(e,a)),r&&(l.current=n(r,a))},[e,r])}function n(e,r){if("function"!=typeof e)return e.current=r,()=>{e.current=null};{let t=e(r);return"function"==typeof t?t:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},68816,(e,r,t)=>{"use strict";function a(e,r){let t=e||75;return r?.qualities?.length?r.qualities.reduce((e,r)=>Math.abs(r-t)<Math.abs(e-t)?r:e,r.qualities[0]):t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findClosestQuality",{enumerable:!0,get:function(){return a}})},3866,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let a=e.r(68816),l=e.r(20262);function n({config:e,src:r,width:t,quality:s}){let o=(0,l.getDeploymentId)();if(r.startsWith("/")&&!r.startsWith("//"))if(r.includes("/_next/static/immutable")&&!(0,l.getAssetToken)())o=void 0;else{let e=r.indexOf("?");
13if(-1!==e){let t=new URLSearchParams(r.slice(e+1)),a=t.get("dpl");if(a){o=a,t.delete("dpl");let l=t.toString();r=r.slice(0,e)+(l?"?"+l:"")}}}if(r.startsWith("/")&&r.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${r}" is using a query string which is not configured in images.localPatterns. 14Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,a.findClosestQuality)(s,e);return`${e.path}?url=${encodeURIComponent(r)}&w=${t}&q=${i}${r.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let s=n},66785,(e,r,t)=>{"use strict";e.i(50461),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return d}});let a=e.r(20262),l=e.r(13606),n=e.r(15125),s=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function i(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function d({src:e,sizes:r,unoptimized:t=!1,priority:u=!1,preload:c=!1,loading:m,className:h,quality:p,width:g,height:f,fill:b=!1,style:x,overrideSrc:v,onLoad:y,onLoadingComplete:R,placeholder:N="empty",blurDataURL:E,fetchPriority:I,decoding:C="async",layout:_,objectFit:j,objectPosition:S,lazyBoundary:D,lazyRoot:T,...A},F){var O;let w,L,P,{imgConf:k,showAltText:M,blurComplete:V,defaultLoader:B}=F,Y=k||n.imageConfigDefault;if("allSizes"in Y)w=Y;else{let e=[...Y.deviceSizes,...Y.imageSizes].sort((e,r)=>e-r),r=Y.deviceSizes.sort((e,r)=>e-r),t=Y.qualities?.sort((e,r)=>e-r);w={...Y,allSizes:e,deviceSizes:r,qualities:t}}if(void 0===B)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=A.loader||B;delete A.loader,delete A.srcSet;let z="__next_img_default"in U;if(z){if("custom"===w.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. 15Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=r=>{let{config:t,...a}=r;return e(a)}}if(_){"fill"===_&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[_];t&&!r&&(r=t)}let Z="",q=i(g),H=i(f);if((O=e)&&"object"==typeof O&&(o(O)||void 0!==O.src)){let r=o(e)?e.default:e;
15if(!r.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(r)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!r.height||!r.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(r)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(L=r.blurWidth,P=r.blurHeight,E=E||r.blurDataURL,Z=r.src,!b)if(q||H){if(q&&!H){let e=q/r.width;H=Math.round(r.height*e)}else if(!q&&H){let e=H/r.height;q=Math.round(r.width*e)}}else q=r.width,H=r.height}let $=!u&&!c&&("lazy"===m||void 0===m);(!(e="string"==typeof e?e:Z)||e.startsWith("data:")||e.startsWith("blob:"))&&(t=!0,$=!1),w.unoptimized&&(t=!0),z&&!w.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(t=!0);let G=i(p),Q=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:j,objectPosition:S}:{},M?{}:{color:"transparent"},x),W=V||"empty"===N?null:"blur"===N?`url("data:image/svg+xml;charset=utf-8,${(0,l.getImageBlurSvg)({widthInt:q,heightInt:H,blurWidth:L,blurHeight:P,blurDataURL:E||"",objectFit:Q.objectFit})}")`:`url("${N}")`,K=s.includes(Q.objectFit)?"fill"===Q.objectFit?"100% 100%":"cover":Q.objectFit,J=W?{backgroundSize:K,backgroundPosition:Q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},X=function({config:e,src:r,unoptimized:t,width:l,quality:n,sizes:s,loader:o}){if(t){if(r.startsWith("/")&&!r.startsWith("//")){let e=(0,a.getDeploymentId)();if(r.includes("/_next/static/immutable")&&!(0,a.getAssetToken)())e=void 0;else if(e){let t=r.indexOf("?");
15if(-1!==t){let a=new URLSearchParams(r.slice(t+1));a.get("dpl")||(a.append("dpl",e),r=r.slice(0,t)+"?"+a.toString())}else r+=`?dpl=${e}`}}return{src:r,srcSet:void 0,sizes:void 0}}let{widths:i,kind:d}=function({deviceSizes:e,allSizes:r},t,a){if(a){let t=/(^|\s)(1?\d?\d)vw/g,l=[];for(let e;e=t.exec(a);)l.push(parseInt(e[2]));if(l.length){let t=.01*Math.min(...l);return{widths:r.filter(r=>r>=e[0]*t),kind:"w"}}return{widths:r,kind:"w"}}return"number"!=typeof t?{widths:e,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>r.find(r=>r>=e)||r[r.length-1]))],kind:"x"}}(e,l,s),u=i.length-1;return{sizes:s||"w"!==d?s:"100vw",srcSet:i.map((t,a)=>`${o({config:e,src:r,quality:n,width:t})} ${"w"===d?t:a+1}${d}`).join(", "),src:o({config:e,src:r,quality:n,width:i[u]})}}({config:w,src:e,unoptimized:t,width:q,quality:G,sizes:r,loader:U}),ee=$?"lazy":m;return{props:{...A,loading:ee,fetchPriority:I,width:q,height:H,decoding:C,className:h,style:{...Q,...J},sizes:X.sizes,srcSet:X.srcSet,src:v||X.src},meta:{unoptimized:t,preload:c||u,placeholder:N,fill:b}}}},13606,(e,r,t)=>{"use strict";function a({widthInt:e,heightInt:r,blurWidth:t,blurHeight:l,blurDataURL:n,objectFit:s}){let o=t?40*t:e,i=l?40*l:r,d=o&&i?`viewBox='0 0 ${o} ${i}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${d}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${d?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${n}'/%3E%3C/svg%3E`}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},58021,15363,40733,4625,25929,20375,39271,44861,38793,76065,57034,46071,45892,70484,94102,78118,73282,20280,62768,50547,22738,58360,84637,46203,82974,30798,34762,32548,94988,34346,52866,14034,91004,77995,93509,57993,55994,13044,49243,76609,30633,89815,723,91955,15682,94241,17817,6633,32058,58207,36794,34187,e=>{"use strict";let r;e.s([],13044),e.s(["ButtonSitecore",()=>lE,"Default",()=>lI,"Primary",()=>lC,"PrimarySmall",()=>l_,"Secondary",()=>lj,"SecondarySmall",()=>lS,"Tertiary",()=>lD,"TertiaryWhite",()=>lT,"default",()=>lA],55994);var t,a,l,n,s,o,i,d=e.i(91788),u=e=>e instanceof Date,c=e=>null==e,m=e=>!c(e)&&!Array.isArray(e)&&"object"==typeof e&&!u(e),h=e=>m(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,p=(e,r)=>r.split(".").some((r,t,a)=>!isNaN(Number(r))&&e.has(a.slice(0,t).join("."))),g="u">typeof window&&void 0!==window.HTMLElement&&"u">typeof document;function f(e){let r;if(e instanceof Date)return new Date(e);let t="u">typeof FileList&&e instanceof FileList;if(g&&(e instanceof Blob||t))return e;let a=Array.isArray(e);if(!a&&!(m(e)&&m(r=e.constructor&&e.constructor.prototype)&&r.hasOwnProperty("isPrototypeOf")))return e;let l=a?[]:Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(l[r]=f(e[r]));return l}var b=e=>void 0===e,x=e=>Array.isArray(e)?e.filter(Boolean):[],v=e=>x(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!m(e))return t;let a=(/^\w*$/.test(r)?[r]:v(r)).reduce((e,r)=>c(e)?void 0:e[r],e);return b(a)||a===e?b(e[r])?t:e[r]:a},R=e=>"function"==typeof e,N=(e,r,t)=>{let a=-1,l=/^\w*$/.test(r)?[r]:v(r),n=l.length,s=n-1;for(;++a<n;){let r=l[a],n=t;if(a!==s){let t=e[r];n=m(t)||Array.isArray(t)?t:isNaN(+l[a+1])?{}:[]}if("__proto__"===r||"constructor"===r||"prototype"===r)return;e[r]=n,e=e[r]}};let E="blur",I="trigger",C="onChange",_="onSubmit",j="maxLength",S="minLength",D="pattern",T="required",A="validate",F="form",O="root",w=d.default.createContext(null);w.displayName="HookFormControlContext";var L=(e,r,t,a=!0)=>{let l={};for(let n in e)Object.defineProperty(l,n,{get:()=>("all"!==r._proxyFormState[n]&&(r._proxyFormState[n]=!a||"all"),t&&(t[n]=!0),e[n])});return l};let P="u">typeof window?d.default.useLayoutEffect:d.default.useEffect;function k(e){let r=d.default.useContext(w),{control:t=r,disabled:a,name:l,exact:n}=e||{},[s,o]=d.default.useState(()=>({...t._formState,defaultValues:t._defaultValues})),i=d.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return P(()=>t._subscribe({name:l,formState:i.current,exact:n,callback:e=>{a||o({...t._formState,...e,defaultValues:t._defaultValues})}}),[l,a,n]),d.default.useEffect(()=>{i.current.isValid&&t._setValid(!0)},[t]),d.default.useMemo(()=>L(s,t,i.current,!1),[s,t])}var M=e=>"string"==typeof e,V=(e,r,t,a,l)=>M(e)?(a&&r.watch.add(e),y(t,e,l)):Array.isArray(e)?e.map(e=>(a&&r.watch.add(e),y(t,e))):(a&&(r.watchAll=!0),t),B=e=>c(e)||"object"!=typeof e;function Y(e,r,t=new WeakSet){if(e===r)return!0;
15if(B(e)||B(r))return Object.is(e,r);if(u(e)&&u(r))return Object.is(e.getTime(),r.getTime());let a=Object.keys(e),l=Object.keys(r);if(a.length!==l.length)return!1;if(t.has(e)||t.has(r))return!0;for(let l of(t.add(e),t.add(r),a)){let a=e[l];if(!(l in r))return!1;if("ref"!==l){let e=r[l];if(u(a)&&u(e)||(m(a)||Array.isArray(a))&&(m(e)||Array.isArray(e))?!Y(a,e,t):!Object.is(a,e))return!1}}return!0}function U(e){let r=d.default.useContext(w),{control:t=r,name:a,defaultValue:l,disabled:n,exact:s,compute:o}=e||{},i=d.default.useRef(l),u=d.default.useRef(o),c=d.default.useRef(void 0),m=d.default.useRef(t),h=d.default.useRef(a);u.current=o;let[p,g]=d.default.useState(()=>{let e=t._getWatch(a,i.current);return u.current?u.current(e):e}),f=d.default.useCallback(e=>{let r=V(a,t._names,e||t._formValues,!1,i.current);return u.current?u.current(r):r},[t._formValues,t._names,a]),b=d.default.useCallback(e=>{if(!n){let r=V(a,t._names,e||t._formValues,!1,i.current);if(u.current){let e=u.current(r);Y(e,c.current)||(g(e),c.current=e)}else g(r)}},[t._formValues,t._names,n,a]);P(()=>(m.current===t&&Y(h.current,a)||(m.current=t,h.current=a,b()),t._subscribe({name:a,formState:{values:!0},exact:s,callback:e=>{b(e.values)}})),[t,s,a,b]),d.default.useEffect(()=>t._removeUnmounted());let x=m.current!==t,v=h.current,y=d.default.useMemo(()=>{if(n)return null;let e=!x&&!Y(v,a);return x||e?f():null},[n,x,a,v,f]);return null!==y?y:p}let z=e=>e.render(function(e){let r=d.default.useContext(w),{name:t,disabled:a,control:l=r,shouldUnregister:n,defaultValue:s,exact:o=!0}=e,i=p(l._names.array,t),u=d.default.useMemo(()=>y(l._formValues,t,y(l._defaultValues,t,s)),[l,t,s]),c=U({control:l,name:t,defaultValue:u,exact:o}),m=k({control:l,name:t,exact:o}),g=d.default.useRef(e),x=d.default.useRef(l.register(t,{...e.rules,value:c,..."boolean"==typeof e.disabled?{disabled:e.disabled}:{}}));g.current=e;let v=d.default.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),I=d.default.useCallback(e=>x.current.onChange({target:{value:h(e),name:t},type:"change"}),[t]),C=d.default.useCallback(()=>x.current.onBlur({target:{value:y(l._formValues,t),name:t},type:E}),[t,l._formValues]),_=d.default.useCallback(e=>{let r=y(l._fields,t);r&&r._f&&e&&(r._f.ref={focus:()=>R(e.focus)&&e.focus(),select:()=>R(e.select)&&e.select(),setCustomValidity:r=>R(e.setCustomValidity)&&e.setCustomValidity(r),reportValidity:()=>R(e.reportValidity)&&e.reportValidity()})},[l._fields,t]),j=d.default.useMemo(()=>({name:t,value:c,..."boolean"==typeof a||m.disabled?{disabled:m.disabled||a}:{},onChange:I,onBlur:C,ref:_}),[t,a,m.disabled,I,C,_,c]);return d.default.useEffect(()=>{let e=l._options.shouldUnregister||n;l.register(t,{...g.current.rules,..."boolean"==typeof g.current.disabled?{disabled:g.current.disabled}:{}});let r=(e,r)=>{let t=y(l._fields,e);t&&t._f&&(t._f.mount=r)};if(r(t,!0),e){let e=f(y(l._options.defaultValues,t,g.current.defaultValue));N(l._defaultValues,t,e),b(y(l._formValues,t))&&N(l._formValues,t,e)}return i||l.register(t),()=>{(i?e&&!l._state.action:e)?l.unregister(t):r(t,!1)}},[t,l,i,n]),d.default.useEffect(()=>{l._setDisabledField({disabled:a,name:t})},[a,t,l]),d.default.useMemo(()=>({field:j,formState:m,fieldState:v}),[j,m,v])}(e)),Z=d.default.createContext(null);Z.displayName="HookFormContext";let q=()=>d.default.useContext(Z);var H=(e,r,t,a,l)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[a]:l||!0}}:{},$=e=>Array.isArray(e)?e:[e],G=()=>{let e=[];return{get observers(){return e},next:r=>{for(let t of e)t.next&&t.next(r)},subscribe:r=>(e.push(r),{unsubscribe:()=>{e=e.filter(e=>e!==r)}}),unsubscribe:()=>{e=[]}}},Q=e=>m(e)&&!Object.keys(e).length,W=e=>{if(!g)return!1;let r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},K=e=>W(e)&&e.isConnected;function J(e,r){if(M(r)&&Object.prototype.hasOwnProperty.call(e,r))return delete e[r],e;let t=Array.isArray(r)?r:/^\w*$/.test(r)?[r]:v(r),a=1===t.length?e:function(e,r){let t=r.slice(0,-1).length,a=0;for(;a<t;){if(c(e)){e=void 0;break}e=e[r[a]],a++}return e}(e,t),l=t.length-1,n=t[l];return a&&delete a[n],0!==l&&(m(a)&&Q(a)||Array.isArray(a)&&function(e){for(let r in e)if(e.hasOwnProperty(r)&&!b(e[r]))return!1;return!0}(a))&&J(e,t.slice(0,-1)),e}function X(e){return Array.isArray(e)||m(e)&&!(e=>{for(let r in e)if(R(e[r]))return!0;return!1})(e)}function ee(e,r={}){for(let t in e){let a=e[t];X(a)?(r[t]=Array.isArray(a)?[]:{},ee(a,r[t])):b(a)||(r[t]=!0)}return r}function er(e,r,t){for(let a in t||(t=ee(r)),e){let l=e[a];if(X(l))b(r)||B(t[a])?t[a]=ee(l,Array.isArray(l)?[]:{}):er(l,c(r)?{}:r[a],t[a]);else{let e=r[a];t[a]=!Y(l,e)}}return function e(r){if(!1!==r){if(!0===r)return!0;
15if(Array.isArray(r)){let t=r.map(r=>e(r));return t.some(e=>void 0!==e)?t:void 0}if(m(r)){let t={};for(let a in r){let l=e(r[a]);b(l)||(t[a]=l)}return Object.keys(t).length?t:void 0}}}(t)||{}}let et={value:!1,isValid:!1},ea={value:!0,isValid:!0};var el=e=>{if(Array.isArray(e)){if(e.length>1){let r=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!b(e[0].attributes.value)?b(e[0].value)||""===e[0].value?ea:{value:e[0].value,isValid:!0}:ea:et}return et},en=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:a})=>b(e)?e:r?""===e?NaN:e?+e:e:t&&M(e)?new Date(e):a?a(e):e;let es={isValid:!1,value:null};var eo=e=>Array.isArray(e)?e.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,es):es;function ei(e){let r=e.ref;return"file"===r.type?r.files:"radio"===r.type?eo(e.refs).value:"select-multiple"===r.type?[...r.selectedOptions].map(({value:e})=>e):"checkbox"===r.type?el(e.refs).value:en(b(r.value)?e.ref.value:r.value,e)}var ed=e=>b(e)?e:e instanceof RegExp?e.source:m(e)?e.value instanceof RegExp?e.value.source:e.value:e,eu=e=>({isOnSubmit:!e||e===_,isOnBlur:"onBlur"===e,isOnChange:e===C,isOnAll:"all"===e,isOnTouch:"onTouched"===e});let ec="AsyncFunction";var em=e=>!!e&&!!e.validate&&!!(R(e.validate)&&e.validate.constructor.name===ec||m(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ec)),eh=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));let ep=(e,r,t,a)=>{for(let l of t||Object.keys(e)){let t=y(e,l);if(t){let{_f:e,...n}=t;if(e){if(e.refs&&e.refs[0]&&r(e.refs[0],l)&&!a)return!0;else if(e.ref&&r(e.ref,e.name)&&!a)return!0;else if(ep(n,r))break}else if(m(n)&&ep(n,r))break}}};function eg(e,r,t){let a=y(e,t);if(a||/^\w*$/.test(t))return{error:a,name:t};let l=t.split(".");for(;l.length;){let a=l.join("."),n=y(r,a),s=y(e,a);if(n&&!Array.isArray(n)&&t!==a)break;if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};l.pop()}return{name:t}}var ef=(e,r,t)=>{let a=$(y(e,t));return N(a,O,r[t]),N(e,t,a),e};function eb(e,r,t="validate"){if(M(e)||Array.isArray(e)&&e.every(M)||"boolean"==typeof e&&!e)return{type:t,message:M(e)?e:"",ref:r}}var ex=e=>!m(e)||e instanceof RegExp?{value:e,message:""}:e,ev=async(e,r,t,a,l,n)=>{let{ref:s,refs:o,required:i,maxLength:d,minLength:u,min:h,max:p,pattern:g,validate:f,name:x,valueAsNumber:v,mount:N}=e._f,E=y(t,x);if(!N||r.has(x))return{};let I=o?o[0]:s,C=e=>{l&&I.reportValidity&&(I.setCustomValidity("boolean"==typeof e?"":e||""),I.reportValidity())},_={},F="radio"===s.type,O="checkbox"===s.type,w=(v||"file"===s.type)&&b(s.value)&&b(E)||W(s)&&""===s.value||""===E||Array.isArray(E)&&!E.length||v&&"number"==typeof E&&isNaN(E),L=H.bind(null,x,a,_),P=(e,r,t,a=j,l=S)=>{let n=e?r:t;_[x]={type:e?a:l,message:n,ref:s,...L(e?a:l,n)}};if(n?!Array.isArray(E)||!E.length:i&&(!(F||O)&&(w||c(E))||"boolean"==typeof E&&!E||O&&!el(o).isValid||F&&!eo(o).isValid)){let{value:e,message:r}=M(i)?{value:!!i,message:i}:ex(i);if(e&&(_[x]={type:T,message:r,ref:I,...L(T,r)},!a))return C(r),_}if(!w&&(!c(h)||!c(p))){let e,r,t=ex(p),l=ex(h);if(c(E)||isNaN(E)){let a=s.valueAsDate||new Date(E),n=e=>new Date(new Date().toDateString()+" "+e),o="time"==s.type,i="week"==s.type;M(t.value)&&E&&(e=o?n(E)>n(t.value):i?E>t.value:a>new Date(t.value)),M(l.value)&&E&&(r=o?n(E)<n(l.value):i?E<l.value:a<new Date(l.value))}else{let a=s.valueAsNumber||(E?+E:E);c(t.value)||(e=a>t.value),c(l.value)||(r=a<l.value)}if((e||r)&&(P(!!e,t.message,l.message,"max","min"),!a))return C(_[x].message),_}if((d||u)&&!w&&(M(E)||n&&Array.isArray(E))){let e=ex(d),r=ex(u),t=!c(e.value)&&E.length>+e.value,l=!c(r.value)&&E.length<+r.value;if((t||l)&&(P(t,e.message,r.message),!a))return C(_[x].message),_}if(g&&!w&&M(E)){let{value:e,message:r}=ex(g);if(e instanceof RegExp&&!E.match(e)&&(_[x]={type:D,message:r,ref:s,...L(D,r)},!a))return C(r),_}if(f){if(R(f)){let e=eb(await f(E,t),I);if(e&&(_[x]={...e,...L(A,e.message)},!a))return C(e.message),_}else if(m(f)){let e={};for(let r in f){if(!Q(e)&&!a)break;let l=eb(await f[r](E,t),I,r);l&&(e={...l,...L(r,l.message)},C(l.message),a&&(_[x]=e))}if(!Q(e)&&(_[x]={ref:I,...e},!a))return _}}return C(!0),_};let ey={mode:_,reValidateMode:C,shouldFocusError:!0},eR={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};e.s(["Controller",0,z,"FormProvider",0,e=>{let{children:r,watch:t,getValues:a,getFieldState:l,setError:n,clearErrors:s,setValue:o,setValues:i,trigger:u,formState:c,resetField:m,reset:h,handleSubmit:p,unregister:g,control:f,register:b,setFocus:x,subscribe:v}=e,y=d.default.useMemo(()=>({watch:t,getValues:a,getFieldState:l,setError:n,clearErrors:s,setValue:o,setValues:i,trigger:u,formState:c,resetField:m,reset:h,handleSubmit:p,unregister:g,control:f,register:b,setFocus:x,subscribe:v}),[s,f,c,l,a,p,b,h,m,n,x,o,i,v,u,g,t]);return d.default.createElement(Z.Provider,{value:y},d.default.createElement(w.Provider,{value:y.control},r))},"appendErrors",0,H,"get",0,y,"set",0,N,"useForm",0,function(e={}){let r=d.default.useRef(void 0),t=d.default.useRef(void 0),[a,l]=d.default.useState(()=>({...f(eR),isLoading:R(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:R(e.defaultValues)?void 0:e.defaultValues}));if(!r.current)if(e.formControl)r.current={...e.formControl,formState:a},e.defaultValues&&!R(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:t,...l}=function(e={}){let r,t={...ey,...e},a={...f(eR),isLoading:R(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},l={},n=(m(t.defaultValues)||m(t.values))&&f(t.defaultValues||t.values)||{},s=t.shouldUnregister?{}:f(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},d=0,v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},C={...v},_={...C},j={array:G(),state:G()},S="all"===t.criteriaMode,D=async e=>{if(!o.keepIsValid&&!t.disabled&&(C.isValid||_.isValid||e)){let e;t.resolver?(e=Q((await k()).errors),T()):e=await z({fields:l,onlyCheckValid:!0,eventType:"valid"}),e!==a.isValid&&j.state.next({isValid:e})}},T=(e,r)=>{!t.disabled&&(C.isValidating||C.validatingFields||_.isValidating||_.validatingFields)&&((e||Array.from(i.mount)).forEac
15h(e=>{e&&(r?N(a.validatingFields,e,r):J(a.validatingFields,e))}),j.state.next({validatingFields:a.validatingFields,isValidating:!Q(a.validatingFields)}))},w=()=>{a.dirtyFields=er(n,s)},L=(e,r,t,i)=>{let d=y(l,e);if(d){let l=b(y(s,e)),u=y(s,e,b(t)?y(n,e):t);b(u)||i&&i.defaultChecked||r?N(s,e,r?u:ei(d._f)):H(e,u),o.mount&&!o.action&&(D(),l&&a.isDirty&&(C.isDirty||_.isDirty)&&(Z()||(a.isDirty=!1,j.state.next({...a}))))}},P=(e,r,l,s,o)=>{let i=!1,d=!1,u={name:e};if(!t.disabled){if(!l||s){(C.isDirty||_.isDirty)&&(d=a.isDirty,a.isDirty=u.isDirty=Z(),i=d!==u.isDirty);let t=Y(y(n,e),r);d=!!y(a.dirtyFields,e),t?J(a.dirtyFields,e):N(a.dirtyFields,e,!0),u.dirtyFields=a.dirtyFields,i=i||(C.dirtyFields||_.dirtyFields)&&!t!==d}if(l){let r=y(a.touchedFields,e);r||(N(a.touchedFields,e,l),u.touchedFields=a.touchedFields,i=i||(C.touchedFields||_.touchedFields)&&r!==l)}i&&o&&j.state.next(u)}return i?u:{}},k=async e=>(T(e,!0),await t.resolver(s,t.context,((e,r,t,a)=>{let l={};for(let t of e){let e=y(r,t);e&&N(l,t,e._f)}return{criteriaMode:t,names:[...e],fields:l,shouldUseNativeValidation:a}})(e||i.mount,l,t.criteriaMode,t.shouldUseNativeValidation))),B=async e=>{let{errors:r}=await k(e);if(T(e),e)for(let t of e){let e=y(r,t);e?N(a.errors,t,e):J(a.errors,t)}else a.errors=r;return r},U=async({name:r,eventType:t})=>{if(e.validate){let l=await e.validate({formValues:s,formState:a,name:r,eventType:t});if(m(l))for(let e in l)l[e]&&eb(`${F}.${e}`,{message:M(l.message)?l.message:"",type:A});else M(l)||!l?eb(F,{message:l||"",type:A}):ec(F);return l}return!0},z=async({fields:r,onlyCheckValid:l,name:n,eventType:o,context:d={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(d.runRootValidation=!0,!await U({name:n,eventType:o}))&&(d.valid=!1,l))return d.valid;for(let n in r){let u=r[n];if(u){let{_f:r,...c}=u;if(r){let n=i.array.has(r.name),o=u._f&&em(u._f);o&&C.validatingFields&&T([r.name],!0);let c=await ev(u,i.disabled,s,S,t.shouldUseNativeValidation&&!l,n);if(o&&C.validatingFields&&T([r.name]),c[r.name]&&(d.valid=!1,l)||(l||(y(c,r.name)?n?ef(a.errors,c,r.name):N(a.errors,r.name,c[r.name]):J(a.errors,r.name)),e.shouldUseNativeValidation&&c[r.name]))break}Q(c)||await z({context:d,onlyCheckValid:l,fields:c,name:n,eventType:o})}}return d.valid},Z=(e,r)=>!t.disabled&&(e&&r&&N(s,e,r),!Y(es(),n)),q=(e,r,t)=>V(e,i,{...o.mount?s:b(r)?n:M(e)?{[e]:r}:r},t,r),H=(e,r,t={})=>{let a=y(l,e),n=r;if(a){let t=a._f;t&&(t.disabled||N(s,e,en(r,t)),n=W(t.ref)&&c(r)?"":r,"select-multiple"===t.ref.type?[...t.ref.options].forEach(e=>e.selected=n.includes(e.value)):t.refs?"checkbox"===t.ref.type?t.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(n)?e.checked=!!n.find(r=>r===e.value):e.checked=n===e.value||!!n)}):t.refs.forEach(e=>e.checked=e.value===n):"file"===t.ref.type?t.ref.value="":(t.ref.value=n,t.ref.type||j.state.next({name:e,values:f(s)})))}(t.shouldDirty||t.shouldTouch)&&P(e,n,t.shouldTouch,t.shouldDirty,!0),t.shouldValidate&&el(e)},X=(e,r,t)=>{for(let a in r){if(!r.hasOwnProperty(a))return;let n=r[a],s=e+"."+a,o=y(l,s);(i.array.has(e)||m(n)||o&&!o._f)&&!u(n)?X(s,n,t):H(s,n,t)}},ee=(e,r,t={})=>{let n=y(l,e),d=i.array.has(e),u=f(r),m=Y(y(s,e),u);if(N(s,e,u),d)j.array.next({name:e,values:f(s)}),(C.isDirty||C.dirtyFields||_.isDirty||_.dirtyFields)&&t.shouldDirty&&(w(),j.state.next({name:e,dirtyFields:a.dirtyFields,isDirty:Z(e,u)}));else{let r=Array.isArray(u)&&!u.length||Q(u);!n||n._f||c(u)||r?H(e,u,t):X(e,u,t)}if(!m){let r=eh(e,i);j.state.next({...r&&a,name:o.mount||r?e:void 0,values:f(s)})}},et=async n=>{o.mount=!0;let c=n.target,m=c.name,p=!0,g=y(l,m),b=e=>{p=Number.isNaN(e)||u(e)&&isNaN(e.getTime())||Y(e,y(s,m,e))},x=eu(t.mode),v=eu(t.reValidateMode);if(g){var R,I,A,F,O;let o,u,V,B=c.type?ei(g._f):h(n),Z=n.type===E||"focusout"===n.type,q=!((V=g._f).mount&&(V.required||V.min||V.max||V.maxLength||V.minLength||V.pattern||V.validate))&&!e.validate&&!t.resolver&&!y(a.errors,m)&&!g._f.deps||(R=Z,I=y(a.touchedFields,m),A=a.isSubmitted,F=v,!(O=x).isOnAll&&(!A&&O.isOnTouch?!(I||R):(A?F.isOnBlur:O.isOnBlur)?!R:(A?!F.isOnChange:!O.isOnChange)||R)),H=eh(m,i,Z);N(s,m,B),Z?c&&c.readOnly||(g._f.onBlur&&g._f.onBlur(n),r&&r(0)):g._f.onChange&&g._f.onChange(n);let $=P(m,B,Z),G=!Q($)||H;if(Z||j.state.next({name:m,type:n.type,values:f(s)}),q)return(C.isValid||_.isValid)&&("onBlur"===t.mode?Z&&D():Z||D()),G&&j.state.next({name:m,...H?{}:$});if(!t.resolver&&e.validate&&await U({name:m,eventType:n.type}),!Z&&H&&j.state.next({...a}),t.resolver){let{errors:e}=await k([m]);if(T([m]),b(B),p){let r=eg(a.errors,l,m),t=eg(e,l,r.name||m);o=t.error,m=t.name,u=Q(e)}}
15else T([m],!0),o=(await ev(g,i.disabled,s,S,t.shouldUseNativeValidation))[m],T([m]),b(B),p&&(o?u=!1:(C.isValid||_.isValid)&&(u=await z({fields:l,onlyCheckValid:!0,name:m,eventType:n.type})));if(p){g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&el(g._f.deps);var w=m,L=u,M=o;let e=y(a.errors,w),l=(C.isValid||_.isValid)&&"boolean"==typeof L&&a.isValid!==L;if(t.delayError&&M){let e;e=()=>{N(a.errors,w,M),j.state.next({errors:a.errors})},(r=r=>{clearTimeout(d),d=setTimeout(e,r)})(t.delayError)}else clearTimeout(d),r=null,M?N(a.errors,w,M):J(a.errors,w);if((M?!Y(e,M):e)||!Q($)||l){let e={...$,...l&&"boolean"==typeof L?{isValid:L}:{},errors:a.errors,name:w};a={...a,...e},j.state.next(e)}}}},ea=(e,r)=>{if(y(a.errors,r)&&e.focus)return e.focus(),1},el=async(e,r={})=>{let n,s,o=$(e);if(t.resolver){let r=await B(b(e)?e:o);n=Q(r),s=e?!o.some(e=>y(r,e)):n}else e?((s=(await Promise.all(o.map(async e=>{let r=y(l,e);return await z({fields:r&&r._f?{[e]:r}:r,eventType:I})}))).every(Boolean))||a.isValid)&&D():s=n=await z({fields:l,name:e,eventType:I});return j.state.next({...!M(e)||(C.isValid||_.isValid)&&n!==a.isValid?{}:{name:e},...t.resolver||!e?{isValid:n}:{},errors:a.errors}),r.shouldFocus&&!s&&ep(l,ea,e?o:i.mount),s},es=(e,r)=>{let t={...o.mount?s:n};return r&&(t=function e(r,t){let a={};for(let l in r)if(r.hasOwnProperty(l)){let n=r[l],s=t[l];if(n&&m(n)&&s){let r=e(n,s);m(r)&&(a[l]=r)}else r[l]&&(a[l]=s)}return a}(r.dirtyFields?a.dirtyFields:a.touchedFields,t)),b(e)?t:M(e)?y(t,e):e.map(e=>y(t,e))},eo=(e,r)=>({invalid:!!y((r||a).errors,e),isDirty:!!y((r||a).dirtyFields,e),error:y((r||a).errors,e),isValidating:!!y(a.validatingFields,e),isTouched:!!y((r||a).touchedFields,e)}),ec=e=>{let r=e?$(e):void 0;null==r||r.forEach(e=>J(a.errors,e)),r?r.forEach(e=>{j.state.next({name:e,errors:a.errors})}):j.state.next({errors:{}})},eb=(e,r,t)=>{let n=(y(l,e,{_f:{}})._f||{}).ref,{ref:s,message:o,type:i,...d}=y(a.errors,e)||{};N(a.errors,e,{...d,...r,ref:n}),j.state.next({name:e,errors:a.errors,isValid:!1}),t&&t.shouldFocus&&n&&n.focus&&n.focus()},ex=e=>j.state.subscribe({next:r=>{let t,l,o;if(t=e.name,l=r.name,o=e.exact,(!t||!l||t===l||$(t).some(e=>e&&(o?e===l:e.startsWith(l)||l.startsWith(e))))&&((e,r,t,a)=>{t(e);let{name:l,...n}=e;return Q(n)||a&&Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(e=>r[e]===(!a||"all"))})(r,e.formState||C,eD,e.reRenderRoot)){let t={...s};e.callback({values:t,...a,...r,defaultValues:n})}}}).unsubscribe,eN=(e,r={})=>{for(let o of e?$(e):i.mount)i.mount.delete(o),i.array.delete(o),r.keepValue||(J(l,o),J(s,o)),r.keepError||J(a.errors,o),r.keepDirty||J(a.dirtyFields,o),r.keepTouched||J(a.touchedFields,o),r.keepIsValidating||J(a.validatingFields,o),t.shouldUnregister||r.keepDefaultValue||J(n,o);j.state.next({values:f(s)}),j.state.next({...a,...!r.keepDirty?{}:{isDirty:Z()}}),r.keepIsValid||D()},eE=({disabled:e,name:r})=>{if("boolean"==typeof e&&o.mount||e||i.disabled.has(r)){let t=i.disabled.has(r);e?i.disabled.add(r):i.disabled.delete(r),!!e!==t&&o.mount&&!o.action&&D()}},eI=(e,r={})=>{let a=y(l,e),s="boolean"==typeof r.disabled||"boolean"==typeof t.disabled,d=!i.registerName.has(e)&&a&&a._f&&!a._f.mount;return(N(l,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...r}}),i.mount.add(e),a&&!d)?eE({disabled:"boolean"==typeof r.disabled?r.disabled:t.disabled,name:e}):L(e,!0,r.value),{...s?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:ed(r.min),max:ed(r.max),minLength:ed(r.minLength),maxLength:ed(r.maxLength),pattern:ed(r.pattern)}:{},name:e,onChange:et,onBlur:et,ref:s=>{if(s){let t;i.registerName.add(e),eI(e,r),i.registerName.delete(e),a=y(l,e);let o=b(s.value)&&s.querySelectorAll&&s.querySelectorAll("input,select,textarea")[0]||s,d="radio"===(t=o).type||"checkbox"===t.type,u=a._f.refs||[];(d?u.find(e=>e===o):o===a._f.ref)||(N(l,e,{_f:{...a._f,...d?{refs:[...u.filter(K),o,...Array.isArray(y(n,e))?[{}]:[]],ref:{type:o.type,name:e}}:{ref:o}}}),L(e,!1,void 0,o))}else(a=y(l,e,{}))._f&&(a._f.mount=!1),(t.shouldUnregister||r.shouldUnregister)&&!(p(i.array,e)&&o.action)&&i.unMount.add(e)}}},eC=()=>
15t.shouldFocusError&&ep(l,ea,i.mount),e_=(e,r)=>async n=>{let o;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let d=f(s);if(j.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:r}=await k();T(),a.errors=e,d=f(r)}else await z({fields:l,eventType:"submit"});if(i.disabled.size)for(let e of i.disabled)J(d,e);if(J(a.errors,O),Q(a.errors)){j.state.next({errors:{}});try{await e(d,n)}catch(e){o=e}}else r&&await r({...a.errors},n),eC(),setTimeout(eC);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Q(a.errors)&&!o,submitCount:a.submitCount+1,errors:a.errors}),o)throw o},ej=(e,r={})=>{let d=e?f(e):n,u=f(d),c=Q(e),m=c?n:u;if(r.keepDefaultValues||(n=d),!r.keepValues){if(r.keepDirtyValues)for(let e of Array.from(new Set([...i.mount,...Object.keys(er(n,s))]))){let r=y(a.dirtyFields,e),t=y(s,e),l=y(m,e);r&&!b(t)?N(m,e,t):r||b(l)||ee(e,l)}else{if(g&&b(e))for(let e of i.mount){let r=y(l,e);if(r&&r._f){let e=Array.isArray(r._f.refs)?r._f.refs[0]:r._f.ref;if(W(e)){let r=e.closest("form");if(r){r.reset();break}}}}if(r.keepFieldsRef)for(let e of i.mount)ee(e,y(m,e));else l={}}s=t.shouldUnregister?r.keepDefaultValues?f(n):{}:f(m),j.array.next({values:{...m}}),j.state.next({values:{...m}})}i={mount:r.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!C.isValid||!!r.keepIsValid||!!r.keepDirtyValues||!t.shouldUnregister&&!Q(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!r.keepIsValid,o.action=!1,r.keepErrors||(a.errors={}),j.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:!c&&(r.keepDirty?a.isDirty:!!(r.keepDefaultValues&&!Y(e,n))),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:c?{}:r.keepDirtyValues?r.keepDefaultValues&&s?er(n,s):a.dirtyFields:r.keepDefaultValues&&e?er(n,e):r.keepDirty?a.dirtyFields:{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitSuccessful:!!r.keepIsSubmitSuccessful&&a.isSubmitSuccessful,isSubmitting:!1,defaultValues:n})},eS=(e,r)=>ej(R(e)?e(s):e,{...t.resetOptions,...r}),eD=e=>{a={...a,...e}},eT={control:{register:eI,unregister:eN,getFieldState:eo,handleSubmit:e_,setError:eb,_subscribe:ex,_runSchema:k,_updateIsValidating:T,_focusError:eC,_getWatch:q,_getDirty:Z,_setValid:D,_setFieldArray:(e,r=[],n,i,d=!0,u=!0)=>{if(i&&n&&!t.disabled){if(o.action=!0,u&&Array.isArray(y(l,e))){let r=n(y(l,e),i.argA,i.argB);d&&N(l,e,r)}if(u&&Array.isArray(y(a.errors,e))){let r,t=n(y(a.errors,e),i.argA,i.argB);d&&N(a.errors,e,t),x(y(r=a.errors,e)).length||J(r,e)}if((C.touchedFields||_.touchedFields)&&u&&Array.isArray(y(a.touchedFields,e))){let r=n(y(a.touchedFields,e),i.argA,i.argB);d&&N(a.touchedFields,e,r)}(C.dirtyFields||_.dirtyFields)&&w(),j.state.next({name:e,isDirty:Z(e,r),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else N(s,e,r)},_setDisabledField:eE,_setErrors:e=>{a.errors=e,j.state.next({errors:a.errors,isValid:!1})},_getFieldArray:e=>x(y(o.mount?s:n,e,t.shouldUnregister?y(n,e,[]):[])),_reset:ej,_resetDefaultValues:()=>R(t.defaultValues)&&t.defaultValues().then(e=>{eS(e,t.resetOptions),j.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of i.unMount){let r=y(l,e);r&&(r._f.refs?r._f.refs.every(e=>!K(e)):!K(r._f.ref))&&eN(e)}i.unMount=new Set},_disableForm:e=>{"boolean"==typeof e&&(j.state.next({disabled:e}),ep(l,(r,t)=>{let a=y(l,t);a&&(r.disabled=a._f.disabled||e,Array.isArray(a._f.refs)&&a._f.refs.forEach(r=>{r.disabled=a._f.disabled||e}))},0,!1))},_subjects:j,_proxyFormState:C,get _fields(){return l},get _formValues(){return s},get _state(){return o},set _state(value){o=value},get _defaultValues(){return n},get _names(){return i},set _names(value){i=value},get _formState(){return a},get _options(){return t},set _options(value){t={...t,...value}}},subscribe:e=>(o.mount=!0,_={..._,...e.formState},ex({...e,formState:{...v,...e.formState}})),trigger:el,register:eI,handleSubmit:e_,watch:(e,r)=>R(e)?j.state.subscribe({next:t=>"values"in t&&e(t.values||q(void 0,r),t)}):q(e,r,!0),setValue:ee,setValues:e=>
15{let r=R(e)?e(s):e;Y(s,r)||(s={...s,...r},j.state.next({...a,values:s}))},getValues:es,reset:eS,resetField:(e,r={})=>{y(l,e)&&(b(r.defaultValue)?ee(e,f(y(n,e))):(ee(e,r.defaultValue),N(n,e,f(r.defaultValue))),r.keepTouched||J(a.touchedFields,e),r.keepDirty||(J(a.dirtyFields,e),a.isDirty=r.defaultValue?Z(e,f(y(n,e))):Z()),!r.keepError&&(J(a.errors,e),C.isValid&&D()),j.state.next({...a}))},clearErrors:ec,unregister:eN,setError:eb,setFocus:(e,r={})=>{let t=y(l,e),a=t&&t._f;if(a){let e=a.refs?a.refs[0]:a.ref;e.focus&&setTimeout(()=>{e.focus(),r.shouldSelect&&R(e.select)&&e.select()})}},getFieldState:eo};return{...eT,formControl:eT}}(e);r.current={...l,formState:a}}let n=r.current.control;return n._options=e,P(()=>{let e=n._subscribe({formState:n._proxyFormState,callback:()=>l({...n._formState}),reRenderRoot:!0});return l(e=>({...e,isReady:!0})),n._formState.isReady=!0,e},[n]),d.default.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),d.default.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),d.default.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),d.default.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),d.default.useEffect(()=>{if(n._proxyFormState.isDirty){let e=n._getDirty();e!==a.isDirty&&n._subjects.state.next({isDirty:e})}},[n,a.isDirty]),d.default.useEffect(()=>{var r;e.values&&!Y(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),(null==(r=n._options.resetOptions)?void 0:r.keepIsValid)||n._setValid(),t.current=e.values,l(e=>({...e}))):n._resetDefaultValues()},[n,e.values]),d.default.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=d.default.useMemo(()=>L(a,n),[n,a]),r.current},"useFormContext",0,q,"useFormState",0,k,"useWatch",0,U],58021);let eN=(e,r,t)=>{if(e&&"reportValidity"in e){let a=y(t,r);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},eE=(e,r)=>{for(let t in r.fields){let a=r.fields[t];a&&a.ref&&"reportValidity"in a.ref?eN(a.ref,t,e):a.refs&&a.refs.forEach(r=>eN(r,t,e))}},eI=(e,r)=>e.some(e=>e.startsWith(r+"."));var eC=function(e,r){for(var t={};e.length;){var a=e[0],l=a.code,n=a.message,s=a.path.join(".");if(!t[s])if("unionErrors"in a){var o=a.unionErrors[0].errors[0];t[s]={message:o.message,type:o.code}}else t[s]={message:n,type:l};if("unionErrors"in a&&a.unionErrors.forEach(function(r){return r.errors.forEach(function(r){return e.push(r)})}),r){var i=t[s].types,d=i&&i[a.code];t[s]=H(s,r,t,l,d?[].concat(d,a.message):a.message)}e.shift()}return t};e.s(["zodResolver",0,function(e,r,t){return void 0===t&&(t={}),function(a,l,n){try{return Promise.resolve(function(l){try{var s=Promise.resolve(e["sync"===t.mode?"parse":"parseAsync"](a,r)).then(function(e){return n.shouldUseNativeValidation&&eE({},n),{errors:{},values:t.raw?a:e}})}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:((e,r)=>{r.shouldUseNativeValidation&&eE(e,r);let t={};for(let a in e){let l=y(r.fields,a),n=Object.assign(e[a]||{},{ref:l&&l.ref});if(eI(r.names||Object.keys(e),a)){let e=Object.assign({},y(t,a));N(e,"root",n),N(t,a,e)}else N(t,a,n)}return t})(eC(e.errors,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)};throw e}))}catch(e){return Promise.reject(e)}}}],15363),e.s([],89100),e.i(89100),(t=n||(n={})).assertEqual=e=>{},t.assertIs=function(e){},t.assertNever=function(e){throw Error()},t.arrayToEnum=e=>{let r={};for(let t of e)r[t]=t;return r},t.getValidEnumValues=e=>{let r=t.objectKeys(e).filter(r=>"number"!=typeof e[e[r]]),a={};for(let t of r)a[t]=e[t];return t.objectValues(a)},t.objectValues=e=>t.objectKeys(e).map(function(r){return e[r]}),t.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let r=[];for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r},t.find=(e,r)=>{for(let t of e)if(r(t))return t},t.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>
15"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,t.joinValues=function(e,r=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(r)},t.jsonStringifyReplacer=(e,r)=>"bigint"==typeof r?r.toString():r,(s||(s={})).mergeShapes=(e,r)=>({...e,...r});let e_=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ej=e=>{switch(typeof e){case"undefined":return e_.undefined;case"string":return e_.string;case"number":return Number.isNaN(e)?e_.nan:e_.number;case"boolean":return e_.boolean;case"function":return e_.function;case"bigint":return e_.bigint;case"symbol":return e_.symbol;case"object":if(Array.isArray(e))return e_.array;if(null===e)return e_.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return e_.promise;if("u">typeof Map&&e instanceof Map)return e_.map;if("u">typeof Set&&e instanceof Set)return e_.set;if("u">typeof Date&&e instanceof Date)return e_.date;return e_.object;default:return e_.unknown}};e.s(["ZodParsedType",0,e_,"getParsedType",0,ej,"objectUtil",0,s,"util",0,n],14306);
15let eS=n.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),eD=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class eT extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(e){return e.message},t={_errors:[]},a=e=>{for(let l of e.issues)if("invalid_union"===l.code)l.unionErrors.map(a);else if("invalid_return_type"===l.code)a(l.returnTypeError);else if("invalid_arguments"===l.code)a(l.argumentsError);else if(0===l.path.length)t._errors.push(r(l));else{let e=t,a=0;for(;a<l.path.length;){let t=l.path[a];a===l.path.length-1?(e[t]=e[t]||{_errors:[]},e[t]._errors.push(r(l))):e[t]=e[t]||{_errors:[]},e=e[t],a++}}};return a(this),t}static assert(e){if(!(e instanceof eT))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let r={},t=[];for(let a of this.issues)if(a.path.length>0){let t=a.path[0];r[t]=r[t]||[],r[t].push(e(a))}else t.push(e(a));return{formErrors:t,fieldErrors:r}}get formErrors(){return this.flatten()}}eT.create=e=>new eT(e),e.s(["ZodError",0,eT,"ZodIssueCode",0,eS,"quotelessJson",0,eD],53295);let eA=(e,r)=>{let t;switch(e.code){case eS.invalid_type:t=e.received===e_.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case eS.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(e.expected,n.jsonStringifyReplacer)}`;break;case eS.unrecognized_keys:t=`Unrecognized key(s) in object: ${n.joinValues(e.keys,", ")}`;break;case eS.invalid_union:t="Invalid input";break;case eS.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${n.joinValues(e.options)}`;break;case eS.invalid_enum_value:t=`Invalid enum value. Expected ${n.joinValues(e.options)}, received '${e.received}'`;break;case eS.invalid_arguments:t="Invalid function arguments";break;case eS.invalid_return_type:t="Invalid function return type";break;case eS.invalid_date:t="Invalid date";break;case eS.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(t=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(t=`${t} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?t=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?t=`Invalid input: must end with "${e.validation.endsWith}"`:n.assertNever(e.validation):t="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case eS.too_small:t="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case eS.too_big:t="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case eS.custom:t="Invalid input";break;case eS.invalid_intersection_types:t="Intersection results could not be merged";break;case eS.not_multiple_of:t=`Number must be a multiple of ${e.multipleOf}`;break;case eS.not_finite:t="Number must be finite";break;default:t=r.defaultError,n.assertNever(e)}return{message:t}},eF=eA;function eO(e){eF=e}function ew(){return eF}e.s(["getErrorMap",0,ew,"setErrorMap",0,eO],85665),e.i(85665),e.s(["defaultErrorMap",0,eA,"getErrorMap",0,ew,"setErrorMap",0,eO],82448),e.i(82448);let eL=e=>{let{data:r,path:t,errorMaps:a,issueData:l}=e,n=[...t,...l.path||[]],s={...l,path:n};if(void 0!==l.message)return{...l,path:n,message:l.message};let o="";for(let e of a.filter(e=>!!e).slice().reverse())o=e(s,{data:r,defaultError:o}).message;return{...l,path:n,message:o}},eP=[];function ek(e,r){let t=ew(),a=eL({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,t,t===eA?void 0:eA].filter(e=>!!e)});e.common.issues.push(a)}class eM{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,r){let t=[];for(let a of r){if("aborted"===a.status)return eV;"dirty"===a.status&&e.dirty(),t.push(a.value)}return{status:e.value,value:t}}static async mergeObjectAsync(e,r){let t=[];for(let e of r){let r=await e.key,a=await e.value;t.push({key:r,value:a})}return eM.mergeObjectSync(e,t)}static mergeObjectSync(e,r){let t={};for(let a of r){let{key:r,value:l}=a;if("aborted"===r.status||"aborted"===l.status)return eV;"dirty"===r.status&&e.dirty(),"dirty"===l.status&&e.dirty(),"__proto__"!==r.value&&(void 0!==l.value||a.alwaysSet)&&(t[r.value]=l.value)}return{status:e.value,value:t}}}let eV=Object.freeze({status:"aborted"}),eB=e=>({status:"dirty",value:e}),eY=e=>
15({status:"valid",value:e}),eU=e=>"aborted"===e.status,ez=e=>"dirty"===e.status,eZ=e=>"valid"===e.status,eq=e=>"u">typeof Promise&&e instanceof Promise;e.s(["DIRTY",0,eB,"EMPTY_PATH",0,eP,"INVALID",0,eV,"OK",0,eY,"ParseStatus",0,eM,"addIssueToContext",0,ek,"isAborted",0,eU,"isAsync",0,eq,"isDirty",0,ez,"isValid",0,eZ,"makeIssue",0,eL],88770),e.i(88770),e.s([],19429),e.i(19429),e.i(14306),(a=o||(o={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},a.toString=e=>"string"==typeof e?e:e?.message;class eH{constructor(e,r,t,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=t,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let e$=(e,r)=>{if(eZ(r))return{success:!0,data:r.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new eT(e.common.issues);return this._error=r,this._error}}};function eG(e){if(!e)return{};
vendor: 4,762 bytes, line 15
15let{errorMap:r,invalid_type_error:t,required_error:a,description:l}=e;if(r&&(t||a))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return r?{errorMap:r,description:l}:{errorMap:(r,l)=>{let{message:n}=e;return"invalid_enum_value"===r.code?{message:n??l.defaultError}:void 0===l.data?{message:n??a??l.defaultError}:"invalid_type"!==r.code?{message:l.defaultError}:{message:n??t??l.defaultError}},description:l}}class eQ{get description(){return this._def.description}_getType(e){return ej(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:ej(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new eM,ctx:{common:e.parent.common,data:e.data,parsedType:ej(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(eq(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,r){let t=this.safeParse(e,r);if(t.success)return t.data;throw t.error}safeParse(e,r){let t={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ej(e)},a=this._parseSync({data:e,path:t.path,parent:t});return e$(t,a)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ej(e)};if(!this["~standard"].async)try{let t=this._parseSync({data:e,path:[],parent:r});return eZ(t)?{value:t.value}:{issues:r.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(e=>eZ(e)?{value:e.value}:{issues:r.common.issues})}async parseAsync(e,r){let t=await this.safeParseAsync(e,r);if(t.success)return t.data;throw t.error}async safeParseAsync(e,r){let t={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ej(e)},a=this._parse({data:e,path:t.path,parent:t});return e$(t,await (eq(a)?a:Promise.resolve(a)))}refine(e,r){return this._refinement((t,a)=>{let l=e(t),n=()=>a.addIssue({code:eS.custom,..."string"==typeof r||void 0===r?{message:r}:"function"==typeof r?r(t):r});return"u">typeof Promise&&l instanceof Promise?l.then(e=>!!e||(n(),!1)):!!l||(n(),!1)})}refinement(e,r){return this._refinement((t,a)=>!!e(t)||(a.addIssue("function"==typeof r?r(t,a):r),!1))}_refinement(e){return new rO({schema:this,typeName:i.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return rw.create(this,this._def)}nullable(){return rL.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return rf.create(this)}promise(){return rF.create(this,this._def)}or(e){return rx.create([this,e],this._def)}and(e){return rR.create(this,e,this._def)}transform(e){return new rO({...eG(this._def),schema:this,typeName:i.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new rP({...eG(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:i.ZodDefault})}brand(){return new rB({typeName:i.ZodBranded,type:this,...eG(this._def)})}catch(e){return new rk({...eG(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:i.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return rY.create(this,e)}readonly(){return rU.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let eW=/^c[^\s-]{8,}
15$/i,eK=/^[0-9a-z]+$/,eJ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eX=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,e0=/^[a-z0-9_-]{21}$/i,e1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,e2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,e3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,e4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,e8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,e6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,e7=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,re="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rr=Reg
vendor: 18,884 bytes, line 15
15Exp(`^${re}$`);function rt(e){let r="[0-5]\\d";e.precision?r=`${r}\\.\\d{${e.precision}}`:null==e.precision&&(r=`${r}(\\.\\d+)?`);let t=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${r})${t}`}function ra(e){let r=`${re}T${rt(e)}`,t=[];return t.push(e.local?"Z?":"Z"),e.offset&&t.push("([+-]\\d{2}:?\\d{2})"),r=`${r}(${t.join("|")})`,RegExp(`^${r}$`)}class rl extends eQ{_parse(e){var t,a,l,s;let o;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==e_.string){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.string,received:r.parsedType}),eV}let i=new eM;for(let d of this._def.checks)if("min"===d.kind)e.data.length<d.value&&(ek(o=this._getOrReturnCtx(e,o),{code:eS.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),i.dirty());else if("max"===d.kind)e.data.length>d.value&&(ek(o=this._getOrReturnCtx(e,o),{code:eS.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),i.dirty());else if("length"===d.kind){let r=e.data.length>d.value,t=e.data.length<d.value;(r||t)&&(o=this._getOrReturnCtx(e,o),r?ek(o,{code:eS.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}):t&&ek(o,{code:eS.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}),i.dirty())}else if("email"===d.kind)e3.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"email",code:eS.invalid_string,message:d.message}),i.dirty());else if("emoji"===d.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"emoji",code:eS.invalid_string,message:d.message}),i.dirty());else if("uuid"===d.kind)eX.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"uuid",code:eS.invalid_string,message:d.message}),i.dirty());else if("nanoid"===d.kind)e0.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"nanoid",code:eS.invalid_string,message:d.message}),i.dirty());else if("cuid"===d.kind)eW.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"cuid",code:eS.invalid_string,message:d.message}),i.dirty());else if("cuid2"===d.kind)eK.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"cuid2",code:eS.invalid_string,message:d.message}),i.dirty());else if("ulid"===d.kind)eJ.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"ulid",code:eS.invalid_string,message:d.message}),i.dirty());else if("url"===d.kind)try{new URL(e.data)}catch{ek(o=this._getOrReturnCtx(e,o),{validation:"url",code:eS.invalid_string,message:d.message}),i.dirty()}else"regex"===d.kind?(d.regex.lastIndex=0,d.regex.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"regex",code:eS.invalid_string,message:d.message}),i.dirty())):"trim"===d.kind?e.data=e.data.trim():"includes"===d.kind?e.data.includes(d.value,d.position)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:{includes:d.value,position:d.position},message:d.message}),i.dirty()):"toLowerCase"===d.kind?e.data=e.data.toLowerCase():"toUpperCase"===d.kind?e.data=e.data.toUpperCase():"startsWith"===d.kind?e.data.startsWith(d.value)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:{startsWith:d.value},message:d.message}),i.dirty()):"endsWith"===d.kind?e.data.endsWith(d.value)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:{endsWith:d.value},message:d.message}),i.dirty()):"datetime"===d.kind?ra(d).test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:"datetime",message:d.message}),i.dirty()):"date"===d.kind?rr.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:"date",message:d.message}),i.dirty()):"time"===d.kind?RegExp(`^${rt(d)}$`).test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{code:eS.invalid_string,validation:"time",message:d.message}),i.dirty()):"duration"===d.kind?e2.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"duration",code:eS.invalid_string,message:d.message}),i.dirty()):"ip"===d.kind?(t=e.data,!(("v4"===(a=d.version)||!a)&&e4.test(t)||("v6"===a||!a)&&e8.test(t))&&1&&(ek(o=this._getOrReturnCtx(e,o),{validation:"ip",code:eS.invalid_string,message:d.message}),i.dirty())):"jwt"===d.kind?!function(e,r){if(!e1.test(e))return!1;try{let[t]=e.split(".");if(!t)return!1;let a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),l=JSON.parse(atob(a));if("object"!=typeof l||null===l||"typ"in l&&l?.typ!=="JWT"||!l.alg||r&&l.alg!==r)return!1;return!0}catch{return!1}}(e.data,d.alg)&&(ek(o=this._getOrReturnCtx(e,o),{validation:"jwt",code:eS.invalid_string,message:d.message}),i.dirty()):"cidr"===d.kind?(l=e.data,!(("v4"===(s=d.version)||!s)&&e5.test(l)||("v6"===s||!s)&&e6.test(l))&&1&&(ek(o=this._getOrReturnCtx(e,o),{validation:"cidr",code:eS.invalid_string,message:d.message}),i.dirty())):"base64"===d.kind?e9.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"base64",code:eS.invalid_string,message:d.message}),i.dirty()):"base64url"===d.kind?e7.test(e.data)||(ek(o=this._getOrReturnCtx(e,o),{validation:"base64url",code:eS.invalid_string,message:d.message}),i.dirty()):n.assertNever(d);return{status:i.value,value:e.data}}_regex(e,r,t){return this.refinement(r=>e.test(r),{validation:r,code:eS.invalid_string,...o.errToObj(t)})}_addCheck(e){return new rl({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...o.errToObj(e)})}url(e){return this._addCheck({kind:"url",...o.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...o.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...o.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...o.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...o.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...o.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...o.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...o.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...o.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...o.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...o.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...o.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...o.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...o.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...o.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...o.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...o.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...o.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...o.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...o.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...o.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...o.errToObj(r)})}nonempty(e){return this.min(1,o.errToObj(e))}trim(){return new rl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new rl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new rl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let r of this._def.checks)"min"===r.kind&&(null===e||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return e}}rl.create=e=>new rl({checks:[],typeName:i.ZodString,coerce:e?.coerce??!1,...eG(e)});class rn extends eQ{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let r;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==e_.number){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.number,received:r.parsedType}),eV}let t=new eM;for(let a of this._def.checks)"int"===a.kind?n.isInteger(e.data)||(ek(r=this._getOrReturnCtx(e,r),{code:eS.invalid_type,expected:"integer",received:"float",message:a.message}),t.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),t.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),t.dirty()):"multipleOf"===a.kind?0!==function(e,r){let t=(e.toString().split(".")[1]||"").length,a=(r.toString().split(".")[1]||"").length,l=t>a?t:a;return Number.parseInt(e.toFixed(l).replace(".",""))%Number.parseInt(r.toFixed(l).replace(".",""))/10**l}(e.data,a.value)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.not_multiple_of,multipleOf:a.value,message:a.message}),t.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(ek(r=this._getOrReturnCtx(e,r),{code:eS.not_finite,message:a.message}),t.dirty()):n.assertNever(a);return{status:t.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,o.toString(r))}gt(e,r){return this.setLimit("min",e,!1,o.toString(r))}lte(e,r){return this.setLimit("max",e,!0,o.toString(r))}lt(e,r){return this.setLimit("max",e,!1,o.toString(r))}setLimit(e,r,t,a){return new rn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:t,message:o.toString(a)}]})}_addCheck(e){return new rn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:o.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:o.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)"min"===r.kind&&(null===e||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&n.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let t of this._def.checks)if("finite"===t.kind||"int"===t.kind||"multipleOf"===t.kind)return!0;else"min"===t.kind?(null===r||t.value>r)&&(r=t.value):"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return Number.isFinite(r)&&Number.isFinite(e)}}rn.create=e=>new rn({checks:[],typeName:i.ZodNumber,coerce:e?.coerce||!1,...eG(e)});class rs extends eQ{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let r;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==e_.bigint)return this._getInvalidInput(e);let t=new eM;for(let a of this._def.checks)"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),t.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),t.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.not_multiple_of,multipleOf:a.value,message:a.message}),t.dirty()):n.assertNever(a);return{status:t.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.bigint,received:r.parsedType}),eV}gte(e,r){return this.setLimit("min",e,!0,o.toString(r))}gt(e,r){return this.setLimit("min",e,!1,o.toString(r))}lte(e,r){return this.setLimit("max",e,!0,o.toString(r))}lt(e,r){return this.setLimit("max",e,!1,o.toString(r))}setLimit(e,r,t,a){return new rs({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:t,message:o.toString(a)}]})}_addCheck(e){return new rs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)"min"===r.kind&&(null===e||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return e}}rs.create=e=>new rs({checks:[],typeName:i.ZodBigInt,coerce:e?.coerce??!1,...eG(e)});class ro extends eQ{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==e_.boolean){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.boolean,received:r.parsedType}),eV}return eY(e.data)}}ro.create=e=>new ro({typeName:i.ZodBoolean,coerce:e?.coerce||!1,...eG(e)});class ri extends eQ{_parse(e){let r;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==e_.date){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.date,received:r.parsedType}),eV}if(Number.isNaN(e.data.getTime()))return ek(this._getOrReturnCtx(e),{code:eS.invalid_date}),eV;let t=new eM;for(let a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(ek(r=this._getOrReturnCtx(e,r),{code:eS.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):n.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ri({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:o.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:o.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)"min"===r.kind&&(null===e||r.value>e)&&(e=r.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return null!=e?new Date(e):null}}ri.create=e=>new ri({checks:[],coerce:e?.coerce||!1,typeName:i.ZodDate,...eG(e)});class rd extends eQ{_parse(e){if(this._getType(e)!==e_.symbol){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.symbol,received:r.parsedType}),eV}return eY(e.data)}}rd.create=e=>new rd({typeName:i.ZodSymbol,...eG(e)});class ru extends eQ{_parse(e){if(this._getType(e)!==e_.undefined){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.undefined,received:r.parsedType}),eV}return eY(e.data)}}ru.create=e=>new ru({typeName:i.ZodUndefined,...eG(e)});class rc extends eQ{_parse(e){if(this._getType(e)!==e_.null){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.null,received:r.parsedType}),eV}return eY(e.data)}}rc.create=e=>new rc({typeName:i.ZodNull,...eG(e)});class rm extends eQ{constructor(){super(...arguments),this._any=!0}_parse(e){return eY(e.data)}}rm.create=e=>new rm({typeName:i.ZodAny,...eG(e)});class rh extends eQ{constructor(){super(...arguments),this._unknown=!0}_parse(e){return eY(e.data)}}rh.create=e=>new rh({typeName:i.ZodUnknown,...eG(e)});class rp extends eQ{_parse(e){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.never,received:r.parsedType}),eV}}rp.create=e=>new rp({typeName:i.ZodNever,...eG(e)});class rg extends eQ{_parse(e){if(this._getType(e)!==e_.undefined){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.void,received:r.parsedType}),eV}return eY(e.data)}}rg.create=e=>new rg({typeName:i.ZodVoid,...eG(e)});class rf extends eQ{_parse(e){let{ctx:r,status:t}=this._processInputParams(e),a=this._def;if(r.parsedType!==e_.array)return ek(r,{code:eS.invalid_type,expected:e_.array,received:r.parsedType}),eV;if(null!==a.exactLength){let e=r.data.length>a.exactLength.value,l=r.data.length<a.exactLength.value;(e||l)&&(ek(r,{code:e?eS.too_big:eS.too_small,minimum:l?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),t.dirty())}if(null!==a.minLength&&r.data.length<a.minLength.value&&(ek(r,{code:eS.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),t.dirty()),null!==a.maxLength&&r.data.length>a.maxLength.value&&(ek(r,{code:eS.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),t.dirty()),r.common.async)return Promise.all([...r.data].map((e,t)=>a.type._parseAsync(new eH(r,e,r.path,t)))).then(e=>eM.mergeArray(t,e));let l=[...r.data].map((e,t)=>a.type._parseSync(new eH(r,e,r.path,t)));return eM.mergeArray(t,l)}
15get element(){return this._def.type}min(e,r){return new rf({...this._def,minLength:{value:e,message:o.toString(r)}})}max(e,r){return new rf({...this._def,maxLength:{value:e,message:o.toString(r)}})}length(e,r){return new rf({...this._def,exactLength:{value:e,message:o.toString(r)}})}nonempty(e){return this.min(1,e)}}rf.create=(e,r)=>new rf({type:e,minLength:null,maxLength:null,exactLength:null,typeName:i.ZodArray,...eG(r)});class rb extends eQ{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),r=n.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==e_.object){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.object,received:r.parsedType}),eV}let{status:r,ctx:t}=this._processInputParams(e),{shape:a,keys:l}=this._getCached(),n=[];if(!(this._def.catchall instanceof rp&&"strip"===this._def.unknownKeys))for(let e in t.data)l.includes(e)||n.push(e);let s=[];for(let e of l){let r=a[e],l=t.data[e];s.push({key:{status:"valid",value:e},value:r._parse(new eH(t,l,t.path,e)),alwaysSet:e in t.data})}if(this._def.catchall instanceof rp){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of n)s.push({key:{status:"valid",value:e},value:{status:"valid",value:t.data[e]}});else if("strict"===e)n.length>0&&(ek(t,{code:eS.unrecognized_keys,keys:n}),r.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let r of n){let a=t.data[r];s.push({key:{status:"valid",value:r},value:e._parse(new eH(t,a,t.path,r)),alwaysSet:r in t.data})}}return t.common.async?Promise.resolve().then(async()=>{let e=[];for(let r of s){let t=await r.key,a=await r.value;e.push({key:t,value:a,alwaysSet:r.alwaysSet})}return e}).then(e=>eM.mergeObjectSync(r,e)):eM.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(e){return o.errToObj,new rb({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(r,t)=>{let a=this._def.errorMap?.(r,t).message??t.defaultError;return"unrecognized_keys"===r.code?{message:o.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new rb({...this._def,unknownKeys:"strip"})}passthrough(){return new rb({...this._def,unknownKeys:"passthrough"})}extend(e){return new rb({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rb({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:i.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new rb({...this._def,catchall:e})}pick(e){let r={};for(let t of n.objectKeys(e))e[t]&&this.shape[t]&&(r[t]=this.shape[t]);return new rb({...this._def,shape:()=>r})}omit(e){let r={};for(let t of n.objectKeys(this.shape))e[t]||(r[t]=this.shape[t]);return new rb({...this._def,shape:()=>r})}deepPartial(){return function e(r){if(r instanceof rb){let t={};for(let a in r.shape){let l=r.shape[a];t[a]=rw.create(e(l))}return new rb({...r._def,shape:()=>t})}if(r instanceof rf)return new rf({...r._def,type:e(r.element)});if(r instanceof rw)return rw.create(e(r.unwrap()));if(r instanceof rL)return rL.create(e(r.unwrap()));if(r instanceof rN)return rN.create(r.items.map(r=>e(r)));else return r}(this)}partial(e){let r={};for(let t of n.objectKeys(this.shape)){let a=this.shape[t];e&&!e[t]?r[t]=a:r[t]=a.optional()}return new rb({...this._def,shape:()=>r})}required(e){let r={};for(let t of n.objectKeys(this.shape))if(e&&!e[t])r[t]=this.shape[t];else{let e=this.shape[t];for(;e instanceof rw;)e=e._def.innerType;r[t]=e}return new rb({...this._def,shape:()=>r})}keyof(){return rD(n.objectKeys(this.shape))}}rb.create=(e,r)=>new rb({shape:()=>e,unknownKeys:"strip",catchall:rp.create(),typeName:i.ZodObject,...eG(r)}),rb.strictCreate=(e,r)=>new rb({shape:()=>e,unknownKeys:"strict",catchall:rp.create(),typeName:i.ZodObject,...eG(r)}),rb.lazycreate=(e,r)=>new rb({shape:e,unknownKeys:"strip",catchall:rp.create(),typeName:i.ZodObject,...eG(r)});class rx extends eQ{_parse(e){let{ctx:r}=this._processInputParams(e),t=this._def.options;if(r.common.async)return Promise.all(t.map(async e=>{let t={...r,common:{...r.common,issues:[]},parent:null};return{result:await e._parseAsync({data:r.data,path:r.path,parent:t}),ctx:t}})).then(function(e){for(let r of e)if("valid"===r.result.status)return r.result;for(let t of e)if("dirty"===t.result.status)return r.common.issues.push(...t.ctx.common.issues),t.result;let t=e.map(e=>new eT(e.ctx.common.issues));return ek(r,{code:eS.invalid_union,unionErrors:t}),eV});{let e,a=[];for(let l of t){let t={...r,common:{...r.common,issues:[]},parent:null},n=l._parseSync({data:r.data,path:r.path,parent:t});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:t}),t.common.issues.length&&a.push(t.common.issues)}if(e)return r.common.issues.push(...e.ctx.common.issues),e.result;let l=a.map(e=>new eT(e));return ek(r,{code:eS.invalid_union,unionErrors:l}),eV}}get options(){return this._def.options}}rx.create=(e,r)=>new rx({options:e,typeName:i.ZodUnion,...eG(r)});let rv=e=>{if(e instanceof rj)return rv(e.schema);if(e instanceof rO)return rv(e.innerType());if(e instanceof rS)return[e.value];if(e instanceof rT)return e.options;if(e instanceof rA)return n.objectValues(e.enum);else if(e instanceof rP)return rv(e._def.innerType);else if(e instanceof ru)return[void 0];else if(e instanceof rc)return[null];else if(e instanceof rw)return[void 0,...rv(e.unwrap())];else if(e instanceof rL)return[null,...rv(e.unwrap())];else if(e instanceof rB)return rv(e.unwrap());else if(e instanceof rU)return rv(e.unwrap());else if(e instanceof rk)return rv(e._def.innerType);else return[]};class ry extends eQ{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==e_.object)return ek(r,{code:eS.invalid_type,expected:e_.object,received:r.parsedType}),eV;let t=this.discriminator,a=r.data[t],l=this.optionsMap.get(a);return l?r.common.async?l._parseAsync({data:r.data,path:r.path,parent:r}):l._parseSync({data:r.data,path:r.path,parent:r}):(ek(r,{code:eS.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[t]}),eV)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,t){let a=new Map;for(let t of r){let r=rv(t.shape[e]);if(!r.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let l of r){if(a.has(l))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);a.set(l,t)}}return new ry({typeName:i.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...eG(t)})}}class rR extends eQ{_parse(e){let{status:r,ctx:t}=this._processInputParams(e),a=(e,a)=>{if(eU(e)||eU(a))return eV;let l=function e(r,t){let a=ej(r),l=ej(t);if(r===t)return{valid:!0,data:r};if(a===e_.object&&l===e_.object){let a=n.objectKeys(t),l=n.objectKeys(r).filter(e=>-1!==a.indexOf(e)),s={...r,...t};for(let a of l){let l=e(r[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}if(a===e_.array&&l===e_.array){if(r.length!==t.length)return{valid:!1};let a=[];for(let l=0;l<r.length;l++){let n=e(r[l],t[l]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}if(a===e_.date&&l===e_.date&&+r==+t)return{valid:!0,data:r};return{valid:!1}}(e.value,a.value);return l.valid?((ez(e)||ez(a))&&r.dirty(),{status:r.value,value:l.data}):(ek(t,{code:eS.invalid_intersection_types}),eV)};return t.common.async?Promise.all([this._def.left._parseAsync({data:t.data,path:t.path,parent:t}),this._def.right._parseAsync({data:t.data,path:t.path,parent:t})]).then(([e,r])=>a(e,r)):a(this._def.left._parseSync({data:t.data,path:t.path,parent:t}),this._def.right._parseSync({data:t.data,path:t.path,parent:t}))}}rR.create=(e,r,t)=>new rR({left:e,right:r,typeName:i.ZodIntersection,...eG(t)});class rN extends eQ{_parse(e){let{status:r,ctx:t}=this._processInputParams(e);if(t.parsedType!==e_.array)return ek(t,{code:eS.invalid_type,expected:e_.array,received:t.parsedType}),eV;if(t.data.length<this._def.items.length)return ek(t,{code:eS.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),eV;!this._def.rest&&t.data.length>this._def.items.length&&(ek(t,{code:eS.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...t.data].map((e,r)=>{let a=this._def.items[r]||this._def.rest;return a?a._parse(new eH(t,e,t.path,r)):null}).filter(e=>!!e);return t.common.async?Promise.all(a).then(e=>eM.mergeArray(r,e)):eM.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new rN({...this._def,rest:e})}}rN.create=(e,r)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new rN({items:e,typeName:i.ZodTuple,rest:null,...eG(r)})};class rE extends eQ{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:t}=this._processInputParams(e);if(t.parsedType!==e_.object)return ek(t,{code:eS.invalid_type,expected:e_.object,received:t.parsedType}),eV;let a=[],l=this._def.keyType,n=this._def.valueType;for(let e in t.data)a.push({key:l._parse(new eH(t,e,t.path,e)),value:n._parse(new eH(t,t.data[e],t.path,e)),alwaysSet:e in t.data});return t.common.async?eM.mergeObjectAsync(r,a):eM.mergeObjectSync(r,a)}
15get element(){return this._def.valueType}static create(e,r,t){return new rE(r instanceof eQ?{keyType:e,valueType:r,typeName:i.ZodRecord,...eG(t)}:{keyType:rl.create(),valueType:e,typeName:i.ZodRecord,...eG(r)})}}class rI extends eQ{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:t}=this._processInputParams(e);if(t.parsedType!==e_.map)return ek(t,{code:eS.invalid_type,expected:e_.map,received:t.parsedType}),eV;let a=this._def.keyType,l=this._def.valueType,n=[...t.data.entries()].map(([e,r],n)=>({key:a._parse(new eH(t,e,t.path,[n,"key"])),value:l._parse(new eH(t,r,t.path,[n,"value"]))}));if(t.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let t of n){let a=await t.key,l=await t.value;if("aborted"===a.status||"aborted"===l.status)return eV;("dirty"===a.status||"dirty"===l.status)&&r.dirty(),e.set(a.value,l.value)}return{status:r.value,value:e}})}{let e=new Map;for(let t of n){let a=t.key,l=t.value;if("aborted"===a.status||"aborted"===l.status)return eV;("dirty"===a.status||"dirty"===l.status)&&r.dirty(),e.set(a.value,l.value)}return{status:r.value,value:e}}}}rI.create=(e,r,t)=>new rI({valueType:r,keyType:e,typeName:i.ZodMap,...eG(t)});class rC extends eQ{_parse(e){let{status:r,ctx:t}=this._processInputParams(e);if(t.parsedType!==e_.set)return ek(t,{code:eS.invalid_type,expected:e_.set,received:t.parsedType}),eV;let a=this._def;null!==a.minSize&&t.data.size<a.minSize.value&&(ek(t,{code:eS.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),null!==a.maxSize&&t.data.size>a.maxSize.value&&(ek(t,{code:eS.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());let l=this._def.valueType;function n(e){let t=new Set;for(let a of e){if("aborted"===a.status)return eV;"dirty"===a.status&&r.dirty(),t.add(a.value)}return{status:r.value,value:t}}let s=[...t.data.values()].map((e,r)=>l._parse(new eH(t,e,t.path,r)));return t.common.async?Promise.all(s).then(e=>n(e)):n(s)}min(e,r){return new rC({...this._def,minSize:{value:e,message:o.toString(r)}})}max(e,r){return new rC({...this._def,maxSize:{value:e,message:o.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}rC.create=(e,r)=>new rC({valueType:e,minSize:null,maxSize:null,typeName:i.ZodSet,...eG(r)});class r_ extends eQ{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==e_.function)return ek(r,{code:eS.invalid_type,expected:e_.function,received:r.parsedType}),eV;function t(e,t){return eL({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ew(),eA].filter(e=>!!e),issueData:{code:eS.invalid_arguments,argumentsError:t}})}function a(e,t){return eL({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ew(),eA].filter(e=>!!e),issueData:{code:eS.invalid_return_type,returnTypeError:t}})}let l={errorMap:r.common.contextualErrorMap},n=r.data;if(this._def.returns instanceof rF){let e=this;return eY(async function(...r){let s=new eT([]),o=await e._def.args.parseAsync(r,l).catch(e=>{throw s.addIssue(t(r,e)),s}),i=await Reflect.apply(n,this,o);return await e._def.returns._def.type.parseAsync(i,l).catch(e=>{throw s.addIssue(a(i,e)),s})})}{let e=this;return eY(function(...r){let s=e._def.args.safeParse(r,l);if(!s.success)throw new eT([t(r,s.error)]);let o=Reflect.apply(n,this,s.data),i=e._def.returns.safeParse(o,l);if(!i.success)throw new eT([a(o,i.error)]);return i.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r_({...this._def,args:rN.create(e).rest(rh.create())})}returns(e){return new r_({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,t){return new r_({args:e||rN.create([]).rest(rh.create()),returns:r||rh.create(),typeName:i.ZodFunction,...eG(t)})}}class rj extends eQ{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}rj.create=(e,r)=>new rj({getter:e,typeName:i.ZodLazy,...eG(r)});class rS extends eQ{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return ek(r,{received:r.data,code:eS.invalid_literal,expected:this._def.value}),eV}
vendor: 5,286 bytes, line 15
15return{status:"valid",value:e.data}}get value(){return this._def.value}}function rD(e,r){return new rT({values:e,typeName:i.ZodEnum,...eG(r)})}rS.create=(e,r)=>new rS({value:e,typeName:i.ZodLiteral,...eG(r)});class rT extends eQ{_parse(e){if("string"!=typeof e.data){let r=this._getOrReturnCtx(e),t=this._def.values;return ek(r,{expected:n.joinValues(t),received:r.parsedType,code:eS.invalid_type}),eV}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),t=this._def.values;return ek(r,{received:r.data,code:eS.invalid_enum_value,options:t}),eV}return eY(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return rT.create(e,{...this._def,...r})}exclude(e,r=this._def){return rT.create(this.options.filter(r=>!e.includes(r)),{...this._def,...r})}}rT.create=rD;class rA extends eQ{_parse(e){let r=n.getValidEnumValues(this._def.values),t=this._getOrReturnCtx(e);if(t.parsedType!==e_.string&&t.parsedType!==e_.number){let e=n.objectValues(r);return ek(t,{expected:n.joinValues(e),received:t.parsedType,code:eS.invalid_type}),eV}if(this._cache||(this._cache=new Set(n.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=n.objectValues(r);return ek(t,{received:t.data,code:eS.invalid_enum_value,options:e}),eV}return eY(e.data)}get enum(){return this._def.values}}rA.create=(e,r)=>new rA({values:e,typeName:i.ZodNativeEnum,...eG(r)});class rF extends eQ{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);return r.parsedType!==e_.promise&&!1===r.common.async?(ek(r,{code:eS.invalid_type,expected:e_.promise,received:r.parsedType}),eV):eY((r.parsedType===e_.promise?r.data:Promise.resolve(r.data)).then(e=>this._def.type.parseAsync(e,{path:r.path,errorMap:r.common.contextualErrorMap})))}}rF.create=(e,r)=>new rF({type:e,typeName:i.ZodPromise,...eG(r)});class rO extends eQ{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===i.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:t}=this._processInputParams(e),a=this._def.effect||null,l={addIssue:e=>{ek(t,e),e.fatal?r.abort():r.dirty()},get path(){return t.path}};if(l.addIssue=l.addIssue.bind(l),"preprocess"===a.type){let e=a.transform(t.data,l);if(t.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===r.value)return eV;let a=await this._def.schema._parseAsync({data:e,path:t.path,parent:t});return"aborted"===a.status?eV:"dirty"===a.status||"dirty"===r.value?eB(a.value):a});{if("aborted"===r.value)return eV;let a=this._def.schema._parseSync({data:e,path:t.path,parent:t});return"aborted"===a.status?eV:"dirty"===a.status||"dirty"===r.value?eB(a.value):a}}if("refinement"===a.type){let e=e=>{let r=a.refinement(e,l);if(t.common.async)return Promise.resolve(r);if(r instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==t.common.async)return this._def.schema._parseAsync({data:t.data,path:t.path,parent:t}).then(t=>"aborted"===t.status?eV:("dirty"===t.status&&r.dirty(),e(t.value).then(()=>({status:r.value,value:t.value}))));{let a=this._def.schema._parseSync({data:t.data,path:t.path,parent:t});return"aborted"===a.status?eV:("dirty"===a.status&&r.dirty(),e(a.value),{status:r.value,value:a.value})}}if("transform"===a.type)if(!1!==t.common.async)return this._def.schema._parseAsync({data:t.data,path:t.path,parent:t}).then(e=>eZ(e)?Promise.resolve(a.transform(e.value,l)).then(e=>({status:r.value,value:e})):eV);else{let e=this._def.schema._parseSync({data:t.data,path:t.path,parent:t});if(!eZ(e))return eV;let n=a.transform(e.value,l);if(n instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:n}}n.assertNever(a)}}rO.create=(e,r,t)=>new rO({schema:e,typeName:i.ZodEffects,effect:r,...eG(t)}),rO.createWithPreprocess=(e,r,t)=>new rO({schema:r,effect:{type:"preprocess",transform:e},typeName:i.ZodEffects,...eG(t)});class rw extends eQ{_parse(e){return this._getType(e)===e_.undefined?eY(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rw.create=(e,r)=>new rw({innerType:e,typeName:i.ZodOptional,...eG(r)});class rL extends eQ{_parse(e){return this._getType(e)===e_.null?eY(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rL.create=(e,r)=>new rL({innerType:e,typeName:i.ZodNullable,...eG(r)});class rP extends eQ{_parse(e){let{ctx:r}=this._processInputParams(e),t=r.data;return r.parsedType===e_.undefined&&(t=this._def.defaultValue()),this._def.innerType._parse({data:t,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}rP.create=(e,r)=>new rP({innerType:e,typeName:i.ZodDefault,defaultValue:"function"==typeof r.default?r.default:()=>r.default,...eG(r)});class rk extends eQ{_parse(e){let{ctx:r}=this._processInputParams(e),t={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:t.data,path:t.path,parent:{...t}});return eq(a)?a.then(e=>
15({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new eT(t.common.issues)},input:t.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new eT(t.common.issues)},input:t.data})}}removeCatch(){return this._def.innerType}}rk.create=(e,r)=>new rk({innerType:e,typeName:i.ZodCatch,catchValue:"function"==typeof r.catch?r.catch:()=>r.catch,...eG(r)});class rM extends eQ{_parse(e){if(this._getType(e)!==e_.nan){let r=this._getOrReturnCtx(e);return ek(r,{code:eS.invalid_type,expected:e_.nan,received:r.parsedType}),eV}return{status:"valid",value:e.data}}}rM.create=e=>new rM({typeName:i.ZodNaN,...eG(e)});let rV=Symbol("zod_brand");class rB extends eQ{_parse(e){let{ctx:r}=this._processInputParams(e),t=r.data;return this._def.type._parse({data:t,path:r.path,parent:r})}unwrap(){return this._def.type}}class rY extends eQ{_parse(e){let{status:r,ctx:t}=this._processInputParams(e);if(t.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:t.data,path:t.path,parent:t});return"aborted"===e.status?eV:"dirty"===e.status?(r.dirty(),eB(e.value)):this._def.out._parseAsync({data:e.value,path:t.path,parent:t})})();{let e=this._def.in._parseSync({data:t.data,path:t.path,parent:t});return"aborted"===e.status?eV:"dirty"===e.status?(r.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:t.path,parent:t})}}static create(e,r){return new rY({in:e,out:r,typeName:i.ZodPipeline})}}class rU extends eQ{_parse(e){let r=this._def.innerType._parse(e),t=e=>(eZ(e)&&(e.value=Object.freeze(e.value)),e);return eq(r)?r.then(e=>t(e)):t(r)}unwrap(){return this._def.innerType}}function rz(e,r){let t="function"==typeof e?e(r):"string"==typeof e?{message:e}:e;return"string"==typeof t?{message:t}:t}function rZ(e,r={},t){return e?rm.create().superRefine((a,l)=>{let n=e(a);if(n instanceof Promise)return n.then(e=>{if(!e){let e=rz(r,a),n=e.fatal??t??!0;l.addIssue({code:"custom",...e,fatal:n})}});if(!n){let e=rz(r,a),n=e.fatal??t??!0;l.addIssue({code:"custom",...e,fatal:n})}}):rm.create()}rU.create=(e,r)=>new rU({innerType:e,typeName:i.ZodReadonly,...eG(r)});let rq={object:rb.lazycreate};(l=i||(i={})).ZodString="ZodString",l.ZodNumber="ZodNumber",l.ZodNaN="ZodNaN",l.ZodBigInt="ZodBigInt",l.ZodBoolean="ZodBoolean",l.ZodDate="ZodDate",l.ZodSymbol="ZodSymbol",l.ZodUndefined="ZodUndefined",l.ZodNull="ZodNull",l.ZodAny="ZodAny",l.ZodUnknown="ZodUnknown",l.ZodNever="ZodNever",l.ZodVoid="ZodVoid",l.ZodArray="ZodArray",l.ZodObject="ZodObject",l.ZodUnion="ZodUnion",l.ZodDiscriminatedUnion="ZodDiscriminatedUnion",l.ZodIntersection="ZodIntersection",l.ZodTuple="ZodTuple",l.ZodRecord="ZodRecord",l.ZodMap="ZodMap",l.ZodSet="ZodSet",l.ZodFunction="ZodFunction",l.ZodLazy="ZodLazy",l.ZodLiteral="ZodLiteral",l.ZodEnum="ZodEnum",l.ZodEffects="ZodEffects",l.ZodNativeEnum="ZodNativeEnum",l.ZodOptional="ZodOptional",l.ZodNullable="ZodNullable",l.ZodDefault="ZodDefault",l.ZodCatch="ZodCatch",l.ZodPromise="ZodPromise",l.ZodBranded="ZodBranded",l.ZodPipeline="ZodPipeline",l.ZodReadonly="ZodReadonly";let rH=(e,r={message:`Input not instance of ${e.name}`})=>rZ(r=>r instanceof e,r),r$=rl.create,rG=rn.create,rQ=rM.create,rW=rs.create,rK=ro.create,rJ=ri.create,rX=rd.create,r0=ru.create,r1=rc.create,r2=rm.create,r3=rh.create,r4=rp.create,r5=rg.create,r8=rf.create,r6=rb.create,r9=rb.strictCreate,r7=rx.create,te=ry.create,tr=rR.create,tt=rN.create,ta=rE.create,tl=rI.create,tn=rC.create,ts=r_.create,to=rj.create,ti=rS.create,td=rT.create,tu=rA.create,tc=rF.create,tm=rO.create,th=rw.create,tp=rL.create,tg=rO.createWithPreprocess,tf=rY.create,tb=()=>r$().optional(),tx=()=>rG().optional(),tv=()=>rK().optional(),ty={string:e=>rl.create({...e,coerce:!0}),number:e=>rn.create({...e,coerce:!0}),boolean:e=>ro.create({...e,coerce:!0}),bigint:e=>rs.create({...e,coerce:!0}),date:e=>ri.create({...e,coerce:!0})};e.s(["BRAND",0,rV,"NEVER",0,eV,"Schema",0,eQ,"ZodAny",0,rm,"ZodArray",0,rf,"ZodBigInt",0,rs,"ZodBoolean",0,ro,"ZodBranded",0,rB,"ZodCatch",0,rk,"ZodDate",0,ri,"ZodDefault",0,rP,"ZodDiscriminatedUnion",0,ry,"ZodEffects",0,rO,"ZodEnum",0,rT,"ZodFirstPartyTypeKind",0,i,"ZodFunction",0,r_,"ZodIntersection",0,rR,"ZodLazy",0,rj,"ZodLiteral",0,rS,"ZodMap",0,rI,"ZodNaN",0,rM,"ZodNativeEnum",0,rA,"ZodNever",0,rp,"ZodNull",0,rc,"ZodNullable",0,rL,"ZodNumber",0,rn,"ZodObject",0,rb,"ZodOptional",0,rw,"ZodPipeline",0,rY,"ZodPromise",0,rF,"ZodReadonly",0,rU,"ZodRecord",0,rE,"ZodSchema",0,eQ,"ZodSet",0,rC,"ZodString",0,rl,"ZodSymbol",0,rd,"ZodTransformer",0,rO,"ZodTuple",0,rN,"ZodType",0,eQ,"ZodUndefined",0,ru,"ZodUnion",0,rx,"ZodUnknown",0,rh,"ZodVoid",0,rg,"any",0,r2,"array",0,r8,"bigint",0,rW,"boolean",0,rK,"coerce",0,ty,"custom",0,rZ,"date",0,rJ,"datetimeRegex",0,ra,"discriminatedUnion",0,te,"effect",0,tm,"enum",0,td,"function",0,ts,"instanceof",0,rH,"intersection",0,tr,"late",0,rq,"lazy",0,to,"literal",0,ti,"map",0,tl,"nan",0,rQ,"nativeEnum",0,tu,"never",0,r4,"null",0,r1,"nullable",0,tp,"number",0,rG,"object",0,r6,"oboolean",0,tv,"onumber",0,tx,"optional",0,th,"ostring",0,tb,"pipeline",0,tf,"preprocess",0,tg,"promise",0,tc,"record",0,ta,"set",0,tn,"strictObject",0,r9,"string",0,r$,"symbol",0,rX,"transformer",0,tm,"tuple",0,tt,"undefined",0,r0,"union",0,r7,"unknown",0,r3,"void",0,r5],10378),e.i(10378),e.i(53295),e.s(["BRAND",0,rV,"DIRTY",0,eB,"EMPTY_PATH",0,eP,"INVALID",0,eV,"NEVER",0,eV,"OK",0,eY,"ParseStatus",0,eM,"Schema",0,eQ,"ZodAny",0,rm,"ZodArray",0,rf,"ZodBigInt",0,rs,"ZodBoolean",0,ro,"ZodBranded",0,rB,"ZodCatch",0,rk,"ZodDate",0,ri,"ZodDefault",0,rP,"ZodDiscriminatedUnion",0,ry,"ZodEffects",0,rO,"ZodEnum",0,rT,"ZodError",0,eT,"ZodFirstPartyTypeKind",0,i,"ZodFunction",0,r_,"ZodIntersection",0,rR,"ZodIssueCode",0,eS,"ZodLazy",0,rj,"ZodLiteral",0,rS,"ZodMap",0,rI,"ZodNaN",0,rM,"ZodNativeEnum",0,rA,"ZodNever",0,rp,"ZodNull",0,rc,"ZodNullable",0,rL,"ZodNumber",0,rn,"ZodObject",0,rb,"ZodOptional",0,rw,"ZodParsedType",0,e_,"ZodPipeline",0,rY,"ZodPromise",0,rF,"ZodReadonly",0,rU,"ZodRecord",0,rE,"ZodSchema",0,eQ,"ZodSet",0,rC,"ZodString",0,rl,"ZodSymbol",0,rd,"ZodTransformer",0,rO,"ZodTuple",0,rN,"ZodType",0,eQ,"ZodUndefined",0,ru,"ZodUnion",0,rx,"ZodUnknown",0,rh,"ZodVoid",0,rg,"addIssueToContext",0,ek,"any",0,r2,"array",0,r8,"bigint",0,rW,"boolean",0,rK,"coerce",0,ty,"custom",0,rZ,"date",0,rJ,"datetimeRegex",0,ra,"defaultErrorMap",0,eA,"discriminatedUnion",0,te,"effect",0,tm,"enum",0,td,"function",0,ts,"getErrorMap",0,ew,"getParsedType",0,ej,"instanceof",0,rH,"intersection",0,tr,"isAborted",0,eU,"isAsync",0,eq,"isDirty",0,ez,"isValid",0,eZ,"late",0,rq,"lazy",0,to,"literal",0,ti,"makeIssue",0,eL,"map",0,tl,"nan",0,rQ,"nativeEnum",0,tu,"never",0,r4,"null",0,r1,"nullable",0,tp,"number",0,rG,"object",0,r6,"objectUtil",0,s,"oboolean",0,tv,"onumber",0,tx,"optional",0,th,"ostring",0,tb,"pipeline",0,tf,"preprocess",0,tg,"promise",0,tc,"quotelessJson",0,eD,"record",0,ta,"set",0,tn,"setErrorMap",0,eO,"strictObject",0,r9,"string",0,r$,"symbol",0,rX,"transformer",0,tm,"tuple",0,tt,"undefined",0,r0,"union",0,r7,"unknown",0,r3,"util",0,n,"void",0,r5],63782);var tR=e.i(63782);e.s(["z",0,tR],40733);var tR=tR;let tN=/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/,tE=/^\d{5}(-\d{4})?$/,tI="Please enter a valid zip code. (ex: 77022 or 77022-8845)",tC=/^\d{4}-\d{2}-\d{2}$/,t_=/^\d{1,14}$/,tj=/^[a-zA-Z\s]+$/,tS=/^[A-Za-z0-9\s\-.,#'\/]+$/,tD=/^[A-Za-z0-9\s\-&.,]+$/;function tT(e){window.open(e,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")}function tA(e){let[r,t,a]=e.split("-").map(Number),l=new Date(r,t-1,a);return l.getMonth()!==t-1?new Date(NaN):l}function tF(e){if(!e)return"";if(!/^\d{4}-\d{2}-\d{2}$/.test(e.trim()))return e;let[r,t,a]=e.split("-");return`${t}/${a}/${r}`}let tO="cnp_rebate_data_",tw="_expiry";function tL(e){try{let r=tO+e,t=localStorage.getItem(r+tw),a=localStorage.getItem(r);if(t&&a&&Date.now()<parseInt(t,10))return JSON.parse(a)}catch{}return null}function tP(e,r){try{let t=tO+e;localStorage.setItem(t,JSON.stringify(r)),localStorage.setItem(t+tw,String(Date.now()+864e5))}catch{}}let tk=["","selected","Selected Option"];function tM(e,r){if(!r||tk.includes(r))return"";let t=e.find(e=>e.value===r);return t?.label??r}e.s(["ZIP_CODE_MESSAGE",0,tI,"addressRegex",0,tS,"alphaOnlyRegex",0,tj,"alphanumericRegex",0,/^[a-zA-Z0-9\s]+$/,"btuRangeRegex",0,/^[10000-999999]{5,6}$/,"companyNameRegex",0,tD,"customerNameRegex",0,/^[A-Za-z0-9\s\-.,#'&\/]+$/,"dateRegex",0,tC,"decimalRegex",0,/^(\d+(\.\d+)?|\.\d+)$/,"esiidRegex",0,/^\d{22}$/,"formatDateForDisplay",0,tF,"gasAccountRegex",0,t_,"getCachedRebateData",0,tL,"getDisplayLabel",0,tM,"getTodayString",0,function(){let e=new Date,r=String(e.getFullYear()),t=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${r}-${t}-${a}`},"normalizeTermsUrl",0,function(e){let r=e?.trim();if(r&&!/^[/#]+(\?|$)/.test(r))return r},"openPopup",0,tT,"parseDate",0,tA,"phoneRegex",0,tN,"setCachedRebateData",0,tP,"zipRegex",0,tE],4625);var tV=e.i(30392);let tB="Form_Error_StreetAddressRequired",tY="Form_Error_StreetAddressInvalid",tU="Form_Error_CityRequired",tz="Form_Error_CityInvali
15d",tZ="Form_Error_StateRequired",tq="Form_Error_ZipRequired",tH="Form_Error_FirstNameRequired",t$="Form_Error_FirstNameInvalid",tG="Form_Error_LastNameRequired",tQ="Form_Error_LastNameInvalid",tW="Form_Error_CompanyNameRequired",tK="Form_Error_CompanyNameInvalid",tJ="Form_Error_EmailRequired",tX="Form_Error_EmailInvalid",t0="Form_Error_EmailMismatch",t1="Form_Error_PhoneRequired",t2="Form_Error_PhoneInvalid",t3="Form_Error_DateRequired",t4="Form_Error_PurchaseDateRequired",t5="Form_Error_InstallDateRequired",t8="Form_Error_InstallDateFuture",t6="Form_Error_PurchaseDateFuture",t9="Form_Error_InstallBeforePurchase",t7="Form_Error_SignatureDateFuture",ae="Form_Error_GasAccountInvalid",ar="Form_Error_SelectOption",at="Form_Error_SelectBuildingType",aa="Form_Error_SelectPropertyType",al="Form_Error_SelectInstallationType",an="Form_Error_SelectPurchaserType",as="Form_Error_SelectCheckPayable",ao="Form_Error_SelectBrand",ai="Form_Error_ModelRequired",ad="Form_Error_SerialRequired",au="Form_Error_AHRIRequired",ac="Form_Error_SignatureRequired",am="Form_Error_CrewLeaderSignatureRequired",ah="Form_Error_TermsRequired",ap="Form_Error_NumberInvalid",ag="Form_Error_TotalUnitsRequired",af="Form_Error_IncomeEligibleRequired",ab="Form_Error_IncomeEligibleExceedsTotal",ax="Form_Error_AgreementRequired",av="Form_Error_AuthorizationNumberRequired",ay="Form_Error_DealerIdInvalid",aR="Form_Error_SelectInstaller",aN="Form_Error_SwitchoverTemperatureRequired",aE="Form_Error_BTUInputRequired",aI="Form_Error_BTUInputRange",aC="Form_Error_SelectMultiFamilyBonus",a_={[tB]:tV.DICTIONARY.F.Form_Error_StreetAddressRequired,[tY]:tV.DICTIONARY.F.Form_Error_StreetAddressInvalid,[tU]:tV.DICTIONARY.F.Form_Error_CityRequired,[tz]:tV.DICTIONARY.F.Form_Error_CityInvalid,[tZ]:tV.DICTIONARY.F.Form_Error_StateRequired,[tq]:tV.DICTIONARY.F.Form_Error_ZipRequired,Form_Error_ZipInvalid:tV.DICTIONARY.F.Form_Error_ZipInvalid,[tH]:tV.DICTIONARY.F.Form_Error_FirstNameRequired,[t$]:tV.DICTIONARY.F.Form_Error_FirstNameInvalid,[tG]:tV.DICTIONARY.F.Form_Error_LastNameRequired,[tQ]:tV.DICTIONARY.F.Form_Error_LastNameInvalid,[tW]:tV.DICTIONARY.F.Form_Error_CompanyNameRequired,[tK]:tV.DICTIONARY.F.Form_Error_CompanyNameInvalid,[tJ]:tV.DICTIONARY.F.Form_Error_EmailRequired,[tX]:tV.DICTIONARY.F.Form_Error_EmailInvalid,[t0]:tV.DICTIONARY.F.Form_Error_EmailMismatch,[t1]:tV.DICTIONARY.F.Form_Error_PhoneRequired,[t2]:tV.DICTIONARY.F.Form_Error_PhoneInvalid,[t3]:tV.DICTIONARY.F.Form_Error_DateRequired,[t4]:tV.DICTIONARY.F.Form_Error_PurchaseDateRequired,[t5]:tV.DICTIONARY.F.Form_Error_InstallDateRequired,Form_Error_DateFuture:tV.DICTIONARY.F.Form_Error_DateFuture,[t8]:tV.DICTIONARY.F.Form_Error_InstallDateFuture,[t6]:tV.DICTIONARY.F.Form_Error_PurchaseDateFuture,[t9]:tV.DICTIONARY.F.Form_Error_InstallBeforePurchase,[t7]:tV.DICTIONARY.F.Form_Error_SignatureDateFuture,[ae]:tV.DICTIONARY.F.Form_Error_GasAccountInvalid,[ar]:tV.DICTIONARY.F.Form_Error_SelectOption,[at]:tV.DICTIONARY.F.Form_Error_SelectBuildingType,[al]:tV.DICTIONARY.F.Form_Error_SelectInstallationType,[an]:tV.DICTIONARY.F.Form_Error_SelectPurchaserType,[as]:tV.DICTIONARY.F.Form_Error_SelectCheckPayable,[ao]:tV.DICTIONARY.F.Form_Error_SelectBrand,[aa]:tV.DICTIONARY.F.Form_Error_SelectPropertyType,[ai]:tV.DICTIONARY.F.Form_Error_ModelRequired,[ad]:tV.DICTIONARY.F.Form_Error_SerialRequired,[au]:tV.DICTIONARY.F.Form_Error_AHRIRequired,[ac]:tV.DICTIONARY.F.Form_Error_SignatureRequired,[am]:tV.DICTIONARY.F.Form_Error_CrewLeaderSignatureRequired,[ah]:tV.DICTIONARY.F.Form_Error_TermsRequired,Form_Error_InvoiceRequired:tV.DICTIONARY.F.Form_Error_InvoiceRequired,[ap]:tV.DICTIONARY.F.Form_Error_NumberInvalid,Form_Error_FixHighlighted:tV.DICTIONARY.F.Form_Error_FixHighlighted,Form_Error_DealerIdFormat:tV.DICTIONARY.F.Form_Error_DealerIdFormat,Form_Error_DealerIdRequired:tV.DICTIONARY.F.Form_Error_DealerIdRequired,Form_Error_DealerNotFound:tV.DICTIONARY.F.Form_Error_DealerNotFound,Form_Error_DealerVerifyFailed:tV.DICTIONARY.F.Form_Error_DealerVerifyFailed,Form_Error_UnexpectedResponse:tV.DICTIONARY.F.Form_Error_UnexpectedResponse,Form_Error_SelectInstallationTypeFirst:tV.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst,Form_Error_SelectEquipmentTypeFirst:tV.DICTIONARY.F.Form_Error_SelectEquipmentTypeFirst,Form_Error_SelectWaterHeaterTypeFirst:tV.DICTIONARY.F.Form_Error_SelectWaterHeaterTypeFirst,Form_Error_SelectHeatingSystemTypeFirst:tV.DICTIONARY.F.Form_Error_SelectHeatingSystemTypeFirst,[ag]:tV.DICTIONARY.F.Form_Error_TotalUnitsRequired,[af]:tV.DICTIONARY.F.Form_Error_IncomeEligibleRequired,[ab]:tV.DICTIONARY.F.Form_Error_IncomeEligibleExceedsTotal,Form_Error_ReceiptRequired:tV.DICTIONARY.F.Form_Error_ReceiptRequired,Form_Error_DocumentRequired:tV.DICTIONARY.F.Form_Error_DocumentRequired,Form_Error_RetailerReceiptRequired:tV.DICTIONARY.F.Form_Error_RetailerReceiptRequired,[ax]:tV.DICTIONARY.F.Form_Error_AgreementRequired,[av]:tV.DICTIONARY.F.Form_Error_AuthorizationNumberRequired,[ay]:tV.DICTIONARY.F.Form_Error_DealerIdInvali
15d,[aR]:tV.DICTIONARY.F.Form_Error_SelectInstaller,[aN]:tV.DICTIONARY.F.Form_Error_SwitchoverTemperatureRequired,[aE]:tV.DICTIONARY.F.Form_Error_BTUInputRequired,[aI]:tV.DICTIONARY.F.Form_Error_BTUInputRange,[aC]:tV.DICTIONARY.F.Form_Error_SelectMultiFamilyBonus};function aj(e,r){if(!r)return;let t=a_[r];return t?(0,tV.getDictionaryValue)(e,t):r}e.s(["ERROR_AGREEMENT_REQUIRED",0,ax,"ERROR_AHRI_REQUIRED",0,au,"ERROR_AUTHORIZATION_NUMBER_REQUIRED",0,av,"ERROR_BTU_INPUT_RANGE",0,aI,"ERROR_BTU_INPUT_REQUIRED",0,aE,"ERROR_CITY_INVALID",0,tz,"ERROR_CITY_REQUIRED",0,tU,"ERROR_COMPANY_NAME_INVALID",0,tK,"ERROR_COMPANY_NAME_REQUIRED",0,tW,"ERROR_CREW_LEADER_SIGNATURE_REQUIRED",0,am,"ERROR_DATE_REQUIRED",0,t3,"ERROR_DEALER_ID_INVALID",0,ay,"ERROR_EMAIL_INVALID",0,tX,"ERROR_EMAIL_MISMATCH",0,t0,"ERROR_EMAIL_REQUIRED",0,tJ,"ERROR_FIRST_NAME_INVALID",0,t$,"ERROR_FIRST_NAME_REQUIRED",0,tH,"ERROR_GAS_ACCOUNT_INVALID",0,ae,"ERROR_INCOME_ELIGIBLE_EXCEEDS_TOTAL",0,ab,"ERROR_INCOME_ELIGIBLE_REQUIRED",0,af,"ERROR_INSTALL_BEFORE_PURCHASE",0,t9,"ERROR_INSTALL_DATE_FUTURE",0,t8,"ERROR_INSTALL_DATE_REQUIRED",0,t5,"ERROR_LAST_NAME_INVALID",0,tQ,"ERROR_LAST_NAME_REQUIRED",0,tG,"ERROR_MODEL_REQUIRED",0,ai,"ERROR_NUMBER_INVALID",0,ap,"ERROR_PHONE_INVALID",0,t2,"ERROR_PHONE_REQUIRED",0,t1,"ERROR_PURCHASE_DATE_FUTURE",0,t6,"ERROR_PURCHASE_DATE_REQUIRED",0,t4,"ERROR_SELECT_BRAND",0,ao,"ERROR_SELECT_BUILDING_TYPE",0,at,"ERROR_SELECT_CHECK_PAYABLE",0,as,"ERROR_SELECT_INSTALLATION_TYPE",0,al,"ERROR_SELECT_INSTALLER",0,aR,"ERROR_SELECT_MULTI_FAMILY_BONUS",0,aC,"ERROR_SELECT_OPTION",0,ar,"ERROR_SELECT_PROPERTY_TYPE",0,aa,"ERROR_SELECT_PURCHASER_TYPE",0,an,"ERROR_SERIAL_REQUIRED",0,ad,"ERROR_SIGNATURE_DATE_FUTURE",0,t7,"ERROR_SIGNATURE_REQUIRED",0,ac,"ERROR_STATE_REQUIRED",0,tZ,"ERROR_STREET_ADDRESS_INVALID",0,tY,"ERROR_STREET_ADDRESS_REQUIRED",0,tB,"ERROR_SWITCHOVER_TEMPERATURE_REQUIRED",0,aN,"ERROR_TERMS_REQUIRED",0,ah,"ERROR_TOTAL_UNITS_REQUIRED",0,ag,"ERROR_ZIP_REQUIRED",0,tq,"translateFormError",0,aj],25929);let aS=tR.object({installStreet:tR.string({required_error:tB}).min(1,tB).max(60,"Max 60 characters").regex(tS,tY),installCity:tR.string({required_error:tU}).min(1,tU).max(30,"Max 30 characters").regex(tj,tz),installState:tR.literal("MN"),installZip:tR.string({required_error:tq}).min(1,tq).regex(tE,tI),accountNumber:tR.string().max(14).refine(e=>!e||""===e||t_.test(e),ae).optional().or(tR.literal("")),buildingType:tR.string({required_error:at}).min(1,at),installationType:tR.string({required_error:al}).min(1,al),checkPayableTo:tR.enum(["PURCHASER","COMPANY"],{required_error:as,message:as}),purchaserFirstName:tR.string().max(30).regex(tj,t$).optional().or(tR.literal("")),purchaserLastName:tR.string().max(40).regex(tj,tQ).optional().or(tR.literal("")),companyName:tR.string().max(40).regex(tD,tK).optional().or(tR.literal("")),additionalPurchaser:tR.boolean().default(!1),secondPurchaserFirstName:tR.string().max(30).regex(tj,t$).optional().or(tR.literal("")),secondPurchaserLastName:tR.string().max(40).regex(tj,tQ).optional().or(tR.literal("")),mailingAddressDifferent:tR.enum(["YES","NO",""],{message:ar}),mailingStreet:tR.string().max(60).regex(tS,tY).optional().or(tR.literal("")),mailingCity:tR.string().max(30).regex(tj,tz).optional().or(tR.literal("")),mailingState:tR.string().optional().or(tR.literal("")),mailingZip:tR.string().refine(e=>!e||""===e||tE.test(e),tI).optional().or(tR.literal("")),purchaserType:tR.string({required_error:an}).min(1,an),purchaserEmail:tR.string().max(50).email(tX).optional().or(tR.literal("")),purchaserPhone:tR.string().regex(tN,t2).optional().or(tR.literal("")),purchaserAltPhone:tR.string().regex(tN,t2).optional().or(tR.literal("")),waterHeaterType:tR.string({required_error:ar}).min(1,ar),ahriReferenceNumber:tR.string().max(30).optional().or(tR.literal("")),brand:tR.string({required_error:ao}).min(1,ao),modelNumber:tR.string({required_error:ai}).min(1,ai),serialNumber:tR.string({required_error:ad}).min(1,ad).max(30),installDate:tR.string({required_error:t5}).regex(tC,t5).refine(e=>tA(e)<=new Date,t8),rebateAmount:tR.number().default(0),equipmentCapacity:tR.string().default(""),equipmentPotableVolume:tR.string().default(""),equipmentUef:tR.string().default(""),equipmentThermalEff:tR.string().default(""),equipmentUsageBin:tR.string().default(""),equipmentInputRate:tR.string().default(""),equipmentStandbyLoss:tR.string().default(""),dealerPath:tR.enum(["yes","no",""]),dealerId:tR.string().optional().or(tR.literal("")),dealerCompanyName:tR.string().max(40).regex(tD,tK).optional().or(tR.literal("")),dealerStreet:tR.string().max(60).regex(tS,tY).optional().or(tR.literal("")),dealerCity:tR.string().max(30).regex(tj,tz).optional().or(tR.literal("")),dealerState:tR.string().optional().or(tR.literal("")),dealerZip:tR.string().refine(e=>!e||""===e||tE.test(e),tI).optional().or(tR.literal("")),rebateContactName:tR.string({required_error:tH}).min(1,tH).regex(tj,t$),rebateContactEmail:tR.string({required_error:tX}).max(50).email(tX),confirmEmail:tR.string({required_error:tX}).max(50).email(tX),dealerPhone:tR.string({required_error:t1}).regex(tN,t2),additionalInfo:tR.string().max(500).optional(),dealerSignature:tR.string({required_error:ac}).min(1,ac).max(30).regex(tj,t$),signatureDate:tR.string({required_error:t3}).regex(tC,t3),agreeAndSubmit:tR.boolean().refine(e=>!0===e,{message:ax})}).superRefine((e,r)=>
15{"yes"!==e.dealerPath&&"no"!==e.dealerPath&&r.addIssue({code:tR.ZodIssueCode.custom,message:ar,path:["dealerPath"]}),"PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tH,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tG,path:["purchaserLastName"]})),"COMPANY"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tW,path:["companyName"]}),e.additionalPurchaser&&(e.secondPurchaserFirstName&&""!==e.secondPurchaserFirstName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tH,path:["secondPurchaserFirstName"]}),e.secondPurchaserLastName&&""!==e.secondPurchaserLastName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tG,path:["secondPurchaserLastName"]})),"YES"!==e.mailingAddressDifferent&&"NO"!==e.mailingAddressDifferent&&r.addIssue({code:tR.ZodIssueCode.custom,message:ar,path:["mailingAddressDifferent"]}),"YES"===e.mailingAddressDifferent&&(e.mailingStreet&&""!==e.mailingStreet.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tB,path:["mailingStreet"]}),e.mailingCity&&""!==e.mailingCity.trim()?tj.test(e.mailingCity)||r.addIssue({code:tR.ZodIssueCode.custom,message:tz,path:["mailingCity"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tU,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tZ,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?tE.test(e.mailingZip)||r.addIssue({code:tR.ZodIssueCode.custom,message:tI,path:["mailingZip"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tq,path:["mailingZip"]})),"yes"!==e.dealerPath||e.dealerId&&/^\d{6}$/.test(e.dealerId)||r.addIssue({code:tR.ZodIssueCode.custom,message:ay,path:["dealerId"]}),"no"===e.dealerPath&&(e.dealerCompanyName&&""!==e.dealerCompanyName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tW,path:["dealerCompanyName"]}),e.dealerStreet&&""!==e.dealerStreet.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tB,path:["dealerStreet"]}),e.dealerCity&&""!==e.dealerCity.trim()?tj.test(e.dealerCity)||r.addIssue({code:tR.ZodIssueCode.custom,message:tz,path:["dealerCity"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tU,path:["dealerCity"]}),e.dealerState&&""!==e.dealerState.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tZ,path:["dealerState"]}),e.dealerZip&&""!==e.dealerZip.trim()?tE.test(e.dealerZip)||r.addIssue({code:tR.ZodIssueCode.custom,message:tI,path:["dealerZip"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tq,path:["dealerZip"]})),e.rebateContactEmail!==e.confirmEmail&&r.addIssue({code:tR.ZodIssueCode.custom,message:t0,path:["confirmEmail"]})});e.s(["waterHeaterRebateSchema",0,aS],20375);let aD=["rate_limited","invalid_submission","attachments_rejected","form_not_configured","downstream_rejected","downstream_timeout","downstream_unavailable","no_confirmation","dealer_not_found","duplicate_submission","account_not_found","not_eligible","network_error","unreadable_response","server_error"],aT={rate_limited:tV.DICTIONARY.F.FormSubmit_RateLimited,invalid_submission:tV.DICTIONARY.F.FormSubmit_InvalidSubmission,attachments_rejected:tV.DICTIONARY.F.FormSubmit_AttachmentsRejected,form_not_configured:tV.DICTIONARY.F.FormSubmit_NotConfigured,downstream_rejected:tV.DICTIONARY.F.FormSubmit_Rejected,downstream_timeout:tV.DICTIONARY.F.FormSubmit_Timeout,downstream_unavailable:tV.DICTIONARY.F.FormSubmit_Unavailable,no_confirmation:tV.DICTIONARY.F.FormSubmit_NoConfirmation,dealer_not_found:tV.DICTIONARY.F.FormSubmit_DealerNotFound,duplicate_submission:tV.DICTIONARY.F.FormSubmit_Duplicate,account_not_found:tV.DICTIONARY.F.FormSubmit_AccountNotFound,not_eligible:tV.DICTIONARY.F.FormSubmit_NotEligible,network_error:tV.DICTIONARY.F.FormSubmit_NetworkError,unreadable_response:tV.DICTIONARY.F.FormSubmit_UnreadableResponse,server_error:tV.DICTIONARY.F.FormSubmit_Generic};function aA(e,r){let t=r&&aT[r]||tV.DICTIONARY.F.FormSubmit_Generic;return(0,tV.getDictionaryValue)(e,t)}async function aF(e,r){var t;let a;try{let r=await e.json();"object"==typeof r&&null!==r&&(a=r)}catch{a=void 0}let l=a?.errorCode,n="string"==typeof l&&aD.includes(l)?l:void 0;if(e.ok&&a?.success===!0){let e=a.confirmationNumber;
15return"string"==typeof e&&""!==e.trim()?{confirmationNumber:e.includes(":")?e.split(":").pop()?.trim()??e.trim():e.trim()}:{errorCode:"no_confirmation",errorMessage:aA(r,"no_confirmation")}}let s=n??(e.ok?"unreadable_response":429===(t=e.status)?"rate_limited":404===t?"form_not_configured":400===t?"invalid_submission":502===t||503===t||504===t?"downstream_unavailable":"server_error");return{errorCode:s,errorMessage:aA(r,s)}}e.s(["networkErrorMessage",0,function(e){return aA(e,"network_error")},"readSubmitOutcome",0,aF,"resolveSubmitErrorMessage",0,aA],39271);var aO=e.i(91398),aw=e.i(16645);e.s(["RebateConfirmation",0,function({confirmationNumber:e,confirmationNumberLabel:r,printLabel:t,submitAnotherLabel:a,successMessage:l,thankYouLabel:n,onSubmitAnother:s}){return(0,aO.jsxs)("section",{className:"rebate-confirmation-printable rounded-2xl border border-[var(--color-grey-3)] p-8 text-center","aria-labelledby":"rebate-confirmation-heading",children:[(0,aO.jsx)("h2",{id:"rebate-confirmation-heading",className:"mb-4 text-[24px] font-bold text-[var(--color-dark-blue)]",children:n}),(0,aO.jsxs)("p",{className:"text-[18px] text-[var(--color-text-primary)]",children:[r," ",(0,aO.jsx)("strong",{children:e})]}),l?(0,aO.jsx)("div",{className:"mt-4 text-[var(--color-text-secondary)]",children:l}):null,(0,aO.jsxs)("div",{className:"rebate-confirmation-no-print mt-6 flex flex-col items-center justify-center gap-3 sm:flex-row",children:[(0,aO.jsxs)("button",{type:"button",onClick:()=>window.print(),className:"inline-flex items-center justify-center gap-2 rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-hover)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:[(0,aO.jsx)(aw.PrintIcon,{className:"h-5 w-5","aria-hidden":"true"}),t]}),s&&a?(0,aO.jsx)("button",{type:"button",onClick:s,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:a}):null]})]})}],44861),e.s([],38793);let aL=["003","013","050","051","078","079","097"],aP=["071"],ak=["098"];function aM(e){return aL.includes(e)}function aV(e){return aP.includes(e)}function aB(e){return ak.includes(e)}let aY=(0,d.createContext)(null);function aU(){let e=(0,d.useContext)(aY);if(!e)throw Error("useWaterHeaterDataContext must be used within a WaterHeaterDataProvider");return e}e.s(["WaterHeaterDataProvider",0,function({children:e}){let r=function(){let[e,r]=(0,d.useState)(null),[t,a]=(0,d.useState)(!0),[l,n]=(0,d.useState)(null);(0,d.useEffect)(()=>{(async()=>{a(!0),n(null);try{let e=await fetch("/api/forms/water-heater-rebate/data?region=MN");if(!e.ok)throw Error("Failed to fetch water heater data");let t=await e.json();if("object"!=typeof t||null===t||"error"in t)throw Error(t?.error??"Invalid response");r(t)}catch(e){n(e instanceof Error?e.message:"Failed to load form data")}finally{a(!1)}})()},[]);let s=(0,d.useCallback)(r=>e?aM(r)?e.resBrands:aV(r)?e.comBrands:aB(r)?e.idBrands:[]:[],[e]),o=(0,d.useCallback)((r,t)=>e&&t?aM(r)?e.resModels.filter(e=>e.brand===t).map(e=>({brand:e.brand,ahri:e.ahri,modelNum:e.modelNum,description:e.description,uef:e.uef,thermalEff:0,storageVol:e.storageVol,usageBin:e.usageBin,inputRate:e.inputNum,potableVol:0,stbyLost:0,modelType:"residential"})):aV(r)?e.comModels.filter(e=>e.brand===t).map(e=>({brand:e.brand,ahri:e.ahri,modelNum:e.modelNum,description:e.description,uef:e.uef,thermalEff:e.thermalEff,storageVol:e.storageVol,usageBin:e.usageBin,inputRate:e.inputRate,potableVol:0,stbyLost:e.stbyLost,modelType:"commercial"})):aB(r)?e.idModels.filter(e=>e.brand===t).map(e=>({brand:e.brand,ahri:e.ahri,modelNum:e.modelNum,description:e.description,uef:0,thermalEff:0,storageVol:e.potableVol,usageBin:"",inputRate:0,potableVol:e.potableVol,stbyLost:e.stbyLost,modelType:"indirect"})):[]:[],[e]),i=(0,d.useCallback)(r=>{if(!e||!r)return null;let t=r.trim(),a=e.resModels.find(e=>String(e.ahri).trim()===t);if(a)return{brand:a.brand,ahri:a.ahri,modelNum:a.modelNum,description:a.description,uef:a.uef,thermal
15Eff:0,storageVol:a.storageVol,usageBin:a.usageBin,inputRate:a.inputNum,potableVol:0,stbyLost:0,modelType:"residential"};let l=e.comModels.find(e=>String(e.ahri).trim()===t);if(l)return{brand:l.brand,ahri:l.ahri,modelNum:l.modelNum,description:l.description,uef:l.uef,thermalEff:l.thermalEff,storageVol:l.storageVol,usageBin:l.usageBin,inputRate:l.inputRate,potableVol:0,stbyLost:l.stbyLost,modelType:"commercial"};let n=e.idModels.find(e=>String(e.ahri).trim()===t);return n?{brand:n.brand,ahri:n.ahri,modelNum:n.modelNum,description:n.description,uef:0,thermalEff:0,storageVol:n.potableVol,usageBin:"",inputRate:0,potableVol:n.potableVol,stbyLost:n.stbyLost,modelType:"indirect"}:null},[e]),u=(0,d.useCallback)(r=>{if(!e||!r.model||!r.typeCode||!r.installationType)return 0;let{typeCode:t,installationType:a,model:l,region:n}=r,s=e.rules.find(e=>{if(e.typeCode!==t||e.installTp!==a||"WR"!==e.projectTp)return!1;if("071"===t){if(!function(e,r){if(!e||!r)return!1;let t=e.split(" ");if(2!==t.length)return!1;let a=parseFloat(t[0]),l=parseFloat(t[1]);if(isNaN(a)||isNaN(l))return!1;let n=r>1?r/100:r;return n>=a&&n<=l}(e.thermalEff,l.thermalEff))return!1;if(e.inputRate&&"0"!==e.inputRate){let r=parseFloat(e.inputRate);if(!isNaN(r)&&l.inputRate<r)return!1}return!0}return"098"===t||!!function(e,r){if(!e||!r)return!1;let t=e.split(" ");if(2!==t.length)return!1;let a=parseFloat(t[0]),l=parseFloat(t[1]);return!(isNaN(a)||isNaN(l))&&r>=a&&r<=l}(e.uef,l.uef)&&("MS"===n||"OK"===n||"AR"===n||(!e.usageBin||!l.usageBin||e.usageBin.toLowerCase()===l.usageBin.toLowerCase())&&("MN"!==n||"013"!==t||!!function(e,r,t){if(!r)return!0;let a=parseFloat(r);if(isNaN(a))return!0;if(!e)return t<=a;let l=parseFloat(e);return isNaN(l)?t<=a:t>=l&&t<=a}(e.storageLow,e.storageHigh,l.storageVol)))&&!0});if(s){let e=parseFloat(s.custRebate);return isNaN(e)?0:e}return 0},[e]);return(0,d.useMemo)(()=>({data:e,isLoading:t,error:l,getBrandsForType:s,getModelsForBrand:o,findModelByAhri:i,calculateRebate:u}),[e,t,l,s,o,i,u])}();return(0,aO.jsx)(aY.Provider,{value:r,children:e})},"useWaterHeaterDataContext",0,aU],76065);var az=e.i(14601),aZ=e.i(43725),aq=e.i(59369),aH=e.i(47657);function a$({children:e,label:r,helperText:t,errorMessage:a,required:l=!1,disabled:n=!1,isFocused:s=!1,multiline:o=!1,className:i="",id:d,descId:u}){let c=!!a,m=c||!!t,h=(0,aq.cn)("relative flex rounded-[30px] border bg-white","transition-colors duration-200 motion-reduce:transition-none",o?"min-h-[270px] flex-col":"h-[56px] items-center",s&&"ring-2 ring-[var(--color-dark-blue)] ring-offset-1",c?"border-[var(--color-red)]":n?"border-[var(--color-disabled)] bg-[var(--color-medium-grey)]/20 cursor-not-allowed":(0,aq.cn)("border-[var(--color-dark-grey)] hover:border-2",s&&"border-[var(--color-primary-blue)]"));return(0,aO.jsxs)("div",{className:(0,aq.cn)("flex flex-col gap-2",i),children:[r&&(0,aO.jsxs)("label",{htmlFor:d,className:(0,aq.cn)("text-body-md font-semibold text-[var(--color-text-primary)]",c&&"text-[var(--color-red)]"),children:[r,l&&(0,aO.jsx)("span",{className:"ml-1 text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsx)("div",{className:h,children:e}),m&&(0,aO.jsx)("div",{children:c&&a?(0,aO.jsxs)("span",{id:u,className:"flex items-start gap-1 text-body-md text-[var(--color-red)]",role:"alert",children:[(0,aO.jsx)(aH.CircleInfoIcon,{className:"mt-[5px] h-[14px] w-[14px] shrink-0","aria-hidden":"true"}),a]}):t?(0,aO.jsx)("span",{id:u,className:"text-body-md text-[var(--color-text-secondary)]",children:t}):null})]})}function aG(){let[e,r]=(0,d.useState)(!1),t=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{let e=e=>{"Tab"===e.key&&(t.current=!0)},r=()=>{t.current=!1};return document.addEventListener("keydown",e,!0),document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("keydown",e,!0),document.removeEventListener("mousedown",r,!0)}},[]),{isKeyboardFocused:e,handleFocus:()=>{t.current&&r(!0)},handleBlur:()=>{r(!1),t.current=!1}}}e.s([],57034),e.s(["useFieldFocus",0,aG],46071);var aQ=e.i(3910),aW=e.i(11040);function aK({value:e,onChange:r,onBlur:t,onFocus:a,label:l,helperText:n,errorMessage:s,required:o=!1,optional:i=!1,disabled:u=!1,className:c="",placeholder:m,type:h="text",name:p,id:g,maxLength:f,prefixIcon:b,suffixIcon:x,showPasswordToggle:v=!1,multiline:y=!1,rows:R,resize:N="vertical"}){let E=(0,aZ.useI18n)(),I=E?.t??(e=>""),C=(0,d.useId)(),_=g??C,j=`${_}-desc`,{isKeyboardFocused:S,handleFocus:D,handleBlur:T}=aG(),A=()=>{D(),a?.()},F=()=>{T(),t?.()},[O,w]=(0,d.useState)(!1),L=v&&"password"===h?(0,aO.jsx)("button",{type:"button",onClick:()=>w(e=>!e),className:"flex items-center justify-center","aria-label":O?(0,tV.getDictionaryValue)(I,tV.DICTIONARY.H.HidePassword):(0,tV.getDictionaryValue)(I,tV.DICTIONARY.S.ShowPassword),children:O?(0,aO.jsx)(aW.EyeSlashIcon,{className:"h-5 w-5 text-[var(--color-primary-blue)]"}):(0,aO.jsx)(aQ.EyeIcon,{className:"h-5 w-5 text-[var(--color-primary-blue)]"})}):null,P=L||x,k=(0,aq.cn)("w-full h-full bg-transparent","px-[24px] font-light text-[18px] leading-[1.5] text-[var(--color-text-primary)] placeholder:text-[var(--color-medium-grey)]","outline-none",b&&"pl-12",P&&"pr-12",u&&"cursor-not-allowed text-[var(--color-dark-grey)]","date"===h&&"rebate-date-input"),M=(0,aq.cn)("w-full flex-1 bg-transparent","px-[24px] pt-[14px] pb-[6px] font-light text-[18px] leading-[1.5] text-[var(--color-text-primary)] placeholder:text-[var(--color-medium-grey)]","outline-none rounded-[30px]","none"===N&&"resize-none","vertical"===N&&"resize-y","both"===N&&"resize",u&&"cursor-not-allowed text-[var(--color-dark-grey)]");return(0,aO.jsxs)("div",{className:(0,aq.cn)("relative",c),children:[(0,aO.jsx)(a$,{isFocused:S,label:l,helperText:n,errorMessage:s,required:o,optional:i,disabled:u,multiline:y,id:_,descId:j,children:y?(0,aO.jsx)("textarea",{id:_,name:p,value:e,onCh
15ange:e=>r(e.target.value),onFocus:A,onBlur:F,placeholder:m,disabled:u,required:o,maxLength:f,rows:R,"aria-required":!!o||void 0,"aria-invalid":!!s||void 0,"aria-describedby":n||s?j:void 0,className:M}):(0,aO.jsxs)(aO.Fragment,{children:[b&&(0,aO.jsx)("span",{className:"pointer-events-none absolute left-[24px] flex items-center text-[var(--color-dark-grey)]","aria-hidden":"true",children:b}),(0,aO.jsx)("input",{id:_,type:"password"===h&&O?"text":h,name:p,value:e,onChange:e=>r(e.target.value),onFocus:A,onBlur:F,placeholder:m,disabled:u,required:o,maxLength:f,"aria-required":!!o||void 0,"aria-invalid":!!s||void 0,"aria-describedby":n||s?j:void 0,className:k}),P&&(0,aO.jsx)("span",{className:(0,aq.cn)("absolute right-[24px] flex items-center",L?"pointer-events-auto":"pointer-events-none"),"aria-hidden":!L,children:P})]})}),null!=f&&(0,aO.jsxs)("span",{className:"absolute bottom-[-20px] right-0 text-body-md text-[var(--color-text-secondary)]","aria-live":"polite",children:[(e??"").length,"/",f]})]})}e.s(["InputField",0,aK],45892),e.s([],70484);var aJ=e.i(30943),aX=e.i(97597),a0=e.i(26368);function a1({value:e,onChange:r,options:t,label:a,helperText:l,errorMessage:n,required:s=!1,disabled:o=!1,className:i="",placeholder:u,name:c,id:m,searchable:h=!1,onBlur:p,onFocus:g,renderOptionsInPortal:f=!1}){let b=(0,d.useId)(),x=m??b,v=`${x}-desc`,y=`${x}-listbox`,R=`${x}-search`,{isKeyboardFocused:N,handleFocus:E,handleBlur:I}=aG(),[C,_]=(0,d.useState)(!1),[j,S]=(0,d.useState)(-1),[D,T]=(0,d.useState)(""),A=(0,d.useRef)(null),F=(0,d.useRef)(null),O=(0,d.useRef)(null),w=(0,d.useRef)(null),L=(0,d.useRef)(null),[P,k]=(0,d.useState)(null),M=t.find(r=>r.value===e),V=M?.label||u||"",B=!!n,Y=B||!!l,U=h&&D?t.filter(e=>e.label.toLowerCase().includes(D.toLowerCase())):t,z=U.filter(e=>!e.disabled);(0,d.useEffect)(()=>{if(!C)return;let e=e=>{let r=e.target,t=A.current?.contains(r),a=L.current?.contains(r);t||a||(_(!1),S(-1),T(""),p?.())};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[C,p]),(0,d.useEffect)(()=>{if(!f||!C){C||k(null);return}(()=>{if(!w.current)return;let e=w.current.getBoundingClientRect();k({top:e.bottom,left:e.left,width:e.width})})();let e=()=>{_(!1),S(-1),T("")},r=r=>{let t=r.target;t instanceof Node&&L.current?.contains(t)||e()};return window.addEventListener("scroll",r,{capture:!0,passive:!0}),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",r,{capture:!0}),window.removeEventListener("resize",e)}},[C,f]),(0,d.useEffect)(()=>{C&&h&&O.current&&O.current.focus()},[C,h]);let Z=(0,aq.cn)("relative bg-white border","transition-colors duration-200 motion-reduce:transition-none",C?"rounded-t-[28px] rounded-b-none border-b-0":"rounded-[30px]",B?"border-[var(--color-red)]":o?"border-[var(--color-disabled)] bg-[var(--color-medium-grey)]/20 cursor-not-allowed":(0,aq.cn)("border-[var(--color-dark-grey)]",!C&&"hover:border-2",N&&!C&&"ring-2 ring-[var(--color-dark-blue)] ring-offset-1")),q=(0,aq.cn)("w-full flex items-center justify-between bg-transparent","pl-[24px] pr-[12px]",C?"pt-[12px] pb-[6px]":"py-[6px] h-[56px]","font-light text-[18px] leading-[1.5] text-left outline-none","text-[var(--color-text-primary)]",!e&&"text-[var(--color-medium-grey)]",o?"cursor-not-allowed text-[var(--color-dark-grey)]":"cursor-pointer"),H=(0,aq.cn)("flex items-center justify-center shrink-0","w-[38px] h-[38px] px-[13px] py-[8px]"),$=C?(0,aO.jsxs)("div",{className:"border-t border-[var(--color-grey-3)] mx-[3.8%] pt-[20px] pb-[6px]",children:[h&&(0,aO.jsx)("div",{className:"mb-3",children:(0,aO.jsx)("input",{ref:O,id:R,type:"text",value:D,onChange:e=>{T(e.target.value),S(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),S(e=>e<z.length-1?e+1:e)):"ArrowUp"===e.key?(e.preventDefault(),S(e=>e>0?e-1:e)):"Enter"===e.key&&j>=0&&j<z.length?(e.preventDefault(),r(z[j].value),_(!1),S(-1),T(""),F.current?.focus()):"Escape"===e.key&&(e.preventDefault(),_(!1),S(-1),T(""),F.current?.focus())},placeholder:"Type to search...",className:"w-full px-3 py-2 text-[16px] border border-[var(--color-grey-3)] rounded-lg outline-none focus:border-[var(--color-primary-blue)] focu
15s:ring-1 focus:ring-[var(--color-primary-blue)]","aria-label":"Search options"})}),(0,aO.jsx)("div",{id:y,role:"listbox","aria-labelledby":x,className:"flex flex-col gap-[2px] max-h-[267px] overflow-y-auto",children:0===U.length?(0,aO.jsx)("div",{className:"px-[12px] py-[8px] text-[16px] text-[var(--color-text-secondary)]",children:"No results found"}):U.map(t=>{let a=t.value===e,l=z.indexOf(t),n=l===j;return(0,aO.jsx)("button",{type:"button",role:"option","aria-selected":a,disabled:t.disabled,onClick:()=>!t.disabled&&void(r(t.value),_(!1),S(-1),T(""),F.current?.focus(),p?.()),onMouseEnter:()=>!t.disabled&&S(l),className:(0,aq.cn)("w-full text-left px-[12px] py-[8px]","transition-colors text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light",n?"bg-[var(--color-secondary-grey)] border border-[var(--color-medium-grey)] rounded-[12px]":"border border-transparent rounded-[4px]",t.disabled&&"opacity-50 cursor-not-allowed",!t.disabled&&!n&&"hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]"),children:t.label},t.value)})})]}):null,G=C&&!o&&!f,Q=C&&!o&&f&&!!P;return(0,aO.jsxs)("div",{className:(0,aq.cn)("flex flex-col gap-2",i),ref:A,children:[a&&(0,aO.jsxs)("label",{htmlFor:x,className:(0,aq.cn)("text-body-md font-semibold text-[var(--color-text-primary)]",B&&"text-[var(--color-red)]"),children:[a,s&&(0,aO.jsx)("span",{className:"ml-1 text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsx)("div",{className:(0,aq.cn)("relative",G&&"z-50 drop-shadow-[0px_0px_40px_rgba(0,71,130,0.28)]"),children:(0,aO.jsxs)("div",{ref:w,className:Z,children:[(0,aO.jsxs)("button",{ref:F,id:x,type:"button",onClick:()=>{if(!o&&(_(e=>!e),!C)){let r=z.findIndex(r=>r.value===e);S(r>=0?r:0)}},onKeyDown:t=>{if(!o)switch(t.key){case"Enter":case" ":if(t.preventDefault(),C&&j>=0&&j<z.length)r(z[j].value),_(!1),S(-1),F.current?.focus();else{_(!C);let r=z.findIndex(r=>r.value===e);S(r>=0?r:0)}break;case"ArrowDown":if(t.preventDefault(),C)S(e=>e<z.length-1?e+1:e);else{_(!0);let r=z.findIndex(r=>r.value===e);S(r>=0?r:0)}break;case"ArrowUp":if(t.preventDefault(),C)S(e=>e>0?e-1:e);else{_(!0);let r=z.findIndex(r=>r.value===e);S(r>=0?r:0)}break;case"Home":t.preventDefault(),C&&S(0);break;case"End":t.preventDefault(),C&&S(z.length-1);break;case"Escape":t.preventDefault(),_(!1),S(-1),T(""),F.current?.focus();break;case"Tab":_(!1),S(-1),T("")}},onFocus:()=>{E(),g?.()},onBlur:e=>{let r=e.relatedTarget,t=A.current?.contains(r),a=L.current?.contains(r);t||a||I()},disabled:o,"aria-haspopup":"listbox","aria-expanded":C,"aria-controls":C?y:void 0,"aria-required":!!s||void 0,"aria-invalid":!!B||void 0,"aria-describedby":l||n?v:void 0,className:q,children:[(0,aO.jsx)("span",{className:"flex-1 min-w-0 truncate",children:V}),(0,aO.jsx)("span",{className:H,children:C?(0,aO.jsx)(a0.ChevronUpIcon,{className:(0,aq.cn)("w-full h-full",B?"text-[var(--color-red)]":"text-[var(--color-primary-blue)]"),"aria-hidden":"true"}):(0,aO.jsx)(aX.ChevronDownIcon,{className:(0,aq.cn)("w-full h-full",B?"text-[var(--color-red)]":"text-[var(--color-primary-blue)]"),"aria-hidden":"true"})})]}),G&&(0,aO.jsx)("div",{className:"absolute left-[-1px] right-[-1px] top-full z-50 rounded-b-[28px] border border-t-0 border-[var(--color-dark-grey)] bg-white",children:$})]})}),Q&&P&&(0,aJ.createPortal)((0,aO.jsx)("div",{ref:L,style:{position:"fixed",top:P.top,left:P.left,width:P.width},className:"z-[1100] rounded-b-[28px] border border-t-0 border-[var(--color-dark-grey)] bg-white drop-shadow-[0px_0px_40px_rgba(0,71,130,0.28)]",children:$}),document.body),Y&&(0,aO.jsx)("div",{children:B&&n?(0,aO.jsxs)("span",{id:v,className:"flex items-center gap-1 text-body-md text-[var(--color-red)]",role:"alert",children:[(0,aO.jsx)(aH.CircleInfoIcon,{className:"h-[14px] w-[14px] shrink-0","aria-hidden":"true"}),n]}):l?(0,aO.jsx)("span",{id:v,className:"text-body-md text-[var(--color-text-secondary)]",children:l}):null}),(0,aO.jsx)("input",{type:"hidden",name:c,value:e})]})}e.s(["Dropdown",0,a1],94102),e.s([],78118);let a2="verified_dealer_id";function a3(e){if("u"<typeof document)return;let r=encodeURIComponent(JSON.stringify(e));document.cookie=`${a2}=${r}; path=/; max-age=2592000; SameSite=Lax; Secure`}e.s(["getStoredDealerId",0,function(){if("u"<typeof document)return null;for(let e of document.cookie.split(";")){let[r,t]=e.trim().split("=");if(r===a2&&t)try{let e=decodeURIComponent(t),r=JSON.parse(e);if("object"==typeof r&&null!==r&&"dealerId"in r&&"dealerName"in r&&"dealerAddress"in r&&"dealerCityStateZip"in r)return r}catch{break}}return null},"storeDealerId",0,a3],73282),e.s(["PreFormDealerGateway",0,function({onVerified:e,dealerInfo:r,onDealerVerified:t,isDealerVerified:a,formId:l,stateOptions:n,dealerPath:s,onDealerPathChange:o,dealerId:i,onDealerIdChange:u,dealerIdError:c,dealerCompanyName:m,onDealerCompanyNameChange:h,dealerStreet:p,onDealerStreetChange:g,dealerCity:f,onDealerCityChange:b,dealerState:x,onDealerStateChange:v,dealerZip:y,onDealerZipChange:R,errors:N={},dealerAddressUpdateHtml:E}){let[I,C]=(0,d.useState)(!1),[_,j]=(0,d.useState)(null),[S,D]=(0,d.useState)(null),[T,A]=(0,d.useState)(null),F=async e=>{if(j(null),A(null),e){if(!/^\d{6}$/.test(e))return void j("Dealer ID must be exactly 6 digits.");C(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:l})});if(!r.ok)return void j("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void j("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){let e={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};A(e),j(null)}
15else j(t.error??"Dealer ID not found."),A(null)}catch{j("Unable to verify dealer. Please try again.")}finally{C(!1)}}},O=r=>{o(r),j(null),D(null),A(null),t(!1),e(null)};return(0,aO.jsxs)("div",{className:"mb-8 rounded-2xl border border-[var(--color-grey-3)] p-6",children:[(0,aO.jsx)("h2",{className:"mb-4 text-[20px] font-bold text-[var(--color-dark-blue)]",children:"Dealer Information"}),(0,aO.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsx)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:"Do you have a Dealer ID? *"}),(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsx)(az.Radio,{label:"Yes",name:"preFormDealerPath",value:"yes",checked:"yes"===s,onChange:()=>O("yes"),variant:"forms"}),(0,aO.jsx)(az.Radio,{label:"No",name:"preFormDealerPath",value:"no",checked:"no"===s,onChange:()=>O("no"),variant:"forms"})]})]}),"yes"===s&&(0,aO.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,aO.jsx)(aK,{label:"Dealer ID (6-digit number)",value:i,onChange:e=>{u(e),T&&A(null)},placeholder:"",maxLength:6,errorMessage:c??_??void 0,required:!0}),(0,aO.jsx)("button",{type:"button",onClick:()=>F(i),disabled:I||!i,className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:I?"Submittingâ¦":"Submit"}),T&&(0,aO.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,aO.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,aO.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,aO.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,aO.jsx)("span",{className:"font-medium",children:"Dealer Name:"})," ",T.name]}),(0,aO.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,aO.jsx)("span",{className:"font-medium",children:"Dealer Address:"})," ",T.cityStateZip?`${T.address}, ${T.cityStateZip}`:`${T.address}, ${T.city}, ${T.state} ${T.zip}`]})]}),(0,aO.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:E||'Note: If Dealer Name is correct, but address is not, contact <a href="mailto:[email protected]">[email protected]</a> to update the address.'}}),(0,aO.jsx)("button",{type:"button",onClick:()=>{T&&(a3({dealerId:i,dealerName:T.name,dealerAddress:T.address,dealerCityStateZip:T.cityStateZip??""}),e(T),t(!0))},className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:"Verify"})]})]}),"no"===s&&(0,aO.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:"Company Name",value:m,onChange:r=>{h(r),a&&(t(!1),e(null))},maxLength:60,errorMessage:N.dealerCompanyName,required:!0})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:"Street Address",value:p,onChange:r=>{g(r),a&&(t(!1),e(null))},maxLength:60,errorMessage:N.dealerStreet,required:!0})}),(0,aO.jsx)(aK,{label:"City",value:f,onChange:r=>{b(r),a&&(t(!1),e(null))},maxLength:30,errorMessage:N.dealerCity,required:!0}),(0,aO.jsx)(a1,{label:"State",value:x,onChange:r=>{v(r),a&&(t(!1),e(null))},options:n,placeholder:"Select state",errorMessage:N.dealerState,required:!0}),(0,aO.jsx)(aK,{label:"Zip Code",value:y,onChange:r=>{R(r),a&&(t(!1),e(null))},maxLength:10,placeholder:"XXXXX",errorMessage:N.dealerZip,required:!0})]}),S&&(0,aO.jsx)("p",{className:"text-body-md text-[var(--color-red)]",role:"alert",children:S}),(0,aO.jsx)("button",{type:"button",onClick:()=>{(D(null),m.trim())?p.trim()?f.trim()?x?y.trim()&&/^\d{5}(-\d{4})?$/.test(y)?(e({name:m,address:p,city:f,state:x,zip:y}),t(!0)):D(tI):D("Please select a state."):D("Please enter a city."):D("Please enter the street address."):D("Please enter the company name.")}
15,className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:"Verify"}),a&&r&&(0,aO.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,aO.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information Verified"}),(0,aO.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,aO.jsx)("span",{className:"font-medium",children:"Company Name:"})," ",r.name]}),(0,aO.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,aO.jsx)("span",{className:"font-medium",children:"Address:"})," ",r.address,", ",r.city,", ",r.state," ",r.zip]})]})]})]})]})}],20280),e.s([],62768);let a4=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],a5=[{value:"",label:""},{value:"A",label:"AGENCY"},{value:"B",label:"BUILDER"},{value:"L",label:"LANDLORD"},{value:"O",label:"OWNER"},{value:"R",label:"RENTER"}],a8="https://assets.centerpointenergy.com/api/public/content/find-your-account-number.pdf?v=9d12e0d7",a6="Customer's CenterPoint Energy Gas Account Number",a9=[{value:"",label:""},...a4.map(e=>({value:e.value,label:e.value}))],a7=[{value:"TH_CB_NHEF",label:"New High Efficiency Furnace"},{value:"TH_CB_NSEF",label:"New Standard Efficiency Furnace"},{value:"TH_CB_AC",label:"Air Conditioner"},{value:"TH_CB_TO",label:"Thermostat Only"}];function le({number:e,title:r,children:t,className:a}){return(0,aO.jsxs)("section",{className:(0,aq.cn)("w-full",a),children:[(0,aO.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[void 0!==e&&(0,aO.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,aO.jsx)("h2",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:r})]}),(0,aO.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:t})]})}function lr({value:e,onChange:r,onBlur:t,errorMessage:a,customerVoice:l=!1,required:n=!1,className:s,showHelpText:o=!1}){let i=(0,aZ.useI18n)(),d=i?.t??(e=>""),u=l?(0,tV.getDictionaryValue)(d,tV.DICTIONARY.F.Form_Label_GasAccountNumberCustomer):(0,tV.getDictionaryValue)(d,tV.DICTIONARY.F.Form_Label_GasAccountNumber),c=(0,tV.getDictionaryValue)(d,tV.DICTIONARY.F.Form_Placeholder_GasAccount);return(0,aO.jsxs)("div",{className:(0,aq.cn)("flex flex-col gap-1 sm:col-span-2",s),children:[(0,aO.jsx)(aK,{label:u,value:e,onCh
15ange:r,onBlur:t,maxLength:14,placeholder:c,errorMessage:a,required:n}),o&&(0,aO.jsxs)("p",{className:"mt-5 text-sm text-[var(--color-text-secondary)]",children:["Note: Need help"," ",(0,aO.jsx)("button",{type:"button",onClick:()=>tT(a8),className:"text-[var(--color-primary-blue)] underline hover:no-underline","aria-label":"Link to find the account number on a bill or statement",children:"finding your account number?"})]})]})}function lt(e){return e.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}e.s(["ACCEPTED_FILE_TYPES",0,["image/jpeg","image/gif","image/png","application/pdf"],"ACCOUNT_NUMBER_GUIDE_URL",0,a8,"GAS_ACCOUNT_NUMBER_LABEL",0,a6,"GAS_ACCOUNT_NUMBER_LABEL_CUSTOMER",0,"CenterPoint Energy Gas Account Number","GAS_ACCOUNT_NUMBER_MAX_LENGTH",0,14,"INSTALLATION_TYPE_CHECKBOXES",0,a7,"MAX_FILE_SIZE_MB",0,5,"MN_STATE_OPTION",0,[{value:"MN",label:"MN"}],"PURCHASER_TYPES",0,a5,"REBATE_BUILDING_TYPES",0,[{value:"",label:""},{value:"SINGLE_FAMILY",label:"Single Family"},{value:"TOWNHOME",label:"Townhome"},{value:"MULTI_FAMILY",label:"Multi-Family"},{value:"OFFICE_BUILDING",label:"Office Building"},{value:"HOSPITAL",label:"Hospital"},{value:"HOTEL",label:"Hotel"},{value:"FAST_FOOD",label:"Fast Food Restaurant"},{value:"GROCERY_STORE",label:"Grocery Store"},{value:"HEALTH_CLINIC",label:"Health Clinic"},{value:"ELEMENTARY_SCHOOL",label:"Elementary School"},{value:"NURSING_HOME",label:"Nursing Home"},{value:"MOTEL",label:"Motel"},{value:"MEN_DORMITORIES",label:"Men Dormitories"},{value:"LAUNDROMAT",label:"Laundromat"},{value:"RETAIL_STORE",label:"Retail Store"},{value:"JR_HIGH_SCHOOL",label:"Jr High/High School"},{value:"COMMERCIAL_LAUNDRY",label:"Commercial Laundry Facility"}
15,{value:"RESTAURANT",label:"Sit Down Restaurant"},{value:"WAREHOUSE",label:"Warehouse"},{value:"WOMEN_DORMITORIES",label:"Women Dormitories"},{value:"OTHER",label:"Other"},{value:"TWO_PLEX_TO_FOUR_PLEX",label:"Two-Plex to Four-Plex"}],"STATE_OPTIONS",0,a9,"US_STATES",0,a4],50547),e.s([],22738),e.s(["evaluateRebateSubmit",0,function({isValid:e,uploads:r=[],blockedMessage:t="Please fix the highlighted fields before submitting."}){let a=!0;for(let e of r)e.satisfied?e.setError(void 0):(e.setError(e.message),a=!1);let l=!e||!a;return{blocked:l,generalError:l?t:void 0}},"focusFirstInvalidField",0,function(e){if("u"<typeof document)return;let r=()=>{let r=document.querySelector('[aria-invalid="true"]:not(.sr-only)'),t=document.querySelector('[role="alert"]'),a=r??t??e??null;a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),"function"==typeof a.focus&&a.focus({preventScroll:!0}))};setTimeout(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(r):r()},0)}],58360),e.s(["FormSection",0,le],84637),e.s(["GasAccountNumberField",0,lr],46203),e.s(["InstallationSection",0,function(){let e=(0,aZ.useI18n)(),r=e?.t??(e=>""),{control:t,formState:{errors:a}}=q(),{data:l,isLoading:n}=aU(),[s,o]=(0,d.useState)(!1),i=(0,d.useMemo)(()=>l?.buildingTypes?l.buildingTypes.map(e=>({value:e.key,label:lt(e.value)})):[],[l?.buildingTypes]),u=(0,d.useMemo)(()=>l?.installationTypes?l.installationTypes.map(e=>({value:e.key,label:lt(e.value)})):[],[l?.installationTypes]);return(0,aO.jsx)(le,{number:1,title:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)(z,{control:t,name:"installStreet",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(r,a.installStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"installCity",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,a.installCity?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"installState",render:({field:e})=>(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:[{value:"MN",label:"MN"}],placeholder:"MN",errorMessage:aj(r,a.installState?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"installZip",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:aj(r,a.installZip?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"accountNumber",render:({field:e})=>(0,aO.jsx)(lr,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:aj(r,a.accountNumber?.message)})}),(0,aO.jsx)(z,{control:t,name:"buildingType",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_BuildingType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:i,placeholder:n?(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_Loading):(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_SelectBuildingType),errorMessage:aj(r,a.buildingType?.message),disabled:n||0===i.length,required:!0})})}),(0,aO.jsx)(z,{control:t,name:"installationType",render:({field:e})=>(0,aO.jsxs)("div",{className:"sm:col-span-2 flex flex-col gap-2",children:[(0,aO.jsxs)("div",{className:"flex items-center gap-2",children:[(0,aO.jsxs)("label",{htmlFor:"installationType-dropdown",className:"text-body-md font-semibold text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_InstallationType)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,aO.jsxs)("div",{className:"relative inline-block",children:[(0,aO.jsx)("button",{type:"button",className:"text-sm text-[var(--color-primary-blue)] underline hover:no-underline",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),"aria-describedby":"installation-type-tooltip",children:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Helper_MoreInformation)}),s&&(0,aO.jsx)("div",{id:"installation-type-tooltip",role:"tooltip",className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,aO.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
15webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,aO.jsx)(a1,{id:"installationType-dropdown",label:"",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:u,placeholder:n?(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_Loading):(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_SelectInstallationType),errorMessage:aj(r,a.installationType?.message),disabled:n||0===u.length})]})})]})})}],82974);var la=e.i(19394),ll=e.i(51078),ln=e.i(99013);let ls=e=>(0,aO.jsx)("svg",{viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,aO.jsxs)("g",{children:[(0,aO.jsx)("path",{d:"M15.4286 0C16.8348 0 18 1.16518 18 2.57143V15.4286C18 16.875 16.8348 18 15.4286 18H2.57143C1.125 18 1.22919e-06 16.875 1.22919e-06 15.4286V2.57143C1.22919e-06 1.16518 1.125 0 2.57143 0H15.4286ZM15.4286 1.92857H2.57143C2.20982 1.92857 1.92857 2.25 1.92857 2.57143V15.4286C1.92857 15.7902 2.20982 16.0714 2.57143 16.0714H15.4286C15.75 16.0714 16.0714 15.7902 16.0714 15.4286V2.57143C16.0714 2.25 15.75 1.92857 15.4286 1.92857Z",fill:"currentColor"}),(0,aO.jsx)("line",{x1:"16.3536",y1:"1.35355",x2:"1.35355",y2:"16.3536",stroke:"currentColor"})]})}),lo=({label:e,checked:r,indeterminate:t=!1,onChange:a,disabled:l=!1,variant:n="forms",count:s,name:o,value:i,id:u,required:c,className:m="","aria-describedby":h})=>{let p=(0,d.useId)(),g=u??p,f=(0,d.useRef)(null);(0,d.useEffect)(()=>{f.current&&(f.current.indeterminate=t&&!r)},[t,r]);let b=t&&!r,x=(0,aq.cn)("group relative inline-flex items-center","h-[48px] rounded-[40px]","gap-[12px] lg:gap-[4px]","py-[4px] pr-[12px]","cursor-pointer select-none","transition-colors duration-200 ease-in-out motion-reduce:transition-none","after:absolute after:inset-0 after:rounded-[8px] after:pointer-events-none after:content-['']","has-[input:focus-visible]:after:ring-2","has-[input:focus-visible]:after:ring-[var(--color-primary-blue-hover)]",l&&"cursor-not-allowed pointer-events-none",m),v=(0,aq.cn)("size-[32px] lg:size-[18px]","transition-colors duration-200 motion-reduce:transition-none",l?"text-[var(--color-disabled)]":"text-[var(--color-primary-blue)]",!r&&!l&&!b&&"rounded-[4px] group-hover:bg-[var(--color-med-blue)]"),y=(0,aq.cn)("font-sans","filter"===n?"text-body-lg-semi lg:text-body-md-medium":"text-body-md",l?"text-[var(--color-disabled-dark)]":"text-[var(--color-text-secondary)]","group-has-[input:focus-visible]:underline","group-has-[input:focus-visible]:[text-decoration-skip-ink:none]",!l&&"group-hover:underline"),R=(0,aq.cn)("text-body-lg-semi lg:text-body-md-medium",l?"text-[var(--color-disabled-dark)]":"text-[var(--color-text-secondary)]"),N=l?ls:b?ln.SquareMinusIcon:r?ll.SquareCheckIcon:la.SquareIcon;return(0,aO.jsxs)("label",{htmlFor:g,className:x,children:[(0,aO.jsx)("input",{ref:f,id:g,type:"checkbox",checked:r,onChange:e=>a(e.target.checked),disabled:l,name:o,value:i,"aria-required":!!c||void 0,"aria-describedby":h,className:"sr-only"}),(0,aO.jsx)("span",{className:"flex items-center justify-center size-[48px] lg:size-[38px] flex-shrink-0","aria-hidden":"true",children:(0,aO.jsx)(N,{className:v})}),(0,aO.jsx)("span",{className:y,children:e}),"filter"===n&&void 0!==s&&(0,aO.jsxs)("span",{className:R,children:["Â (",s,")"]})]})};e.s(["Checkbox",0,lo],30798);let li=a5.map(e=>({value:e.value,label:e.label}));function ld({label:e,value:r,highlight:t=!1,className:a}){return(0,aO.jsxs)("div",{className:(0,aq.cn)("flex min-w-0 flex-col gap-1",a),children:[(0,aO.jsx)("span",{className:"text-body-md font-semibold break-words text-[var(--color-text-primary)]",children:e}),(0,aO.jsx)("span",{className:(0,aq.cn)("text-[18px] leading-[1.5] font-light break-words text-[var(--color-text-primary)]",t&&"text-[24px] font-semibold text-[var(--color-primary-blue)]"),children:r})]})}function lu({label:e,amount:r,className:t}){let a="string"==typeof r?r:`$${(r??0).toFixed(2)}`;return(0,aO.jsx)(ld,{label:e,value:a,highlight:!0,className:t})}function lc({label:e,onChange:r,accept:t=["image/jpeg","image/gif","
15image/png","application/pdf"],maxSizeMB:a=5,maxFiles:l,multiple:n=!1,required:s=!1,optional:o=!1,errorMessage:i,helperText:u,className:c}){let m=(0,d.useId)(),h=(0,d.useId)(),p=(0,d.useRef)(null),[g,f]=(0,d.useState)([]),[b,x]=(0,d.useState)(null),v=i??b;return(0,aO.jsxs)("div",{className:(0,aq.cn)("flex flex-col gap-2",c),children:[(0,aO.jsxs)("label",{htmlFor:m,className:(0,aq.cn)("text-body-md font-semibold text-[var(--color-text-primary)]",v&&"text-[var(--color-red)]"),children:[e,s&&(0,aO.jsx)("span",{className:"ml-1 text-[var(--color-red)]","aria-hidden":"true",children:"*"}),o&&(0,aO.jsx)("span",{className:"ml-1 font-normal text-[var(--color-text-secondary)]",children:"(Optional)"})]}),(0,aO.jsxs)("div",{className:(0,aq.cn)("flex items-center gap-3 rounded-[30px] border px-6 py-3",v?"border-[var(--color-red)]":"border-[var(--color-dark-grey)]"),children:[(0,aO.jsx)("button",{type:"button",onClick:()=>p.current?.click(),className:"shrink-0 rounded-full bg-[var(--color-primary-blue)] px-4 py-2 text-sm font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-1",children:n?"Choose Files":"Choose File"}),(0,aO.jsx)("span",{className:"truncate text-[16px] text-[var(--color-text-secondary)]",children:g.length>0?g.map(e=>e.name).join(", "):"No file chosen"}),(0,aO.jsx)("input",{ref:p,id:m,type:"file",accept:t.join(","),multiple:n,required:s,onChange:e=>{let n=Array.from(e.target.files??[]);for(let r of(x(null),n))if(!t.includes(r.type)||r.size>1024*a*1024){x(`Please upload valid files (JPEG, PDF, GIF, or PNG, max ${a}MB each)`),e.target.value="";return}let s=new Set(g.map(e=>`${e.name}-${e.size}`)),o=[...g,...n.filter(e=>!s.has(`${e.name}-${e.size}`))];if(void 0!==l&&o.length>l){x(`Maximum ${l} file${1!==l?"s":""} allowed`),e.target.value="";return}f(o),r(o),e.target.value=""},className:"sr-only","aria-required":!!s||void 0,"aria-invalid":!!v||void 0,"aria-describedby":v?h:void 0})]}),u&&(0,aO.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)]",children:u}),g.length>0&&(0,aO.jsx)("ul",{className:"flex flex-col gap-1",children:g.map((e,t)=>(0,aO.jsxs)("li",{className:"flex items-center gap-2 text-sm text-[var(--color-text-primary)]",children:[(0,aO.jsx)("span",{className:"flex-1 truncate",children:e.name}),(0,aO.jsx)("button",{type:"button",onClick:()=>{let e;f(e=g.filter((e,r)=>r!==t)),r(e),p.current&&(p.current.value="")},className:"shrink-0 text-[var(--color-red)] hover:underline focus:outline-none","aria-label":`Remove ${e.name}`,children:"Remove"})]},e.name+e.size))}),v&&(0,aO.jsxs)("span",{id:h,className:"flex items-center gap-1 text-body-md text-[var(--color-red)]",role:"alert",children:[(0,aO.jsx)(aH.CircleInfoIcon,{className:"h-[14px] w-[14px] shrink-0","aria-hidden":"true"}),v]})]})}function lm(e){return String(e).trim().toLowerCase()}function lh(e){let r=new Map;for(let{modelNumber:t,ahri:a}of e){let e=lm(t),l=r.get(e)??new Set;l.add(String(a??"").trim()),r.set(e,l)}let t=new Set;for(let[e,a]of r)a.size>1&&t.add(e);return t}e.s(["PurchaserSection",0,function(){let e=(0,aZ.useI18n)(),r=e?.t??(e=>""),{control:t,watch:a,setValue:l,formState:{errors:n}}=q(),s=a("checkPayableTo"),o=a("additionalPurchaser"),i=a("mailingAddressDifferent"),d=e=>{"COMPANY"===e?(l("purchaserFirstName","",{shouldValidate:!1}),l("purchaserLastName","",{shouldValidate:!1}),l("additionalPurchaser",!1,{shouldValidate:!1}),l("secondPurchaserFirstName","",{shouldValidate:!1}),l("secondPurchaserLastName","",{shouldValidate:!1})):"PURCHASER"===e&&l("companyName","",{shouldValidate:!1})},u=e=>{"NO"===e&&(l("mailingStreet","",{shouldValidate:!1}),l("mailingCity","",{shouldValidate:!1}),l("mailingState","MN",{shouldValidate:!1}),l("mailingZip","",{shouldValidate:!1}))};return(0,aO.jsx)(le,{number:2,title:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:t,name:"checkPayableTo",render:({field:e})=>(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"PURCHASER",checked:"PURCHASER"===e.value,onChange:()=>{e.onChange("PURCHASER"),d("PURCHASER")},variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"COMPANY",checked:"COMPANY"===e.value,onChange:()=>{e.onChange("COMPANY"),d("COMPANY")},variant:"forms"})]}),n.checkPayableTo&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(r,n.checkPayableTo.message)})]})})}),"PURCHASER"===s&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"purchaserFirstName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,n.purchaserFirstName?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"purchaserLastName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,n.purchaserLastName?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"additionalPurchaser",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(lo,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(l("secondPurchaserFirstName","",{shouldValidate:!1}),l("secondPurchaserLastName","",{shouldValidate:!1}))},variant:"forms"})})}),!0===o&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"secondPurchaserFirstName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,n.secondPurchaserFirstName?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"secondPurchaserLastName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,n.secondPurchaserLastName?.message),required:!0})})]})]}),"COMPANY"===s&&(0,aO.jsx)(z,{control:t,name:"companyName",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,n.companyName?.message),required:!0})})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsx)("div",{className:"flex flex-col gap-3",children:(0,aO.jsx)(z,{control:t,name:"mailingAddressDifferent",render:({field:e})=>(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Yes),name:"mailingAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>{e.onChange("YES"),u("YES")},variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_No),name:"mailingAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>{e.onChange("NO"),u("NO")},variant:"forms"})]})})}),n.mailingAddressDifferent&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(r,n.mailingAddressDifferent.message)})]})}),"YES"===i&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"mailingStreet",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(r,n.mailingStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"mailingCity",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,n.mailingCity?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"mailingState",render:({field:e})=>(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:a9,placeholder:"--Select State--",errorMessage:aj(r,n.mailingState?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"mailingZip",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:aj(r,n.mailingZip?.message),required:!0})})]}),(0,aO.jsx)(z,{control:t,name:"purchaserType",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:li,placeholder:"--Select Purchaser Type--",errorMessage:aj(r,n.purchaserType?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"purchaserEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:aj(r,n.purchaserEmail?.message)})}),(0,aO.jsx)(z,{control:t,name:"purchaserPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(r,n.purchaserPhone?.message)})}),(0,aO.jsx)(z,{control:t,name:"purchaserAltPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(r,n.purchaserAltPhone?.message)})})]})})}],34762),e.s(["ReadOnlyField",0,ld],32548),e.s(["RebateAmountField",0,lu],94988),e.s(["FileUpload",0,lc],34346),e.s(["findDuplicateModelNumbers",0,lh,"normalizeModelNumber",0,lm],52866);let lp={equipmentCapacity:"",equipmentPotableVolume:"",equipmentUef:"",equipmentThermalEff:"",equipmentUsageBin:"",equipmentInputRate:"",equipmentStandbyLoss:""};function lg(e){return e>0?String(e):""}function lf(e,r){if(!r||!e)return lp;let t="071"===e,a="098"===e;return{equipmentCapacity:a?"":lg(r.storageVol),equipmentPotableVolume:a?lg(r.potableVol):"",equipmentUef:t||a?"":lg(r.uef),equipmentThermalEff:t?lg(r.thermal
15Eff):"",equipmentUsageBin:r.usageBin,equipmentInputRate:t?lg(r.inputRate):"",equipmentStandbyLoss:lg(r.stbyLost)}}e.s(["buildWaterHeaterEquipmentValues",0,lf],14034),e.s(["EquipmentSection",0,function({fileUploadKey:e,invoiceError:r,onInvoiceChange:t}){let a=(0,aZ.useI18n)(),l=a?.t??(e=>""),{control:n,watch:s,setValue:o,formState:{errors:i}}=q(),[u,c]=(0,d.useState)(!1),[m,h]=(0,d.useState)(!1),[p,g]=(0,d.useState)(!1),[f,b]=(0,d.useState)(!1),x=(0,d.useRef)(void 0),{data:v,isLoading:y,getBrandsForType:R,getModelsForBrand:N,findModelByAhri:E,calculateRebate:I}=aU(),C=s("waterHeaterType"),_=s("brand"),j=s("installationType"),S=s("rebateAmount"),D=s("ahriReferenceNumber"),[T,A]=(0,d.useState)(null),[F,O]=(0,d.useState)(""),[w,L]=(0,d.useState)(!1),P=(0,d.useRef)(null),k=(0,d.useRef)(!1);(0,d.useEffect)(()=>{A(null),O(""),L(!1)},[e]),(0,d.useEffect)(()=>{x.current!==j&&void 0!==x.current&&(o("waterHeaterType","",{shouldValidate:!1}),o("brand","",{shouldValidate:!1}),o("modelNumber","",{shouldValidate:!1}),o("rebateAmount",0,{shouldValidate:!1}),o("ahriReferenceNumber","",{shouldValidate:!1}),A(null),O(""),L(!1),c(!1),h(!1),g(!1),b(!1)),x.current=j},[j,o]);let M=(0,d.useMemo)(()=>v?.typeCodes?v.typeCodes.map(e=>({value:e.type,label:"013"===e.type?"Tank":e.text})):[],[v?.typeCodes]),V=(0,d.useMemo)(()=>{if(!C)return[];let e=R(C).map(e=>({value:e.key,label:e.value}));if(D){let r=E(D);if(r)return e.filter(e=>e.value===r.brand)}return e},[C,R,D,E]),B=(0,d.useMemo)(()=>C&&_?N(C,_):[],[C,_,N]),Y=(0,d.useMemo)(()=>lh(B.map(e=>({modelNumber:e.modelNum,ahri:e.ahri}))),[B]),U=(0,d.useMemo)(()=>{if(!F)return B.slice(0,50);let e=F.toLowerCase();return B.filter(r=>r.modelNum.toLowerCase().includes(e)).slice(0,50)},[B,F]);(0,d.useEffect)(()=>{C&&!k.current&&(o("brand",""),o("modelNumber",""),o("ahriReferenceNumber",""),A(null),O(""))},[C,o]),(0,d.useEffect)(()=>{_&&!k.current&&(o("modelNumber",""),o("ahriReferenceNumber",""),A(null),O(""))},[_,o]),(0,d.useEffect)(()=>{T&&C&&j?o("rebateAmount",I({typeCode:C,installationType:j,model:T,region:"MN"})):o("rebateAmount",0)},[T,C,j,I,o]),(0,d.useEffect)(()=>{for(let[e,r]of Object.entries(lf(C,T)))o(e,r)},[T,C,o]);let Z=(0,d.useRef)(!1),H=(0,d.useCallback)(e=>{A(e),o("modelNumber",e.modelNum),o("ahriReferenceNumber",e.ahri),O(e.modelNum),L(!1),setTimeout(()=>{Z.current=!1},150)},[o]),$=(0,d.useCallback)(e=>{if(o("ahriReferenceNumber",e),A(null),o("modelNumber",""),o("brand",""),O(""),e.length>=5){let r=E(e);r&&(k.current=!0,A(r),o("modelNumber",r.modelNum),o("brand",r.brand),O(r.modelNum),"commercial"===r.modelType?o("waterHeaterType","071"):"indirect"===r.modelType?o("waterHeaterType","098"):"residential"===r.modelType&&(0===r.storageVol&&r.uef>0?o("waterHeaterType","078"):r.uef>=2?o("waterHeaterType","079"):o("waterHeaterType","013")),setTimeout(()=>{k.current=!1},0))}},[E,o]);(0,d.useEffect)(()=>{let e=e=>{P.current&&!P.current.contains(e.target)&&L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G="071"===C?"Thermal Efficiency":"UEF",Q=T?"071"===C?`${T.thermalEff}%`:T.uef.toFixed(2):"-";return(0,aO.jsx)(le,{number:3,title:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)(z,{control:n,name:"waterHeaterType",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(a1,{label:"New Water Heater Type",value:e.value,onChange:r=>{j?e.onChange(r):c(!0)},onBlur:e.onBlur,onFocus:()=>c(!0),options:M,placeholder:y?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Placeholder_Loading):(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Placeholder_SelectWaterHeaterType),errorMessage:!j&&u?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):aj(l,i.waterHeaterType?.message),disabled:y||0===M.length,required:!0})})}),(0,aO.jsx)(z,{control:n,name:"ahriReferenceNumber",render:({field:e})=>(0,aO.jsxs)("div",{className:"sm:col-span-2",children:[(0,aO.jsx)(aK,{label:"AHRI Reference Number",value:e.value??"",onChange:e=>{j&&C?$(e):h(!0)},onBlur:e.onBlur,onFocus:()=>h(!0),maxLength:30,errorMessage:!j&&m?"Select installation type first":!C&&m?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectWaterHeaterTypeFirst):aj(l,i.ahriReferenceNumber?.message)}),(0,aO.jsxs)("p",{className:"mt-1 text-body-sm text-[var(--color-text-secondary)]",children:[(0,aO.jsx)("span",{className:"font-semibold",children:"Note"}),": For rebate to qualify, the AHRI Reference Number must be found on the"," ",(0,aO.jsx)("a",{href:"https://www.ahridirectory.org/Search/SearchHome",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"AHRI"})," ","or"," ",(0,aO.jsx)("a",{href:"https://www.energystar.gov/productfinder/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"ENERGY STAR"})," ","websites."]})]})}),(0,aO.jsx)(z,{control:n,name:"brand",render:({field:e})=>(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_Brand),value:e.value,onChange:r=>{j&&C?e.onChange(r):g(!0)},onBlur:e.onBlur,onFocus:()=>g(!0),options:j&&C?V:[],placeholder:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Placeholder_SelectBrand),errorMessage:!j&&p?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):!C&&p?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectWaterHeaterTypeFirst):aj(l,i.brand?.message),searchable:!0,required:!0})}),(0,aO.jsxs)("div",{ref:P,className:"relative sm:col-span-2",children:[(0,aO.jsx)(z,{control:n,name:"modelNumber",render:({field:e})=>{let r=w&&U.length>0&&_&&F.length>=3;return(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_ModelNumber),value:F,onChange:r=>{j&&_?(O(r),e.onChange(r),L(r.length>=3&&!!j&&!!_),r||(A(null),o("ahriReferenceNumber",""))):b(!0)},onBlur:()=>{if(e.onBlur(),Z.current)return;let r=e.value;r&&(U.length>0&&U.some(e=>e.modelNum.toLowerCase()===r.toLowerCase())||(O(""),e.onChange(""),A(null),o("ahriReferenceNumber","")))},onFocus:()=>b(!0),placeholder:"",errorMessage:r?void 0:!j&&f?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):!_&&f?"Select brand first":aj(l,i.modelNumber?.message),required:!0})}}),w&&U.length>0&&_&&F.length>=3&&(0,aO.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:U.map(e=>(0,aO.jsxs)("button",{type:"button",onMouseDown:()=>{Z.current=!0},onClick:()=>H(e),className:(0,aq.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:[(0,aO.jsx)("div",{className:"font-medium",children:e.modelNum}),e.ahri&&Y.has(lm(e.modelNum))?(0,aO.jsxs)("div",{className:"text-[12px] text-[var(--color-text-secondary)]",children:["AHRI: ",e.ahri]}):null]},`${e.brand}-${e.ahri}-${e.modelNum}`))})]}),(0,aO.jsx)(z,{control:n,name:"serialNumber",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_Seri
15alNumber),value:e.value,onChange:r=>e.onChange(r.toUpperCase()),onBlur:e.onBlur,maxLength:30,errorMessage:aj(l,i.serialNumber?.message),required:!0})}),(0,aO.jsx)(z,{control:n,name:"installDate",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_DateOfInstallation),value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:aj(l,i.installDate?.message),required:!0})}),T&&(0,aO.jsx)(ld,{label:G,value:Q,highlight:!0}),T&&T.storageVol>0&&(0,aO.jsx)(ld,{label:"Storage Volume",value:`${T.storageVol} gallons`}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(lu,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_RebateAmount),amount:S})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(lc,{label:"Attach Invoice and Supporting Documents (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:e=>t(e),accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:r,required:!0},`invoice-${e}`)})]})})}],91004),e.s(["DealerSection",0,function({preFormDealerInfo:e,preFormDealerPath:r,preFormDealerId:t,termsUrl:a}){let l=(0,aZ.useI18n)(),n=l?.t??(e=>""),{control:s,watch:o,setValue:i,formState:{errors:u}}=q(),[c,m]=(0,d.useState)(!1),[h,p]=(0,d.useState)(null),[g,f]=(0,d.useState)(null),b=o("dealerPath")??"",x=o("dealerId")??"";(0,d.useEffect)(()=>{e&&(i("dealerPath",r),"yes"===r?(i("dealerId",t),f(e)):(i("dealerCompanyName",e.name),i("dealerStreet",e.address),i("dealerCity",e.city),i("dealerState",e.state),i("dealerZip",e.zip)))},[e,r,t,i]);let v=async e=>{if(p(null),e){if(!/^\d{6}$/.test(e))return void p("Dealer ID must be exactly 6 digits.");m(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"WATERHEATER"})});if(!r.ok)return void p("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void p("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){a3({dealerId:e,dealerName:t.dealer.dealerName,dealerAddress:t.dealer.dealerAddress,dealerCityStateZip:t.dealer.dealerCityStateZip});let r={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};f(r),p(null)}else p(t.error??"Dealer ID not found."),f(null)}catch{p("Unable to verify dealer. Please try again.")}finally{m(!1)}}};return(0,aO.jsx)(le,{number:4,title:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Section_DealerInfo),children:(0,aO.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:["Do you have a Dealer ID? ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Option_Yes),name:"dealerPath",value:"yes",checked:"yes"===b,onChange:()=>{i("dealerPath","yes"),p(null),!g&&e&&"yes"===r&&x===t&&f(e)},variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Option_No),name:"dealerPath",value:"no",checked:"no"===b,onChange:()=>{i("dealerPath","no"),p(null),f(null)},variant:"forms"})]}),u.dealerPath&&(0,aO.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",children:aj(n,u.dealerPath.message)})]}),"yes"===b&&(0,aO.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,aO.jsx)(z,{control:s,name:"dealerId",render:({field:e})=>(0,aO.jsx)(aK,{label:"Dealer ID (6-digit number)",value:e.value??"",onChange:r=>{e.onChange(r),g&&f(null),p(null)},onBlur:()=>{e.onBlur(),e.value&&/^\d{6}$/.test(e.value)&&v(e.value)},placeholder:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Placeholder_DealerId),maxLength:6,errorMessage:aj(n,u.dealerId?.message)??h??void 0,required:!0})}),c&&(0,aO.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Verifying dealer IDâ¦"}),g&&(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,aO.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,aO.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:g.name}),(0,aO.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:g.cityStateZip?`${g.address}, ${g.cityStateZip}`:`${g.address}, ${g.city}, ${g.state} ${g.zip}`})]}),(0,aO.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}})]})]}),("yes"===b||"no"===b)&&(0,aO.jsx)(aO.Fragment,{children:(0,aO.jsx)("h3",{className:"text-[16px] font-bold text-[var(--color-text-primary)]",children:"Dealer Contact Information"})}),"no"===b&&(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"dealerCompanyName",render:({field:e})=>(0,aO.jsx)(aK,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(n,u.dealerCompanyName?.message),required:!0})})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"dealerStreet",render:({field:e})=>(0,aO.jsx)(aK,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(n,u.dealerStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:s,name:"dealerCity",render:({field:e})=>(0,aO.jsx)(aK,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(n,u.dealerCity?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerState",render:({field:e})=>(0,aO.jsx)(a1,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:a9,placeholder:"--Select State--",errorMessage:aj(n,u.dealerState?.message),searchable:!0,required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerZip",render:({field:e})=>(0,aO.jsx)(aK,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:aj(n,u.dealerZip?.message),required:!0})})]}),("yes"===b||"no"===b)&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"rebateContactName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_RebateContactName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(n,u.rebateContactName?.message),required:!0})})}),(0,aO.jsx)(z,{control:s,name:"rebateContactEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:"Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:aj(n,u.rebateContactEmail?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"confirmEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:"Verify Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:aj(n,u.confirmEmail?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:"Dealer Telephone Number",type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(n,u.dealerPhone?.message),required:!0})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"additionalInfo",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_AdditionalInformation),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:500,multiline:!0,rows:4})})}),(0,aO.jsx)(z,{control:s,name:"dealerSignature",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_DealerSignature),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(n,u.dealerSignature?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"signatureDate",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_SignatureDate),type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,aO.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,aO.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:"By typing my digital signature above and clicking the 'I agree' box, I represent as follows:"}),(0,aO.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,aO.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,aO.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,aO.jsx)("li",{children:"All information submitted on this Online Rebate Form is true and correct to the best of my information and ability."}),(0,aO.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,aO.jsxs)("li",{children:["I have read and agree to the"," ",a?(0,aO.jsx)("button",{type:"button",onClick:()=>{a&&window.open(a,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"Online Rebate Form Terms & Conditions"}):(0,aO.jsx)("span",{children:"Online Rebate Form Terms & Conditions"}),"."]})]}),(0,aO.jsx)(z,{control:s,name:"agreeAndSubmit",render:({field:e})=>(0,aO.jsx)(lo,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"})}),u.agreeAndSubmit&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:aj(n,u.agreeAndSubmit.message)})]})]})]})})}],77995);var lb=e.i(26019);function lx(e){return e.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function lv({number:e,title:r,children:t}){return(0,aO.jsxs)("section",{className:"w-full",children:[(0,aO.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,aO.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,aO.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:r})]}),(0,aO.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,aO.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:t})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:r,onSubmit:t,isSubmitting:a,submitError:l,dealerInfo:n}){let{control:s,getValues:o,formState:{errors:i}}=q(),{data:u,getBrandsForType:c}=aU(),m=(0,aZ.useI18n)(),h=m?.t??(e=>""),p=(0,d.useMemo)(()=>u?.buildingTypes?u.buildingTypes.map(e=>({value:e.key,label:lx(e.value)})):[],[u?.buildingTypes]),g=(0,d.useMemo)(()=>u?.installationTypes?u.installationTypes.map(e=>({value:e.key,label:lx(e.value)})):[],[u?.installationTypes]),f=(0,d.useMemo)(()=>u?.typeCodes?u.typeCodes.map(e=>({value:e.type,label:"013"===e.type?"Tank":e.text})):[],[u?.typeCodes]),b=(0,d.useRef)(null),x=(0,d.useId)();(0,d.useEffect)(()=>{let r=b.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let v=o();return(0,aO.jsx)("dialog",{ref:b,onCancel:e=>{e.preventDefault(),r()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"wh-preview-modal-title",children:(0,aO.jsxs)("div",{children:[(0,aO.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,aO.jsxs)("div",{className:"flex items-center justify-between",children:[(0,aO.jsx)(lb.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,aO.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleStr
15ing("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,aO.jsx)("h2",{id:"wh-preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Water Heater Rebate Form - Review Your Submission"}),(0,aO.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,aO.jsxs)(lv,{number:1,title:"Installation Information",children:[(0,aO.jsx)(ld,{label:"Street Address",value:v.installStreet??""}),(0,aO.jsx)(ld,{label:"City",value:v.installCity??""}),(0,aO.jsx)(ld,{label:"State",value:v.installState??""}),(0,aO.jsx)(ld,{label:"Zip Code",value:v.installZip??""}),(0,aO.jsx)(ld,{label:a6,value:v.accountNumber??""}),(0,aO.jsx)(ld,{label:"Type of Building",value:tM(p,v.buildingType)}),(0,aO.jsx)(ld,{label:"Type of Installation",value:tM(g,v.installationType)})]}),(0,aO.jsxs)(lv,{number:2,title:"Purchaser Information",children:[(0,aO.jsx)(ld,{label:"Check payable to",value:"PURCHASER"===v.checkPayableTo?"Purchaser":"COMPANY"===v.checkPayableTo?"Company":""}),"PURCHASER"===v.checkPayableTo&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Purchaser First Name",value:v.purchaserFirstName??""}),(0,aO.jsx)(ld,{label:"Purchaser Last Name",value:v.purchaserLastName??""}),v.additionalPurchaser&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Second Purchaser First Name",value:v.secondPurchaserFirstName??""}),(0,aO.jsx)(ld,{label:"Second Purchaser Last Name",value:v.secondPurchaserLastName??""})]})]}),"COMPANY"===v.checkPayableTo&&(0,aO.jsx)(ld,{label:"Company Name",value:v.companyName??""}),(0,aO.jsx)(ld,{label:"Is Rebate Mailing Address different from Installation Address?",value:"YES"===v.mailingAddressDifferent?"Yes":"NO"===v.mailingAddressDifferent?"No":""}),"YES"===v.mailingAddressDifferent&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Mailing Street Address",value:v.mailingStreet??""}),(0,aO.jsx)(ld,{label:"Mailing City",value:v.mailingCity??""}),(0,aO.jsx)(ld,{label:"Mailing State",value:tM(a9,v.mailingState??"")}),(0,aO.jsx)(ld,{label:"Mailing Zip Code",value:v.mailingZip??""})]}),(0,aO.jsx)(ld,{label:"Purchaser Type",value:tM(a5,v.purchaserType)}),(0,aO.jsx)(ld,{label:"Purchaser's Email Address",value:v.purchaserEmail??""}),(0,aO.jsx)(ld,{label:"Purchaser's Telephone Number",value:v.purchaserPhone??""}),(0,aO.jsx)(ld,{label:"Purchaser's Alternate Telephone Number",value:v.purchaserAltPhone??""})]}),(0,aO.jsxs)(lv,{number:3,title:"Equipment Information",children:[(0,aO.jsx)(ld,{label:"New Water Heater Type",value:tM(f,v.waterHeaterType)}),(0,aO.jsx)(ld,{label:"AHRI Reference Number",value:v.ahriReferenceNumber??""}),(0,aO.jsx)(ld,{label:"Brand",value:tM(c(v.waterHeaterType??"").map(e=>({value:e.key,label:e.value})),v.brand)}),(0,aO.jsx)(ld,{label:"Model Number",value:v.modelNumber??""}),(0,aO.jsx)(ld,{label:"Serial Number",value:v.serialNumber??""}),(0,aO.jsx)(ld,{label:"Date of Installation",value:tF(v.installDate)}),(0,aO.jsx)(lu,{label:"Rebate Amount",amount:v.rebateAmount})]}),(0,aO.jsxs)(lv,{number:4,title:"Dealer Information",children:[(0,aO.jsx)(ld,{label:"Do you have a Dealer ID?",value:"yes"===v.dealerPath?"Yes":"no"===v.dealerPath?"No":""}),"yes"===v.dealerPath&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Dealer ID (6-digit number)",value:v.dealerId??""}),n&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Dealer Name",value:n.name??""}),(0,aO.jsx)(ld,{label:"Dealer Address",value:n.cityStateZip?`${n.address}, ${n.cityStateZip}`:`${n.address}, ${n.city}, ${n.state} ${n.zip}`})]})]}),"no"===v.dealerPath&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Company Name",value:v.dealerCompanyName??""}),(0,aO.jsx)(ld,{label:"Street Address",value:v.dealerStreet??""}),(0,aO.jsx)(ld,{label:"City",value:v.dealerCity??""}),(0,aO.jsx)(ld,{label:"State",value:tM(a9,v.dealerState??"")}),(0,aO.jsx)(ld,{label:"Zip Code",value:v.dealerZip??""})]}),(0,aO.jsx)(ld,{label:"Rebate Contact Name",value:v.rebateContactName??""}),(0,aO.jsx)(ld,{label:"Email Address",value:v.rebateContactEmail??""}),(0,aO.jsx)(ld,{label:"Dealer Telephone Number",value:v.dealerPhone??""}),(0,aO.jsx)(ld,{label:"Additional Information",value:v.additionalInfo??""}),(0,aO.jsx)(ld,{label:"Dealer Electronic Signature",value:v.dealerSignature??""}),(0,aO.jsx)(ld,{label:"Date",value:tF(v.signatureDate)})]})]}),(0,aO.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,aO.jsx)(z,{control:s,name:"agreeAndSubmit",render:({field:e})=>(0,aO.jsx)(lo,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":i.agreeAndSubmit?x:void 0})}),i.agreeAndSubmit&&(0,aO.jsx)("p",{id:x,className:"text-body-md text-[var(--color-red)]",role:"alert",children:aj(h,i.agreeAndSubmit.message)}),l&&(0,aO.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:l}),(0,aO.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,aO.jsx)("button",{type:"button",onClick:t,disabled:a,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focu
15s:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:a?(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Submitting):(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Submit)}),(0,aO.jsx)("button",{type:"button",onClick:r,disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Modify)}),(0,aO.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],93509);let ly=({className:e,variant:r="tertiary",disabled:t=!1})=>{let a="tertiary-white"===r;return(0,aO.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:[(0,aO.jsx)("defs",{children:(0,aO.jsxs)("linearGradient",{id:"arrow-gradient",x1:"0",y1:"10",x2:"20",y2:"10",gradientUnits:"userSpaceOnUse",children:[(0,aO.jsx)("stop",{stopColor:"#1A4570"}),(0,aO.jsx)("stop",{offset:"1",stopColor:"#146776"})]})}),(0,aO.jsx)("circle",{className:"arrow-circle-fill transition-all duration-200",cx:"10",cy:"10",r:"10",fill:t?a?"#B3BCC0":"#939EA9":a?"currentColor":"url(#arrow-gradient)"}),(0,aO.jsx)("circle",{className:"arrow-circle-stroke transition-all duration-200",cx:"10",cy:"10",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"2"}),(0,aO.jsx)("path",{className:"arrow-chevron transition-all duration-200",d:"M8 5.5L12.5 10L8 14.5",stroke:t?"#FFFFFF":"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})},lR=({children:e,as:r="a",href:t,variant:a="primary",target:l="_self",disabled:n=!1,onClick:s,icon:o,className:i="",ariaLabel:u,tabindex:c,fragment:m})=>{let h=(0,aZ.useI18n)(),p=h?.t||(e=>"");m&&(t?t.includes("#")||(t=`${t}#${m}`):t=`#${m}`);let[g,f]=(0,d.useState)(!1),b=(0,d.useCallback)(()=>{n||f(!0)},[n]),x=(0,d.useCallback)(()=>{f(!1)},[]),v=(0,d.useCallback)(()=>{f(!1)},[]),y=e=>{if(n){e.preventDefault(),e.stopPropagation();return}s&&s(e)},R=(0,aq.cn)("appearance-none border-none m-0 cursor-pointer select-none no-underline inline-flex items-center justify-center gap-2 font-sans font-bold text-body-md text-center rounded-full transition-all duration-200 ease-in-out focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 [-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",((e,r)=>{if(r)switch(e){case"primary":case"secondary":return"py-4 px-6 w-full sm:w-auto bg-disabled-dark !text-white [-webkit-text-fill-color:white] border-2 border-solid border-transparent rounded-full cursor-not-allowed ";case"primary-small":case"secondary-small":return"py-2 px-4.5 w-full sm:w-auto self-center leading-[1.25] bg-disabled-dark !text-white [-webkit-text-fill-color:white] border-2 border-solid border-transparent rounded-full cursor-not-allowed ";case"tertiary":return"py-1 px-0.5 text-disabled-dark [-webkit-text-fill-color:currentColor] border-2 border-solid border-transparent rounded-full cursor-not-allowed ";case"tertiary-white":return"py-1 px-0.5 text-disabled [-webkit-text-fill-color:currentColor] border-2 border-solid border-transparent rounded-full cursor-not-allowed "}switch(e){case"primary":return"py-4 px-6 w-full sm:w-auto min-w-[104px] relative [background:linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_padding-box] text-white border-2 border-solid border-transparent hover:[background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] focus-visible:[background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] focus-visible:outline-none focus-visible:shadow-[0_0_0_4px_white,0_0_0_6px_var(--gradient-button-start)] active:![background:var(--color-active)] active:border-transparent active:shadow-none";case"secondary":return"py-4 px-6 w-full sm:w-auto min-w-[104px] [background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] border-2 border-solid border-transparent hover:![background:var(--color-hover)] hover:!border-transparent hover:text-white focus-visible:![background:var(--color-hover)] focus-visible:!border-transparent focus-visible:outline-none focus-visible:shadow-[0_0_0_2px_white,0_0_0_4px_#005fad] active:![background:var(--color-active)] active:!border-2 active:!border-white active:text-white active:shadow-none";case"tertiary":return"py-1 px-0.5 bg-transparent text-primary-blue gap-2.5 border-2 border-solid border-transparent roun
15ded-full hover:text-hover focus-visible:text-hover focus-visible:outline-none focus-visible:border-hover active:text-active";case"tertiary-white":return"py-1 px-0.5 bg-transparent text-white gap-2.5 border-2 border-solid border-transparent rounded-full hover:text-white focus-visible:text-white focus-visible:outline-none focus-visible:border-white active:text-cnp-blue";case"primary-small":return"py-2 px-4.5 w-full sm:w-auto min-w-[104px] relative self-center !leading-[1.25] [background:linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_padding-box] text-white border-2 border-solid border-transparent hover:[background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] focus-visible:[background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] focus-visible:outline-none focus-visible:shadow-[0_0_0_4px_white,0_0_0_6px_var(--gradient-button-start)] active:![background:var(--color-active)] active:border-transparent active:shadow-none";case"secondary-small":return"py-2 px-4.5 w-full sm:w-auto min-w-[104px] self-center !leading-[1.25] [background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] border-2 border-solid border-transparent hover:![background:var(--color-hover)] hover:!border-white hover:text-white focus-visible:![background:var(--color-hover)] focus-visible:!border-transparent focus-visible:outline-none focus-visible:shadow-[0_0_0_2px_white,0_0_0_4px_#005fad] active:![background:var(--color-active)] active:!border-transparent active:text-white active:shadow-none";default:return""}})(a,n),"motion-reduce:transition-none",i),N={"aria-disabled":n||void 0,"aria-label":u,rel:"_blank"===l?"noopener noreferrer":void 0,tabIndex:"number"==typeof c?c:void 0},E="tertiary"===a||"tertiary-white"===a,I="secondary-small"===a&&o,C="secondary"===a||"secondary-small"===a,_="primary"===a||"primary-small"===a,j=(0,aq.cn)("inline-flex items-center transition-all duration-200",C&&!n&&["bg-gradient-to-r from-[var(--gradient-button-start)] to-[var(--gradient-button-end)]","bg-clip-text text-transparent","group-hover:bg-none group-hover:text-white","group-focus-visible:bg-none group-focus-visible:text-white","group-active:bg-none group-active:text-white"],_&&!n&&["text-white","group-hover:bg-gradient-to-r group-hover:from-[var(--gradient-button-start)] group-hover:to-[var(--gradient-button-end)]","group-hover:bg-clip-text group-hover:text-transparent","group-focus-visible:bg-gradient-to-r group-focus-visible:from-[var(--gradient-button-start)] group-focus-visible:to-[var(--gradient-button-end)]","group-focus-visible:bg-clip-text group-focus-visible:text-transparent","group-active:bg-none group-active:text-white"],(_||C)&&n&&"text-white"),S=(0,aq.cn)("inline-flex flex-shrink-0 w-5 h-5","tertiary"===a&&!n&&["text-white","[&_.arrow-circle-stroke]:opacity-0","group-hover:[&_.arrow-circle-fill]:opacity-0 group-hover:[&_.arrow-circle-stroke]:opacity-100 group-hover:text-hover","group-focus-visible:[&_.arrow-circle-fill]:opacity-0 group-focus-visible:[&_.arrow-circle-stroke]:opacity-100 group-focus-visible:text-hover","group-active:[&_.arrow-circle-fill]:opacity-0 group-active:[&_.arrow-circle-stroke]:opacity-100 group-active:text-active"],"tertiary-white"===a&&!n&&["text-cnp-blue","[&_.arrow-circle-stroke]:opacity-0","[&_.arrow-chevron]:stroke-white","group-hover:text-white group-hover:[&_.arrow-chevron]:stroke-[#0070CC]","group-focus-visible:text-white group-focus-visible:[&_.arrow-chevron]:stroke-[#0070CC]","group-active:text-cnp-blue group-active:[&_.arrow-chevron]:stroke-[#1A4570]"],n&&"[&_.arrow-circle-stroke]:opacity-0"),D=(0,aq.cn)("inline-flex items-center justify-center w-[18px] h-[18px]",!n&&"text-blue-green",!n&&"group-hover:text-white group-focus-visible:text-white group-active:text-white",n&&"text-white");if("secondary"===a)return(0,aO.jsxs)("a",{href:n?void 0:t,target:l,onClick:y,onTouchStart:b,onTouchEnd:x,onTouchCancel:v,className:(0,aq.cn)(R,"group",g&&!n&&"![background:var(--color-active)] !border-2 !border-white text-white shadow-none"),...N,children:[(0,aO.jsx)("span",{className:(0,aq.cn)(j,g&&!n&&"bg-none !text-white"),children:e}),"_blank"===l&&(0,aO.jsx)("span",{className:"sr-only",children:(0,tV.getDictionaryValue)(p,tV.DICTIONARY.O.OpensInNewWindow)})]});if(E){let o=(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)("span",{className:"inline-flex items-center",children:e}),(0,aO.jsx)(ly,{className:(0,aq.cn)(S,g&&!n&&"tertiary"===a&&"[&_.arrow-circle-fill]:opacity-0 [&_.arrow-circle-stroke]:opacity-100 text-active",g&&!n&&"tertiary-white"===a&&"text-cnp-blue [&_.arrow-chevron]:stroke-[#1A4570]"),variant:a,disabled:n})]}),i=(0,aq.cn)(R,"group",g&&!n&&"tertiary"===a&&"text-active",g&&!n&&"tertiary-white"===a&&"text-cnp-blue");return"button"===r?(0,aO.jsx)("button",{type:"button",onClick:e=>{!n&&s&&s(e)},onTouchStart:b,onTouchEnd:x,onTouchCancel:v,className:i,"aria-disabled":n||void 0,"aria-label":u,tabIndex:"number"==typeof c?c:void 0,children:o}):(0,aO.jsxs)("a",{href:n?void 0:t,target:l,onClick:y,onTouchStart:b,onTouchEnd:x,onTouchCancel:v,className:i,...N,children:[o,"_blank"===l&&(0,aO.jsx)("span",{className:"sr-only",children:(0,tV.getDictionaryValue)(p,tV.DICTIONARY.O.OpensInNewWindow)})]})}let T=C||_,A=g&&!n&&_&&"![background:var(--color-active)] border-transparent shadow-none",F=g&&!n&&"secondary-small"===a&&"![background:var(--color-active)] !border-transparent text-white shadow-none";return(0,aO.jsxs)("a",{href:n?void 0:t,target:l,onClick:y,onTouchStart:b,onTouchEnd:x,onTouchCancel:v,className:(0,aq.cn)(R,T&&"group",A,F),"data-variant":a,...N,children:[I&&(0,aO.jsx)("span",{className:(0,aq.cn)(D,g&&!n&&"text-white"),children:o}),(0,aO.jsx)("span",{className:(0,aq.cn)(C||_?j:"inline-flex items-center",g&&!n&&_&&"bg-none !text-white",g&&!n&&"secondary-small"===a&&"bg-none !text-white"),children:e}),"_blank"===l&&(0,aO.jsx)("span",{className:"sr-only",children:(0,tV.getDictionaryValue)(p,tV.DICTIONARY.O.OpensInNewWindow)})]})};e.s(["Button",0,lR],57993);var lN=e.i(28562);let lE=e=>{let{fields:r,params:t}=e,{variant:a="primary",icon:l,styles:n}=t||{},{page:{mode:s}}=(0,lN.useSitecore)(),o=r?.Link?.value?.href||"",i=r?.Link?.value?.target||"_self",d=r?.Link?.value?.text||"",u=r?.Link?.value?.anchor,c=o?.trim()&&!/^\s*https?:\/?\/?[\s\/]*$/i.test(o);if((!d||!c)&&!s.isEditing)return null;let m=c?o:"/";return(0,aO.jsx)(lR,{href:m,target:i,variant:a,icon:l?(0,aO.jsx)("span",{children:l}):void 0,className:`${n??""}`,fragment:u,children:d})},lI=lE,lC=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"primary"}}),l_=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"primary-small"}}),lj=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"secondary"}}),lS=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"secondary-small"}}),lD=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"tertiary"}}),lT=e=>(0,aO.jsx)(lE,{...e,params:{...e.params,variant:"tertiary-white"}}),lA=lE;e.s(["PlayIcon",0,({hovered:e,className:r})=>(0,aO.jsx)("svg",{width:"29",height:"37",viewBox:"0 0 29 37",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:(0,aq.cn)("transition-colors duration-200 motion-reduce:transition-none",r),children:(0,aO.jsx)("path",{d:"M0.138672 4.83655C0.415428 0.936129 4.89822 -1.2482 8.16211 1.08264L27.0098 14.5465C29.8594 16.5835 29.8595 20.7827 27.0098 22.8199L8.16211 36.2819C4.7947 38.6878 0.125342 36.2814 0.125 32.1461V5.21936L0.138672 4.83655ZM6.86523 2.90491C4.97544 1.5544 2.36831 2.89207 2.36816 5.21838V32.1451C2.36816 34.4716 4.97362 35.8092 6.86523 34.4586L25.7119 20.9957C27.3047 19.8583 27.3048 17.5081 25.7119 16.3688L6.86523 2.90491Z",className:(0,aq.cn)("transition-colors duration-200 motion-reduce:transition-none",e?"fill-dark-blue stroke-dark-blue":"fill-white stroke-white","group-focus-visible:!fill-dark-blue group-focus-visible:!stroke-dark-blue","group-active:!fill-white group-active:!stroke-white"),strokeWidth:"0.25"})})],49243),e.s([],76609);var lF=e.i(5035),lO=e.i(96523),lw=e.i(86629),lL=e.i(3828);e.i(47530);var lP=e.i(96499),lk=e.i(30305),lM=e.i(67609);function lV(e,r){return r.toUpperCase()===lM.REGIONS.MINNESOTA?e:e.filter(e=>!e.name.toLowerCase().startsWith(lM.LANGUAGE_CODES.SOMALI_PREFIX))}let lB=/^[a-z0-9_-]+$/i;function lY(e,r){let t=lB.test(e)?e:lM.LANGUAGE_CODES.ENGLISH_US,a=`/${t}`;if(!r||r.startsWith("//")||/[:\\]/.test(r))return a;let l=r.replace(/^\/+/,"");return l?`${a}/${l}`:a}function lU(e,r){if(!r||0===r.length)return!1;
15let t=window.location.pathname.split("/").filter(Boolean),a=t[0]?.toLowerCase(),l=lV(r,e).map(e=>e.name.toLowerCase()),n=r.map(e=>e.name.toLowerCase());if(a&&n.includes(a)&&!l.includes(a)){let e=t.slice(1).join("/");return window.location.href=lY(lM.LANGUAGE_CODES.ENGLISH_US,e),!0}return!1}e.s(["buildSafeLanguagePath",0,lY,"getLanguagesByRegion",0,lV,"handleRegionChangeWithLanguageValidation",0,lU],30633);let lz=(0,d.createContext)(void 0),lZ=(0,d.createContext)(void 0),lq=(0,d.createContext)(void 0),lH=(0,d.createContext)(void 0),l$=(0,d.createContext)(void 0),lG=({rendering:e,dynamicId:r})=>{let t=r?`outage-tracker-${r}`:"outage-tracker";return(0,aO.jsx)(lw.Placeholder,{name:t,rendering:e,disableSuspense:!0})},lQ=({rendering:e,dynamicId:r})=>(0,aO.jsx)(lG,{rendering:e,dynamicId:r}),lW=({rendering:e,placeholderKeys:r,logoField:t,logoLinkField:a,isEditing:l,isSearchOpen:n,onCloseSearch:s,closeSearchLabel:o,params:i})=>{let u=(0,d.useRef)(null),[c,m]=(0,d.useState)(144);return(0,d.useEffect)(()=>{if(!u.current)return;let e=()=>{m(u.current?.offsetHeight||144)};e();let r=new ResizeObserver(e);return r.observe(u.current),()=>r.disconnect()},[]),(0,aO.jsxs)("div",{className:"hidden lg:block",ref:u,children:[(0,aO.jsx)(lw.Placeholder,{name:r.alertBanner,rendering:e,disableSuspense:!0}),(0,aO.jsx)("div",{className:"",children:(0,aO.jsx)("div",{className:"",children:(0,aO.jsx)(lw.Placeholder,{name:r.utilityNav,rendering:e,disableSuspense:!0})})}),(0,aO.jsx)("div",{className:"bg-dark-blue relative",children:!n||l?(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsxs)("div",{className:(0,aq.cn)("max-w-(--container-max-width) mx-auto px-12","flex items-center justify-between"),children:[(0,aO.jsx)("div",{className:"flex-shrink-0",children:a?.value?.href?(0,aO.jsx)(lF.Link,{field:a,className:"block",prefetch:!1,onClick:e=>{!l&&a?.value?.href&&(e.preventDefault(),window.location.href=a.value.href)},children:(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:l})}):(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:l})}),(0,aO.jsx)(lw.Placeholder,{name:r.mainNav,rendering:e,disableSuspense:!0})]}),l&&(0,aO.jsx)("div",{className:"max-w-(--container-max-width) mx-auto px-12 pb-4",children:(0,aO.jsx)(lQ,{rendering:e,dynamicId:i?.DynamicPlaceholderId})})]}):(0,aO.jsxs)("div",{className:"max-w-(--container-max-width) mx-auto px-12 py-5 flex items-center justify-center gap-3",children:[(0,aO.jsx)("div",{className:"flex-shrink-0 mr-auto",children:a?.value?.href?(0,aO.jsx)(lF.Link,{field:a,className:"block",prefetch:!1,onClick:e=>{a?.value?.href&&(e.preventDefault(),window.location.href=a.value.href)},children:(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:!1})}):(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:!1})}),(0,aO.jsx)("div",{className:"@container w-full max-w-[526px] relative z-40",children:(0,aO.jsx)(lQ,{rendering:e,dynamicId:i?.DynamicPlaceholderId})}),(0,aO.jsx)("a",{href:"#",role:"button",onClick:e=>{e.preventDefault(),s()},onKeyDown:e=>{" "===e.key&&(e.preventDefault(),s())},className:"ml-auto inline-flex items-center text-white hover:text-grey-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white rounded cursor-pointer no-underline","aria-label":o,children:(0,aO.jsx)(lP.Icon,{name:"xmark",className:"size-6"})})]})}),n&&!l&&(0,aO.jsx)("div",{className:"fixed inset-0 z-30 bg-gradient-to-b from-light-blue via-[38.942%] via-lt-blue to-[97.115%] to-white opacity-90 backdrop-blur-[32px]",style:{top:`${c}px`},onClick:s,"aria-hidden":"true"})]})},lK=({rendering:e,placeholderKeys:r,logoField:t,logoLinkField:a,firstUtilityLink:l,languageData:n,regionData:s,hmongLink:o,isEditing:i,isOpen:u,onToggle:c,selectedLanguage:m,selectedRegion:h,handleLanguageSelect:p,handleRegionSelect:g,params:f})=>{let{t:b}=(0,aZ.useI18n)(),x=(0,tV.getDictionaryValue)(b,tV.DICTIONARY.C.CloseMenu),v=(0,tV.getDictionaryValue)(b,tV.DICTIONARY.O.OpenMenu),y=(0,tV.getDictionaryValue)(b,tV.DICTIONARY.B.Back),R=(0,tV.getDictionaryValue)(b,tV.DICTIONARY.H.HeaderNavigation_SelectLanguage),N=(0,tV.getDictionaryValue)(b,tV.DICTIONARY.S.SelectLocation),[E,I]=(0,d.useState)("main"),[C,_]=(0,d.useState)(null),[j,S]=(0,d.useState)(!1),D=(0,d.useMemo)(()=>({activePanel:E,panelContainer:C}),[E,C]);(0,d.useEffect)(()=>{S(!0)},[]),(0,d.useEffect)(()=>{u||I("main")},[u]),(0,d.useEffect)(()=>{let e=!1,r=r=>{let t="touchend"===r.type?document.elementFromPoint(r.changedTouches[0].clientX,r.changedTouches[0].clientY):r.target;if(!t)return;let a=t.closest("[data-mobile-location-trigger]"),l=t.closest("[data-mobile-language-trigger]"),n=t.closest("[data-mobile-nav-trigger]");if(a||l||n){if(r.preventDefault(),"touchend"===r.type)e=!0,setTimeout(()=>{e=!1},300);else if("click"===r.type&&e)return;if(a)I("location");else if(l)I("language");else if(n){let e=n.getAttribute("data-panel-id");e&&I(e)}}};return u&&(document.addEventListener("click",r),document.addEventListener("touchend",r)),()=>{document.removeEventListener("click",r),document.removeEventListener("touchend",r)}},[u]);let T=(0,d.useRef)(null),[A,F]=(0,d.useState)(77);return(0,d.useEffect)(()=>
15{if(!T.current)return;let e=()=>{F(T.current?.offsetHeight||77)};e();let r=new ResizeObserver(e);return r.observe(T.current),()=>r.disconnect()},[]),(0,aO.jsx)(lH.Provider,{value:D,children:(0,aO.jsxs)("div",{className:"lg:hidden",children:[(0,aO.jsxs)("div",{ref:T,children:[(0,aO.jsx)(lw.Placeholder,{name:r.alertBanner,rendering:e,disableSuspense:!0}),(0,aO.jsx)("div",{className:"bg-darkest-blue h-[77px]",children:(0,aO.jsxs)("div",{className:"flex items-center justify-between px-6 py-[17px] h-full",children:[(0,aO.jsx)("div",{className:"flex-shrink-0",children:a?.value?.href?(0,aO.jsx)(lF.Link,{field:a,className:"block",prefetch:!1,onClick:e=>{!i&&a?.value?.href&&(e.preventDefault(),window.location.href=a.value.href)},children:(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:i})}):(0,aO.jsx)(lO.Image,{field:t,className:"h-10 w-auto",editable:i})}),(0,aO.jsxs)("div",{className:(0,aq.cn)("flex items-center",u?"gap-3":"gap-5"),children:[j&&l?.link?.value?.href&&(0,aO.jsxs)(lF.Link,{field:l.link,href:l.link.value.href,target:l.link.value.target||void 0,className:"flex items-center text-md font-medium text-white transition-colors",children:[l.iconName&&(0,aO.jsx)("div",{className:"flex items-center justify-center size-[38px]",children:(0,aO.jsx)(lP.Icon,{name:l.iconName,className:"size-[18px] text-white"})}),(0,aO.jsx)("span",{className:"text-md font-medium leading-[1.5]",children:l.link.value.text||l.link.value.title})]}),(0,aO.jsx)("button",{type:"button",onClick:c,className:"w-12 h-12 flex items-center justify-center text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white rounded-md","aria-expanded":u,"aria-label":u?x:v,tabIndex:0,children:u?(0,aO.jsx)(lP.Icon,{name:"xmark",size:24,"aria-hidden":"true"}):(0,aO.jsxs)("div",{className:"flex flex-col gap-1.5 w-6","aria-hidden":"true",children:[(0,aO.jsx)("div",{className:"h-0.5 w-full bg-white"}),(0,aO.jsx)("div",{className:"h-0.5 w-full bg-white"})]})})]})]})})]}),(0,aO.jsxs)("div",{className:(0,aq.cn)("fixed inset-0 z-40 transform transition-transform duration-300 ease-in-out",u?"translate-x-0":"translate-x-full"),style:{top:`${A}px`},"aria-hidden":!u,children:[(0,aO.jsxs)("div",{className:(0,aq.cn)("absolute inset-0 bg-light-blue overflow-y-auto transition-transform duration-300 ease-in-out","main"===E?"translate-x-0":"-translate-x-full"),children:[(0,aO.jsx)("div",{className:"bg-secondary-grey flex items-center justify-center py-5 w-full px-6",children:(0,aO.jsx)("div",{className:"@container w-full max-w-[374px]",children:(0,aO.jsx)(lQ,{rendering:e,dynamicId:f?.DynamicPlaceholderId})})}),(0,aO.jsx)("nav",{className:"bg-white flex flex-col gap-1 px-5 pt-6 pb-0",children:(0,aO.jsx)(lw.Placeholder,{name:r.utilityNav,rendering:e,disableSuspense:!0})}),(0,aO.jsxs)("div",{className:"bg-light-blue flex flex-col w-full",children:[(0,aO.jsx)("div",{className:"bg-white h-12 w-full rounded-bl-[50px]"}),(0,aO.jsx)("div",{className:"flex flex-col gap-1 pl-[60px] pr-5 py-5",children:(0,aO.jsx)(lw.Placeholder,{name:r.mainNav,rendering:e,disableSuspense:!0})})]})]}),(0,aO.jsx)("div",{className:(0,aq.cn)("absolute inset-0 bg-white overflow-y-auto transition-transform duration-300 ease-in-out","language"===E?"translate-x-0":"translate-x-full"),children:(0,aO.jsxs)("div",{className:"flex flex-col h-full",children:[(0,aO.jsxs)("button",{type:"button",onClick:()=>I("main"),className:"flex items-center gap-3 px-6 py-2 bg-white",tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-5 rounded-full bg-gradient-to-r from-darkest-blue to-blue-green",children:(0,aO.jsx)(lP.Icon,{name:"chevron-left",className:"size-3 text-white"})}),(0,aO.jsx)("span",{className:"text-md font-medium text-primary-blue leading-[1.8]",children:y})]}),(0,aO.jsxs)("div",{className:"bg-secondary-grey border-t border-light-grey flex flex-col px-5 py-10 flex-1",children:[(0,aO.jsx)("h2",{className:"text-[32px] font-bold text-dark-grey leading-[1.2] mb-3",children:R}),(0,aO.jsxs)("div",{className:"flex flex-col gap-1",children:[j&&n&&n.length>0?n.map((e,r)=>{let t=m?m===e.name.toLowerCase():0===r;return(0,aO.jsxs)("button",{type:"button",onClick:()=>p(e.id),className:"flex items-center gap-3 h-12 py-1 rounded-[40px]",tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-12",children:(0,aO.jsx)(lP.Icon,{name:t?"circle-check":"circle",className:"size-8 text-primary-blue"})}),(0,aO.jsx)("span",{className:"text-lg font-semibold text-black leading-[1.5]",children:e.displayName||e.name})]},e.id)}):null,j&&o&&(0,aO.jsxs)(lF.Link,{field:o,prefetch:!1,rel:"_blank"===o.target?"noopener noreferrer":void 0,className:"flex items-center gap-3 h-12 py-1 rounded-[40px]",onClick:c,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-12",children:(0,aO.jsx)(lP.Icon,{name:"circle",className:"size-8 text-primary-blue"})}),(0,aO.jsx)("span",{className:"text-lg font-semibold text-black leading-[1.5]",children:o.text})]})]})]})]})}),(0,aO.jsx)("div",{className:(0,aq.cn)("absolute inset-0 bg-white overflow-y-auto transition-transform duration-300 ease-in-out","location"===E?"translate-x-0":"translate-x-full"),children:(0,aO.jsxs)("div",{className:"flex flex-col h-full",children:[(0,aO.jsxs)("button",{type:"button",onClick:()=>I("main"),className:"flex items-center gap-3 px-6 py-2 bg-white",tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-5 rounded-full bg-gradient-to-r from-darkest-blue to-blue-green",children:(0,aO.jsx)(lP.Icon,{name:"chevron-left",className:"size-3 text-white"})}),(0,aO.jsx)("span",{className:"text-md font-medium text-primary-blue leading-[1.8]",children:y})]}),(0,aO.jsxs)("div",{className:"bg-secondary-grey border-t border-light-grey flex flex-col px-5 py-10 flex-1",children:[(0,aO.jsx)("h2",{className:"text-[32px] font-bold text-dark-grey leading-[1.2] mb-3",children:N}),(0,aO.jsx)("div",{className:"flex flex-col gap-1",children:j&&s&&s.length>0?s.map((e,r)=>{let t=h?h===e.id:0===r;return(0,aO.jsxs)("button",{type:"button",onClick:()=>g(e.id),className:"flex items-center gap-3 h-12 py-1 rounded-[40px]",tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-12",children:(0,aO.jsx)(lP.Icon,{name:t?"circle-check":"circle",className:"size-8 text-primary-blue"})}),(0,aO.jsx)("span",{className:"text-lg font-semibold text-black leading-[1.5]",children:e.displayName||e.name})]},e.id)}):null})]})]})}),(0,aO.jsx)("div",{className:(0,aq.cn)("absolute inset-0 bg-white overflow-y-auto transition-transform duration-300 ease-in-out",E.startsWith("nav-")?"translate-x-0":"translate-x-full"),children:E.startsWith("nav-")&&(0,aO.jsxs)("div",{className:"flex flex-col h-full",children:[(0,aO.jsxs)("button",{type:"button",onClick:()=>I("main"),className:"flex items-center gap-3 px-6 py-2 bg-white",tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center size-5 rounded-full bg-gradient-to-r from-darkest-blue to-blue-green",children:(0,aO.jsx)(lP.Icon,{name:"chevron-left",className:"size-3 text-white"})}),(0,aO.jsx)("span",{className:"text-md font-medium text-primary-blue leading-[1.8]",children:y})]}),(0,aO.jsx)("div",{ref:_,className:"bg-secondary-grey border-t border-light-grey flex flex-col pl-[60px] pr-5 py-5 gap-1 flex-1"})]})})]}),u&&(0,aO.jsx)("div",{className:"fixed inset-0 z-30 bg-black/50",style:{to
15p:`${A}px`},onClick:c,"aria-hidden":"true"})]})})},lJ=e=>{let{t:r}=(0,aZ.useI18n)(),t=(0,lL.useRouter)(),{rendering:a,params:l,fields:n}=e,{page:s}=(0,lN.useSitecore)(),o=s?.mode?.isEditing??!1,{region:i,setRegion:u}=(0,lk.useRegion)(),c=(0,tV.getDictionaryValue)(r,tV.DICTIONARY.C.CloseSearch),[m,h]=(0,d.useState)(!1),[p,g]=(0,d.useState)(!1),[f,b]=(0,d.useState)(!1),x=(0,d.useCallback)(()=>{h(e=>!e)},[]),v=(0,d.useCallback)(()=>{h(!1)},[]),y=(0,d.useCallback)(()=>{b(!0)},[]),R=(0,d.useCallback)(()=>{g(!0)},[]);(0,d.useEffect)(()=>{if(m||p){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[m,p]);let N=(0,d.useCallback)(()=>{g(!1)},[]);(0,d.useEffect)(()=>{let e=()=>{g(!1),h(!1)};return t.events.on("routeChangeStart",e),()=>{t.events.off("routeChangeStart",e)}},[t.events]);let E=l?.DynamicPlaceholderId,I={alertBanner:E?`header-alert-banner-${E}`:"header-alert-banner",utilityNav:E?`header-utility-nav-${E}`:"header-utility-nav",mainNav:E?`header-main-nav-${E}`:"header-main-nav",desktopSearch:E?`desktop-search-${E}`:"desktop-search",mobileSearch:E?`mobile-search-${E}`:"mobile-search"},C=(0,d.useMemo)(()=>((e,r)=>{let t=e.placeholders,a=t?.[r];if(!Array.isArray(a))return;let l=a.find(e=>"UtilityNav"===e.componentName);if(!l)return;let n=l.fields?.data?.datasource?.children?.results?.[0],s=n?.link?.jsonValue,o=n?.icon?.jsonValue?.fields?.IconName?.value;if(s)return{link:s,iconName:o}})(a,I.utilityNav),[a,I.utilityNav]),_=(0,d.useMemo)(()=>((e,r)=>{let t=e.placeholders,a=t?.[r];if(!Array.isArray(a))return;let l=a.find(e=>"UtilityNav"===e.componentName);return l?.fields?.data?.datasource?.languageSelector?.targetItems})(a,I.utilityNav),[a,I.utilityNav]),j=(0,d.useMemo)(()=>((e,r)=>{let t=e.placeholders,a=t?.[r];if(!Array.isArray(a))return;let l=a.find(e=>"UtilityNav"===e.componentName);return l?.fields?.data?.datasource?.regionSelector?.targetItems})(a,I.utilityNav),[a,I.utilityNav]),S=(0,d.useMemo)(()=>((e,r)=>{let t=e.placeholders,a=t?.[r];if(!Array.isArray(a))return;let l=a.find(e=>"UtilityNav"===e.componentName),n=l?.fields?.data?.datasource?.hmongLink?.jsonValue;if(n?.value?.href)return{href:n.value.href,text:n.value.text||n.value.title||"Hmong",target:n.value.target||"_blank"}})(a,I.utilityNav),[a,I.utilityNav]),[D,T]=(0,d.useState)(void 0),[A,F]=(0,d.useState)(void 0),[O,w]=(0,d.useState)(void 0),[L,P]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{_&&_.length>0&&T(_)},[_]),(0,d.useEffect)(()=>{j&&j.length>0&&F(j)},[j]),(0,d.useEffect)(()=>{C&&w(C)},[C]),(0,d.useEffect)(()=>{S&&P(S)},[S]);let k=_&&_.length>0?_:D,M=j&&j.length>0?j:A,V=C??O,B=S??L,[Y,U]=(0,d.useState)(""),[z,Z]=(0,d.useState)("");(0,d.useEffect)(()=>{if(k&&k.length>0){let e=window.location.pathname.split("/").filter(Boolean),r=e[0]?.toLowerCase(),t=k.find(e=>e.name.toLowerCase()===r);if(t){let e=t.name.toLowerCase();Y!==e&&U(e)}else if(!Y){let e=k.find(e=>e.name.toLowerCase()===lM.LANGUAGE_CODES.ENGLISH_US);U(e?.name.toLowerCase()||k[0].name.toLowerCase())}}},[k?.length]),(0,d.useEffect)(()=>{if(M&&M.length>0)if(i){let e=M.find(e=>e.name===i||e.displayName===i||e.cookieName?.value===i);e&&e.id!==z&&Z(e.id)}else z||Z(M[0].id)},[i,M]);let q=(0,d.useMemo)(()=>({selectedLanguage:Y,selectedRegion:z,setSelectedLanguage:U,setSelectedRegion:Z}),[Y,z]),H=(0,d.useMemo)(()=>({isAlertDismissed:f,dismissAlert:y,isInsideStickyHeader:!0}),[f,y]),$=(0,d.useCallback)(async e=>{let r=M?.find(r=>r.id===e);r&&(await u(r.cookieName.value,{regionName:r.displayName}),lU(r.cookieName.value,k)||window.location.reload())},[M,k,u]),G=(0,d.useCallback)(e=>{let r=_?.find(r=>r.id===e);if(r){let e=r.name.toLowerCase();U(e);let t=window.location.pathname.split("/").filter(Boolean),a=_?.map(e=>e.name.toLowerCase())||[],l=t[0]?.toLowerCase(),n=lY(e,l&&a.includes(l)?t.slice(1).join("/"):t.join("/"));window.location.href=n}},[_,U]);return o?(0,aO.jsx)(lz.Provider,{value:{openSearch:R,isHeaderSearch:!0},children:(0,aO.jsx)(l$.Provider,{value:q,children:(0,aO.jsx)(lq.Provider,{value:{closeMobileMenu:v},children:(0,aO.jsx)(lZ.Provider,{value:H,children:(0,aO.jsxs)("header",{className:(0,aq.cn)("w-full",l?.styles),children:[(0,aO.jsx)("div",{className:"pb-4 mb-4",children:(0,aO.jsx)(lW,{rendering:a,placeholderKeys:I,logoField:n?.["Logo Image"],logoLinkField:n?.["Logo Link"],isEditing:o,isSearchOpen:!1,onCloseSearch:N,closeSearchLabel:c,params:l})}),(0,aO.jsx)("div",{className:"pb-4",children:(0,aO.jsx)(lK,{rendering:a,placeholderKeys:I,logoField:n?.["Logo Image"],logoLinkField:n?.["Logo Link"],firstUtilityLink:V,languageData:k,regionData:M,hmongLink:B,isEditing:o,isOpen:m,onToggle:x,params:l,selectedLanguage:Y,selectedRegion:z,handleLanguageSelect:G,handleRegionSelect:$})})]})})})})}):(0,aO.jsx)(lz.Provider,{value:{openSearch:R,isHeaderSearch:!0},children:(0,aO.jsx)(l$.Provider,{value:q,children:(0,aO.jsx)(lq.Provider,{value:{closeMobileMenu:v},children:(0,aO.jsx)(lZ.Provider,{value:H,children:(0,aO.jsxs)("header",{className:(0,aq.cn)("w-full sticky top-0 z-50",l?.styles),children:[(0,aO.jsx)(lW,{rendering:a,placeholderKeys:I,logoField:n?.["Logo Image"],logoLinkField:n?.["Logo Link"],isEditing:o,isSearchOpen:p,onCloseSearch:N,closeSearchLabel:c,params:l}),(0,aO.jsx)(lK,{rendering:a,placeholderKeys:I,logoField:n?.["Logo Image"],logoLinkField:n?.["Logo Link"],firstUtilityLink:V,languageData:k,regionData:M,hmongLink:B,isEditing:o,isOpen:m,onToggle:x,params:l,selectedLanguage:Y,selectedRegion:z,handleLanguageSelect:G,handleRegionSelect:$})]})})})})})};e.s(["Default",0,lJ,"default",0,lJ,"useAlertBannerContext",0,()=>{let e=(0,d.useContext)(lZ);return e||{isAlertDismissed:!1,dismissAlert:()=>{},isInsideStickyHeader:!1}},"useMobileMenu",0,()=>{let e=(0,d.useContext)(lq);return e||{closeMobileMenu:()=>{}}},"useMobileNavPanel",0,()=>{let e=(0,d.useContext)(lH);return e||{activePanel:"main",panelContainer:null}},"useSearch",0,()=>{let e=(0,d.useContext)(lz);return e||{openSearch:()=>{},isHeaderSearch:!1}},"useSelection",0,()=>{let e=(0,d.useContext)(l$);return e||{selectedLanguage:"",selectedRegion:"",setSelectedLanguage:()=>{},setSelectedRegion:()=>{}}}],89815);let lX=e=>{let{fields:r,params:t}=e,{styles:a}=t||{},{page:{mode:l}}=(0,lN.useSitecore)();return!r?.Link&&l.isNormal?null:(0,aO.jsx)(lF.Link,{field:r?.Link,className:`${a??""}`})};e.s(["Default",0,lX,"LinkSitecore",0,lX,"WithIcon",0,e=>{let{fields:r,params:t,onClick:a}=e,{styles:l}=t||{},{page:{mode:n}}=(0,lN.useSitecore)();if(!r?.Link&&n.isNormal)return null;let s=r?.Icon?.fields?.IconName?.value,o=r?.Link?.value?.href,i=r?.Link?.value?.target;return n.isEditing?(0,aO.jsxs)("div",{className:(0,aq.cn)("inline-flex items-center gap-2",l),children:[s&&(0,aO.jsx)(lP.Icon,{name:s,size:20}),(0,aO.jsx)(lF.Link,{field:r?.Link,className:"no-underline"})]}):(0,aO.jsxs)("div",{className:(0,aq.cn)("inline-flex items-center gap-2 cursor-pointer",l),onClick:()=>{a?.(),o&&("_blank"===i?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o)},onKeyDown:e=>
15{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),a?.(),o&&("_blank"===i?window.open(o,"_blank","noopener,noreferrer"):window.location.href=o))},role:"link",tabIndex:0,children:[s&&(0,aO.jsx)(lP.Icon,{name:s,size:20}),(0,aO.jsx)("span",{onClick:e=>e.preventDefault(),className:"contents",children:(0,aO.jsx)(lF.Link,{field:r?.Link,className:"no-underline",tabIndex:-1})})]})},"default",0,lX],723),e.s(["UtilityDropdown",0,function({options:e,selectedId:r,onSelect:t,icon:a,label:l,ariaLabel:n,customLink:s}){let[o,i]=(0,d.useState)(!1),u=(0,d.useRef)(null),c=(0,d.useRef)(null),m=(0,d.useRef)(null),h=(0,d.useRef)(new Map),p=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&i(!1)},r=e=>{"Escape"===e.key&&o&&(e.preventDefault(),i(!1),c.current?.focus())},t=e=>{if(!o||"Tab"!==e.key)return;let r=[...Array.from(h.current.values()).filter(e=>null!==e),...p.current?[p.current]:[]];if(0===r.length)return;let t=r.findIndex(e=>e===document.activeElement);e.shiftKey?(e.preventDefault(),t<=0?r[r.length-1]?.focus():r[t-1]?.focus()):(e.preventDefault(),-1===t||t>=r.length-1?r[0]?.focus():r[t+1]?.focus())};return o&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",r),document.addEventListener("keydown",t)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",r),document.removeEventListener("keydown",t)}},[o]),(0,d.useEffect)(()=>{o&&setTimeout(()=>{m.current?.focus()},0)},[o]);let g=e=>{t(e.value??e.id),i(!1),c.current?.focus()};return(0,aO.jsxs)("div",{className:"relative",ref:u,children:[(0,aO.jsxs)("a",{ref:c,href:"#",role:"button",onClick:e=>{e.preventDefault(),i(!o)},onKeyDown:e=>{"ArrowDown"!==e.key||o?" "===e.key&&(e.preventDefault(),i(!o)):(e.preventDefault(),i(!0))},className:(0,aq.cn)("flex items-center gap-2 h-12 px-[20px] cursor-pointer transition-all no-underline","bg-secondary-grey","hover:bg-grey-2 hover:border-b-[3px] hover:border-primary-blue-active hover:border-solid","focus-visible:bg-grey-2 focus-visible:border-2 focus-visible:border-primary-blue-active focus-visible:border-solid focus-visible:outline-none",o&&"bg-grey-2 border-b-[3px] border-primary-blue-active border-solid"),"aria-label":n,"aria-expanded":o,"aria-haspopup":"listbox",children:[(0,aO.jsx)("div",{className:"flex items-center justify-center",children:a}),(0,aO.jsx)("span",{className:"text-md font-medium text-primary-blue leading-[1.8]",children:l}),(0,aO.jsx)("div",{className:"flex items-center justify-center w-[10px] h-[10px]",children:(0,aO.jsx)("div",{className:(0,aq.cn)("transition-transform",o&&"rotate-180"),children:(0,aO.jsx)(lP.Icon,{name:"chevron-down",className:"text-primary-blue",size:12})})})]}),o&&(0,aO.jsxs)("div",{className:"absolute top-full left-1/2 -translate-x-1/2 bg-secondary-grey rounded-3xl shadow-hero-card p-9 flex flex-col gap-3 min-w-[200px] z-[60]",role:"listbox","aria-label":n,children:[e.map((e,t)=>{let a=(e.value??e.id)===r;return(0,aO.jsxs)("button",{ref:r=>{r&&(h.current.set(e.id,r),0===t&&(m.current=r))},type:"button",onClick:()=>g(e),onKeyDown:r=>{("Enter"===r.key||" "===r.key)&&(r.preventDefault(),g(e))},className:(0,aq.cn)("group flex items-center gap-1 py-1 rounded-[40px] transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary-blue-hover)] focus-visible:rounded-lg"),role:"option","aria-selected":a,tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center px-[8px] py-[13px]",children:(0,aO.jsx)(lP.Icon,{name:a?"circle-check":"circle",className:(0,aq.cn)("size-[18px] text-primary-blue transition-colors",!a&&"rounded-full group-hover:bg-[var(--color-med-blue)]")})}),(0,aO.jsx)("span",{className:"flex-1 text-md font-medium text-black leading-[1.8] text-left group-hover:underline group-focus-visible:underline",children:e.label})]},e.id)}),s&&(0,aO.jsxs)("a",{ref:p,href:s.href,target:s.target||"_blank",rel:"_blank"===s.target?"noopener noreferrer":void 0,className:(0,aq.cn)("group flex items-center gap-1 py-1 rounded-[40px] no-underline transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary-blue-hover)] focus-visible:rounded-lg"),onClick:()=>i(!1),tabIndex:0,children:[(0,aO.jsx)("div",{className:"flex items-center justify-center px-[8px] py-[13px]",children:(0,aO.jsx)(lP.Icon,{name:"circle",className:"size-[18px] text-primary-blue transition-colors rounded-full group-hover:bg-[var(--color-med-blue)]"})}),(0,aO.jsx)("span",{className:"flex-1 text-md font-medium text-black leading-[1.8] text-left group-hover:underline group-focus-visible:underline",children:s.text}),"_blank"===s.target&&(0,aO.jsx)("span",{className:"sr-only",children:"(opens in new window)"})]})]})]})}],91955),e.s([],15682);var tR=tR;let l0=tR.object({installStreet:tR.string({required_error:tB}).min(1,tB).max(60).regex(tS,tY),installCity:tR.string({required_error:tU}).min(1,tU).max(30).regex(tj,tz),installState:tR.string({required_error:tZ}).min(1,tZ),installZip:tR.string({required_error:tq}).min(1,tq).regex(tE,tI),accountNumber:tR.string().max(14).refine(e=>!e||""===e||t_.test(e),ae).optional().or(tR.literal("")),buildingType:tR.string({required_error:at}).min(1,at),installationType:tR.string({required_error:al}).min(1,al),checkPayableTo:tR.enum(["PURCHASER","COMPANY"],{errorMap:()=>({message:ar})}),purchaserFirstName:tR.string().max(30).regex(tj,t$).optional().or(tR.literal("")),purchaserLastName:tR.string().max(40).regex(tj,tQ).optional().or(tR.literal("")),hasAdditionalPurchaser:tR.boolean().default(!1),secondaryPurchaserFirstName:tR.string().max(30).regex(tj,t$).optional().or(tR.literal("")),secondaryPurchaserLastName:tR.string().max(40).regex(tj,tQ).optional().or(tR.literal("")),companyName:tR.string().max(40).regex(tD,tK).optional().or(tR.literal("")),mailingAddressDifferent:tR.enum(["YES","NO",""],{message:ar}),mailingStreet:tR.string().max(60).regex(tS,tY).optional().or(tR.literal("")),mailingCity:tR.string().max(30).regex(tj,tz).optional().or(tR.literal("")),mailingState:tR.string().optional(),mailingZip:tR.string().refine(e=>!e||""===e||tE.test(e),tI).optional().or(tR.literal("")),purchaserType:tR.string({required_error:an}).min(1,an),purchaserEmail:tR.string().max(50).email(tX).optional().or(tR.literal("")),purchaserPhone:tR.string().regex(tN,t2).optional().or(tR.literal("")),purchaserAltPhone:tR.string().regex(tN,t2).optional().or(tR.literal("")),installationTypes:tR.array(tR.string()).min(1,al),purchaseDate:tR.string({required_error:t4}).min(1,t4).regex(tC,t4).refine(e=>tA(e)<=new Date,t6),brand:tR.string({required_error:ao}).min(1,ao),modelNumber:tR.string({required_error:ai}).min(1,ai).max(50),installDate:tR.string({required_error:t5}).min(1,t5).regex(tC,t5).refine(e=>tA(e)<=new Date,t8),rebateAmount:tR.number().default(0),dealerPath:tR.enum(["yes","no",""]),dealerId:tR.string().optional(),dealerCompanyName:tR.string().max(40).regex(tD,tK).optional().or(tR.literal("")),dealerStreet:tR.string().max(60).regex(tS,tY).optional().or(tR.literal("")),dealerCity:tR.string().max(30).regex(tj,tz).optional().or(tR.literal("")),dealerState:tR.string().optional(),dealerZip:tR.string().refine(e=>!e||""===e||tE.test(e),tI).optional().or(tR.literal("")),rebateContactName:tR.string({required_error:tH}).min(1,tH).max(30).regex(tj,t$),rebateContactEmail:tR.string({required_error:tX}).min(1,tX).max(50).email(tX),confirmEmail:tR.string({required_error:tX}).min(1,tX).max(50).email(tX),dealerPhone:tR.string({required_error:t1}).min(1,t1).regex(tN,t2),additionalInfo:tR.string().max(500).optional(),dealerSignature:tR.string({required_error:ac}).min(1,ac).max(30).regex(tj,t$),signatureDate:tR.string({required_error:t3}).min(1,t3).regex(tC,t3),agreeAndSubmit:tR.boolean().refine(e=>!0===e,{message:ax})}).superRefine((e,r)=>{if("yes"!==e.dealerPath&&"no"!==e.dealerPath&&r.addIssue({code:tR.ZodIssueCode.custom,message:ar,path:["dealerPath"]}),"PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tH,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tG,path:["purchaserLastName"]}),e.hasAdditionalPurchaser&&(e.secondaryPurchaserFirstName&&""!==e.secondaryPurchaserFirstName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tH,path:["secondaryPurchaserFirstName"]}),e.secondaryPurchaserLastName&&""!==e.secondaryPurchaserLastName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tG,path:["secondaryPurchaserLastName"]}))),"COMPANY"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tW,path:["companyName"]}),"YES"!==e.mailingAddressDifferent&&"NO"!==e.mailingAddressDifferent&&r.addIssue({code:tR.ZodIssueCode.custom,message:ar,path:["mailingAddressDifferent"]}),"YES"===e.mailingAddressDifferent&&(e.mailingStreet&&""!==e.mailingStreet.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tB,path:["mailingStreet"]}),e.mailingCity&&""!==e.mailingCity.trim()?tj.test(e.mailingCity)||r.addIssue({code:tR.ZodIssueCode.custom,message:tz,path:["mailingCity"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tU,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tZ,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?tE.test(e.mailingZip)||r.addIssue({code:tR.ZodIssueCode.custom,message:tI,path:["mailingZip"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tq,path:["mailingZip"]})),e.purchaseDate&&e.installDate&&tC.test(e.purchaseDate)&&tC.test(e.installDate)){let t=tA(e.purchaseDate);tA(e.installDate)<t&&r.addIssue({code:tR.ZodIssueCode.custom,message:t9,path:["installDate"]})}"yes"===e.dealerPath?e.dealerId&&/^\d{6}$/.test(e.dealerId)||r.addIssue({code:tR.ZodIssueCode.custom,message:ay,path:["dealerId"]}):"no"===e.dealerPath&&(e.dealerCompanyName&&""!==e.dealerCompanyName.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tW,path:["dealerCompanyName"]}),e.dealerStreet&&""!==e.dealerStreet.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tB,path:["dealerStreet"]}),e.dealerCity&&""!==e.dealerCity.trim()?tj.test(e.dealerCity)||r.addIssue({code:tR.ZodIssueCode.custom,message:tz,path:["dealerCity"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tU,path:["dealerCity"]}),e.dealerState&&""!==e.dealerState.trim()||r.addIssue({code:tR.ZodIssueCode.custom,message:tZ,path:["dealerState"]}),e.dealerZip&&""!==e.dealerZip.trim()?tE.test(e.dealerZip)||r.addIssue({code:tR.ZodIssueCode.custom,message:tI,path:["dealerZip"]}):r.addIssue({code:tR.ZodIssueCode.custom,message:tq,path:["dealerZip"]})),e.rebateContactEmail!==e.confirmEmail&&r.addIssue({code:tR.ZodIssueCode.custom,message:t0,path:["confirmEmail"]})});e.s(["thermostatRebateSchema",0,l0],94241);let l1=[{value:"",label:""},{value:"1",label:"SINGLE FAMILY"},{value:"7",label:"TOWNHOME"},{value:"8",label:"TWO-PLEX TO FOUR-PLEX"},{value:"10",label:"OTHER"},{value:"13",label:"MULTIFAMILY"},{value:"16",label:"CONDOMINIUM"},{value:"20",label:"OFFICE 3-4 STORY"},{value:"21",label:"OFFICE 5-9 STORY"},{value:"22",label:"OFFICE 10+ STORY"},{value:"30",label:"CONVENIENCE STORE"},{value:"35",label:"RESTAURANT"},{value:"41",label:"HOTEL/MOTEL"},{value:"44",label:"RETAIL-LARGE(>30,000 SQ FT)"},{value:"47",label:"RETAIL-STRIP MALL(<30,000 SQ FT)"},{value:"50",label:"HEALTH/MEDICAL-CLINIC"},{value:"52",label:"HEALTH/MEDICAL-HOSPITAL"},{value:"60",label:"EDUCATION-COLLEGE/UNIVERSITY"},{value:"61",label:"EDUCATION-PRIMARY"},{value:"62",label:"EDUCATION-SECONDARY"},{value:"80",label:"WAREHOUSE"},{value:"81",label:"MANUFACTURING"}],l2=[{value:"",label:""},{value:"Y",label:"REPLACEMENT"},{value:"N",label:"NEW CONSTRUCTION"},{value:"C",label:"COMMERCIAL"}];[...["Ecobee","Honeywell","Nest","Emerson","Lennox","Carrier","Trane","White-Rodgers","Braeburn","Lux","Venstar","Aprilaire","Robertshaw","Sensi","Johnson Controls","Other"].map(e=>({value:e,label:e}
15))],e.s(["INSTALLATION_TYPES",0,l2,"THERMOSTAT_BUILDING_TYPES",0,l1],17817);let l3=l1.map(e=>({value:e.value,label:e.label})),l4=l2.map(e=>({value:e.value,label:e.label})),l5=[{value:"MN",label:"MN"}];e.s(["InstallationSection",0,function(){let e=(0,aZ.useI18n)(),r=e?.t??(e=>""),{control:t,formState:{errors:a}}=q(),[l,n]=(0,d.useState)(!1);return(0,aO.jsx)(le,{number:1,title:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)(z,{control:t,name:"installStreet",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(r,a.installStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"installCity",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,a.installCity?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"installState",render:({field:e})=>(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:l5,placeholder:"MN",errorMessage:aj(r,a.installState?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"installZip",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:aj(r,a.installZip?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"accountNumber",render:({field:e})=>(0,aO.jsx)(lr,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:aj(r,a.accountNumber?.message)})}),(0,aO.jsx)(z,{control:t,name:"buildingType",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_BuildingType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:l3,placeholder:"--Select Building Type--",errorMessage:aj(r,a.buildingType?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"installationType",render:({field:e})=>(0,aO.jsxs)("div",{className:"sm:col-span-2",children:[(0,aO.jsxs)("div",{className:"flex items-center gap-2",children:[(0,aO.jsxs)("span",{className:"text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_InstallationType)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,aO.jsxs)("div",{className:"relative",children:[(0,aO.jsx)("button",{type:"button",className:"text-[var(--color-primary-blue)] underline hover:no-underline text-sm",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),"aria-label":"More information about installation types",children:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Helper_MoreInformation)}),l&&(0,aO.jsx)("div",{className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,aO.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
15webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,aO.jsx)(a1,{value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:l4,placeholder:"--Select Installation Type--",errorMessage:aj(r,a.installationType?.message),required:!0})]})})]})})}],6633);let l8=a5.map(e=>({value:e.value,label:e.label}));e.s(["PurchaserSection",0,function(){let e=(0,aZ.useI18n)(),r=e?.t??(e=>""),{control:t,watch:a,setValue:l,trigger:n,formState:{errors:s,isSubmitted:o}}=q(),i=a("checkPayableTo"),d=a("hasAdditionalPurchaser"),u=a("mailingAddressDifferent"),c=(e,r)=>{r(e),"COMPANY"===e&&(l("purchaserFirstName","",{shouldValidate:!1}),l("purchaserLastName","",{shouldValidate:!1}),l("hasAdditionalPurchaser",!1,{shouldValidate:!1}),l("secondaryPurchaserFirstName","",{shouldValidate:!1}),l("secondaryPurchaserLastName","",{shouldValidate:!1})),"PURCHASER"===e&&l("companyName","",{shouldValidate:!1}),o&&("PURCHASER"===e?n(["purchaserFirstName","purchaserLastName"]):n("companyName"))},m=(e,r)=>{r(e),"NO"===e&&(l("mailingStreet","",{shouldValidate:!1}),l("mailingCity","",{shouldValidate:!1}),l("mailingState","MN",{shouldValidate:!1}),l("mailingZip","",{shouldValidate:!1})),o&&"YES"===e&&n(["mailingStreet","mailingCity","mailingState","mailingZip"])};return(0,aO.jsx)(le,{number:2,title:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:t,name:"checkPayableTo",render:({field:e})=>(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"PURCHASER",checked:"PURCHASER"===e.value,onChange:()=>c("PURCHASER",e.onChange),variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"COMPANY",checked:"COMPANY"===e.value,onChange:()=>c("COMPANY",e.onChange),variant:"forms"})]}),s.checkPayableTo&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(r,s.checkPayableTo.message)})]})})}),"PURCHASER"===i&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"purchaserFirstName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,s.purchaserFirstName?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"purchaserLastName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,s.purchaserLastName?.message),required:!0})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:t,name:"hasAdditionalPurchaser",render:({field:e})=>(0,aO.jsx)(lo,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value??!1,onChange:r=>{(0,e.onChange)(r),!r&&(l("secondaryPurchaserFirstName","",{shouldValidate:!1}),l("secondaryPurchaserLastName","",{shouldValidate:!1})),o&&r&&n(["secondaryPurchaserFirstName","secondaryPurchaserLastName"])},variant:"forms"})})}),d&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"secondaryPurchaserFirstName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,s.secondaryPurchaserFirstName?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"secondaryPurchaserLastName",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,s.secondaryPurchaserLastName?.message),required:!0})})]})]}),"COMPANY"===i&&(0,aO.jsx)(z,{control:t,name:"companyName",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(r,s.companyName?.message),required:!0})})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-2 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,aO.jsx)("div",{className:"flex flex-col gap-3",children:(0,aO.jsx)(z,{control:t,name:"mailingAddressDifferent",render:({field:e})=>(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_Yes),name:"mailingAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>m("YES",e.onChange),variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Option_No),name:"mailingAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>m("NO",e.onChange),variant:"forms"})]})})}),s.mailingAddressDifferent&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(r,s.mailingAddressDifferent.message)})]})}),"YES"===u&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(z,{control:t,name:"mailingStreet",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(r,s.mailingStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"mailingCity",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(r,s.mailingCity?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"mailingState",render:({field:e})=>(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:a9,placeholder:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:aj(r,s.mailingState?.message),required:!0})}),(0,aO.jsx)(z,{control:t,name:"mailingZip",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:aj(r,s.mailingZip?.message),required:!0})})]}),(0,aO.jsx)(z,{control:t,name:"purchaserType",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:l8,placeholder:"--Select Purchaser Type--",errorMessage:aj(r,s.purchaserType?.message),required:!0})})}),(0,aO.jsx)(z,{control:t,name:"purchaserEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:aj(r,s.purchaserEmail?.message)})}),(0,aO.jsx)(z,{control:t,name:"purchaserPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(r,s.purchaserPhone?.message)})}),(0,aO.jsx)(z,{control:t,name:"purchaserAltPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(r,tV.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(r,s.purchaserAltPhone?.message)})})]})})}],32058);let l6={REPLACEMENT:"Y",NEW_CONSTRUCTION:"N",COMMERCIAL:"C",Y:"Y",N:"N",C:"C"};function l9({number:e,title:r,children:t}){return(0,aO.jsxs)("section",{className:"w-full",children:[(0,aO.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,aO.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,aO.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:r})]}),(0,aO.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,aO.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:t})})]})}e.s(["EquipmentSection",0,function({onInvoiceChange:e,invoiceError:r,fileUploadKey:t}){let a=(0,aZ.useI18n)(),l=a?.t??(e=>""),{control:n,watch:s,setValue:o,formState:{errors:i}}=q(),[u,c]=(0,d.useState)([]),[m,h]=(0,d.useState)([]),[p,g]=(0,d.useState)([]),[f,b]=(0,d.useState)(!1),[x,v]=(0,d.useState)(null),[y,R]=(0,d.useState)(!1),[N,E]=(0,d.useState)(void 0),[I,C]=(0,d.useState)(!1),[_,j]=(0,d.useState)(!1),S=(0,d.useRef)(void 0),D=s("brand"),T=s("modelNumber"),A=s("installationType"),F=!!A,O=s("purchaseDate"),w=s("installDate"),[L,P]=(0,d.useState)(""),[k,M]=(0,d.useState)(!1),V=(0,d.useRef)(null);(0,d.useEffect)(()=>
15{if(O&&w){let e=new Date(O);new Date(w)<e?E("Purchase date cannot be in the future"):E(void 0)}else E(void 0)},[O,w]),(0,d.useEffect)(()=>{let e="thermostat-mn",r=tL(e);if(r&&r.brands?.length>0){c(r.brands.map(e=>({value:e.key,label:e.value}))),h(r.models??[]),g(r.rules??[]),b(!1);return}b(!0),v(null),fetch("/api/forms/rebate-data?equipmentType=thermostat®ion=MN").then(e=>{if(!e.ok)throw Error("Failed to load data.");return e.json()}).then(r=>{"object"==typeof r&&null!==r&&"brands"in r&&Array.isArray(r.brands)?(c(r.brands.map(e=>({value:e.key,label:e.value}))),h(r.models??[]),g(r.rules??[]),tP(e,r)):v("Unable to load brands")}).catch(()=>{v("Unable to load brands")}).finally(()=>{b(!1)})},[]);let B=(0,d.useMemo)(()=>D?m.filter(e=>e.brand===D).map(e=>({value:e.equipModel,label:e.equipModel})):[],[m,D]),Y=(0,d.useMemo)(()=>{if(!B.length)return[];if(!L)return B.slice(0,50);let e=L.toLowerCase();return B.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[B,L]),U=(0,d.useMemo)(()=>{if(!T)return"";let e=m.find(e=>e.equipModel===T);return e?.tier??""},[T,m]),Z=(0,d.useMemo)(()=>{if(!U||!A)return 0;let e=l6[A];if(!e)return 0;let r=new Date().getFullYear().toString(),t=p.find(t=>t.tier===U&&t.installationType===e&&t.programYear===r);if(t&&t.custRebate){let e=parseFloat(t.custRebate);if(!isNaN(e))return e}return 0},[U,A,p]);(0,d.useEffect)(()=>{o("rebateAmount",Z,{shouldValidate:!1})},[Z,o]),(0,d.useEffect)(()=>{S.current!==A&&void 0!==S.current&&(o("brand","",{shouldValidate:!1}),o("modelNumber","",{shouldValidate:!1}),o("rebateAmount",0,{shouldValidate:!1}),P(""),M(!1),C(!1),j(!1)),A&&R(!1),S.current=A},[A,o]),(0,d.useEffect)(()=>{let e=e=>{V.current&&!V.current.contains(e.target)&&M(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let H=(0,d.useRef)(!1),$=(0,d.useCallback)(e=>{o("modelNumber",e.value,{shouldValidate:!1}),P(e.label||e.value),M(!1),setTimeout(()=>{H.current=!1},150)},[o]);return(0,aO.jsxs)(le,{number:3,title:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Section_EquipmentInfo),children:[(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsx)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:"Check all that Apply"}),(0,aO.jsx)("p",{className:"mb-2 text-body-sm text-[var(--color-text-secondary)]",children:"Dealer Installation Type"}),(0,aO.jsx)(z,{control:n,name:"installationTypes",render:({field:e})=>(0,aO.jsx)("div",{className:"flex flex-col gap-3",children:a7.map(r=>(0,aO.jsx)(lo,{label:r.label,checked:e.value?.includes(r.value)??!1,onChange:()=>{var t,a;return t=r.value,void o("installationTypes",(a=e.value??[]).includes(t)?a.filter(e=>e!==t):[...a,t],{shouldValidate:!0})},variant:"forms"},r.value))})}),i.installationTypes&&(0,aO.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(l,i.installationTypes.message)})]})}),(0,aO.jsx)(z,{control:n,name:"purchaseDate",render:({field:e})=>(0,aO.jsx)(aK,{label:`${(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_PurchaseDate)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:aj(l,i.purchaseDate?.message),required:!0})}),(0,aO.jsx)(z,{control:n,name:"installDate",render:({field:e})=>(0,aO.jsx)(aK,{label:`${(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_DateOfInstallation)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:N??aj(l,i.installDate?.message),required:!0})}),(0,aO.jsx)("div",{children:(0,aO.jsx)(z,{control:n,name:"brand",render:({field:e})=>(0,aO.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,aO.jsx)(a1,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_Brand),value:e.value,onChange:r=>{var t;return t=e.onChange,void(!F?C(!0):(R(!1),t(r),o("modelNumber","",{shouldValidate:!1}),P(""),M(!1)))},onBlur:e.onBlur,onFocus:()=>C(!0),options:u,placeholder:f?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Placeholder_LoadingBrands):(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Placeholder_SelectBrand),errorMessage:!A&&I||y?(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):aj(l,i.brand?.message)??x??void 0,disabled:0===u.length||f,required:!0}),(0,aO.jsx)("button",{type:"button",onClick:()=>tT("https://assets.centerpointenergy.com/api/public/content/thermostat-tier-resource-guide-thermostat-tier-resource-guide?v=e6343a30"),className:"text-[var(--color-primary-blue)] underline hover:no-underline text-sm text-left","aria-label":"Link to see list of eligible thermostat brands and model numbers",children:"List of eligible thermostat brands and model numbers."})]})})}),(0,aO.jsxs)("div",{ref:V,className:"relative",children:[(0,aO.jsx)(z,{control:n,name:"modelNumber",render:({field:e})=>{let r=k&&Y.length>0&&D&&L.length>=3;return(0,aO.jsx)(aK,{label:"Model Number",value:L,onChange:r=>{A?(P(r),e.onChange(r),M(r.length>=3)):j(!0)},onBlur:()=>{if(e.onBlur(),H.current)return;let r=e.value;r&&(m.length>0&&m.some(e=>e.equipModel.toLowerCase()===r.toLowerCase())||(P(""),e.onChange("")))},onFocus:()=>j(!0),placeholder:"",errorMessage:r?void 0:!A&&_?"Select installation type first":aj(l,i.modelNumber?.message),disabled:!D||0===B.length,required:!0})}}),k&&Y.length>0&&D&&L.length>=3&&(0,aO.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:Y.map(e=>(0,aO.jsx)("button",{type:"button",onMouseDown:()=>{H.current=!0},onClick:()=>$(e),className:(0,aq.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:(0,aO.jsx)("div",{className:"font-medium",children:e.label||e.value})},e.value))})]}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(lu,{label:(0,tV.getDictionaryValue)(l,tV.DICTIONARY.F.Form_Label_RebateAmount),amount:Z})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(lc,{label:"Attach Invoice and Supporting Documents (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:r=>{e(r)}
15,accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:r,required:!0},`invoice-${t}`)})]}),(0,aO.jsx)("input",{type:"hidden",value:Z,readOnly:!0,"aria-hidden":"true"})]})}],58207),e.s(["DealerSection",0,function({preFormDealerInfo:e,preFormDealerPath:r,preFormDealerId:t,termsUrl:a}){let l=(0,aZ.useI18n)(),n=l?.t??(e=>""),{control:s,watch:o,setValue:i,clearErrors:u,formState:{errors:c}}=q(),[m,h]=(0,d.useState)(!1),[p,g]=(0,d.useState)(null),[f,b]=(0,d.useState)(null),[x,v]=(0,d.useState)(void 0),y=o("dealerPath")??"",R=o("rebateContactEmail"),N=o("confirmEmail");(0,d.useEffect)(()=>{R&&N&&R!==N?v("Email addresses must match"):v(void 0)},[R,N]),(0,d.useEffect)(()=>{e&&(i("dealerPath",r),"yes"===r?(i("dealerId",t),b(e)):(i("dealerCompanyName",e.name),i("dealerStreet",e.address),i("dealerCity",e.city),i("dealerState",e.state),i("dealerZip",e.zip)))},[e,r,t,i]);let E=async e=>{if(g(null),e){if(!/^\d{6}$/.test(e))return void g("Dealer ID must be exactly 6 digits.");h(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"THERMOSTAT"})});if(!r.ok)return void g("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void g("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){a3({dealerId:e,dealerName:t.dealer.dealerName,dealerAddress:t.dealer.dealerAddress,dealerCityStateZip:t.dealer.dealerCityStateZip});let r={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};b(r),g(null)}else g(t.error??"Dealer ID not found."),b(null)}catch{g("Unable to verify dealer. Please try again.")}finally{h(!1)}}};return(0,aO.jsx)(le,{number:4,title:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Section_DealerInfo),children:(0,aO.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,aO.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,aO.jsxs)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:["Do you have a Dealer ID? ",(0,aO.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Option_Yes),name:"dealerPath",value:"yes",checked:"yes"===y,onChange:()=>{i("dealerPath","yes"),c.dealerPath&&u("dealerPath"),g(null),!f&&e&&"yes"===r&&(o("dealerId")??"")===t&&b(e)},variant:"forms"}),(0,aO.jsx)(az.Radio,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Option_No),name:"dealerPath",value:"no",checked:"no"===y,onChange:()=>{i("dealerPath","no"),c.dealerPath&&u("dealerPath"),g(null),b(null)},variant:"forms"})]}),c.dealerPath&&(0,aO.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",children:aj(n,c.dealerPath.message)})]}),"yes"===y&&(0,aO.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,aO.jsx)(z,{control:s,name:"dealerId",render:({field:e})=>(0,aO.jsx)(aK,{label:"Dealer ID (6-digit number)",value:e.value??"",onChange:r=>{e.onChange(r),f&&b(null),g(null)},onBlur:()=>{e.onBlur(),e.value&&/^\d{6}$/.test(e.value)&&E(e.value)},placeholder:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Placeholder_DealerId),maxLength:6,errorMessage:aj(n,c.dealerId?.message)??p??void 0,required:!0})}),m&&(0,aO.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Verifying dealer IDâ¦"}),f&&(0,aO.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,aO.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,aO.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,aO.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:f.name}),(0,aO.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:f.cityStateZip?`${f.address}, ${f.cityStateZip}`:`${f.address}, ${f.city}, ${f.state} ${f.zip}`})]}),(0,aO.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}})]})]}),("yes"===y||"no"===y)&&(0,aO.jsx)(aO.Fragment,{children:(0,aO.jsx)("h3",{className:"text-[16px] font-bold text-[var(--color-text-primary)]",children:"Dealer Contact Information"})}),"no"===y&&(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"dealerCompanyName",render:({field:e})=>(0,aO.jsx)(aK,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:aj(n,c.dealerCompanyName?.message),required:!0})})}),(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(z,{control:s,name:"dealerStreet",render:({field:e})=>(0,aO.jsx)(aK,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:aj(n,c.dealerStreet?.message),required:!0})})}),(0,aO.jsx)(z,{control:s,name:"dealerCity",render:({field:e})=>(0,aO.jsx)(aK,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(n,c.dealerCity?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerState",render:({field:e})=>(0,aO.jsx)(a1,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:a9,placeholder:"--Select State--",errorMessage:aj(n,c.dealerState?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerZip",render:({field:e})=>(0,aO.jsx)(aK,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:aj(n,c.dealerZip?.message),required:!0})})]}),("yes"===y||"no"===y)&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,aO.jsx)(z,{control:s,name:"rebateContactName",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_RebateContactName),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:aj(n,c.rebateContactName?.message),required:!0})})}),(0,aO.jsx)(z,{control:s,name:"rebateContactEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:"Email Address",type:"email",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:aj(n,c.rebateContactEmail?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"confirmEmail",render:({field:e})=>(0,aO.jsx)(aK,{label:"Verify Email Address",type:"email",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:x??aj(n,c.confirmEmail?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"dealerPhone",render:({field:e})=>(0,aO.jsx)(aK,{label:"Dealer Telephone Number",type:"tel",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(n,c.dealerPhone?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"additionalInfo",render:({field:e})=>(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_AdditionalInformation),value:e.value??"",onChange:e.onChange,multiline:!0,rows:6,maxLength:500})})}),(0,aO.jsx)(z,{control:s,name:"dealerSignature",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_DealerSignature),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:aj(n,c.dealerSignature?.message),required:!0})}),(0,aO.jsx)(z,{control:s,name:"signatureDate",render:({field:e})=>(0,aO.jsx)(aK,{label:(0,tV.getDictionaryValue)(n,tV.DICTIONARY.F.Form_Label_SignatureDate),type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,aO.jsxs)("div",{className:"mt-6",children:[(0,aO.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:'By typing my digital signature above and clicking the "I agree" box, I represent as follows:'}),(0,aO.jsxs)("ul",{className:"mb-6 list-disc space-y-2 pl-6 text-body-md text-[var(--color-text-primary)]",children:[(0,aO.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,aO.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,aO.jsx)("li",{children:"All information submitted on this Online Rebate Form is true and correct to the best of my information and ability."}),(0,aO.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,aO.jsxs)("li",{children:["I have read and agree to the"," ",a?(0,aO.jsx)("button",{type:"button",onClick:()=>{window.open(a,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"Online Rebate Form Terms & Conditions"}):(0,aO.jsx)("span",{children:"Online Rebate Form Terms & Conditions"}),"."]})]}),(0,aO.jsx)(z,{control:s,name:"agreeAndSubmit",render:({field:e})=>(0,aO.jsxs)("div",{children:[(0,aO.jsx)(lo,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"}),c.agreeAndSubmit&&(0,aO.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:aj(n,c.agreeAndSubmit.message)})]})})]})]})]})})}],36794),e.s(["PreviewModal",0,function({isOpen:e,onClose:r,onSubmit:t,isSubmitting:a,submitError:l}){let n,{control:s,getValues:o,formState:{errors:i}}=q(),u=(0,d.useRef)(null),c=(0,d.useId)(),m=(0,aZ.useI18n)(),h=m?.t??(e=>"");(0,d.useEffect)(()=>{let r=u.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let p=o(),g=a7.filter(e=>p.installationTypes?.includes(e.value)).map(e=>e.label).join(", ");return(0,aO.jsx)("dialog",{ref:u,onCancel:e=>{e.preventDefault(),r()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"thermostat-preview-modal-title",children:(0,aO.jsxs)("div",{children:[(0,aO.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,aO.jsxs)("div",{className:"flex items-center justify-between",children:[(0,aO.jsx)(lb.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,aO.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleStr
15ing("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,aO.jsx)("h2",{id:"thermostat-preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Thermostat Rebate Form - Review Your Submission"}),(0,aO.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,aO.jsxs)(l9,{number:1,title:"Installation Information",children:[(0,aO.jsx)(ld,{label:"Street Address",value:p.installStreet??""}),(0,aO.jsx)(ld,{label:"City",value:p.installCity??""}),(0,aO.jsx)(ld,{label:"State",value:p.installState??""}),(0,aO.jsx)(ld,{label:"Zip Code",value:p.installZip??""}),(0,aO.jsx)(ld,{label:a6,value:p.accountNumber??""}),(0,aO.jsx)(ld,{label:"Type of Building",value:tM(l1,p.buildingType)}),(0,aO.jsx)(ld,{label:"Type of Installation",value:tM(l2,p.installationType)})]}),(0,aO.jsxs)(l9,{number:2,title:"Purchaser Information",children:[(0,aO.jsx)(ld,{label:"Check payable to",value:"COMPANY"===p.checkPayableTo?"Company":"Purchaser"}),"PURCHASER"===p.checkPayableTo&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Purchaser First Name",value:p.purchaserFirstName??""}),(0,aO.jsx)(ld,{label:"Purchaser Last Name",value:p.purchaserLastName??""}),p.hasAdditionalPurchaser&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Secondary Purchaser First Name",value:p.secondaryPurchaserFirstName??""}),(0,aO.jsx)(ld,{label:"Secondary Purchaser Last Name",value:p.secondaryPurchaserLastName??""})]})]}),"COMPANY"===p.checkPayableTo&&(0,aO.jsx)(ld,{label:"Company Name",value:p.companyName??""}),(0,aO.jsx)(ld,{label:"Is Rebate Mailing Address different from Installation Address?",value:"YES"===p.mailingAddressDifferent?"Yes":"No"}),"YES"===p.mailingAddressDifferent&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Street Address",value:p.mailingStreet??""}),(0,aO.jsx)(ld,{label:"City",value:p.mailingCity??""}),(0,aO.jsx)(ld,{label:"State",value:tM(a9,p.mailingState??"")}),(0,aO.jsx)(ld,{label:"Zip Code",value:p.mailingZip??""})]}),(0,aO.jsx)(ld,{label:"Purchaser Type",value:tM(a5,p.purchaserType)}),(0,aO.jsx)(ld,{label:"Purchaser's Email Address",value:p.purchaserEmail??""}),(0,aO.jsx)(ld,{label:"Purchaser's Telephone Number",value:p.purchaserPhone??""}),(0,aO.jsx)(ld,{label:"Purchaser's Alternate Telephone Number",value:p.purchaserAltPhone??""})]}),(0,aO.jsxs)(l9,{number:3,title:"Equipment Information",children:[(0,aO.jsx)("div",{className:"sm:col-span-2",children:(0,aO.jsx)(ld,{label:"Dealer Installation Type",value:g||""})}),(0,aO.jsx)(ld,{label:"Purchase Date (MM/DD/YYYY)",value:tF(p.purchaseDate)}),(0,aO.jsx)(ld,{label:"Date of Installation (MM/DD/YYYY)",value:tF(p.installDate)}),(0,aO.jsx)(ld,{label:"Brand",value:tM((n=tL("thermostat-mn"),n?.brands?n.brands.map(e=>({value:e.key,label:e.value})):[]),p.brand)}),(0,aO.jsx)(ld,{label:"Model Number",value:p.modelNumber??""}),(0,aO.jsx)(lu,{label:"Rebate Amount",amount:p.rebateAmount})]}),(0,aO.jsxs)(l9,{number:4,title:"Dealer Information",children:[(0,aO.jsx)(ld,{label:"Do you have a Dealer ID?",value:"yes"===p.dealerPath?"Yes":"no"===p.dealerPath?"No":""}),"yes"===p.dealerPath&&(0,aO.jsx)(ld,{label:"Dealer ID (6-digit number)",value:p.dealerId??""}),"no"===p.dealerPath&&(0,aO.jsxs)(aO.Fragment,{children:[(0,aO.jsx)(ld,{label:"Company Name",value:p.dealerCompanyName??""}),(0,aO.jsx)(ld,{label:"Street Address",value:p.dealerStreet??""}),(0,aO.jsx)(ld,{label:"City",value:p.dealerCity??""}),(0,aO.jsx)(ld,{label:"State",value:tM(a9,p.dealerState??"")}),(0,aO.jsx)(ld,{label:"Zip Code",value:p.dealerZip??""})]}),(0,aO.jsx)(ld,{label:"Rebate Contact Name",value:p.rebateContactName??""}),(0,aO.jsx)(ld,{label:"Email Address",value:p.rebateContactEmail??""}),(0,aO.jsx)(ld,{label:"Verify Email Address",value:p.confirmEmail??""}),(0,aO.jsx)(ld,{label:"Dealer Telephone Number",value:p.dealerPhone??""}),(0,aO.jsx)(ld,{label:"Additional Information",value:p.additionalInfo??""}),(0,aO.jsx)(ld,{label:"Dealer Electronic Signature",value:p.dealerSignature??""}),(0,aO.jsx)(ld,{label:"Date",value:tF(p.signatureDate)})]})]}),(0,aO.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,aO.jsx)(z,{control:s,name:"agreeAndSubmit",render:({field:e})=>(0,aO.jsx)(lo,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":i.agreeAndSubmit?c:void 0})}),i.agreeAndSubmit&&(0,aO.jsx)("p",{id:c,className:"text-body-md text-[var(--color-red)]",role:"alert",children:aj(h,i.agreeAndSubmit.message)}),l&&(0,aO.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:l}),(0,aO.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,aO.jsx)("button",{type:"button",onClick:t,disabled:a,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focu
15s:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:a?(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Submitting):(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Submit)}),(0,aO.jsx)("button",{type:"button",onClick:r,disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_Modify)}),(0,aO.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,tV.getDictionaryValue)(h,tV.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],34187)},31578,(e,r,t)=>{"use strict";r.exports=function(e,r){if(r=r.split(":")[0],!(e*=1))return!1;switch(r){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},72349,(e,r,t)=>{"use strict";var a,l=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,r){var t,n,o=[];for(n in"string"!=typeof(r=r||"")&&(r="?"),e)if(l.call(e,n)){if(!(t=e[n])&&(null===t||t===a||isNaN(t))&&(t=""),n=s(n),t=s(t),null===n||null===t)continue;o.push(n+"="+t)}return o.length?r+o.join("&"):""},t.parse=function(e){for(var r,t=/([^=?#&]+)=?([^&]*)/g,a={};r=t.exec(e);){var l=n(r[1]),s=n(r[2]);null===l||null===s||l in a||(a[l]=s)}return a}},7095,(e,r,t)=>{"use strict";var a=e.r(31578),l=e.r(72349),n=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/:\d+$/,d=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function c(e){return(e||"").toString().replace(n,"")}var m=[["#","hash"],["?","query"],function(e,r){return g(r.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function p(r){var t,a,l=(t="u">typeof window?window:e.g).location||{},n={},s=typeof(r=r||l);if("blob:"===r.protocol)n=new b(unescape(r.pathname),{});else if("string"===s)for(a in n=new b(r,{}),h)delete n[a];else if("object"===s){for(a in r)a in h||(n[a]=r[a]);void 0===n.slashes&&(n.slashes=o.test(r.href))}return n}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function f(e,r){e=(e=c(e)).replace(s,""),r=r||{};var t,a=d.exec(e),l=a[1]?a[1].toLowerCase():"",n=!!a[2],o=!!a[3],i=0;return n?o?(t=a[2]+a[3]+a[4],i=a[2].length+a[3].length):(t=a[2]+a[4],i=a[2].length):o?(t=a[3]+a[4],i=a[3].length):t=a[4],"file:"===l?i>=2&&(t=t.slice(2)):g(l)?t=a[4]:l?n&&(t=t.slice(2)):i>=2&&g(r.protocol)&&(t=a[4]),{protocol:l,slashes:n||g(l),slashesCount:i,rest:t}}function b(e,r,t){if(e=(e=c(e)).replace(s,""),!(this instanceof b))return new b(e,r,t);var n,o,i,d,h,x,v=m.slice(),y=typeof r,R=0;for("object"!==y&&"string"!==y&&(t=r,r=null),t&&"function"!=typeof t&&(t=l.parse),n=!(o=f(e||"",r=p(r))).protocol&&!o.slashes,this.slashes=o.slashes||n&&r.slashes,this.protocol=o.protocol||r.protocol||"",e=o.rest,("file:"===o.protocol&&(2!==o.slashesCount||u.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!g(this.protocol)))&&(v[3]=[/(.*)/,"pathname"]);R<v.length;R++){if("function"==typeof(d=v[R])){e=d(e,this);continue}i=d[0],x=d[1],i!=i?this[x]=e:"string"==typeof i?~(h="@"===i?e.lastIndexOf(i):e.indexOf(i))&&("number"==typeof d[2]?(this[x]=e.slice(0,h),e=e.slice(h+d[2])):(this[x]=e.slice(h),e=e.slice(0,h))):(h=i.exec(e))&&(this[x]=h[1],e=e.slice(0,h.index)),this[x]=this[x]||n&&d[3]&&r[x]||"",d[4]&&(this[x]=this[x].toLowerCase())}t&&(this.query=t(this.query)),n&&r.slashes&&"/"!==this.pathname.charAt(0)&&(""!==this.pathname||""!==r.pathname)&&(this.pathname=function(e,r){if(""===e)return r;for(var t=(r||"/").split("/").slice(0,-1).concat(e.split("/")),a=t.length,l=t[a-1],n=!1,s=0;a--;)"."===t[a]?t.splice(a,1):".."===t[a]?(t.splice(a,1),s++):s&&(0===a&&(n=!0),t.splice(a,1),s--);return n&&t.unshift(""),("."===l||".."===l)&&t.push(""),t.join("/")}(this.pathname,r.pathname)),"/"!==this.pathname.charAt(0)&&g(this.protocol)&&(this.pathname="/"+this.pathname),a(this.port,this.protocol)||(this.host=this.hostname,this.port=""),this.username=this.password="",this.auth&&(~(h=this.auth.indexOf(":"))?(this.username=this.auth.slice(0,h),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=this.auth.slice(h+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(this.auth)),this.auth=this.password?this.username+":"+this.password:this.username),this.origin="file:"!==this.protocol&&g(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString()}b.prototype={set:function(e,r,t){switch(e){case"query":"string"==typeof r&&r.length&&(r=(t||l.parse)(r)),this[e]=r;break;case"port":this[e]=r,a(r,this.protocol)?r&&(this.host=this.hostname+":"+r):(this.host=this.hostname,this[e]="");break;case"hostname":this[e]=r,this.port&&(r+=":"+this.port),this.host=r;break;case"host":this[e]=r,i.test(r)?(r=r.split(":"),this.port=r.pop(),this.hostname=r.join(":")):(this.hostname=r,this.port="");break;case"protocol":this.protocol=r.toLowerCase(),this.slashes=!t;break;case"pathname":case"hash":if(r){var n="pathname"===e?"/":"#";this[e]=r.charAt(0)!==n?n+r:r}else this[e]=r;break;case"username":case"password":this[e]=encodeURIComponent(r);break;case"auth":var s=r.indexOf(":");~s?(this.username=r.slice(0,s),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=r.slice(s+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(r))}for(var o=0;o<m.length;o++){var d=m[o];d[4]&&(this[d[1]]=this[d[1]].toLowerCase())}return this.auth=this.password?this.username+":"+this.password:this.username,this.origin="file:"!==this.protocol&&g(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString(),this},toString:function(e){e&&"function"==typeof e||(e=l.stringify);var r,t=this.host,a=this.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var n=a+(this.protocol&&this.slashes||g(this.protocol)?"//":"");return this.username?(n+=this.username,this.password&&(n+=":"+this.password),n+="@"):this.password?(n+=":"+this.password,n+="@"):"file:"!==this.protocol&&g(this.protocol)&&!t&&"/"!==this.pathname&&(n+="@"),(":"===t[t.length-1]||i.test(this.hostname)&&!this.port)&&(t+=":"),n+=t+this.pathname,(r="object"==typeof this.query?e(this.query):this.query)&&(n+="?"!==r.charAt(0)?"?"+r:r),this.hash&&(n+=this.hash),n}}
15,b.extractProtocol=f,b.location=p,b.trimLeft=c,b.qs=l,r.exports=b},60152,21170,49943,e=>{"use strict";var r=e.i(91398),t=e.i(5035),a=e.i(91788),l=e.i(43725),n=e.i(59369),s=e.i(91592);e.i(13044);var o=e.i(57993),i=e.i(52221),d=e.i(30392);let u=(0,a.createContext)(null),c=()=>(0,a.useContext)(u),m="inline-flex items-center gap-2.5 text-body-md font-bold text-primary-blue bg-transparent border-none p-0 m-0 hover:underline focus-visible:outline-2 focus-visible:outline-primary-blue focus-visible:outline-offset-2 transition-colors duration-200 cursor-pointer",h=()=>(0,r.jsxs)("svg",{width:"24",height:"22",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"text-blue-green",children:[(0,r.jsx)("path",{d:"M6 7L12 1L18 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4 11H20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M6 14L12 20L18 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),p=()=>(0,r.jsxs)("svg",{width:"24",height:"22",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"text-blue-green",children:[(0,r.jsx)("path",{d:"M6 1L12 7L18 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4 11H20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M6 20L12 14L18 20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),g=()=>(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M7 5L12 10L7 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});e.s(["Accordion",0,({headline:e,description:c,viewAllLink:f,showExpandCollapseAll:b=!1,headingTag:x="h2",theme:v="white",sharkFin:y="SharkFinTopAndBottom",children:R,className:N,isEditing:E,id:I})=>{let C=(0,l.useI18n)(),_=C?.t||(e=>""),[j,S]=a.default.useState(!1),D=a.default.useId(),T=()=>{S(!j)},A=e?.value||E,F=c?.value||E,O=A||F,w=b||E,L=f?.value?.href||E,P="blue"===v,k=P&&(0,i.isSharkFinTopVisible)(y),M=P&&(0,i.isSharkFinBottomVisible)(y),V=P&&(0,i.isSharkFinBottomFullVisible)(y),B=(0,d.getDictionaryValue)(_,d.DICTIONARY.E.ExpandAll),Y=(0,d.getDictionaryValue)(_,d.DICTIONARY.C.CollapseAll),U=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-primary-blue",children:j?Y:B}),j?(0,r.jsx)(p,{}):(0,r.jsx)(h,{})]}),z=(0,n.cn)("blue"===v?"w-full bg-light-blue relative overflow-hidden":"w-full bg-white relative overflow-hidden",k&&"shark-fin-decoration-top pt-[84px] min-[768px]:pt-[136px]",M&&"shark-fin-decoration-bottom pb-[84px] min-[768px]:pb-[136px]",V&&"shark-fin-decoration-top pb-[80px]",N);return(0,r.jsx)(u.Provider,{value:{accordionId:D,allExpanded:j},children:(0,r.jsx)("div",{className:z,id:I,children:(0,r.jsxs)("div",{className:"w-full max-w-[1032px] mx-auto px-6 lg:px-0 relative z-20",children:[(O||w)&&(0,r.jsxs)("div",{className:"mb-6 text-left lg:text-center"+(k?" pt-6":""),children:[(A||w)&&(0,r.jsxs)("div",{className:(0,n.cn)("relative lg:flex lg:items-center lg:gap-4",A?"lg:justify-center":"lg:justify-end"),children:[A&&(0,r.jsx)(s.Text,{field:e,tag:x,className:"text-h2 mb-0 text-text-primary max-w-[660px]"}),w&&(b||E)&&(0,r.jsx)("div",{className:(0,n.cn)("hidden lg:block",A&&"absolute right-0 top-1/2 -translate-y-1/2"),children:(0,r.jsx)("button",{type:"button",className:m,onClick:T,"aria-expanded":j,"aria-label":j?Y:B,children:U()})})]}),F&&(0,r.jsx)("div",{className:"text-body-md font-medium leading-[1.5] text-text-secondary mt-2",children:(0,r.jsx)(s.Text,{field:c})}),w&&(b||E)&&(0,r.jsx)("div",{className:"flex lg:hidden items-center justify-end gap-2.5 w-full mt-8 mb-6",children:(0,r.jsx)("button",{type:"button",className:m,onClick:T,"aria-expanded":j,"aria-label":j?Y:B,children:U()})})]}),(0,r.jsx)("div",{className:"flex flex-col gap-3",role:"presentation",children:R}),L&&f&&(0,r.jsx)("div",{className:`flex justify-end mt-3 ${M||V?"pb-6":""}`,children:E?(0,r.jsxs)("div",{className:"inline-flex items-center gap-2.5 py-1 px-0 text-body-md font-bold text-primary-blue hover:underline focus-visible:outline-2 focus-visible:outline-primary-blue focus-visible:outline-offset-2 transition-colors duration-200 [&_a]:text-inherit [&_a]:no-underline [&_a:hover]:underline",children:[(0,r.jsx)(t.Link,{field:f}),(0,r.jsx)(g,{})]}):f.value?.href&&(0,r.jsx)(o.Button,{variant:"tertiary",href:f.value.href,fragment:f.value.anchor,children:f.value.text})})]})})})},"useAccordionContext",0,c],21170);let f="flex flex-1 pr-8",b="text-[16px] lg:text-[18px] font-semibold leading-[1.5] text-text-primary",x=()=>(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M7 1V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M1 7H13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),v=()=>(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M1 7H13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),y=({isExpanded:e})=>(0,r.jsx)("span",{className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-full bg-gradient-to-r from-dark-blue to-blue-green text-white transition-transform duration-200 hover:scale-110",children:e?(0,r.jsx)(v,{}):(0,r.jsx)(x,{})});e.s(["AccordionItem",0,({id:e,header:t,description:n,children:o,isExpanded:i,onToggle:u,className:m,isEditing:h,renderingIdentifier:p})=>{let g=(0,l.useI18n)(),x=g?.t??(e=>""),v=c(),R=`accordion-header-${e}`,N=`accordion-panel-${e}`;(0,a.useEffect)(()=>{v&&i!==v.allExpanded&&u(e)},[v?.allExpanded]);let E=()=>{u(e)},I=r=>{("Enter"===r.key||" "===r.key)&&(r.preventDefault(),u(e))},C=t?.value||h,_=n?.value||h,j=a.default.Children.count(o)>0||h;return C?(0,r.jsxs)("div",{id:p,className:[["bg-white rounded-md p-8 border-solid transition-all duration-200",i?"border-2 border-blue-green":"border border-grey-3"].join(" "),m].filter(
15Boolean).join(" "),"data-accordion-item":!0,children:[(0,r.jsx)("h3",{className:"m-0",children:h?(0,r.jsxs)("div",{className:"flex items-start justify-between w-full text-left bg-transparent",id:R,children:[(0,r.jsx)("div",{className:f,children:(0,r.jsx)("span",{className:b,children:(0,r.jsx)(s.Text,{field:t})})}),(0,r.jsx)("button",{type:"button",onClick:E,onKeyDown:I,"aria-expanded":i,"aria-controls":N,"aria-label":i?(0,d.getDictionaryValue)(x,d.DICTIONARY.A.AccordionItem_Collapse):(0,d.getDictionaryValue)(x,d.DICTIONARY.A.AccordionItem_Expand),className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-full bg-gradient-to-r from-dark-blue to-blue-green text-white transition-transform duration-200 cursor-pointer border-none hover:scale-110 focus-visible:outline-2 focus-visible:outline-primary-blue focus-visible:outline-offset-2",children:(0,r.jsx)(y,{isExpanded:i})})]}):(0,r.jsxs)("button",{type:"button",id:R,className:"flex items-start justify-between w-full text-left bg-transparent border-none cursor-pointer focus-visible:outline-2 focus-visible:outline-primary-blue focus-visible:outline-offset-2 transition-colors duration-200 w-full",onClick:E,onKeyDown:I,"aria-expanded":i,"aria-controls":N,children:[(0,r.jsx)("div",{className:f,children:(0,r.jsx)("span",{className:b,children:(0,r.jsx)(s.Text,{field:t})})}),(0,r.jsx)(y,{isExpanded:i})]})}),(0,r.jsx)("div",{id:N,role:"region","aria-labelledby":R,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{maxHeight:i?"none":"0",opacity:+!!i,visibility:i?"visible":"hidden"},hidden:!i,children:(0,r.jsxs)("div",{className:"pt-2 overflow-visible",children:[_&&(0,r.jsx)("div",{className:"text-body-md font-normal lg:font-medium leading-[1.5] text-text-secondary mb-4 lg:pr-[62px]",children:(0,r.jsx)(s.Text,{field:n})}),j&&(0,r.jsx)("div",{className:"flex flex-col sm:flex-row flex-wrap gap-2 sm:gap-4 [&>*]:basis-full sm:[&>*]:basis-auto",children:o})]})})]}):null}],49943),e.s([],60152)},21092,82554,27204,66422,75105,62828,12074,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(59369);e.i(70484);var l=e.i(45892),n=e.i(47657);e.s(["InstallerLookupForm",0,function({onResults:e,onError:s,programType:o="SU",resetKey:i}){let[d,u]=(0,t.useState)(""),[c,m]=(0,t.useState)(""),[h,p]=(0,t.useState)(!1),[g,f]=(0,t.useState)(null),[b,x]=(0,t.useState)(void 0),[v,y]=(0,t.useState)(void 0);(0,t.useEffect)(()=>{void 0!==i&&(u(""),m(""),f(null),x(void 0),y(void 0))},[i]);let R=async()=>{let r;if(f(null),r=!0,d.trim()?x(void 0):(x("Please enter installer code."),r=!1),c.trim()?y(void 0):(y("Please enter homeowner last name."),r=!1),r){p(!0);try{let r=await fetch("/api/forms/installer-lookup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({installerCode:d.trim(),homeownerLastName:c.trim(),programType:o})});if(!r.ok){let e="Unable to connect. Please try again.";f(e),s(e);return}let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success){let e="Unexpected response from server. Please try again.";f(e),s(e);return}if(t.success&&t.customers)e(t.customers);else{let e=t.error??"No matching records found.";f(e),s(e)}}catch{let e="Unable to contact server. Please try again.";f(e),s(e)}finally{p(!1)}}};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(l.InputField,{label:"Installer Code",value:d,onChange:e=>{u(e),b&&x(void 0)},placeholder:"Enter installer code",maxLength:20,required:!0,errorMessage:b}),(0,r.jsx)(l.InputField,{label:"Homeowner Last Name",value:c,onChange:e=>{m(e),v&&y(void 0)},placeholder:"Enter last name",maxLength:50,required:!0,errorMessage:v})]}),null!==g&&(0,r.jsxs)("div",{className:"flex items-start gap-2 rounded border border-[var(--color-red)] bg-[#fff5f5] px-4 py-3 text-sm text-[var(--color-red)]",role:"alert",children:[(0,r.jsx)(n.CircleInfoIcon,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:g})]}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{type:"button",onClick:()=>void R(),disabled:h,className:(0,a.cn)("rounded-full px-6 py-4 text-body-md font-bold text-white transition-all duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-dark-blue)] focu
15s-visible:ring-offset-2",h?"cursor-not-allowed bg-[var(--color-disabled-dark)]":"[background:linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_padding-box] border-2 border-solid border-transparent hover:[background:linear-gradient(white,white)_padding-box,linear-gradient(90deg,var(--gradient-button-start),var(--gradient-button-end))_border-box] hover:text-[var(--gradient-button-start)] active:![background:var(--color-active)] active:border-transparent"),"aria-busy":h,children:h?"Searchingâ¦":"Search"})})]})}],21092);var s,o=e.i(50461),i=function(){return(i=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e}).apply(this,arguments)},d=function(e){var r;e?function(e){if(e)for(;e.lastChild;)e.lastChild.remove()}("string"==typeof e?document.getElementById(e):e):(r=document.querySelector(".grecaptcha-badge"))&&r.parentNode&&document.body.removeChild(r.parentNode)},u=function(e,r){d(r),window.___grecaptcha_cfg=void 0;var t,a=document.querySelector("#"+e);a&&a.remove(),(t=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))&&t.remove()},c=function(e){var r=e.render,t=e.onLoadCallbackName,a=e.language,l=e.onLoad,n=e.useRecaptchaNet,s=e.useEnterprise,o=e.scriptProps,i=void 0===o?{}:o,d=i.nonce,u=void 0===d?"":d,c=i.defer,m=i.async,h=i.id,p=i.appendTo,g=(void 0===h?"":h)||"google-recaptcha-v3";if(document.querySelector("#"+g))l();else{var f,b="https://www."+((f={useEnterprise:s,useRecaptchaNet:n}).useRecaptchaNet?"recaptcha.net":"google.com")+"/recaptcha/"+(f.useEnterprise?"enterprise.js":"api.js"),x=document.createElement("script");x.id=g,x.src=b+"?render="+r+("explicit"===r?"&onload="+t:"")+(a?"&hl="+a:""),u&&(x.nonce=u),x.defer=!!(void 0!==c&&c),x.async=!!(void 0!==m&&m),x.onload=l,("body"===p?document.body:document.getElementsByTagName("head")[0]).appendChild(x)}},m=function(e){void 0===o.default||o.default.env,console.warn(e)};(s||(s={})).SCRIPT_NOT_AVAILABLE="Recaptcha script is not available";var h=(0,t.createContext)({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}});function p(e){var r=e.reCaptchaKey,a=e.useEnterprise,l=void 0!==a&&a,n=e.useRecaptchaNet,o=void 0!==n&&n,d=e.scriptProps,p=e.language,g=e.container,f=e.children,b=(0,t.useState)(null),x=b[0],v=b[1],y=(0,t.useRef)(r),R=JSON.stringify(d),N=JSON.stringify(null==g?void 0:g.parameters);(0,t.useEffect)(function(){if(r){var e=(null==d?void 0:d.id)||"google-recaptcha-v3",t=(null==d?void 0:d.onLoadCallbackName)||"onRecaptchaLoadCallback";return window[t]=function(){var e=l?window.grecaptcha.enterprise:window.grecaptcha,t=i({badge:"inline",size:"invisible",sitekey:r},(null==g?void 0:g.parameters)||{});y.current=e.render(null==g?void 0:g.element,t)},c({render:(null==g?void 0:g.element)?"explicit":r,onLoadCallbackName:t,useEnterprise:l,useRecaptchaNet:o,scriptProps:d,language:p,onLoad:function(){if(window&&window.grecaptcha){var e=l?window.grecaptcha.enterprise:window.grecaptcha;e.ready(function(){v(e)})}else m("<GoogleRecaptchaProvider /> "+s.SCRIPT_NOT_AVAILABLE)},onError:function(){m("Error loading google recaptcha script")}}),function(){u(e,null==g?void 0:g.element)}}m("<GoogleReCaptchaProvider /> recaptcha key not provided")},[l,o,R,N,p,r,null==g?void 0:g.element]);var E=(0,t.useCallback)(function(e){if(!x||!x.execute)throw Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return x.execute(y.current,{action:e})},[x,y]),I=(0,t.useMemo)(function(){return{executeRecaptcha:x?E:void 0,container:null==g?void 0:g.element}},[E,x,null==g?void 0:g.element]);return t.default.createElement(h.Provider,{value:I},f)}function g(e,r){return e(r={exports:{}},r.exports),r.exports}h.Consumer;var f="function"==typeof Symbol&&Symbol.for,b=f?Symbol.for("react.element"):60103,x=f?Symbol.for("react.portal"):60106,v=f?Symbol.for("react.fragment"):60107,y=f?Symbol.for("react.strict_mode"):60108,R=f?Symbol.for("react.profiler"):60114,N=f?Symbol.for("react.provider"):60109,E=f?Symbol.for("react.context"):60110,I=f?Symbol.for("react.async_mode"):60111,C=f?Symbol.for("react.concurrent_mode"):60111,_=f?Symbol.for("react.forward_ref"):60112,j=f?Symbol.for("react.suspense"):60113,S=f?Symbol.for("react.suspense_list"):60120,D=f?Symbol.for("react.memo"):60115,T=f?Symbol.for("react.lazy"):60116,A=f?Symbol.for("react.block"):60121,F=f?Symbol.for("react.fundamental"):60117,O=f?Symbol.for("react.responder"):60118,w=f?Symbol.for("react.scope"):60119;function L(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case b:switch(e=e.type){case I:case C:case v:case R:case y:case j:return e;default:switch(e=e&&e.$$typeof){case E:case _:case T:case D:case N:return e;default:return r}}case x:return r}}}function P(e){return L(e)===C}var k={AsyncMode:I,ConcurrentMode:C,ContextConsumer:E,ContextProvider:N,Element:b,ForwardRef:_,Fragment:v,Lazy:T,Memo:D,Portal:x,Profiler:R,StrictMode:y,Suspense:j,isAsyncMode:function(e){return P(e)||L(e)===I},isConcurrentMode:P,isContextConsumer:function(e){return L(e)===E},isContextProvider:function(e){return L(e)===N},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},isForwardRef:function(e){return L(e)===_},isFragment:function(e){return L(e)===v},isLazy:function(e){return L(e)===T},isMemo:function(e){return L(e)===D},isPortal:function(e){return L(e)===x},isProfiler:function(e){return L(e)===R},isStrictMode:function(e){return L(e)===y},isSuspense:function(e){return L(e)===j},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===v||e===C||e===R||e===y||e===j||e===S||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===D||e.$$typeof===N||e.$$typeof===E||e.$$typeof===_||e.$$typeof===F||e.$$typeof===O||e.$$typeof===w||e.$$typeof===A)},typeOf:L},M=g(function(e,r){}),V=(M.AsyncMode,M.ConcurrentMode,M.ContextConsumer,M.ContextProvider,M.Element,M.ForwardRef,M.Fragment,M.Lazy,M.Memo,M.Portal,M.Profiler,M.Str
15ictMode,M.Suspense,M.isAsyncMode,M.isConcurrentMode,M.isContextConsumer,M.isContextProvider,M.isElement,M.isForwardRef,M.isFragment,M.isLazy,M.isMemo,M.isPortal,M.isProfiler,M.isStrictMode,M.isSuspense,M.isValidElementType,M.typeOf,g(function(e){e.exports=k})),B={};B[V.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},B[V.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},e.s(["ReCaptchaProvider",0,function({children:e}){return(0,r.jsx)(p,{reCaptchaKey:"6LcWSlctAAAAAKNShdoX9_B8JHU9gymHjdysXn-1",useEnterprise:!0,scriptProps:{async:!0,defer:!0,appendTo:"head"},children:e})}],82554),e.s(["useReCaptcha",0,function(){let{executeRecaptcha:e}=(0,t.useContext)(h),[r,a]=(0,t.useState)(!1),[l,n]=(0,t.useState)(void 0);return{executeRecaptcha:(0,t.useCallback)(async r=>{if(!e)return n("reCAPTCHA not ready"),null;a(!0),n(void 0);try{return await e(r)}catch(e){return n(e instanceof Error?e.message:"reCAPTCHA verification failed"),null}finally{a(!1)}},[e]),isReady:!!e,isLoading:r,error:l}}],27204),e.s([],66422),e.s(["formatTonnage",0,function(e){let r=e.trim();if(!r)return e;let t=Number(r);return Number.isNaN(t)||t>10?e:t.toPrecision(2)}],75105),e.s(["UNCOLLECTED_DATA_OPTIONS",0,[{value:"unable_to_read",label:"Unable to read serial plate"},{value:"serial_missing",label:"Serial plate is missing"}]],62828),e.s(["buildConfirmationLines",0,function(e,r){let t=[],a=(e,r)=>{r&&""!==r.trim()&&t.push({label:e,value:r})};return e&&(a("Thermostat 1 Serial Number",e.thermostat1),a("AC 1 Serial Number",e.ac1),a("Thermostat 2 Serial Number",e.thermostat2),a("AC 2 Serial Number",e.ac2)),a("Confirmation Number",r??void 0),t}],12074)},85869,62540,77675,59096,e=>{"use strict";var r=e.i(91398),t=e.i(59369),a=e.i(5035),l=e.i(91592),n=e.i(78652);e.i(47530);var s=e.i(96499),o=e.i(67705);let i=({className:e})=>(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"6",cy:"6",r:"5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),(0,r.jsx)("path",{d:"M6 3V6L8 7",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})]}),d="bg-white shadow-[0_0_0_1px_var(--color-grey-3)] transition-shadow duration-200 ease-in-out overflow-hidden w-full focus-visible:outline-2 focus-visible:outline-dark-blue focus-visible:outline-offset-2 no-underline",u=[d,"flex flex-col h-full rounded-image max-md:max-w-[326px] max-sm:max-w-full min-[1900px]:max-w-none"].join(" "),c=[d,"flex flex-row h-full gap-4 items-start rounded-[12px]"].join(" "),m=[d,"flex flex-row h-full gap-4 items-start rounded-[12px] lg:flex-col lg:gap-0 lg:rounded-image lg:max-w-[432px] min-[1900px]:max-w-none"].join(" "),h="w-full h-full object-cover",p="text-body-md-medium text-text-secondary m-0 w-full line-clamp-3",g="flex items-center gap-[6px] h-[18px]",f="text-body-xs text-dark-blue text-right whitespace-nowrap",b="text-body-xs font-bold text-dark-grey text-center whitespace-nowrap",x="text-body-xs font-medium text-dark-blue whitespace-pre-wrap mb-0 flex-1",v=({variant:e="article",layout:d="vertical",image:v,imageSrc:y,imageSources:R,imageAlt:N="",headline:E,headlineLink:I,description:C,readingTime:_,href:j,target:S="_self",headingTag:D="h3",topic:T,date:A,time:F,author:O,iconName:w,icon:L,showIcon:P=!0,onClick:k,className:M="",isEditing:V})=>{let B=(0,t.cn)((()=>{switch(d){case"horizontal":return c;case"responsive":return m;default:return u}})(),j&&"cursor-pointer hover:shadow-[0_0_0_2px_var(--color-grey-3),0_0_40px_rgba(0,71,130,0.28)]","motion-reduce:transition-none","contrast-more:border-[2px] contrast-more:border-current","contrast-more:focus-visible:outline-[3px]",M),Y=()=>{switch(d){case"horizontal":return"text-body-md-semi text-primary-blue m-0 w-full line-clamp-2";case"responsive":return"text-primary-blue m-0 w-full text-body-md-semi line-clamp-2 lg:text-body-lg-semi lg:line-clamp-3";default:return"text-body-lg-semi text-primary-blue m-0 w-full line-clamp-3"}},U="horizontal"===d||"responsive"===d,z=y||v||V,Z="string"==typeof E?E:E?.value?String(E.value):"Read more",q="string"==typeof _?_:_?.value?String(_.value):void 0,H="string"==typeof T?T:T?.value?String(T.value):void 0,$="string"==typeof A?A:A?.value?String(A.value):void 0,G="string"==typeof F?F:F?.value?String(F.value):void 0,Q="str
15ing"==typeof O?O:O?.value?String(O.value):void 0,W=(0,r.jsxs)(r.Fragment,{children:[z&&(0,r.jsx)("div",{className:(()=>{switch(d){case"horizontal":return"relative w-[140px] min-h-[96px] overflow-hidden rounded-l-[12px] flex-shrink-0";case"responsive":return"relative overflow-hidden flex-shrink-0 w-[140px] min-h-[96px] rounded-l-[12px] lg:w-full lg:h-auto lg:aspect-[837/558] lg:rounded-t-image lg:rounded-bl-none";default:return"relative w-full aspect-[837/558] overflow-hidden rounded-t-image flex-shrink-0"}})(),children:y?(0,r.jsxs)("picture",{children:[R?.desktop&&(0,r.jsx)("source",{media:"(min-width: 768px)",srcSet:R.desktop}),R?.mobile&&(0,r.jsx)("source",{media:"(max-width: 767px)",srcSet:R.mobile}),(0,r.jsx)("img",{src:y,alt:N,className:(0,t.cn)(h,"vertical"!==d&&"absolute inset-0"),loading:"lazy"})]}):(0,r.jsx)(n.NextImage,{className:(0,t.cn)(h,"vertical"!==d&&"absolute inset-0"),field:v})}),(0,r.jsxs)("div",{className:(0,t.cn)((()=>{switch(d){case"horizontal":return"flex flex-col flex-1 min-w-0 gap-2 pr-3 py-3";case"responsive":return"flex flex-col flex-1 min-w-0 gap-2 pr-3 py-3 lg:gap-6 lg:px-6 lg:py-9 lg:w-full";default:return"flex flex-col flex-1 gap-6 px-6 py-9 w-full"}})(),U&&!z&&"pl-3"),children:["news"===e&&(H||V)&&(0,r.jsx)("div",{className:"inline-flex w-fit h-6 px-2 py-[3px] rounded-[12px] bg-[#bee7e3] shrink-0",children:"string"==typeof T?(0,r.jsx)("span",{className:b,children:H}):(0,r.jsx)(l.Text,{field:T,className:b})}),"news"===e&&($||G||V)&&(0,r.jsxs)("p",{className:(0,t.cn)("text-body-xs font-medium leading-[0] text-dark-blue uppercase whitespace-pre mb-0","responsive"===d&&"leading-[1.8] lg:leading-[0]"),children:[$&&(0,r.jsx)("span",{className:"leading-[1.8]",children:$}),$&&G&&"responsive"===d&&(0,r.jsx)("span",{className:"font-bold leading-[1.8] hidden lg:inline",children:" ⢠"}),$&&G&&"vertical"===d&&(0,r.jsx)("span",{className:"font-bold leading-[1.8]",children:" ⢠"}),G&&"responsive"===d&&(0,r.jsx)("span",{className:"leading-[1.8] hidden lg:inline",children:G}),G&&"vertical"===d&&(0,r.jsx)("span",{className:"leading-[1.8]",children:G})]}),(0,r.jsxs)("div",{className:(0,t.cn)("flex flex-col w-full","responsive"===d?"gap-0 lg:gap-1":U?"gap-0":"gap-1"),children:["document"===e?(E||I||V)&&(0,r.jsxs)("div",{className:"flex gap-[10px] items-start w-full",children:[V&&I?(0,r.jsx)(a.Link,{field:I,className:(0,t.cn)(Y(),"flex-1 min-w-0")}):"string"==typeof E?(0,r.jsx)("h3",{className:(0,t.cn)(Y(),"flex-1 min-w-0"),children:E}):E?(0,r.jsx)(l.Text,{field:E,tag:D,className:(0,t.cn)(Y(),"flex-1 min-w-0")}):null,P&&(L||w&&(0,r.jsx)(s.Icon,{name:w,size:24,className:"shrink-0 text-primary-blue"}))]}):(E||V)&&("string"==typeof E?(0,r.jsx)("h3",{className:Y(),children:E}):(0,r.jsx)(l.Text,{field:E,tag:D,className:Y()})),(C||V)&&("string"==typeof C?(0,r.jsx)("p",{className:(0,t.cn)(p,"responsive"===d&&"hidden lg:block","horizontal"===d&&"hidden"),children:C}):(0,r.jsx)(o.RichTextWrapper,{field:C,isEditing:V,className:(0,t.cn)("[&_.component-content]:p-0 [&_.component-content]:max-w-none [&_.component-content]:mx-0",p,"responsive"===d&&"hidden lg:block","horizontal"===d&&"hidden")}))]}),"news"===e&&"vertical"===d&&(Q||q||V)?(0,r.jsxs)("div",{className:"flex items-center w-full mt-auto",children:[(Q||V)&&("string"==typeof O?(0,r.jsx)("p",{className:x,children:Q}):(0,r.jsx)("p",{className:x,children:(0,r.jsx)(l.Text,{field:O})})),(q&&""!==q.trim()||V)&&(0,r.jsxs)("div",{className:(0,t.cn)(g,"justify-end"),children:[q&&""!==q.trim()&&(0,r.jsx)(i,{className:"shrink-0 w-3 h-3 text-dark-blue"}),"string"==typeof _?(0,r.jsx)("span",{className:f,children:q}):(0,r.jsx)(l.Text,{field:_,className:f})]})]}):"news"===e&&"responsive"===d&&(Q||q||V)?(0,r.jsxs)("div",{className:"flex items-center w-full mt-auto",children:[(Q||V)&&("string"==typeof O?(0,r.jsx)("p",{className:(0,t.cn)(x,"hidden lg:block"),children:Q}):(0,r.jsx)("p",{className:(0,t.cn)(x,"hidden lg:block"),children:(0,r.jsx)(l.Text,{field:O})})),(q&&""!==q.trim()||V)&&(0,r.jsxs)("div",{className:(0,t.cn)(g,"lg:justify-end"),children:[q&&""!==q.trim()&&(0,r.jsx)(i,{className:"shrink-0 w-3 h-3 text-dark-blue"}),"string"==typeof _?(0,r.jsx)("span",{className:f,children:q}):(0,r.jsx)(l.Text,{field:_,className:f})]})]}
15):(q&&""!==q.trim()||V)&&(0,r.jsxs)("div",{className:(0,t.cn)(g,"mt-auto"),children:[q&&""!==q.trim()&&(0,r.jsx)(i,{className:"shrink-0 w-3 h-3 text-dark-blue"}),"string"==typeof _?(0,r.jsx)("span",{className:f,children:q}):(0,r.jsx)(l.Text,{field:_,className:f})]})]})]});return j&&!V?(0,r.jsx)("a",{href:j,target:S,rel:"_blank"===S?"noopener noreferrer":void 0,className:B,onClick:k,"aria-label":Z,children:W}):(0,r.jsx)("article",{className:B,"aria-label":Z,children:W})};e.s(["ContentCard",0,v],62540),e.s([],77675);let y="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 w-full max-w-[1920px] mx-auto px-6 lg:px-12";e.s(["Listing",0,({items:e,variant:a="article",emptyStateMessage:l="No results found",headingTag:n="h3",className:s=""})=>e&&0!==e.length?(0,r.jsx)("div",{className:(0,t.cn)(y,s),children:e.map((e,t)=>(0,r.jsx)(v,{...e,variant:a,headingTag:n,layout:"responsive",imageSrc:e.image?.value?.src,imageAlt:"string"==typeof e.image?.value?.alt?e.image.value.alt:"",className:"min-[1900px]:max-w-none"},`card-${t}`))}):(0,r.jsx)("div",{className:(0,t.cn)(y,s),children:(0,r.jsx)("div",{className:"flex items-center justify-center min-h-[400px] w-full text-body-lg-semi text-text-secondary text-center",children:(0,r.jsx)("p",{children:l})})})],59096),e.s([],85869)},79133,88986,45886,87756,39921,e=>{"use strict";var r=e.i(91398),t=e.i(30943);let a=(e,r)=>{if(!e||!r||e.startsWith("data:"))return e;if(null==r||""===r)return e;let t=e.includes("?")?"&":"?";return`${e}${t}${encodeURIComponent("t")}=${encodeURIComponent(String(r))}`};e.s(["buildTransformationUrl",0,a],88986),e.s(["CHImage",0,({src:e,alt:l,transformations:n,className:s="",loading:o="lazy",priority:i=!1,intrinsic:d})=>{let u=n?a(e,n.desktop):e,c=n?a(e,n.mobile):e;if(i&&e){try{(0,t.preconnect)(new URL(u).origin,{crossOrigin:"anonymous"})}catch{}(0,t.preload)(u,{as:"image",fetchPriority:"high",crossOrigin:"anonymous"})}return(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{media:"(min-width: 1024px)",srcSet:u}),(0,r.jsx)("img",{src:c,alt:l,className:s,loading:o,decoding:"async",crossOrigin:"anonymous",...i?{fetchPriority:"high"}:{},...d?{width:d.width,height:d.height}:{}})]})}],45886),e.s([],79133);var l=e.i(43725),n=e.i(59369),s=e.i(30392);e.s(["Tag",0,({children:e,href:t,target:a="_self",onClick:o,ariaLabel:i,className:d=""})=>{let{t:u}=(0,l.useI18n)(),c=!!t,m=(0,n.cn)("inline-flex items-center justify-center font-sans font-bold text-xs leading-[1.5] text-center whitespace-nowrap no-underline bg-[#BEE7E3] text-[#28333C] rounded-card h-6 px-2 py-1 border border-transparent transition-colors duration-200 ease-in-out motion-reduce:transition-none",c&&"cursor-pointer hover:bg-[#92D7D0] hover:border-[#1A4570] active:bg-teal active:border-[#1A4570] focus-visible:bg-[#92D7D0] focus-visible:border-[#1A4570] focus-visible:outline-2 focus-visible:outline-[#1A4570] focus-visible:outline-offset-2",d),h=c?{"aria-label":i,rel:"_blank"===a?"noopener noreferrer":void 0}:{};return c?(0,r.jsxs)("a",{href:t,target:a,onClick:o,className:m,...h,children:[e,"_blank"===a&&(0,r.jsx)("span",{className:"sr-only",children:(0,s.getDictionaryValue)(u,s.DICTIONARY.O.OpensInNewWindow)})]}):(0,r.jsx)("span",{className:m,children:e})}],87756),e.s([],39921)},5485,12469,36437,26314,99941,e=>{"use strict";e.i(13044),e.i(47530),e.i(26878);var r=e.i(91398);e.i(43725),e.i(59369),e.i(30392),e.i(67018),e.i(723),e.s(["SharkFin",0,({position:e,className:t=""})=>(0,r.jsx)("svg",{preserveAspectRatio:"none",width:"100%",height:"100%",viewBox:"0 0 1440 136",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:{display:"block",transform:"bottom"===e?"rotate(180deg)":void 0},"aria-hidden":"true",children:(0,r.jsx)("path",{d:"M1440 0H0C0 53.0193 42.9807 96 96 96H1440V0Z",fill:"white"})})],12469),e.s([],36437),e.i(57034),e.s(["CircularArrowIcon",0,e=>(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"arrow-gradient",x1:"0",y1:"10",x2:"20",y2:"10",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#1A4570"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#146776"})]})}),(0,r.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"url(#arrow-gradient)"}),(0,r.jsx)("path",{d:"M8 5.5L12.5 10L8 14.5",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round"})]})],26314),e.i(85617),e.s(["CirclePlusGradientIcon",0,e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:[(0,r.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"url(#circlePlusGradient)"}),(0,r.jsx)("line",{x1:"10.2983",y1:"5.59424",x2:"10.2983",y2:"13.6885",stroke:"white",strokeWidth:"2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"14.063",y1:"9.92383",x2:"5.96875",y2:"9.92383",stroke:"white",strokeWidth:"2",strokeLinecap:"round"}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"circlePlusGradient",x1:"0",y1:"10",x2:"20",y2:"10",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#1A4570"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#146776"})]})})]})],99941),e.s([],5485)},24049,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(86629),l=e.i(91592),n=e.i(28562),s=e.i(43725),o=e.i(59369),i=e.i(30392),d=e.i(45137);let u=(0,t.createContext)(null),c=(0,t.createContext)(null),m=({direction:e,onClick:t,disabled:a,label:l,isBlueTheme:n})=>(0,r.jsx)("button",{type:"button",onClick:t,disabled:a,className:(0,o.cn)("flex items-center justify-center size-10 rounded-full","transition-all duration-200 motion-reduce:transition-none",a?"bg-[#939ea9] text-white cursor-not-allowed":n?"bg-white text-dark-blue hover:bg-grey-1":"bg-gradient-to-r from-[#1a4570] to-[#146776] text-white hover:scale-105","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",n?"focus-visible:ring-white":"focus-visible:ring-dark-blue"),"aria-label":l,children:(0,r.jsx)("svg",{width:"8",he
15ight:"17",viewBox:"0 0 8 17",fill:"none","aria-hidden":"true",className:"left"===e?"":"rotate-180",children:(0,r.jsx)("path",{d:"M7 1L1 8.5L7 16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),h=({total:e,current:t,label:a,slideLabelTemplate:l,isBlueTheme:n})=>(0,r.jsx)("div",{className:"flex items-center justify-center gap-[6px]",role:"tablist","aria-label":a,children:Array.from({length:e}).map((a,s)=>{let i=l.replace("{current}",String(s+1)).replace("{total}",String(e));return(0,r.jsx)("div",{role:"tab","aria-selected":s===t,"aria-label":i,tabIndex:-1,className:(0,o.cn)("transition-all duration-200 motion-reduce:transition-none rounded-full",s===t?(0,o.cn)("w-[58px] h-2",n?"bg-white":"bg-gradient-to-r from-dark-blue to-blue-green"):(0,o.cn)("w-2 h-2",n?"bg-white/50":"bg-blue-green"))},s)})}),p=(e,a)=>{let{isVerticalLayout:l}=a,{page:u}=(0,n.useSitecore)(),{t:c}=(0,s.useI18n)(),m=u?.mode?.isEditing||u?.mode?.isPreview,h=u?.mode?.isEditing,{fields:p,params:g,rendering:f,children:b}=e,x=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_SectionLabel),v=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_CarouselLabel),y=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_NavigationLabel),R=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_PreviousCard),N=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_NextCard),E=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_SlideIndicators),I=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_SlideLabel),C=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_ShowingCard),_=(0,i.getDictionaryValue)(c,i.DICTIONARY.C.ComparisonCardContainer_CardLabel),j=g?.RenderingIdentifier,S=`comparison-card-container-${g?.DynamicPlaceholderId}`,D=(0,d.getBackgroundClass)(e?.params?.["Background Colors"])?.includes("Blue"),T=f?.placeholders?.[S],A=t.Children.toArray(b),F=Array.isArray(T)?T.length:A.length,O=(0,t.useRef)(null),w=(0,t.useRef)(null),[L,P]=(0,t.useState)(0),[k,M]=(0,t.useState)(!1),[V,B]=(0,t.useState)(0),[Y,U]=(0,t.useState)(""),[z,Z]=(0,t.useState)(!1),[q,H]=(0,t.useState)(null),[$,G]=(0,t.useState)(0),Q=(0,t.useCallback)(()=>{Z(e=>!e)},[]),W=(0,t.useCallback)(()=>{if(!O.current)return;let e=O.current.querySelectorAll("[data-comparison-card]");if(0===e.length)return;let r={header:0,price:0,content:0,buttons:0},t=0;e.forEach(e=>{let a=e.querySelector('[data-section="header"]'),l=e.querySelector('[data-section="price"]'),n=e.querySelector('[data-section="content"]'),s=e.querySelector('[data-section="buttons"]'),o=e.querySelector('[data-section="accordion-content"]');a&&(r.header=Math.max(r.header,a.scrollHeight)),l&&(r.price=Math.max(r.price,l.scrollHeight)),n&&(r.content=Math.max(r.content,n.scrollHeight)),s&&(r.buttons=Math.max(r.buttons,s.scrollHeight)),o&&(t=Math.max(t,o.scrollHeight))}),H(r),G(t)},[]),K=l&&(k||F>4),J=k?F-1:Math.max(0,F-4),X=0===L,ee=L>=J,er=p?.Title?.value||m,et=p||m,ea=(0,t.useCallback)(()=>{X||P(e=>e-1)},[X]),el=(0,t.useCallback)(()=>{ee||P(e=>e+1)},[ee]);(0,t.useEffect)(()=>{let e=()=>{M(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,t.useEffect)(()=>{if(!K)return;let e=()=>{w.current&&B(w.current.clientWidth)};return requestAnimationFrame(e),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[K]),(0,t.useEffect)(()=>{if(!K){H(null),G(0);return}let e=setTimeout(W,100);return window.addEventListener("resize",W),()=>{clearTimeout(e),window.removeEventListener("resize",W)}},[K,F,W]),(0,t.useEffect)(()=>{if(!K||!z)return;let e=setTimeout(W,350);return()=>clearTimeout(e)},[z,K,W]),(0,t.useEffect)(()=>{L>=F&&F>0&&P(F-1)},[L,F]),(0,t.useEffect)(()=>{K&&F>0&&U(C.replace("{current}",String(L+1)).replace("{total}",String(F)))},[L,F,K,C]),(0,t.useEffect)(()=>{if(m||!K)return;let e=e=>{"ArrowLeft"===e.key?ea():"ArrowRight"===e.key&&el()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ea,el,m,K]);let en=k?12:24,es=k?300:V&&0!==V?Math.floor((V-4*en-160)/4):320,eo=(0,t.useCallback)(e=>{let a=t.Children.toArray(e);return a.map((e,t)=>{let l=_.replace("{current}",String(t+1)).replace("{total}",String(a.length));return(0,r.jsx)("div",{id:`comparison-slide-${j}-${t}`,className:"grid row-span-4 [grid-template-rows:subgrid] transition-opacity duration-300",role:"tabpanel","aria-label":l,"aria-hidden":t
15!==L,children:e},t)})},[L,j,_]),ei=(0,o.cn)("relative w-full overflow-hidden",D?"bg-light-blue":"bg-white",D?"py-[44px] min-[768px]:py-[96px]":"py-8 min-[768px]:py-12",D&&"shark-fin-decoration-top shark-fin-decoration-bottom",g?.GridParameters,g?.Styles),ed=(0,o.cn)("flex flex-col items-center w-full",D&&"py-10"),eu=(0,o.cn)("text-h2 text-center","w-full max-w-[1032px]","text-[#28333c]","pb-3 my-6"),ec=l?"Vertical":"Horizontal";return{fields:p,rendering:f,children:b,childrenArray:A,id:j,placeholderKey:S,isBlueTheme:D,isMobile:k,carouselGap:en,cardWidth:es,containerRef:O,carouselRef:w,currentIndex:L,liveRegionMessage:Y,showCarousel:K,isFirstCard:X,isLastCard:ee,totalCards:F,slideCount:J+1,hasTitle:er,shouldRender:et,goToPrevious:ea,goToNext:el,renderCarouselCards:eo,getCarouselTransform:()=>{if(!K)return"translateX(0)";if(k&&V>0){let e=L*(es+en);return`translateX(${-(e-(V-48-es)/2)}px)`}let e=L*es;return`translateX(${80-e}px)`},containerStyles:ei,innerContainerStyles:ed,titleStyles:eu,sectionLabel:x,carouselLabel:v,navigationLabel:y,previousCardLabel:R,nextCardLabel:N,slideIndicatorsLabel:E,slideLabelTemplate:I,isVerticalLayout:l,cardLayout:ec,mobileAccordionExpanded:z,handleMobileAccordionToggle:Q,cardHeights:q,accordionContentMinHeight:$,isPageEditor:h}},g=e=>{let{fields:t,rendering:n,childrenArray:s,id:i,placeholderKey:d,isBlueTheme:g,carouselGap:f,cardWidth:b,containerRef:x,carouselRef:v,liveRegionMessage:y,showCarousel:R,isFirstCard:N,isLastCard:E,totalCards:I,slideCount:C,hasTitle:_,shouldRender:j,goToPrevious:S,goToNext:D,renderCarouselCards:T,getCarouselTransform:A,containerStyles:F,innerContainerStyles:O,titleStyles:w,sectionLabel:L,carouselLabel:P,navigationLabel:k,previousCardLabel:M,nextCardLabel:V,slideIndicatorsLabel:B,slideLabelTemplate:Y,currentIndex:U,mobileAccordionExpanded:z,handleMobileAccordionToggle:Z,cardLayout:q,cardHeights:H,accordionContentMinHeight:$,isPageEditor:G}=p(e,{isVerticalLayout:!0});if(!j)return null;let Q={cardLayout:q};return(0,r.jsx)(u.Provider,{value:{isExpanded:z,toggle:Z,contentMinHeight:$},children:(0,r.jsx)(c.Provider,{value:H,children:(0,r.jsx)("section",{className:F,id:i,"aria-label":L,"aria-roledescription":R?P:void 0,children:(0,r.jsxs)("div",{className:O,children:[R&&(0,r.jsx)("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:y}),_&&(0,r.jsx)("h2",{className:w,children:(0,r.jsx)(l.Text,{field:t?.Title})}),R?(0,r.jsxs)("div",{className:"relative w-full max-w-[1920px] mx-auto",children:[(0,r.jsx)("div",{className:"overflow-hidden px-6 lg:px-12",ref:v,children:(0,r.jsx)("div",{ref:x,className:(0,o.cn)("grid grid-flow-col transition-transform duration-300 ease-in-out","grid-rows-[auto_auto_1fr_auto]"),style:{transform:A(),gap:`${f}px`,gridAutoColumns:`${b}px`},children:n?(0,r.jsx)(a.Placeholder,{name:d,rendering:n,render:T,passThroughComponentProps:Q}):T(s)})}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 mt-6 w-full max-w-[374px] mx-auto lg:justify-center lg:gap-6 lg:max-w-none",role:"group","aria-label":k,children:[(0,r.jsx)(h,{total:C,current:U,label:B,slideLabelTemplate:Y,isBlueTheme:g}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(m,{direction:"left",onClick:S,disabled:N,label:M,isBlueTheme:g}),(0,r.jsx)(m,{direction:"right",onClick:D,disabled:E,label:V,isBlueTheme:g})]})]})]}):(0,r.jsx)("div",{ref:x,className:(0,o.cn)("px-6 lg:px-12 w-full max-w-[1920px] mx-auto","grid gap-x-6 pb-6","grid-rows-[auto_auto_1fr_auto]",G&&"grid-cols-1 gap-y-4",!G&&1===I&&"grid-cols-1",!G&&2===I&&"grid-cols-2",!G&&3===I&&"grid-cols-3",!G&&(I>=4||0===I)&&"grid-cols-4","max-lg:grid-cols-1 max-lg:gap-3"),children:n?(0,r.jsx)(a.Placeholder,{name:d,rendering:n,passThroughComponentProps:Q}):s})]})})})})};e.s(["CardHeightContext",0,c,"Default",0,g,"Horizontal",0,e=>{let{fields:t,rendering:n,children:s,childrenArray:i,id:d,placeholderKey:g,isBlueTheme:f,carouselGap:b,cardWidth:x,containerRef:v,carouselRef:y,liveRegionMessage:R,showCarousel:N,isFirstCard:E,isLastCard:I,slideCount:C,hasTitle:_,shouldRender:j,goToPrevious:S,goToNext:D,renderCarouselCards:T,getCarouselTransform:A,containerStyles:F,innerContainerStyles:O,titleStyles:w,sectionLabel:L,carouselLabel:P,navigationLabel:k,previousCardLabel:M,nextCardLabel:V,slideIndicatorsLabel:B,slideLabelTemplate:Y,currentIndex:U,mobileAccordionExpanded:z,handleMobileAccordionToggle:Z,cardLayout:q,cardHeights:H,accordionContentMinHeight:$}=p(e,{isVerticalLayout:!1});if(!j)return null;let G={cardLayout:q};return(0,r.jsx)(u.Provider,{value:{isExpanded:z,toggle:Z,contentMinHeight:$},children:(0,r.jsx)(c.Provider,{value:H,children:(0,r.jsx)("section",{className:F,id:d,"aria-label":L,"aria-roledescription":N?P:void 0,children:(0,r.jsxs)("div",{className:O,children:[N&&(0,r.jsx)("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:R}),_&&(0,r.jsx)("h2",{className:w,children:(0,r.jsx)(l.Text,{field:t?.Title})}),N?(0,r.jsxs)("div",{className:"relative w-full max-w-[1920px] mx-auto",children:[(0,r.jsx)("div",{className:"overflow-hidden px-6 lg:px-12",ref:y,children:(0,r.jsx)("div",{ref:v,className:(0,o.cn)("grid grid-flow-col transition-transform duration-300 ease-in-out","grid-rows-[auto_auto_1fr_auto]"),style:{transform:A(),gap:`${b}px`,gridAutoColumns:`${x}px`},children:n?(0,r.jsx)(a.Placeholder,{name:g,rendering:n,render:T,passThroughComponentProps:G}):T(i)})}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 mt-6 w-full max-w-[374px] mx-auto lg:justify-center lg:gap-6 lg:max-w-none",role:"group","aria-label":k,children:[(0,r.jsx)(h,{total:C,current:U,label:B,slideLabelTemplate:Y,isBlueTheme:f}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(m,{direction:"left",onClick:S,disabled:E,label:M,isBlueTheme:f}),(0,r.jsx)(m,{direction:"right",onClick:D,disabled:I,label:V,isBlueTheme:f})]})]})]}):(0,r.jsx)("div",{ref:v,className:"flex flex-col gap-5 w-full max-w-[1920px] mx-auto px-6 lg:px-12",children:n?(0,r.jsx)(a.Placeholder,{name:g,rendering:n,passThroughComponentProps:G}):s})]})})})})},"MobileAccordionContext",0,u,"Vertical",0,g,"useCardHeights",0,()=>(0,t.useContext)(c),"useMobileAccordion",0,()=>(0,t.useContext)(u)])},60212,76488,79426,39611,13835,7054,54065,47141,11552,81665,85194,51698,68295,36315,64604,94606,37870,38453,30921,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(58021),l=e.i(43725),n=e.i(25929),s=e.i(14601);e.i(70484);var o=e.i(45892);e.i(78118);var i=e.i(94102),d=e.i(56558),u=e.i(50547),c=e.i(30392),m=e.i(73282),h=e.i(4625);e.s(["PreFormDealerGateway",0,function({onVerified:e,dealerInfo:d,onDealerVerified:p,isDealerVerified:g}){let f=(0,l.useI18n)(),b=f?.t??(e=>""),{watch:x,setValue:v,formState:{errors:y}}=(0,a.useFormContext)(),[R,N]=(0,t.useState)(!1),[E,I]=(0,t.useState)(null),[C,_]=(0,t.useState)(null),[j,S]=(0,t.useState)(null),D=x("preFormDealerPath")??"yes",T=x("preFormDealerId")??"",A=x("preFormDealerCompanyName")??"",F=x("preFormDealerStreet")??"",O=x("preFormDealerCity")??"",w=x("preFormDealerState")??"",L=x("preFormDealerZip")??"",P=async e=>{if(I(null),S(null),e){if(!/^\d{6}$/.test(e))return void I("Dealer ID must be exactly 6 digits.");N(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"HEAT_PUMP"})});if(!r.ok)return void I("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void I("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){let e={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};S(e),I(null)}
15else I(t.error??"Dealer ID not found."),S(null)}catch{I("Unable to verify dealer. Please try again.")}finally{N(!1)}}},k=r=>{v("preFormDealerPath",r),I(null),_(null),S(null),p(!1),e(null)};return(0,r.jsxs)("div",{className:"mb-8 rounded-2xl border border-[var(--color-grey-3)] p-6",children:[(0,r.jsx)("h2",{className:"mb-4 text-[20px] font-bold text-[var(--color-dark-blue)]",children:"Dealer Information"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsx)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:"Do you have a Dealer ID? *"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Option_Yes),name:"preFormDealerPath",value:"yes",checked:"yes"===D,onChange:()=>k("yes"),variant:"forms"}),(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Option_No),name:"preFormDealerPath",value:"no",checked:"no"===D,onChange:()=>k("no"),variant:"forms"})]})]}),"yes"===D&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.InputField,{label:"Dealer ID (6-digit number)",value:T,onChange:e=>{v("preFormDealerId",e),j&&S(null)},placeholder:(0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Placeholder_DealerId),maxLength:6,errorMessage:(0,n.translateFormError)(b,y.preFormDealerId?.message)??E??void 0,required:!0}),(0,r.jsx)("button",{type:"button",onClick:()=>P(T),disabled:R||!T,className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:R?"Submittingâ¦":"Submit"}),j&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,r.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,r.jsx)("span",{className:"font-medium",children:"Dealer Name:"})," ",j.name]}),(0,r.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,r.jsx)("span",{className:"font-medium",children:"Dealer Address:"})," ",j.cityStateZip?`${j.address}, ${j.cityStateZip}`:`${j.address}, ${j.city}, ${j.state} ${j.zip}`]})]}),(0,r.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}}),(0,r.jsx)("button",{type:"button",onClick:()=>{j&&((0,m.storeDealerId)({dealerId:T,dealerName:j.name,dealerAddress:j.address,dealerCityStateZip:j.cityStateZip??""}),e(j),p(!0))},className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:"Verify"})]})]}),"no"===D&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Company Name",value:A,onChange:r=>{v("preFormDealerCompanyName",r),g&&(p(!1),e(null))},maxLength:60,errorMessage:(0,n.translateFormError)(b,y.preFormDealerCompanyName?.message),required:!0})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Street Address",value:F,onChange:r=>{v("preFormDealerStreet",r),g&&(p(!1),e(null))},maxLength:60,errorMessage:(0,n.translateFormError)(b,y.preFormDealerStreet?.message),required:!0})}),(0,r.jsx)(o.InputField,{label:"City",value:O,onChange:r=>{v("preFormDealerCity",r),g&&(p(!1),e(null))},maxLength:30,errorMessage:(0,n.translateFormError)(b,y.preFormDealerCity?.message),required:!0}),(0,r.jsx)(i.Dropdown,{label:"State",value:w,onChange:r=>{v("preFormDealerState",r),g&&(p(!1),e(null))},options:u.STATE_OPTIONS,placeholder:"--Select State--",errorMessage:(0,n.translateFormError)(b,y.preFormDealerState?.message),required:!0}),(0,r.jsx)(o.InputField,{label:"Zip Code",value:L,onChange:r=>{v("preFormDealerZip",r),g&&(p(!1),e(null))},maxLength:10,placeholder:(0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:(0,n.translateFormError)(b,y.preFormDealerZip?.message),required:!0})]}),C&&(0,r.jsx)("p",{className:"text-body-md text-[var(--color-red)]",role:"alert",children:C}),(0,r.jsx)("button",{type:"button",onClick:()=>{(_(null),A.trim())?F.trim()?O.trim()?w?L.trim()&&/^\d{5}(-\d{4})?$/.test(L)?(e({name:A,address:F,city:O,state:w,zip:L}),p(!0)):_(h.ZIP_CODE_MESSAGE):_((0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Error_StateRequired)):_((0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Error_CityRequired)):_((0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Error_StreetAddressRequired)):_((0,c.getDictionaryValue)(b,c.DICTIONARY.F.Form_Error_CompanyNameRequired))},className:"w-fit rounded-full bg-[var(--color-primary-blue)] px-6 py-2 text-[14px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:"Verify"}),g&&d&&(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information Verified"}),(0,r.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,r.jsx)("span",{className:"font-medium",children:"Company Name:"})," ",d.name]}),(0,r.jsxs)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:[(0,r.jsx)("span",{className:"font-medium",children:"Address:"})," ",d.address,", ",d.city,", ",d.state," ",d.zip]})]})]})]})]})}],60212);var p=e.i(84637),g=e.i(46203);let f=d.BUILDING_TYPES.map(e=>({value:e.value,label:e.label})),b=d.INSTALLATION_TYPES.map(e=>({value:e.value,label:e.label})),x=d.MN_STATE_OPTION.map(e=>({value:e.value,label:e.label}));e.s(["InstallationSection",0,function(){let e=(0,l.useI18n)(),t=e?.t??(e=>""),{control:s,formState:{errors:d}}=(0,a.useFormContext)();return(0,r.jsx)(p.FormSection,{number:1,title:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:s,name:"installStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,n.translateFormError)(t,d.installStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:s,name:"installCity",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(t,d.installCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:s,name:"installState",render:({field:e})=>(0,r.jsx)(i.Dropdown,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:x,placeholder:"MN",errorMessage:(0,n.translateFormError)(t,d.installState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:s,name:"installZip",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:(0,n.translateFormError)(t,d.installZip?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:s,name:"accountNumber",render:({field:e})=>(0,r.jsx)(g.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,n.translateFormError)(t,d.accountNumber?.message)})}),(0,r.jsx)(a.Controller,{control:s,name:"buildingType",render:({field:e})=>(0,r.jsx)(i.Dropdown,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_BuildingType),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:f,placeholder:"--Select Building Type--",errorMessage:(0,n.translateFormError)(t,d.buildingType?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:s,name:"installationType",render:({field:e})=>(0,r.jsx)(i.Dropdown,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_InstallationType),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:b,placeholder:"--Select Installation Type--",errorMessage:(0,n.translateFormError)(t,d.installationType?.message),required:!0})})]})})}],76488);var v=e.i(30798);let y=d.CHECK_PAYABLE_TYPES.map(e=>({value:e.value,label:e.label})),R=u.PURCHASER_TYPES.map(e=>({value:e.value,label:e.label}));e.s(["PurchaserSection",0,function(){let e=(0,l.useI18n)(),t=e?.t??(e=>""),{control:d,watch:m,setValue:h,formState:{errors:g}}=(0,a.useFormContext)(),f=m("checkPayableTo"),b=m("additionalPurchaser"),x=m("rebateAddressDifferent"),N=e=>{"NO"===e&&(h("purchaserStreet","",{shouldValidate:!1}),h("purchaserCity","",{shouldValidate:!1}),h("purchaserState","MN",{shouldValidate:!1}),h("purchaserZip","",{shouldValidate:!1}))};return(0,r.jsx)(p.FormSection,{number:2,title:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsxs)("fieldset",{children:[(0,r.jsx)("legend",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_CheckPayableTo)}),(0,r.jsx)("div",{className:"flex flex-col gap-3",children:(0,r.jsx)(a.Controller,{control:d,name:"checkPayableTo",render:({field:e})=>(0,r.jsx)(r.Fragment,{children:y.map(t=>(0,r.jsx)(s.Radio,{label:t.label,name:"checkPayableTo",value:t.value,checked:e.value===t.value,onChange:()=>{var r;e.onChange(t.value),"COMPANY"===(r=t.value)?(h("purchaserFirstName","",{shouldValidate:!1}),h("purchaserLastName","",{shouldValidate:!1}),h("additionalPurchaser",!1,{shouldValidate:!1}),h("secondaryPurchaserFirstName","",{shouldValidate:!1}),h("secondaryPurchaserLastName","",{shouldValidate:!1})):"PURCHASER"===r&&h("companyName","",{shouldValidate:!1})},variant:"forms"},t.value))})})}),g.checkPayableTo&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,n.translateFormError)(t,g.checkPayableTo.message)})]})}),"PURCHASER"===f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"purchaserFirstName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(t,g.purchaserFirstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserLastName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,n.translateFormError)(t,g.purchaserLastName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"additionalPurchaser",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(v.Checkbox,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(h("secondaryPurchaserFirstName","",{shouldValidate:!1}),h("secondaryPurchaserLastName","",{shouldValidate:!1}))},variant:"forms"})})}
15),b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"secondaryPurchaserFirstName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(t,g.secondaryPurchaserFirstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"secondaryPurchaserLastName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,n.translateFormError)(t,g.secondaryPurchaserLastName?.message),required:!0})})]})]}),"COMPANY"===f&&(0,r.jsx)(a.Controller,{control:d,name:"companyName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,n.translateFormError)(t,g.companyName?.message),required:!0})})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsxs)("fieldset",{children:[(0,r.jsxs)("legend",{className:"mb-2 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-3",children:(0,r.jsx)(a.Controller,{control:d,name:"rebateAddressDifferent",render:({field:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Option_Yes),name:"rebateAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>{e.onChange("YES"),N("YES")},variant:"forms"}),(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Option_No),name:"rebateAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>{e.onChange("NO"),N("NO")},variant:"forms"})]})})}),g.rebateAddressDifferent&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,n.translateFormError)(t,g.rebateAddressDifferent.message)})]})}),"YES"===x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"purchaserStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,n.translateFormError)(t,g.purchaserStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserCity",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(t,g.purchaserCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserState",render:({field:e})=>(0,r.jsx)(i.Dropdown,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:u.STATE_OPTIONS,placeholder:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:(0,n.translateFormError)(t,g.purchaserState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserZip",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,n.translateFormError)(t,g.purchaserZip?.message),required:!0})})]}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserType),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:R,placeholder:"--Select Purchaser Type--",errorMessage:(0,n.translateFormError)(t,g.purchaserType?.message),required:!0})})}
15),(0,r.jsx)(a.Controller,{control:d,name:"purchaserEmail",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,n.translateFormError)(t,g.purchaserEmail?.message)})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserPhone",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,n.translateFormError)(t,g.purchaserPhone?.message)})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserAltPhone",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(t,c.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,n.translateFormError)(t,g.purchaserAltPhone?.message)})})]})})}],79426);var N=e.i(32548),E=e.i(34346);e.s(["EquipmentSection",0,function({heatPumpModels:e,isLoadingData:s,dataLoadError:i,onInvoiceChange:u,invoiceError:m,fileUploadKey:h}){let g=(0,l.useI18n)(),f=g?.t??(e=>""),{control:b,watch:x,setValue:v,formState:{errors:y}}=(0,a.useFormContext)(),[R,I]=(0,t.useState)(!1),[C,_]=(0,t.useState)(!1),[j,S]=(0,t.useState)(!1),D=(0,t.useRef)(void 0),T=x("ahriReferenceNumber"),A=x("installationType"),F=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{D.current=A},[A]),(0,t.useEffect)(()=>{if(s||F.current||(v("condenserBrand","",{shouldValidate:!1}),v("condenserModelNumber","",{shouldValidate:!1}),v("evaporatorCoilBrand","",{shouldValidate:!1}),v("evaporatorCoilModelNumber","",{shouldValidate:!1}),v("furnaceModelNo","",{shouldValidate:!1}),v("hspf2Rating","",{shouldValidate:!1}),v("manufacturerType","",{shouldValidate:!1}),!T))return;let r=T.trim().toLowerCase();if(!r)return;let t=e.find(e=>e.ahri&&e.ahri.trim().toLowerCase()===r);t&&(F.current=!0,t.condBrand&&v("condenserBrand",t.condBrand,{shouldValidate:!1}),t.condModel&&v("condenserModelNumber",t.condModel,{shouldValidate:!1}),t.coilBrand&&v("evaporatorCoilBrand",t.coilBrand,{shouldValidate:!1}),t.coilModel&&v("evaporatorCoilModelNumber",t.coilModel,{shouldValidate:!1}),t.furnModel&&v("furnaceModelNo",t.furnModel,{shouldValidate:!1}),void 0!==t.hspf2&&t.hspf2>0&&v("hspf2Rating",String(t.hspf2),{shouldValidate:!1}),t.mfgType&&v("manufacturerType",t.mfgType,{shouldValidate:!1}),setTimeout(()=>{F.current=!1},100))},[T,e,s,v]),(0,r.jsx)(p.FormSection,{number:3,title:(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(N.ReadOnlyField,{label:"Type Code",value:d.TYPE_CODE_LABEL})}),(0,r.jsx)(a.Controller,{control:b,name:"ahriReferenceNumber",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Label_AHRIReferenceNumber),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,placeholder:"",maxLength:30,errorMessage:(0,n.translateFormError)(f,y.ahriReferenceNumber?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:b,name:"condenserBrand",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Condenser Brand",value:e.value??"",onChange:e.onChange,placeholder:"",maxLength:50,disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"condenserModelNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Condenser Model Number",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,placeholder:"",maxLength:75,errorMessage:(0,n.translateFormError)(f,y.condenserModelNumber?.message),disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"condenserSerialNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Condenser Serial Number",value:e.value??"",onChange:r=>{A?e.onChange(r):I(!0)},onBlur:e.onBlur,onFocus:()=>I(!0),placeholder:"",maxLength:30,errorMessage:!A&&R?(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):(0,n.translateFormError)(f,y.condenserSerialNumber?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:b,name:"evaporatorCoilBrand",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Evaporator Coil Brand",value:e.value??"",onChange:e.onChange,placeholder:"",maxLength:30,disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"evaporatorCoilModelNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Evaporator Coil Model Number",value:e.value??"",onChange:e.onChange,placeholder:"",maxLength:75,disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"evaporatorCoilSerialNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Evaporator Coil Serial Number",value:e.value??"",onChange:r=>{A?e.onChange(r):_(!0)},onBlur:e.onBlur,onFocus:()=>_(!0),placeholder:"",maxLength:30,errorMessage:!A&&C?(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):(0,n.translateFormError)(f,y.evaporatorCoilSerialNumber?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"furnaceModelNo",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Furnace Model No",value:e.value??"",onChange:e.onChange,placeholder:"",maxLength:75,disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"installDate",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Label_DateOfInstallation),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,n.translateFormError)(f,y.installDate?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"switchoverTemperature",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Switchover Temperature",value:e.value??"",onChange:r=>{if(!A)return void S(!0);let t=r.replace(/[^0-9]/g,"");e.onChange(t)},onBlur:e.onBlur,onFocus:()=>S(!0),placeholder:"",maxLength:2,errorMessage:!A&&j?(0,c.getDictionaryValue)(f,c.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):(0,n.translateFormError)(f,y.switchoverTemperature?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"hspf2Rating",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"HSPF2 Rating",value:e.value??"",onChange:e.onChange,placeholder:"",disabled:!0})}),(0,r.jsx)(a.Controller,{control:b,name:"manufacturerType",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Manufacturer Type",value:e.value??"",onChange:e.onChange,placeholder:"",disabled:!0})}),(0,r.jsxs)("div",{className:"sm:col-span-2",children:[(0,r.jsx)(E.FileUpload,{label:"Invoice and Supporting Documents (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:u,accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:m,required:!0},h),(0,r.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-text-secondary)]",children:"Accepted formats: JPEG, PDF, GIF, PNG. Max file size: 5MB"})]})]})})}],39611),e.s(["DealerSection",0,function({preFormDealerInfo:e}){let d=(0,l.useI18n)(),h=d?.t??(e=>""),{control:g,watch:f,setValue:b,formState:{errors:x}}=(0,a.useFormContext)(),[v,y]=(0,t.useState)(!1),[R,N]=(0,t.useState)(null),[E,I]=(0,t.useState)(null),C=f("dealerPath")??"";(0,t.useEffect)(()=>{if(e){let r=f("preFormDealerPath");b("dealerPath",r),"yes"===r?(b("dealerId",f("preFormDealerId")??""),I(e)):(b("dealerCompanyName",e.name),b("dealerStreet",e.address),b("dealerCity",e.city),b("dealerState",e.state),b("dealerZip",e.zip))}},[e,b,f]);let _=async e=>{if(N(null),e){if(!/^\d{6}$/.test(e))return void N("Dealer ID must be exactly 6 digits.");y(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"HEAT_PUMP"})});if(!r.ok)return void N("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void N("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){(0,m.storeDealerId)({dealerId:e,dealerName:t.dealer.dealerName,dealerAddress:t.dealer.dealerAddress,dealerCityStateZip:t.dealer.dealerCityStateZip});let r={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};I(r),N(null)}
15else N(t.error??"Dealer ID not found."),I(null)}catch{N("Unable to verify dealer. Please try again.")}finally{y(!1)}}};return(0,r.jsx)(p.FormSection,{number:4,title:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Section_DealerInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:["Do you have a Dealer ID? ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Option_Yes),name:"dealerPath",value:"yes",checked:"yes"===C,onChange:()=>{b("dealerPath","yes"),N(null),!E&&e&&"yes"===f("preFormDealerPath")&&(f("dealerId")??"")===(f("preFormDealerId")??"")&&I(e)},variant:"forms"}),(0,r.jsx)(s.Radio,{label:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Option_No),name:"dealerPath",value:"no",checked:"no"===C,onChange:()=>{b("dealerPath","no"),N(null),I(null)},variant:"forms"})]}),x.dealerPath&&(0,r.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",children:(0,n.translateFormError)(h,x.dealerPath.message)})]}),"yes"===C&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{control:g,name:"dealerId",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Dealer ID (6-digit number)",value:e.value??"",onChange:r=>{e.onChange(r),E&&I(null),N(null)},onBlur:()=>{e.onBlur(),e.value&&/^\d{6}$/.test(e.value)&&_(e.value)},placeholder:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Placeholder_DealerId),maxLength:6,errorMessage:(0,n.translateFormError)(h,x.dealerId?.message)??R??void 0,required:!0})}),v&&(0,r.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Verifying dealer IDâ¦"}),E&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:E.name}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:E.cityStateZip?`${E.address}, ${E.cityStateZip}`:`${E.address}, ${E.city}, ${E.state} ${E.zip}`})]}),(0,r.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}})]})]}),("yes"===C||"no"===C)&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("h3",{className:"text-[16px] font-bold text-[var(--color-text-primary)]",children:"Dealer Contact Information"})}),"no"===C&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:g,name:"dealerCompanyName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,n.translateFormError)(h,x.dealerCompanyName?.message),required:!0})})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:g,name:"dealerStreet",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,n.translateFormError)(h,x.dealerStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:g,name:"dealerCity",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(h,x.dealerCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:g,name:"dealerState",render:({field:e})=>(0,r.jsx)(i.Dropdown,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:u.STATE_OPTIONS,placeholder:"--Select State--",errorMessage:(0,n.translateFormError)(h,x.dealerState?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:g,name:"dealerZip",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Placeholder_Zip),errorMessage:(0,n.translateFormError)(h,x.dealerZip?.message),required:!0})})]}),("yes"===C||"no"===C)&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:g,name:"rebateContactName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Label_RebateContactName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(h,x.rebateContactName?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:g,name:"dealerEmail",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,n.translateFormError)(h,x.dealerEmail?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:g,name:"dealerEmailVerify",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Verify Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,n.translateFormError)(h,x.dealerEmailVerify?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:g,name:"dealerPhone",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Dealer Telephone Number",type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,n.translateFormError)(h,x.dealerPhone?.message),required:!0})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:g,name:"additionalInfo",render:({field:e})=>(0,r.jsx)(o.InputField,{label:(0,c.getDictionaryValue)(h,c.DICTIONARY.F.Form_Label_AdditionalInformation),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:500,multiline:!0,rows:6,errorMessage:(0,n.translateFormError)(h,x.additionalInfo?.message)})})})]})]})})}],13835),e.s(["SignatureSection",0,function({onPreview:e,onReset:t,termsUrl:s}){let i=(0,l.useI18n)(),d=i?.t??(e=>""),{control:u,formState:{errors:m,isSubmitting:h}}=(0,a.useFormContext)();return(0,r.jsx)(p.FormSection,{number:6,title:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Section_Signature),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:u,name:"dealerSignature",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Dealer Electronic Signature",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,n.translateFormError)(d,m.dealerSignature?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:u,name:"signatureDate",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,r.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:"By typing my digital signature above and clicking the 'I agree' box, I represent as follows:"}),(0,r.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,r.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,r.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,r.jsx)("li",{children:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,r.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,r.jsxs)("li",{children:[(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Agreement_ReadAgree)," ",s?(0,r.jsx)("button",{type:"button",onClick:()=>{s&&window.open(s,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,r.jsx)("span",{children:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}
15),(0,r.jsx)(a.Controller,{control:u,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(v.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"})}),m.agreeAndSubmit&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,n.translateFormError)(d,m.agreeAndSubmit.message)})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:e,disabled:h,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Button_Preview)}),(0,r.jsx)("button",{type:"button",onClick:t,disabled:h,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,c.getDictionaryValue)(d,c.DICTIONARY.F.Form_Button_Reset)})]})]})})}],7054);var I=e.i(26019);function C({number:e,title:t,children:a}){return(0,r.jsxs)("section",{className:"w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,r.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,r.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:t})]}),(0,r.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:a})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:s,onSubmit:o,isSubmitting:i,submitError:m}){let{control:p,getValues:g,formState:{errors:f}}=(0,a.useFormContext)(),b=(0,t.useRef)(null),x=(0,t.useId)(),y=(0,l.useI18n)(),R=y?.t??(e=>"");(0,t.useEffect)(()=>{let r=b.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let E=g();return(0,r.jsx)("dialog",{ref:b,onCancel:e=>{e.preventDefault(),s()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-3xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"preview-modal-title",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(I.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,r.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,r.jsx)("h2",{id:"preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Ducted Heat Pump Rebate Form - Review Your Submission"}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(C,{number:1,title:"Installation Information",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(N.ReadOnlyField,{label:"Street Address",value:E.installStreet??""})}),(0,r.jsx)(N.ReadOnlyField,{label:"City",value:E.installCity??""}),(0,r.jsx)(N.ReadOnlyField,{label:"State",value:E.installState??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Zip Code",value:E.installZip??""}),(0,r.jsx)(N.ReadOnlyField,{label:u.GAS_ACCOUNT_NUMBER_LABEL,value:E.accountNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Type of Building",value:(0,h.getDisplayLabel)(d.BUILDING_TYPES,E.buildingType)}),(0,r.jsx)(N.ReadOnlyField,{label:"Type of Installation",value:(0,h.getDisplayLabel)(d.INSTALLATION_TYPES,E.installationType)})]}),(0,r.jsxs)(C,{number:2,title:"Purchaser Information",children:[(0,r.jsx)(N.ReadOnlyField,{label:"Check Payable To",value:"COMPANY"===E.checkPayableTo?"Company":"Purchaser"}),(0,r.jsx)(N.ReadOnlyField,{label:"Payee Name",value:(()=>{let e=E.checkPayableTo??"PURCHASER";if("PURCHASER"===e){let e=`${E.purchaserFirstName??""} ${E.purchaserLastName??""}`.trim();if(E.additionalPurchaser&&E.secondaryPurchaserFirstName){let r=`${E.secondaryPurchaserFirstName??""} ${E.secondaryPurchaserLastName??""}`.trim();return`${e} & ${r}`}return e}return"COMPANY"===e?E.companyName??"":""})()}),"PURCHASER"===E.checkPayableTo&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser First Name",value:E.purchaserFirstName??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser Last Name",value:E.purchaserLastName??""}),E.additionalPurchaser&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.ReadOnlyField,{label:"Secondary Purchaser First Name",value:E.secondaryPurchaserFirstName??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:E.secondaryPurchaserLastName??""})]})]}),"COMPANY"===E.checkPayableTo&&(0,r.jsx)(N.ReadOnlyField,{label:"Company Name",value:E.companyName??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Is Rebate Address Different from Installation Address?",value:"YES"===E.rebateAddressDifferent?"Yes":"No"}),"YES"===E.rebateAddressDifferent&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser Street Address",value:E.purchaserStreet??""})}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser City",value:E.purchaserCity??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser State",value:E.purchaserState??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser Zip Code",value:E.purchaserZip??""})]}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser Type",value:(0,h.getDisplayLabel)(u.PURCHASER_TYPES,E.purchaserType)}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser's Email Address",value:E.purchaserEmail??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser's Telephone Number",value:E.purchaserPhone??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:E.purchaserAltPhone??""})]}),(0,r.jsxs)(C,{number:3,title:"Equipment Information",children:[(0,r.jsx)(N.ReadOnlyField,{label:"Type Code",value:"Ducted Air Source Heat Pump"}),(0,r.jsx)(N.ReadOnlyField,{label:"AHRI Reference Number",value:E.ahriReferenceNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Condenser Brand",value:E.condenserBrand??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Condenser Model Number",value:E.condenserModelNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Condenser Serial Number",value:E.condenserSerialNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Evaporator Coil Brand",value:E.evaporatorCoilBrand??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Evaporator Coil Model Number",value:E.evaporatorCoilModelNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Evaporator Coil Serial Number",value:E.evaporatorCoilSerialNumber??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Furnace Model No",value:E.furnaceModelNo??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Date of Installation",value:(0,h.formatDateForDisplay)(E.installDate)}),(0,r.jsx)(N.ReadOnlyField,{label:"Switchover Temperature",value:E.switchoverTemperature??""}),(0,r.jsx)(N.ReadOnlyField,{label:"HSPF2 Rating",value:E.hspf2Rating??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Manufacturer Type",value:E.manufacturerType??""})]}),(0,r.jsxs)(C,{number:4,title:"Dealer Information",children:[(0,r.jsx)(N.ReadOnlyField,{label:"Rebate Contact Name",value:E.rebateContactName??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Email Address",value:E.dealerEmail??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Dealer Telephone Number",value:E.dealerPhone??""}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(N.ReadOnlyField,{label:"Additional Information",value:E.additionalInfo??""})})]}),(0,r.jsxs)(C,{number:5,title:"Signature",children:[(0,r.jsx)(N.ReadOnlyField,{label:"Dealer Electronic Signature",value:E.dealerSignature??""}),(0,r.jsx)(N.ReadOnlyField,{label:"Date",value:(0,h.formatDateForDisplay)(E.signatureDate)})]})]}),(0,r.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{c
15ontrol:p,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(v.Checkbox,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":f.agreeAndSubmit?x:void 0})}),f.agreeAndSubmit&&(0,r.jsx)("p",{id:x,className:"text-body-md text-[var(--color-red)]",role:"alert",children:(0,n.translateFormError)(R,f.agreeAndSubmit.message)}),m&&(0,r.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:m}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:o,disabled:i,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:i?(0,c.getDictionaryValue)(R,c.DICTIONARY.F.Form_Button_Submitting):(0,c.getDictionaryValue)(R,c.DICTIONARY.F.Form_Button_Submit)}),(0,r.jsx)("button",{type:"button",onClick:s,disabled:i,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,c.getDictionaryValue)(R,c.DICTIONARY.F.Form_Button_Modify)}),(0,r.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:i,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,c.getDictionaryValue)(R,c.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],54065);var _=e.i(40733);let j=["licensedhealthcarefacility","government","wasteWater","industrial","naturalgasserving","renalcare","other"],S={licensedhealthcarefacility:"A) Licensed Health Care Facility",government:"B) Government",wasteWater:"C) Water and Waste Water",industrial:"D) Industrial",naturalgasserving:"E) Natural Gas Load Serving Electric Generation and Co-generation",renalcare:"F) Renal Care",other:"G) Other"},D=[{value:"full service support generation",label:"A) Full Service Support Generation"},{value:"partial service support generation",label:"B) Partial Service Support Generation"},{value:"no onsite generation",label:"C) No Onsite Generation"}],T=[{value:"Hospital",label:"A) Hospital"},{value:"Assisted Living Provider",label:"B) Assisted Living Provider"},{value:"Intermediate Care",label:"C) Intermediate Care"},{value:"Nursing Facility",label:"D) Nursing Facility"},{value:"Memory Care",label:"E) Memory Care"},{value:"Other",label:"F) Other"}],A=[{value:"police-stations",label:"A) Police Stations"},{value:"fire-stations",label:"B) Fire Stations"},{value:"traffic-signals",label:"C) Traffic Signals"},{value:"other",label:"D) Other"}],F=[{value:"manufacturing",label:"A) Manufacturing"},{value:"energy",label:"B) Energy"},{value:"chemical",label:"C) Chemical"},{value:"other",label:"D) Other"}],O=[{value:"water-supply",label:"A) Water Supply"},{value:"water-treatment-facility",label:"B) Water Treatment"},{value:"waste-water-treatment",label:"C) Waste Water Treatment"},{value:"waste-water-lift-station",label:"D) Waste Water Lift Station"},{value:"other",label:"E) Other"}],w=[{value:"military",label:"A) Military"},{value:"schools",label:"B) Schools"},{value:"communications",label:"C) Communications"},{value:"other",label:"D) Other"}];e.s(["BACKUP_GENERATION_OPTIONS",0,D,"ESTABLISHMENT_LABELS",0,S,"ESTABLISHMENT_TYPES",0,j,"GOVERNMENT_FACILITY_OPTIONS",0,A,"HEALTHCARE_FACILITY_OPTIONS",0,T,"INDUSTRIAL_FACILITY_OPTIONS",0,F,"OTHER_FACILITY_OPTIONS",0,w,"WATER_FACILITY_OPTIONS",0,O],47141);let L="Please enter a valid 22 length numerical ESI ID.",P="Please enter the correct 22 digit numeric ESI Number, select information icon to right for ESI Description.";function k(e){let r=(e??"").trim();return""===r?L:h.esiidRegex.test(r)?void 0:P}e.s(["ESI_ID_EMPTY_MESSAGE",0,L,"ESI_ID_INVALID_MESSAGE",0,P,"validateEsiId",0,k],11552);let M=_.z.string().optional(),V=_.z.object({esiId:_.z.string().min(1,L).regex(h.esiidRegex,P),customerName:_.z.string().min(1,"Customer name is required").regex(h.customerNameRegex,"Please enter a valid customer name"),serviceAddress:_.z.string().min(1,"Service address is required"),
15contactFirstName:_.z.string().min(1,"Contact first name is required").regex(h.alphaOnlyRegex,"Please enter a valid first name"),contactLastName:_.z.string().min(1,"Contact last name is required").regex(h.alphaOnlyRegex,"Please enter a valid last name"),workNumber:_.z.string().min(1,"Work number is required").regex(h.phoneRegex,"Please enter a valid phone number"),cellNumber:_.z.string().min(1,"Cell number is required").regex(h.phoneRegex,"Please enter a valid phone number"),emailAddress:_.z.string().min(1,"Email address is required").email("Please enter a valid email address"),puctReason:_.z.string().min(1,"PUCT reason is required"),hasBackupGeneration:_.z.string().min(1,"Please indicate if customer has backup generation"),establishmentType:_.z.enum(j,{errorMap:()=>({message:"Please select a type of establishment"})}).optional(),healthcareType:M,healthcareOtherDescribe:M,healthServicesLicense:M,otherStateAgencyLicense:M,noStateLicenseExplain:M,licensedFacilityId:M,alzheimersCertifiedUnit:_.z.boolean().optional(),healthcarePublicSafetyIssue:M,governmentFacilityType:M,governmentOtherDescribe:M,governmentPublicSafetyIssue:M,governmentExplanationEmail:M,industrialFacilityType:M,industrialOtherDescribe:M,renalCarePublicSafetyIssue:M,waterFacilityType:M,waterOtherDescribe:M,municipalDistrictNumber:M,waterPublicSafetyIssue:M,otherFacilityType:M,otherFacilityDescribe:M,otherPublicSafetyIssue:M,naturalGasCIDDocument:_.z.custom().optional(),naturalGasCIDExcel:_.z.custom().optional(),hiddenPartner1:M,hiddenPartner2:M,hiddenPhonenumDefaultCons:M,hiddenPhonenumMobileCons:M,hiddenEmailaddrCons:M,hiddenPartner2Type:M,hiddenCcareId:M,hiddenCode:M,hiddenStatus400:M,snapshotContactFirstName:M,snapshotContactLastName:M,snapshotWorkNumber:M,snapshotCellNumber:M,snapshotEmail:M,snapshotQualifiesAsCriticalLoad:M,snapshotBackupGeneration:M}).superRefine((e,r)=>{"licensedhealthcarefacility"===e.establishmentType&&(e.healthcareType&&""!==e.healthcareType.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please select a type of facility",path:["healthcareType"]}),e.healthcarePublicSafetyIssue&&""!==e.healthcarePublicSafetyIssue.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the public safety issue",path:["healthcarePublicSafetyIssue"]}),"Other"!==e.healthcareType||e.healthcareOtherDescribe&&""!==e.healthcareOtherDescribe.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the facility type",path:["healthcareOtherDescribe"]})),"government"===e.establishmentType&&(e.governmentFacilityType&&""!==e.governmentFacilityType.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please select a type of government facility",path:["governmentFacilityType"]}),"other"===e.governmentFacilityType&&(e.governmentOtherDescribe&&""!==e.governmentOtherDescribe.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the facility type",path:["governmentOtherDescribe"]}),e.governmentPublicSafetyIssue&&""!==e.governmentPublicSafetyIssue.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the public safety issue",path:["governmentPublicSafetyIssue"]}))),"industrial"===e.establishmentType&&(e.industrialFacilityType&&""!==e.industrialFacilityType.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please select a type of industrial facility",path:["industrialFacilityType"]}),"other"!==e.industrialFacilityType||e.industrialOtherDescribe&&""!==e.industrialOtherDescribe.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the facility type",path:["industrialOtherDescribe"]})),"wasteWater"===e.establishmentType&&(e.waterFacilityType&&""!==e.waterFacilityType.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please select a type of water facility",path:["waterFacilityType"]}),"other"===e.waterFacilityType&&(e.waterOtherDescribe&&""!==e.waterOtherDescribe.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the facility type",path:["waterOtherDescribe"]}),e.waterPublicSafetyIssue&&""!==e.waterPublicSafetyIssue.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the public safety issue",path:["waterPublicSafetyIssue"]}))),"other"===e.establishmentType&&(e.otherFacilityType&&""!==e.otherFacilityType.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please select a type of facility",path:["otherFacilityType"]}),"other"===e.otherFacilityType&&(e.otherFacilityDescribe&&""!==e.otherFacilityDescribe.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the facility type",path:["otherFacilityDescribe"]}),e.otherPublicSafetyIssue&&""!==e.otherPublicSafetyIssue.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the public safety issue",path:["otherPublicSafetyIssue"]}))),"renalcare"!==e.establishmentType||e.renalCarePublicSafetyIssue&&""!==e.renalCarePublicSafetyIssue.trim()||r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please describe the public health, safety, or welfare issue",path:["renalCarePublicSafetyIssue"]}),"naturalgasserving"===e.establishmentType&&((!e.naturalGasCIDDocument||Array.isArray(e.naturalGasCIDDocument)&&0===e.naturalGasCIDDocument.length)&&r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please attach the CI-D Document",path:["naturalGasCIDDocument"]}),(!e.naturalGasCIDExcel||Array.isArray(e.naturalGasCIDExcel)&&0===e.naturalGasCIDExcel.length)&&r.addIssue({code:_.z.ZodIssueCode.custom,message:"Please attach the CI-D Excel file",path:["naturalGasCIDExcel"]}))});e.s(["criticalCareSchema",0,V],81665);let B="critical-care",Y="Invalid Service";function U(e){return""===(e??"").trim()}function z(e){return{formId:B,txtEsiid:e.esiId,txtcustomernameassociatedesiid:e.customerName,txtserviceaddress:e.serviceAddress,txtcontactname:e.contactFirstName,txtContactLastName:e.contactLastName,txtworknumber:e.workNumber,txtcellnumber:e.cellNumber,txtemailaddress:e.emailAddress,QualifiesAsCriticalLoad:e.puctReason,selOnsiteBackupGeneration:e.hasBackupGeneration,seltypeofestablishment:e.establishmentType,txtHospital:e.healthcareType,txtotherdescribehealthcare:e.healthcareOtherDescribe,txtdepthealthlicense:e.healthServicesLicense,txtlicensedbyanotherstateagency:e.otherStateAgencyLicense,txtpleaseexplain:e.noStateLicenseExplain,txtlicensedfaciltyid:e.licensedFacilityId,ChkAlzheimersCertifiedUnit:e.alzheimersCertifiedUnit?"on":"",txtdescribespecific:e.healthcarePublicSafetyIssue,seltypeofgov:e.governmentFacilityType,txttypeofothergov:e.governmentOtherDescribe,txtgovspecificpublicsafetyissue:e.governmentPublicSafetyIssue,txtsendtoemailspecificpublicsafetyissue:e.governmentExplanationEmail,seltypeofindustrial:e.industrialFacilityType,txttypeofotherindustrial:e.industrialOtherDescribe,txtRenalCare:e.renalCarePublicSafetyIssue,selwastewaterfacility:e.waterFacilityType,txttypeofotherwater:e.waterOtherDescribe,txtmunicipaldistrictnumber:e.municipalDistrictNumber,txtwaterspecificpublicsafetyissue:e.waterPublicSafetyIssue,seltypeoffacility:e.otherFacilityType,txttypeofotherDiv:e.otherFacilityDescribe,txtotherspecificpublicsafetyissue:e.otherPublicSafetyIssue,hdntxtPartner1:e.hiddenPartner1,hdntxtPartner2:e.hiddenPartner2,hdnTxtPhonenumDefaultCons:e.hiddenPhonenumDefaultCons,hdnTxtPhonenumMobileCons:e.hiddenPhonenumMobileCons,hdnTxtEmailaddrCons:e.hiddenEmailaddrCons,hdnPartner2Type:e.hiddenPartner2Type,hdnCcareId:e.hiddenCcareId,hdnCode:e.hiddenCode,hdn400Status:e.hiddenStatus400,hdntxtcontactnameupdate:e.snapshotContactFirstName,hdntxtcontactLastnameupdate:e.snapshotContactLastName,hdntxtworknumberupdate:e.snapshotWorkNumber,hdntxtcellnumber:e.snapshotCellNumber,hdntxtemailaddressupdate:e.snapshotEmail,hdnQualifiesAsCriticalLoadupdate:e.snapshotQualifiesAsCriticalLoad,hiddenBackupGeneration:e.snapshotBackupGeneration}}e.s(["CRITICAL_CARE_FORM_ID",0,B,"CRITICAL_CARE_INVALID_SERVICE",0,Y,"isValidServiceStatus",0,U],85194),e.s(["buildCriticalCareSubmitBody",0,z,"buildCriticalCareSubmitFormData",0,function(e,r){let t=new FormData,a=z(e);return r.recaptchaToken&&(a.recaptchaToken=r.recaptchaToken),t.append("data",JSON.stringify(a)),r.cidDocument&&t.append("attachment_UploadFormCID",r.cidDocument),r.cidExcel&&t.append("attachment_UploadFormCIDExcel",r.cidExcel),t}],51698);var Z=e.i(59369);e.i(47530);var q=e.i(96499),H=e.i(37881),$=e.i(34636);function G({title:e,description:t,imageSrc:a,imageAlt:l,className:n,ariaLabel:s,children:o,triggerOnHover:i=!1}){let{isOpen:d,open:u,toggle:c,close:m,closeWithoutFocus:h,position:p,alignment:g,triggerRef:f,tooltipRef:b,tooltipId:x}=(0,$.useTooltip)(),v=s||`More information about ${e}`,y=i?{onMouseEnter:u,onMouseLeave:h}:{};return o?(0,r.jsxs)("span",{className:(0,Z.cn)("inline-flex items-center gap-1",n),children:[o,(0,r.jsxs)("button",{ref:f,type:"button",onClick:i?void 0:c,...y,"aria-expanded":d,"aria-haspopup":"dialog","aria-controls":x,"aria-label":v,className:(0,Z.cn)("group relative inline-flex items-center justify-center cursor-pointer","w-4 h-4","text-primary-blue","active:text-primary-blue-active","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue","rounded-full"),children:[(0,r.jsx)(q.Icon,{name:"circle-info-solid",size:16,className:(0,Z.cn)("absolute inset-0 transition-opacity",!d&&"group-hover:opacity-0 group-focus-visible:opacity-0")}),(0,r.jsx)("span",{className:(0,Z.cn)("absolute inset-0 flex items-center justify-center","bg-white rounded-full","opacity-0 transition-opacity",!d&&"group-hover:opacity-100 group-focus-visible:opacity-100"),children:(0,r.jsx)(q.Icon,{name:"circle-info",size:16})})]}),(0,r.jsx)(H.Tooltip,{ref:b,id:x,title:e,description:t,imageSrc:a,imageAlt:l,isOpen:d,onClose:m,position:p,alignment:g,triggerRef:f,openedOnHover:i})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{ref:f,type:"button",onClick:i?void 0:c,...y,"aria-expanded":d,"aria-haspopup":"dialog","aria-controls":x,"aria-label":v,className:(0,Z.cn)("group relative inline-flex items-center justify-center cursor-pointer","w-5 h-5","text-primary-blue","active:text-primary-blue-active","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue","rounded-full",n),children:[(0,r.jsx)(q.Icon,{name:"circle-info-solid",size:20,className:(0,Z.cn)("absolute inset-0 transition-opacity",!d&&"group-hover:opacity-0 group-focus-visible:opacity-0")}),(0,r.jsx)("span",{className:(0,Z.cn)("absolute inset-0 flex items-center justify-center","bg-white rounded-full","opacity-0 transition-opacity",!d&&"group-hover:opacity-100 group-focus-visible:opacity-100"),children:(0,r.jsx)(q.Icon,{name:"circle-info",size:20})})]}),(0,r.jsx)(H.Tooltip,{ref:b,id:x,title:e,description:t,imageSrc:a,imageAlt:l,isOpen:d,onClose:m,position:p,alignment:g,triggerRef:f,openedOnHover:i})]})}function Q(e,r,t){let a=(e??"").trim(),l=(r??"").trim();return""!==a&&""!==l&&"00000000"!==a&&"00000"!==l&&U(t)}e.s(["TooltipTrigger",0,G],68295),e.s(["hasCriticalLoadDesignation",0,Q],36315);let W=j.map(e=>({value:e,label:S[e]})),K=["customerName","serviceAddress","contactFirstName","contactLastName","workNumber","cellNumber","emailAddress","puctReason","hasBackupGeneration","hiddenPartner1","hiddenPartner2","hiddenPhonenumDefaultCons","hiddenPhonenumMobileCons","hiddenEmailaddrCons","hiddenPartner2Type","hiddenCcareId","hiddenCode","hiddenStatus400","snapshotContactFirstName","snapshotContactLastName","snapshotWorkNumber","snapshotCellNumber","snapshotEmail","snapshotQualifiesAsCriticalLoad","snapshotBackupGeneration"];e.s(["CustomerInfoSection",0,function({onLookupComplete:e,showEstablishmentSection:n,onEsiIdCleared:s}){let d=(0,l.useI18n)(),u=d?.t??(e=>""),{control:m,setValue:h,getValues:g,clearErrors:f,formState:{errors:b}}=(0,a.useFormContext)(),[x,v]=(0,t.useState)(!1),[y,R]=(0,t.useState)(null),[N,E]=(0,t.useState)(!1),I=(0,t.useRef)(null),C=!N,_=N&&n,j=(0,t.useCallback)(()=>{for(let e of K)h(e,"",{shouldValidate:!1})},[h]),S=async()=>{let r=g("esiId");if(!r||""===r.trim()){I.current=null;return}let t=r.trim();if(I.current===t)return;let a=k(t);
15if(a){R(a),E(!1),j(),I.current=null,s?.();return}v(!0),R(null),E(!1);try{let a=await fetch("/api/forms/critical-care/lookup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({esiId:r.trim()})}),l=await a.json();if(j(),l.success&&l.data){if(l.sapDown){h("hiddenStatus400",Y,{shouldValidate:!1}),I.current=t,E(!0),e?.(!0);return}if(h("customerName",l.data.customerName??"",{shouldValidate:!1}),h("serviceAddress",l.data.serviceAddress??"",{shouldValidate:!1}),h("contactFirstName",l.data.contactFirstName??"",{shouldValidate:!1}),h("contactLastName",l.data.contactLastName??"",{shouldValidate:!1}),h("workNumber",l.data.workNumber??"",{shouldValidate:!1}),h("cellNumber",l.data.cellNumber??"",{shouldValidate:!1}),h("emailAddress",l.data.emailAddress??"",{shouldValidate:!1}),h("puctReason",l.data.puctReason??"",{shouldValidate:!1}),h("hasBackupGeneration",l.data.hasBackupGeneration??"",{shouldValidate:!1}),l.data.hidden){let e=l.data.hidden;h("hiddenPartner1",e.partner1,{shouldValidate:!1}),h("hiddenPartner2",e.partner2,{shouldValidate:!1}),h("hiddenPhonenumDefaultCons",e.phonenumDefaultCons,{shouldValidate:!1}),h("hiddenPhonenumMobileCons",e.phonenumMobileCons,{shouldValidate:!1}),h("hiddenEmailaddrCons",e.emailaddrCons,{shouldValidate:!1}),h("hiddenPartner2Type",e.partner2Type,{shouldValidate:!1}),h("hiddenCcareId",e.ccareId,{shouldValidate:!1}),h("hiddenCode",e.code,{shouldValidate:!1}),h("hiddenStatus400",e.status400,{shouldValidate:!1})}h("snapshotContactFirstName",l.data.contactFirstName??"",{shouldValidate:!1}),h("snapshotContactLastName",l.data.contactLastName??"",{shouldValidate:!1}),h("snapshotWorkNumber",l.data.workNumber??"",{shouldValidate:!1}),h("snapshotCellNumber",l.data.cellNumber??"",{shouldValidate:!1}),h("snapshotEmail",l.data.emailAddress??"",{shouldValidate:!1}),h("snapshotQualifiesAsCriticalLoad",l.data.puctReason??"",{shouldValidate:!1}),h("snapshotBackupGeneration",l.data.hasBackupGeneration??"",{shouldValidate:!1}),I.current=t,E(!0);let r=l.data.hidden,a=!Q(r?.ccareId,r?.code,r?.status400);e?.(a)}else l.error&&(R(l.error),h("esiId","",{shouldValidate:!1}),s?.())}catch{R("Failed to look up ESI-ID"),j(),h("hiddenStatus400",Y,{shouldValidate:!1}),I.current=t,E(!0),e?.(!0)}finally{v(!1)}};return(0,r.jsx)(p.FormSection,{number:1,title:(0,c.getDictionaryValue)(u,c.DICTIONARY.F.Form_Section_RequestorInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:m,name:"esiId",render:({field:e})=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.InputField,{label:"ESI-ID",value:e.value,onChange:e=>{h("esiId",e,{shouldValidate:!1}),f("esiId"),I.current=null,e&&""!==e.trim()||(E(!1),R(null),s?.())},onBlur:S,maxLength:22,errorMessage:b.esiId?.message||y||void 0,helperText:x?"Looking up ESI-ID...":void 0,required:!0})}),(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(G,{title:"",description:"",imageSrc:"/images/ESIID.png",imageAlt:"ESI ID format diagram showing CenterPoint Code, Reserved, Premise ID #, Metered, and Year sections",ariaLabel:"More information about ESI-ID",triggerOnHover:!0})})]}),N&&!1===n&&(0,r.jsx)("p",{className:"mt-6 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Please review the following Contact Name, Contact Telephone, Contact Mobile, and Contact Email, and if this information has changed, please replace with current information"})]})}),(0,r.jsx)(a.Controller,{control:m,name:"customerName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-1",children:(0,r.jsx)(o.InputField,{label:"Customer Name Associated with ESI-ID",value:e.value??"",onChange:e.onChange,disabled:!_,errorMessage:b.customerName?.message,required:!0})})}),(0,r.jsx)(a.Controller,{control:m,name:"serviceAddress",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Service Address",value:e.value??"",onChange:e.onChange,disabled:!_,errorMessage:b.serviceAddress?.message,required:!0})})}
15),(0,r.jsx)(a.Controller,{control:m,name:"contactFirstName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Contact First Name",value:e.value??"",onChange:e.onChange,errorMessage:b.contactFirstName?.message,disabled:C,required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"contactLastName",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Contact Last Name",value:e.value??"",onChange:e.onChange,errorMessage:b.contactLastName?.message,disabled:C,required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"workNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Work Number",type:"tel",value:e.value??"",onChange:e.onChange,maxLength:12,errorMessage:b.workNumber?.message,disabled:C,required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"cellNumber",render:({field:e})=>(0,r.jsx)(o.InputField,{label:"Cell Number",type:"tel",value:e.value??"",onChange:e.onChange,maxLength:12,errorMessage:b.cellNumber?.message,disabled:C,required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"emailAddress",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"E-Mail Address",type:"email",value:e.value??"",onChange:e.onChange,errorMessage:b.emailAddress?.message,disabled:C,required:!0})})}),(0,r.jsx)(a.Controller,{control:m,name:"puctReason",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Per PUCT Substantive Rule & 25.497(a)(2), my service qualifies as a critical load for the following reason(s)",value:e.value??"",onChange:e.onChange,multiline:!0,rows:4,errorMessage:b.puctReason?.message,disabled:C,required:!0})})}),(0,r.jsx)(a.Controller,{control:m,name:"hasBackupGeneration",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Does the Customer have onsite, Customer owned stand by back up generation?",value:e.value??"",onChange:e.onChange,options:D,placeholder:"Select...",errorMessage:b.hasBackupGeneration?.message,disabled:C,required:!0})})}),n&&(0,r.jsx)(a.Controller,{control:m,name:"establishmentType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of Establishment",value:e.value??"",onChange:e.onChange,options:W,placeholder:"Select...",errorMessage:b.establishmentType?.message,required:!0})})})]})})}],64604);let J={licensedhealthcarefacility:"Health Care",government:"Government",wasteWater:"Water and Waste Water",industrial:"Industrial",naturalgasserving:"Natural Gas Load Serving",renalcare:"Renal Care",other:"Other"};e.s(["EstablishmentSection",0,function(){let{control:e,watch:t,formState:{errors:l}}=(0,a.useFormContext)(),n=t("establishmentType"),s=t("healthcareType"),d=t("governmentFacilityType"),u=t("industrialFacilityType"),c=t("waterFacilityType"),m=t("otherFacilityType");if(!n)return null;let h=J[n]||"Type of Establishment";return(0,r.jsx)(p.FormSection,{number:2,title:h,children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:["licensedhealthcarefacility"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"healthcareType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of facility",value:e.value??"",onChange:e.onChange,options:T,placeholder:"Select...",errorMessage:l.healthcareType?.message,required:!0})})}),(0,r.jsx)(a.Controller,{control:e,name:"healthcareOtherDescribe",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If Other, Describe",value:e.value??"",onChange:e.onChange,errorMessage:l.healthcareOtherDescribe?.message,required:"Other"===s})})}),(0,r.jsx)(a.Controller,{control:e,name:"healthServicesLicense",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Texas Department of State Health Services License #",value:e.value??"",onChange:e.onChange,maxLength:10})})}),(0,r.jsx)(a.Controller,{control:e,name:"otherStateAgencyLicense",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Or, if licensed by another State agency provide the agency name and license number",value:e.value??"",onChange:e.onChange})})}
15),(0,r.jsx)(a.Controller,{control:e,name:"noStateLicenseExplain",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If there is no State license please explain",value:e.value??"",onChange:e.onChange,multiline:!0,rows:4})})}),(0,r.jsx)(a.Controller,{control:e,name:"licensedFacilityId",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Licensed Facility ID",value:e.value??"",onChange:e.onChange})})}),(0,r.jsx)(a.Controller,{control:e,name:"alzheimersCertifiedUnit",render:({field:e})=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"checkbox",id:"alzheimersCertifiedUnit",checked:e.value??!1,onChange:r=>e.onChange(r.target.checked),className:"h-5 w-5 rounded border-gray-300"}),(0,r.jsx)("label",{htmlFor:"alzheimersCertifiedUnit",className:"text-body-md",children:"Alzheimer's Certified Unit?"})]})}),(0,r.jsx)(a.Controller,{control:e,name:"healthcarePublicSafetyIssue",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Describe the specific public safety issue that may result from an extended power interruption",value:e.value??"",onChange:e.onChange,multiline:!0,rows:4,errorMessage:l.healthcarePublicSafetyIssue?.message,required:!0})})})]}),"government"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"governmentFacilityType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of Government Facility",value:e.value??"",onChange:e.onChange,options:A,placeholder:"Select...",errorMessage:l.governmentFacilityType?.message,required:!0})})}),(0,r.jsx)(a.Controller,{control:e,name:"governmentOtherDescribe",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If Other, Describe",value:e.value??"",onChange:e.onChange,errorMessage:l.governmentOtherDescribe?.message,required:"other"===d})})}),(0,r.jsx)(a.Controller,{control:e,name:"governmentPublicSafetyIssue",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If the facility is described as other, then describe the specific public safety issue that may result from an extended power interruption",value:e.value??"",onChange:e.onChange,multiline:!0,rows:7,errorMessage:l.governmentPublicSafetyIssue?.message,required:"other"===d})})}),(0,r.jsx)(a.Controller,{control:e,name:"governmentExplanationEmail",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Send more detailed explanation to email address",type:"email",value:e.value??"",onChange:e.onChange})})})]}),"industrial"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"industrialFacilityType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of Industrial Facility",value:e.value??"",onChange:e.onChange,options:F,placeholder:"Select...",errorMessage:l.industrialFacilityType?.message,required:!0})})}),(0,r.jsx)(a.Controller,{control:e,name:"industrialOtherDescribe",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If Other, Describe",value:e.value??"",onChange:e.onChange,errorMessage:l.industrialOtherDescribe?.message,required:"other"===u})})})]}),"renalcare"===n&&(0,r.jsx)(a.Controller,{control:e,name:"renalCarePublicSafetyIssue",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Describe the specific public health, safety, or welfare issue",value:e.value??"",onChange:e.onChange,multiline:!0,rows:4,errorMessage:l.renalCarePublicSafetyIssue?.message,required:!0})})}),"wasteWater"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"waterFacilityType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of Water and Waste Water Facility",value:e.value??"",onChange:e.onChange,options:O,placeholder:"Select...",errorMessage:l.waterFacilityType?.message,required:!0})})}
15),(0,r.jsx)(a.Controller,{control:e,name:"waterOtherDescribe",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If Other, Describe",value:e.value??"",onChange:e.onChange,errorMessage:l.waterOtherDescribe?.message,required:"other"===c})})}),(0,r.jsx)(a.Controller,{control:e,name:"municipalDistrictNumber",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"Municipal Utility District Number (If applicable)",value:e.value??"",onChange:e.onChange})})}),(0,r.jsx)(a.Controller,{control:e,name:"waterPublicSafetyIssue",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If the facility is described as other, then describe the specific public safety issue that may result from an extended power interruption",value:e.value??"",onChange:e.onChange,multiline:!0,rows:7,errorMessage:l.waterPublicSafetyIssue?.message,required:"other"===c})})})]}),"other"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"otherFacilityType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(i.Dropdown,{label:"Type of facility",value:e.value??"",onChange:e.onChange,options:w,placeholder:"Select...",errorMessage:l.otherFacilityType?.message,required:!0})})}),(0,r.jsx)(a.Controller,{control:e,name:"otherFacilityDescribe",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If Other, Describe",value:e.value??"",onChange:e.onChange,errorMessage:l.otherFacilityDescribe?.message,required:"other"===m})})}),(0,r.jsx)(a.Controller,{control:e,name:"otherPublicSafetyIssue",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(o.InputField,{label:"If the facility is described as other, then describe the specific public safety issue that may result from an extended power interruption",value:e.value??"",onChange:e.onChange,multiline:!0,rows:6,errorMessage:l.otherPublicSafetyIssue?.message,required:"other"===m})})})]}),"naturalgasserving"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsxs)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:["Please attach the following forms relating to"," ",(0,r.jsx)("a",{href:"https://www.rrc.texas.gov/critical-infrastructure/critical-infrastructure-forms/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"Critical Designation of Natural Gas Infrastructure"})," ","from the Railroad Commission of Texas:"]})}),(0,r.jsx)(a.Controller,{control:e,name:"naturalGasCIDDocument",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(E.FileUpload,{label:"Please attach CI-D Document",helperText:"(XLSX, PDF, JPG, GIF, PNG, DOC â MAX 5MB)",onChange:r=>e.onChange(r),accept:["image/jpeg","image/gif","image/png","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],maxSizeMB:5,multiple:!1,required:!0})})}),(0,r.jsx)(a.Controller,{control:e,name:"naturalGasCIDExcel",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(E.FileUpload,{label:"Please attach CI-D Excel",helperText:"(XLSX, CSV â MAX 5MB)",onChange:r=>e.onChange(r),accept:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],maxSizeMB:5,multiple:!1,required:!0})})})]})]})})}],94606);var X=e.i(86629);function ee({tab:e,isActive:t,isFocused:a,onClick:l,onFocus:n,showDivider:s,tabIndex:o}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{role:"tab",type:"button","aria-selected":t,tabIndex:o,onClick:l,onFocus:n,className:(0,Z.cn)("group relative min-h-12 min-w-0 px-9 rounded-t-default","flex items-center justify-center text-center","font-medium text-base leading-[1.8]","transition-colors duration-200","focus:outline-none","text-primary-blue",!t&&!a&&"bg-white",!t&&!a&&"hover:bg-grey-2",t&&!a&&"bg-grey-2",a&&"bg-grey-2 border-2 border-primary-blue-active z-10"),children:[e.label,!a&&(0,r.jsx)("span",{className:(0,Z.cn)("absolute bottom-0 left-0 right-0 transition-all duration-200",t?"h-[3px] bg-primary-blue-active":"h-px group-hover:h-[3px] group-hover:bg-primary-blue-active"),"aria-hidden":"true"})]}),s&&(0,r.jsx)("div",{className:"flex items-center self-center h-10 shrink-0","aria-hidden":"true",children:(0,r.jsx)("div",{className:"w-px h-full bg-grey-2"})})]})}function er({tabs:e,activeTabId:a,onTabChange:l,label:n}){let[s,o]=(0,t.useState)(!1),i=(0,t.useRef)(null),d=(0,t.useRef)(null),u=(0,t.useId)(),c=`${u}-listbox`,m=e.find(e=>e.id===a);return(0,t.useEffect)(()=>
15{if(!s)return;let e=e=>{i.current&&!i.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]),(0,r.jsxs)("div",{ref:i,children:[n&&(0,r.jsx)("label",{htmlFor:u,className:"block text-body-sm font-semibold text-dark-grey mb-2",children:n}),(0,r.jsxs)("div",{className:(0,Z.cn)("relative bg-white border border-dark-grey","transition-all duration-200",s?"rounded-[28px] shadow-[0px_0px_40px_0px_rgba(0,71,130,0.28)]":"rounded-[30px]"),children:[(0,r.jsxs)("button",{ref:d,id:u,type:"button",onClick:()=>o(e=>!e),onKeyDown:r=>{let t=e.findIndex(e=>e.id===a);switch(r.key){case"Enter":case" ":r.preventDefault(),o(e=>!e);break;case"ArrowDown":if(r.preventDefault(),s){let r=t<e.length-1?t+1:0;l(e[r].id)}else o(!0);break;case"ArrowUp":if(r.preventDefault(),s){let r=t>0?t-1:e.length-1;l(e[r].id)}else o(!0);break;case"Escape":r.preventDefault(),o(!1),d.current?.focus();break;case"Tab":o(!1)}},"aria-haspopup":"listbox","aria-expanded":s,"aria-controls":s?c:void 0,className:(0,Z.cn)("w-full flex items-center justify-between","pl-6 pr-3",s?"pt-3 pb-1.5":"py-1.5 h-14","font-light text-lg leading-[1.5] text-left","text-dark-grey","outline-none cursor-pointer","focus-visible:ring-2 focus-visible:ring-dark-blue focus-visible:ring-inset"),children:[(0,r.jsx)("span",{className:"flex-1 min-w-0 truncate",children:m?.label}),(0,r.jsx)("span",{className:"flex items-center justify-center shrink-0 w-[38px] h-[38px]","aria-hidden":"true",children:(0,r.jsx)(q.Icon,{name:s?"angle-up":"angle-down",size:20,className:"text-primary-blue"})})]}),s&&(0,r.jsx)("div",{className:"border-t border-grey-3 mx-[3.8%] pt-5 pb-1.5",children:(0,r.jsx)("div",{id:c,role:"listbox","aria-labelledby":u,"aria-activedescendant":`${u}-option-${a}`,className:"flex flex-col gap-0.5 max-h-[267px] overflow-y-auto",children:e.map(e=>{let t=e.id===a,n=`${u}-option-${e.id}`;return(0,r.jsx)("button",{id:n,type:"button",role:"option","aria-selected":t,onClick:()=>{l(e.id),o(!1),d.current?.focus()},className:(0,Z.cn)("w-full text-left px-3 py-2","text-lg leading-[1.5] text-dark-grey","transition-colors rounded","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue focus-visible:ring-inset",t?"font-semibold":"font-light",t?"bg-secondary-grey border border-medium-grey rounded-xl":"border border-transparent hover:bg-secondary-grey hover:border-medium-grey hover:rounded-xl"),children:e.label},e.id)})})})]})]})}function et({tabs:e,activeTabId:a,onTabChange:l,className:n,mobileDropdownLabel:s}){let o=(0,t.useRef)(null),[i,d]=(0,t.useState)(null);return(0,r.jsxs)("div",{className:n,children:[(0,r.jsx)("div",{className:"lg:hidden",children:(0,r.jsx)(er,{tabs:e,activeTabId:a,onTabChange:l,label:s})}),(0,r.jsx)("div",{ref:o,role:"tablist","aria-label":"Content tabs","aria-orientation":"horizontal",onBlur:e=>{o.current?.contains(e.relatedTarget)||d(null)},className:"hidden lg:flex items-end border-b border-medium-grey",children:e.map((t,n)=>{let s=t.id===a,u=i===n,c=u||s&&null===i?0:-1;return(0,r.jsx)("div",{className:"contents",onKeyDown:r=>((r,t)=>{let a=o.current?.querySelectorAll('[role="tab"]');if(!a)return;let n=null;switch(r.key){case"ArrowRight":r.preventDefault(),n=t<e.length-1?t+1:0;break;case"ArrowLeft":r.preventDefault(),n=t>0?t-1:e.length-1;break;case"Home":r.preventDefault(),n=0;break;case"End":r.preventDefault(),n=e.length-1;break;case"Enter":case" ":r.preventDefault(),l(e[t].id),d(null);return}null!==n&&(d(n),a[n]?.focus())})(r,n),children:(0,r.jsx)(ee,{tab:t,isActive:s,isFocused:u,onClick:()=>{l(t.id),d(null)},onFocus:()=>{d(n)},showDivider:n<e.length-1,tabIndex:c})},t.id)})})]})}e.s(["ContentTabsNavigation",0,et],37870),e.s([],38453);let ea=(0,t.createContext)(null),el=e=>{let{rendering:a,params:l}=e,[n,s]=(0,t.useState)([]),[o,i]=(0,t.useState)(""),d=(0,t.useRef)([]),u=(0,t.useCallback)((e,r)=>{d.current.includes(e)||d.current.push(e),s(t=>t.some(r=>r.id===e)?t:[...t,{id:e,label:r}].sort((e,r)=>d.current.indexOf(e.id)-d.current.indexOf(r.id)))},[]),c=(0,t.useCallback)(e=>{s(r=>r.filter(r=>r.id!==e)),d.current=d.current.filter(r=>r!==e)},[]);(0,t.useEffect)(()=>{n.length>0&&!o&&i(n[0].id)},[n,o]);let m=(0,t.useCallback)(e=>{i(e)},[]),h=(0,t.useMemo)(()=>({registerTab:u,unregisterTab:c,activeTabId:o}),[u,c,o]),p=l?.DynamicPlaceholderId||a?.uid||"default",g=`content-tabs-${p}`;return(0,r.jsx)(ea.Provider,{value:h,children:(0,r.jsxs)("div",{className:(0,Z.cn)("w-full max-w-[1920px] mx-auto px-6 md:px-12",l?.GridParameters,l?.styles),id:l?.RenderingIdentifier,children:[n.length>0&&(0,r.jsx)(et,{tabs:n,activeTabId:o,onTabChange:m,className:"pb-6 lg:pb-10",mobileDropdownLabel:l?.MobileDropdownLabel}),(0,r.jsx)("div",{children:(0,r.jsx)(X.Placeholder,{name:g,rendering:a,disableSuspense:!0})})]})})};e.s(["ContentTabsSitecoreContext",0,ea,"Default",0,el,"default",0,el],30921)},10534,83923,88985,35698,33838,27624,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(58021),l=e.i(43725);e.i(70484);var n=e.i(45892);e.i(78118);var s=e.i(94102),o=e.i(84637),i=e.i(46203),d=e.i(64873),u=e.i(30392),c=e.i(25929);
15let m=d.BUILDING_TYPES.map(e=>({value:e.value,label:e.label})),h=d.INSTALLATION_TYPES.map(e=>({value:e.value,label:e.label})),p=d.MULTI_FAMILY_BONUS_OPTIONS.map(e=>({value:e.value,label:e.label})),g=d.MN_STATE_OPTION.map(e=>({value:e.value,label:e.label}));e.s(["InstallationSection",0,function(){let e=(0,l.useI18n)(),d=e?.t??(e=>""),{control:f,watch:b,formState:{errors:x}}=(0,a.useFormContext)(),[v,y]=(0,t.useState)(!1),R=b("buildingType"),N=b("multiFamilyBonus"),E="9"===R,I=E&&"1"===N;return(0,r.jsx)(o.FormSection,{number:1,title:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:f,name:"installStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(d,x.installStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:f,name:"installCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(d,x.installCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:f,name:"installState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:g,placeholder:"MN",errorMessage:(0,c.translateFormError)(d,x.installState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:f,name:"installZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:(0,c.translateFormError)(d,x.installZip?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:f,name:"accountNumber",render:({field:e})=>(0,r.jsx)(i.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,c.translateFormError)(d,x.accountNumber?.message)})}),(0,r.jsx)(a.Controller,{control:f,name:"buildingType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_BuildingType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:m,placeholder:"--Select Building Type--",errorMessage:(0,c.translateFormError)(d,x.buildingType?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:f,name:"installationType",render:({field:e})=>(0,r.jsxs)("div",{className:"sm:col-span-2 flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("label",{htmlFor:"installationType-dropdown",className:"text-body-md font-semibold text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_InstallationType)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsx)("button",{type:"button",className:"text-sm text-[var(--color-primary-blue)] underline hover:no-underline",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>y(!0),onBlur:()=>y(!1),"aria-describedby":"installation-type-tooltip",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Helper_MoreInformation)}),v&&(0,r.jsx)("div",{id:"installation-type-tooltip",role:"tooltip",className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,r.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
15webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,r.jsx)(s.Dropdown,{id:"installationType-dropdown",label:"",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:h,placeholder:"--Select Installation Type--",errorMessage:(0,c.translateFormError)(d,x.installationType?.message)})]})}),E&&(0,r.jsx)(a.Controller,{control:f,name:"multiFamilyBonus",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:"Multi-Family Affordable Housing Bonus Rebate",helperText:"Property must have a minimum of 66% income eligible holders to qualify",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:p,placeholder:"--Select Option--",errorMessage:(0,c.translateFormError)(d,x.multiFamilyBonus?.message),required:!0})})}),I&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:f,name:"totalHousingUnits",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Total number of housing units",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,c.translateFormError)(d,x.totalHousingUnits?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:f,name:"incomeEligibleHouseholds",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Number of households occupied by income eligible households",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,c.translateFormError)(d,x.incomeEligibleHouseholds?.message),required:!0})})]})]})})}],10534);var f=e.i(30798),b=e.i(14601),x=e.i(50547);let v=x.PURCHASER_TYPES.map(e=>({value:e.value,label:e.label}));e.s(["PurchaserSection",0,function(){let e=(0,l.useI18n)(),t=e?.t??(e=>""),{control:i,watch:d,setValue:m,formState:{errors:h}}=(0,a.useFormContext)(),p=d("checkPayableTo"),g=d("additionalPurchaser"),y=d("mailingAddressDifferent"),R=e=>{"COMPANY"===e?(m("purchaserFirstName","",{shouldValidate:!1}),m("purchaserLastName","",{shouldValidate:!1}),m("additionalPurchaser",!1,{shouldValidate:!1}),m("secondaryFirstName","",{shouldValidate:!1}),m("secondaryLastName","",{shouldValidate:!1})):"PURCHASER"===e&&m("companyName","",{shouldValidate:!1})},N=e=>{"NO"===e&&(m("mailingStreet","",{shouldValidate:!1}),m("mailingCity","",{shouldValidate:!1}),m("mailingState","MN",{shouldValidate:!1}),m("mailingZip","",{shouldValidate:!1}))};return(0,r.jsx)(o.FormSection,{number:2,title:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsxs)("fieldset",{children:[(0,r.jsxs)("legend",{className:"mb-2 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-3",children:(0,r.jsx)(a.Controller,{control:i,name:"checkPayableTo",render:({field:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"PURCHASER",checked:"PURCHASER"===e.value,onChange:()=>{e.onChange("PURCHASER"),R("PURCHASER")},variant:"forms"}),(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"COMPANY",checked:"COMPANY"===e.value,onChange:()=>{e.onChange("COMPANY"),R("COMPANY")},variant:"forms"})]})})}),h.checkPayableTo&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(t,h.checkPayableTo.message)})]})}),"COMPANY"===p&&(0,r.jsx)(a.Controller,{control:i,name:"companyName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,h.companyName?.message),required:!0})})}),"PURCHASER"===p&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{c
15ontrol:i,name:"purchaserFirstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,h.purchaserFirstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"purchaserLastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,h.purchaserLastName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"additionalPurchaser",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(f.Checkbox,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(m("secondaryFirstName","",{shouldValidate:!1}),m("secondaryLastName","",{shouldValidate:!1}))},variant:"forms"})})}),!0===g&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:i,name:"secondaryFirstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,h.secondaryFirstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"secondaryLastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,h.secondaryLastName?.message),required:!0})})]})]}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsxs)("fieldset",{children:[(0,r.jsxs)("legend",{className:"mb-2 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-3",children:(0,r.jsx)(a.Controller,{control:i,name:"mailingAddressDifferent",render:({field:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Yes),name:"mailingAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>{e.onChange("YES"),N("YES")},variant:"forms"}),(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_No),name:"mailingAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>{e.onChange("NO"),N("NO")},variant:"forms"})]})})}),h.mailingAddressDifferent&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(t,h.mailingAddressDifferent.message)})]})}),"YES"===y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:i,name:"mailingStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(t,h.mailingStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,h.mailingCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:x.STATE_OPTIONS,placeholder:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:(0,c.translateFormError)(t,h.mailingState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,c.translateFormError)(t,h.mailingZip?.message),required:!0})})]}
15),(0,r.jsx)(a.Controller,{control:i,name:"purchaserType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:v,placeholder:"--Select Purchaser Type--",errorMessage:(0,c.translateFormError)(t,h.purchaserType?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:i,name:"purchaserEmail",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,c.translateFormError)(t,h.purchaserEmail?.message)})}),(0,r.jsx)(a.Controller,{control:i,name:"purchaserPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(t,h.purchaserPhone?.message)})}),(0,r.jsx)(a.Controller,{control:i,name:"purchaserAltPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(t,h.purchaserAltPhone?.message)})})]})})}],83923);var y=e.i(59369),R=e.i(94988),N=e.i(34346);let E=d.FIREPLACE_PRODUCTS.map(e=>({value:e.value,label:e.label})),I=d.IGNITION_BRANDS.map(e=>({value:e.value,label:e.label}));e.s(["EquipmentSection",0,function({brands:e,models:i,isLoadingBrands:d,brandsError:m,rules:h,onInvoiceChange:p,invoiceError:g}){let f=(0,l.useI18n)(),b=f?.t??(e=>""),{control:x,watch:v,setValue:C,formState:{errors:_}}=(0,a.useFormContext)(),j=v("brand"),S=v("modelNumber"),[D,T]=(0,t.useState)(""),[A,F]=(0,t.useState)(!1),O=(0,t.useRef)(null),w=(0,t.useMemo)(()=>j?i.filter(e=>e.brand===j).map(e=>({value:e.equipModel,label:e.equipModel})):[],[i,j]),L=(0,t.useMemo)(()=>{if(!w.length)return[];if(!D)return w.slice(0,50);let e=D.toLowerCase();return w.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[w,D]),P=(0,t.useMemo)(()=>{if(!j||!S||0===h.length)return 0;let e=h[0];if(e&&e.custRebate){let r=parseFloat(e.custRebate);if(!isNaN(r))return r}return 0},[j,S,h]);(0,t.useEffect)(()=>{j&&S?C("rebateAmount",`$${P.toFixed(2)}`,{shouldValidate:!1}):C("rebateAmount","",{shouldValidate:!1})},[P,j,S,C]),(0,t.useEffect)(()=>{C("modelNumber","",{shouldValidate:!1}),T(""),F(!1)},[j,C]),(0,t.useEffect)(()=>{let e=e=>{O.current&&!O.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let k=(0,t.useRef)(!1),M=(0,t.useCallback)(e=>{C("modelNumber",e.value,{shouldValidate:!1}),T(e.label||e.value),F(!1),setTimeout(()=>{k.current=!1},150)},[C]);return(0,r.jsx)(o.FormSection,{number:3,title:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:x,name:"fireplaceProduct",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:"Natural Gas Fireplace Product",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:E,placeholder:"--Select Fireplace Product--",errorMessage:(0,c.translateFormError)(b,_.fireplaceProduct?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:x,name:"brand",render:({field:t})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_Brand),value:t.value,onChange:t.onChange,onBlur:t.onBlur,options:e,placeholder:d?(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_LoadingBrands):(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_SelectBrand),errorMessage:(0,c.translateFormError)(b,_.brand?.message)??m??void 0,disabled:0===e.length||d,required:!0})})}),(0,r.jsxs)("div",{ref:O,className:"relative",children:[(0,r.jsx)(a.Controller,{c
15ontrol:x,name:"modelNumber",render:({field:e})=>{let t=A&&L.length>0&&j&&D.length>=3;return(0,r.jsx)(n.InputField,{label:"Model Number",value:D,onChange:r=>{T(r),e.onChange(r),F(r.length>=3)},onBlur:()=>{if(e.onBlur(),k.current)return;let r=e.value;r&&(i.length>0&&i.some(e=>e.equipModel.toLowerCase()===r.toLowerCase())||(T(""),e.onChange("")))},placeholder:"",errorMessage:t?void 0:(0,c.translateFormError)(b,_.modelNumber?.message),disabled:!j||0===w.length,required:!0})}}),A&&L.length>0&&j&&D.length>=3&&(0,r.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:L.map(e=>(0,r.jsx)("button",{type:"button",onMouseDown:()=>{k.current=!0},onClick:()=>M(e),className:(0,y.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:(0,r.jsx)("div",{className:"font-medium",children:e.label||e.value})},e.value))})]}),(0,r.jsx)(a.Controller,{control:x,name:"serialNumber",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_SerialNumber),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,c.translateFormError)(b,_.serialNumber?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:x,name:"btuInput",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"BTU/hr Input",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:6,placeholder:"e.g. 40000",errorMessage:(0,c.translateFormError)(b,_.btuInput?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:x,name:"ignitionBrand",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:"Ignition Brand Name",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:I,placeholder:"--Select Ignition Brand--",errorMessage:(0,c.translateFormError)(b,_.ignitionBrand?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:x,name:"installDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:`${(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_DateOfInstallation)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,c.translateFormError)(b,_.installDate?.message),required:!0})}),(0,r.jsx)("div",{children:(0,r.jsx)(R.RebateAmountField,{label:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_RebateAmount),amount:j&&S?P:0})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(N.FileUpload,{label:"Attach Invoice and Supporting Documents (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:e=>{p(e)},accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:g,required:!0})})]})})}],88985);var C=e.i(73282);e.s(["DealerSection",0,function({preFormDealerInfo:e,preFormDealerPath:i,preFormDealerId:d}){let m=(0,l.useI18n)(),h=m?.t??(e=>""),{control:p,watch:g,setValue:f,formState:{errors:v}}=(0,a.useFormContext)(),[y,R]=(0,t.useState)(!1),[N,E]=(0,t.useState)(null),[I,_]=(0,t.useState)(null),j=g("dealerPath")??"",S=g("dealerId")??"";(0,t.useEffect)(()=>{e&&(f("dealerPath",i),"yes"===i?(f("dealerId",d),_(e)):(f("dealerCompanyName",e.name),f("dealerStreet",e.address),f("dealerCity",e.city),f("dealerState",e.state),f("dealerZip",e.zip)))},[e,i,d,f]);let D=async e=>{if(E(null),e){if(!/^\d{6}$/.test(e))return void E("Dealer ID must be exactly 6 digits.");R(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"FIREPLACE"})});if(!r.ok)return void E("Unable to verify dealer. Please try again.");let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void E("Unexpected response from server.");if(t.success&&t.valid&&t.dealer){(0,C.storeDealerId)({dealerId:e,dealerName:t.dealer.dealerName,dealerAddress:t.dealer.dealerAddress,dealerCityStateZip:t.dealer.dealerCityStateZip});let r={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};_(r),E(null)}
15else E(t.error??"Dealer ID not found."),_(null)}catch{E("Unable to verify dealer. Please try again.")}finally{R(!1)}}};return(0,r.jsx)(o.FormSection,{number:4,title:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Section_DealerInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:["Do you have a Dealer ID? ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Option_Yes),name:"dealerPath",value:"yes",checked:"yes"===j,onChange:()=>{f("dealerPath","yes"),E(null),!I&&e&&"yes"===i&&S===d&&_(e)},variant:"forms"}),(0,r.jsx)(b.Radio,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Option_No),name:"dealerPath",value:"no",checked:"no"===j,onChange:()=>{f("dealerPath","no"),E(null),_(null),f("dealerId","")},variant:"forms"})]}),v.dealerPath&&(0,r.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(h,v.dealerPath.message)})]}),"yes"===j&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{control:p,name:"dealerId",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer ID (6-digit number)",helperText:"Enter 6 digit dealer ID number and click OK",value:e.value??"",onChange:r=>{e.onChange(r),I&&_(null),E(null)},onBlur:()=>{e.onBlur(),e.value&&/^\d{6}$/.test(e.value)&&D(e.value)},maxLength:6,errorMessage:(0,c.translateFormError)(h,v.dealerId?.message)??N??void 0,required:!0})}),y&&(0,r.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Verifying dealer IDâ¦"}),I&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:I.name}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:I.cityStateZip?`${I.address}, ${I.cityStateZip}`:`${I.address}, ${I.city}, ${I.state} ${I.zip}`})]}),(0,r.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}})]})]}),("yes"===j||"no"===j)&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("h3",{className:"text-[16px] font-bold text-[var(--color-text-primary)]",children:"Dealer Contact Information"})}),"no"===j&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:p,name:"dealerCompanyName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(h,v.dealerCompanyName?.message),required:!0})})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:p,name:"dealerStreet",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(h,v.dealerStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(h,v.dealerCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:x.STATE_OPTIONS,placeholder:"--Select State--",errorMessage:(0,c.translateFormError)(h,v.dealerState?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:p,name:"dealerZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Placeholder_Zip),errorMessage:(0,c.translateFormError)(h,v.dealerZip?.message),required:!0})})]}),("yes"===j||"no"===j)&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:p,name:"rebateContactName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Label_RebateContactName),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(h,v.rebateContactName?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:p,name:"rebateContactEmail",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Email Address",value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"email",maxLength:50,errorMessage:(0,c.translateFormError)(h,v.rebateContactEmail?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"confirmEmail",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Verify Email Address",value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"email",maxLength:50,errorMessage:(0,c.translateFormError)(h,v.confirmEmail?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer Telephone Number",value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"tel",maxLength:12,errorMessage:(0,c.translateFormError)(h,v.dealerPhone?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"additionalInfo",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Label_AdditionalInformation),value:e.value??"",onChange:e.onChange,multiline:!0,rows:4,maxLength:500})})})]})]})})}],35698),e.s(["SignatureSection",0,function({onPreview:e,onReset:t,termsUrl:s}){let i=(0,l.useI18n)(),d=i?.t??(e=>""),{control:m,formState:{errors:h,isSubmitting:p}}=(0,a.useFormContext)();return(0,r.jsx)(o.FormSection,{number:5,title:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Section_Signature),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:m,name:"dealerSignature",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer Electronic Signature",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(d,h.dealerSignature?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"signatureDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,r.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:"By typing my digital signature above and clicking the 'I agree' box, I represent as follows:"}),(0,r.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,r.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,r.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,r.jsx)("li",{children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,r.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,r.jsxs)("li",{children:[(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_ReadAgree)," ",s?(0,r.jsx)("button",{type:"button",onClick:()=>{s&&window.open(s,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,r.jsx)("span",{children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}
15),(0,r.jsx)(a.Controller,{control:m,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(f.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"})}),h.agreeAndSubmit&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(d,h.agreeAndSubmit.message)})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:e,disabled:p,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Button_Preview)}),(0,r.jsx)("button",{type:"button",onClick:t,disabled:p,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Button_Reset)})]})]})})}],33838);var _=e.i(26019),j=e.i(32548),S=e.i(4625);function D({number:e,title:t,children:a}){return(0,r.jsxs)("section",{className:"w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,r.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,r.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:t})]}),(0,r.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:a})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:n,onSubmit:s,isSubmitting:o,submitError:i,brands:m}){let{control:h,getValues:p,formState:{errors:g}}=(0,a.useFormContext)(),b=(0,t.useRef)(null),v=(0,t.useId)(),y=(0,l.useI18n)(),N=y?.t??(e=>"");(0,t.useEffect)(()=>{let r=b.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let E=p();return(0,r.jsx)("dialog",{ref:b,onCancel:e=>{e.preventDefault(),n()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-3xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"preview-modal-title",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(_.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,r.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,r.jsx)("h2",{id:"preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Fireplace Rebate Form - Review Your Submission"}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(D,{number:1,title:"Installation Information",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(j.ReadOnlyField,{label:"Street Address",value:E.installStreet??""})}),(0,r.jsx)(j.ReadOnlyField,{label:"City",value:E.installCity??""}),(0,r.jsx)(j.ReadOnlyField,{label:"State",value:E.installState??"MN"}),(0,r.jsx)(j.ReadOnlyField,{label:"Zip Code",value:E.installZip??""}),(0,r.jsx)(j.ReadOnlyField,{label:x.GAS_ACCOUNT_NUMBER_LABEL,value:E.accountNumber??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Type of Building",value:(0,S.getDisplayLabel)(d.BUILDING_TYPES,E.buildingType)}),(0,r.jsx)(j.ReadOnlyField,{label:"Type of Installation",value:(0,S.getDisplayLabel)(d.INSTALLATION_TYPES,E.installationType)}),"9"===E.buildingType&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.ReadOnlyField,{label:"Multi-Family Affordable Housing Bonu
15s Rebate",value:(0,S.getDisplayLabel)(d.MULTI_FAMILY_BONUS_OPTIONS,E.multiFamilyBonus??"")}),"1"===E.multiFamilyBonus&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.ReadOnlyField,{label:"Total number of housing units",value:E.totalHousingUnits??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Number of households occupied by income eligible households",value:E.incomeEligibleHouseholds??""})]})]})]}),(0,r.jsxs)(D,{number:2,title:"Purchaser Information",children:[(0,r.jsx)(j.ReadOnlyField,{label:"Check Payable To",value:"COMPANY"===E.checkPayableTo?"Company":"Purchaser"}),"COMPANY"===E.checkPayableTo?(0,r.jsx)(j.ReadOnlyField,{label:"Company Name",value:E.companyName??""}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser First Name",value:E.purchaserFirstName??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser Last Name",value:E.purchaserLastName??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Additional Purchaser Name",value:E.additionalPurchaser?"Yes":"No"}),E.additionalPurchaser&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.ReadOnlyField,{label:"Secondary Purchaser First Name",value:E.secondaryFirstName??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:E.secondaryLastName??""})]})]}),(0,r.jsx)(j.ReadOnlyField,{label:"Is Mailing Address Different from Installation Address?",value:"YES"===E.mailingAddressDifferent?"Yes":"No"}),"YES"===E.mailingAddressDifferent&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(j.ReadOnlyField,{label:"Street Address",value:E.mailingStreet??""})}),(0,r.jsx)(j.ReadOnlyField,{label:"City",value:E.mailingCity??""}),(0,r.jsx)(j.ReadOnlyField,{label:"State",value:E.mailingState??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Zip Code",value:E.mailingZip??""})]}),(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser Type",value:(0,S.getDisplayLabel)(x.PURCHASER_TYPES,E.purchaserType)}),(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser's Email Address",value:E.purchaserEmail??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser's Telephone Number",value:E.purchaserPhone??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:E.purchaserAltPhone??""})]}),(0,r.jsxs)(D,{number:3,title:"Equipment Information",children:[(0,r.jsx)(j.ReadOnlyField,{label:"Natural Gas Fireplace Product",value:(0,S.getDisplayLabel)(d.FIREPLACE_PRODUCTS,E.fireplaceProduct)}),(0,r.jsx)(j.ReadOnlyField,{label:"Brand",value:(0,S.getDisplayLabel)(m,E.brand)}),(0,r.jsx)(j.ReadOnlyField,{label:"Model Number",value:E.modelNumber??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Serial Number",value:E.serialNumber??""}),(0,r.jsx)(j.ReadOnlyField,{label:"BTU/hr Input",value:E.btuInput??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Ignition Brand Name",value:(0,S.getDisplayLabel)(d.IGNITION_BRANDS,E.ignitionBrand)}),(0,r.jsx)(j.ReadOnlyField,{label:"Date of Installation",value:(0,S.formatDateForDisplay)(E.installDate)}),(0,r.jsx)(R.RebateAmountField,{label:"Rebate Amount",amount:E.rebateAmount??""})]}),(0,r.jsxs)(D,{number:4,title:"Dealer Information",children:[(0,r.jsx)(j.ReadOnlyField,{label:"Rebate Contact Name",value:E.rebateContactName??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Email Address",value:E.rebateContactEmail??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Dealer Telephone Number",value:E.dealerPhone??""}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(j.ReadOnlyField,{label:"Additional Information",value:E.additionalInfo??""})})]}),(0,r.jsxs)(D,{number:5,title:"Signature & Submission",children:[(0,r.jsx)(j.ReadOnlyField,{label:"Dealer Electronic Signature",value:E.dealerSignature??""}),(0,r.jsx)(j.ReadOnlyField,{label:"Date",value:(0,S.formatDateForDisplay)(E.signatureDate)})]})]}),(0,r.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{control:h,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(f.Checkbox,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":g.agreeAndSubmit?v:void 0})}),g.agreeAndSubmit&&(0,r.jsx)("p",{id:v,className:"text-body-md text-[var(--color-red)]",role:"alert",children:(0,c.translateFormError)(N,g.agreeAndSubmit.message)}),i&&(0,r.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:i}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:s,disabled:o,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focu
15s:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:o?(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Submitting):(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Submit)}),(0,r.jsx)("button",{type:"button",onClick:n,disabled:o,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Modify)}),(0,r.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:o,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],27624)},93482,75679,26644,62608,e=>{"use strict";var r,t=e.i(91398),a=e.i(91788),l=e.i(96523),n=e.i(59369);e.i(79133);var s=e.i(45886),o=e.i(67018),i=e.i(26291),d=e.i(52373),u=e.i(28385),c=e.i(26455);let m={import:(0,c.default)("CNP:import"),forms:(0,c.default)("CNP:forms"),graphql:(0,c.default)("CNP:graphql"),ssr:(0,c.default)("CNP:ssr")};var h=((r=h||{}).CLOSED="CLOSED",r.OPEN="OPEN",r.HALF_OPEN="HALF_OPEN",r);let p=new class{state="CLOSED";consecutiveFailures=0;lastFailureTime=0;failureThreshold;cooldownMs;constructor(e){this.failureThreshold=e?.failureThreshold??5,this.cooldownMs=e?.cooldownMs??3e4}isOpen(){return"CLOSED"!==this.state&&"OPEN"===this.state&&(!(Date.now()-this.lastFailureTime>=this.cooldownMs)||(this.state="HALF_OPEN",!1))}recordSuccess(){this.consecutiveFailures=0,this.state="CLOSED"}recordFailure(){this.consecutiveFailures++,this.lastFailureTime=Date.now(),this.consecutiveFailures>=this.failureThreshold&&(this.state="OPEN")}},g="/v1/content/api/graphql/v1",f="/sitecore/api/graph/edge",b=new Set([429,502,503,504,520,521,522,523,524]),x=new class{initOptions;clientFactory;graphQLClient;fetchEndpoint;fetchHeaders;constructor(e){this.initOptions=e,this.clientFactory=this.getClientFactory(),this.graphQLClient=this.clientFactory({debugger:d.debug.http});const r=this.initOptions.api?.local?.apiHost,t=this.initOptions.api?.edge?.edgeUrl,a=this.initOptions.api?.local?.apiKey,l=this.initOptions.api?.edge?.contextId;r?this.fetchEndpoint=`${r.replace(/\/+$/,"")}${f}`:t?this.fetchEndpoint=`${t.replace(/\/+$/,"")}${g}`:this.fetchEndpoint="";const n={"Content-Type":"application/json"};r&&a?n.sc_apikey=a:l&&(n["x-sitecore-contextid"]=l),this.fetchHeaders=n,m.graphql("GraphQL client initialized: endpoint=%s, hasApiKey=%s, hasContextId=%s",this.fetchEndpoint,!!a,!!l)}async executeQuery(e,r){try{return await this.graphQLClient.request(e,r)}catch(e){return m.graphql("GraphQL request failed: %O",e),null}}async executeQueryCached(e,r,t=300){if(p.isOpen())return m.graphql("GraphQL circuit breaker is open, fast-failing"),null;let a=JSON.stringify({query:e,variables:r});for(let e=0;e<=3;e++)try{let r=await fetch(this.fetchEndpoint,{method:"POST",headers:this.fetchHeaders,body:a,next:{revalidate:t}});if(b.has(r.status)){if(e<3){let t=r.headers.get("Retry-After"),a=t?1e3*parseInt(t,10):1e3*Math.pow(2,e);await new Promise(e=>setTimeout(e,a));continue}return p.recordFailure(),m.graphql("GraphQL cached request failed after retries: status %d",r.status),null}if(!r.ok)return p.recordFailure(),m.graphql("GraphQL cached request failed: status %d",r.status),null;let l=await r.json();if(l.errors?.length)return p.recordFailure(),m.graphql("GraphQL cached request returned errors: %O",l.errors),null;return p.recordSuccess(),l.data??null}catch(r){if(e<3){await new Promise(r=>setTimeout(r,1e3*Math.pow(2,e)));continue}p.recordFailure(),m.graphql("GraphQL cached request threw: %O",r);break}return null}getClientFactory(){let e,r=this.initOptions.api?.local?.apiHost,t=this.initOptions.api?.edge?.edgeUrl;e=r?`${r.replace(/\/+$/,"")}${f}`:t?`${t.replace(/\/+$/,"")}${g}`:"";let a=this.initOptions.api?.local?.apiKey,l=this.initOptions.api?.edge?.contextId,n={endpoint:e,apiKey:r?a:void 0,contextId:r?void 0:l,retries:this.initOptions.retries?.count,retryStrategy:this.initOptions.retries?.retryStrategy,fetch};return u.GraphQLRequestClient.createClientFactory(n)}}({...i.default});e.s(["default",0,x],75679);async function v(e,r){let t=r||i.default.defaultLanguage||"en-us";try{let r=await fetch(`/api/hsp/lookup/${e}?language=${t}`);if(!r.ok){if(404===r.status)return null;throw Error(`HSP API failed: ${r.status}`)}return await r.json()}catch(e){return console.error("[HSP Client] Lookup error:",e),null}}function y({headline:e,description:r,heroImageSrc:i,heroImageAlt:d,heroImageField:u,imageAlignment:c,isEditing:m=!1,inputLabel:h,inputPlaceholder:p,servicesHeader:g,salesHeader:f,validationMessage:b,noResultsMessage:x,mockData:R}){let N=(0,a.useId)(),E=(0,a.useId)(),[I,C]=(0,a.useState)(""),[_,j]=(0,a.useState)(null),[S,D]=(0,a.useState)(null),[T,A]=(0,a.useState)(!1),F="left"===c,O=_&&(_.services.length>0||_.sales.length>0),w=async()=>
15{if(!/^\d{5}$/.test(I))return void D("validation");A(!0),D(null),j(null);try{let e=null;(e=R?R.find(e=>e.zip===I)||null:await v(I))&&(e.services.length>0||e.sales.length>0)?j(e):D("no-results")}catch{D("fetch-error")}finally{A(!1)}},L=()=>{switch(S){case"validation":return b;case"no-results":return x.replace("{zip}",I);case"fetch-error":return"Unable to load service data. Please try again.";default:return""}},P=(0,n.cn)("w-full h-[198px] lg:h-[465px] object-cover",F?"rounded-tr-[24px] rounded-br-[24px] lg:rounded-none lg:rounded-tr-[24px] lg:rounded-br-[24px]":"rounded-tl-[24px] rounded-bl-[24px] lg:rounded-none lg:rounded-tl-[24px] lg:rounded-bl-[24px]","min-[1920px]:rounded-[24px]"),k=(0,n.cn)("flex flex-col lg:flex-row lg:items-center gap-8 lg:gap-[72px]",F?"lg:flex-row":"lg:flex-row-reverse"),M=(0,n.cn)("flex flex-col gap-6 flex-1 pb-6 lg:pb-0",F?"lg:pr-[8%]":"lg:pl-[10%]"),V="validation"===S||"fetch-error"===S;return(0,t.jsx)("div",{className:"bg-[var(--color-secondary-grey)] py-8 lg:py-12 px-6",children:(0,t.jsxs)("article",{className:k,children:[(i||m)&&(0,t.jsx)("div",{className:"w-full lg:w-[57%] overflow-hidden shrink-0",children:m?(0,t.jsx)(l.Image,{field:u,className:P}):i&&(0,t.jsx)(s.CHImage,{src:i,alt:d,transformations:{desktop:"Promo",mobile:"PromoMobile"},className:P})}),(0,t.jsxs)("div",{className:M,children:[(0,t.jsx)("h2",{className:"text-h3 text-[var(--color-text-primary)] m-0",children:e}),(0,t.jsx)("p",{className:"text-body-md text-[var(--color-text-secondary)] m-0",children:r}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:N,className:(0,n.cn)("text-body-md font-medium",V?"text-[var(--color-red)]":"text-[var(--color-text-primary)]"),children:h}),(0,t.jsx)("input",{id:N,type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:5,value:I,onChange:e=>{C(e.target.value.replace(/\D/g,"").slice(0,5)),D(null)},onKeyDown:e=>{"Enter"===e.key&&w()},onBlur:()=>{I.length>0&&I.length<5?D("validation"):5===I.length&&w()},placeholder:p,disabled:T,"aria-invalid":V,"aria-describedby":V?E:void 0,className:(0,n.cn)("w-full max-w-[400px] h-[48px] px-6 rounded-full","text-body-md text-[var(--color-text-primary)] placeholder:text-[var(--color-medium-grey)]","border-2 outline-none transition-colors","focus:border-[var(--color-primary-blue)]",V?"border-[var(--color-red)]":"border-[var(--color-grey-3)] bg-white",T&&"opacity-50 cursor-not-allowed")}),V&&(0,t.jsx)("p",{id:E,className:"text-body-sm text-[var(--color-red)] m-0",role:"alert",children:L()})]}),"no-results"===S&&(0,t.jsx)("p",{className:"text-body-md text-[var(--color-primary-blue)] m-0",children:L()}),O&&(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-12 mt-2","aria-live":"polite","aria-label":"Search results",children:[_.services.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-body-md font-semibold text-[var(--color-text-primary)] m-0",children:g}),(0,t.jsx)("ul",{className:"list-none m-0 p-0 flex flex-col gap-1",children:_.services.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-body-md font-medium text-[var(--color-primary-blue)] hover:underline",children:[e.type,(0,t.jsx)(o.ExternalIcon,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"sr-only",children:"(opens in new window)"})]})},e.type))})]}),_.sales.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-body-md font-semibold text-[var(--color-text-primary)] m-0",children:f}),(0,t.jsx)("ul",{className:"list-none m-0 p-0 flex flex-col gap-1",children:_.sales.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-body-md font-medium text-[var(--color-primary-blue)] hover:underline",children:[e.type,(0,t.jsx)(o.ExternalIcon,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"sr-only",children:"(opens in new window)"})]})},e.type))})]})]})]})]})})}e.s(["lookupHSPZipCode",0,v],26644),e.s(["HSPZipCodeLookupClient",0,y,"default",0,y],93482);var R=e.i(4625);let N=[{month:0,day:1},{month:6,day:4},{month:11,day:24},{month:11,day:25}],E=new Map;function I(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function C(e,r){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+r)}function _(e,r,t,a){let l=(t-new Date(e,r,1).getDay()+7)%7;return new Date(e,r,1+l+(a-1)*7)}function j(e){let r=e.getDay();return 6===r?C(e,-1):0===r?C(e,1):e}function S(e){let r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${r}-${t}`}function D(e){let r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${r}/${t}/${e.getFullYear()}`}function T(e){let r;return 6!==(r=e.getDay())&&0!==r&&!(function(e){let r,t,a,l,n,s,o,i,d,u,c,m,h=E.get(e);if(h)return h;let p=[_(e,0,1,3),C((r=e%19,t=Math.floor(e/100),a=e%100,l=Math.floor(t/4),n=Math.floor((t+8)/25),s=Math.floor((t-n+1)/3),o=(19*r+t-l-s+15)%30,i=(32+t%4*2+2*Math.floor(a/4)-o-a%4)%7,d=Math.floor((r+11*o+22*i)/451),new Date(e,Math.floor((u=o+i-7*d+114)/31)-1,u%31+1)),-2),(m=((c=new Date(e,5,0)).getDay()-1+7)%7,new Date(e,4,c.getDate()-m)),_(e,8,1,1),_(e,10,4,4),_(e,10,5,4)];for(let{month:r,day:t}of N)p.push(j(new Date(e,r,t)));p.push(j(new Date(e+1,0,1)));let g=new Set(p.filter(r=>r.getFullYear()===e).map(S));return E.set(e,g),g})(e.getFullYear()).has(S(e))}function A(e,r){let t=I(e),a=Math.max(0,Math.trunc(r));for(;a>0;)T(t=C(t,1))&&(a-=1);return t}let F=/^businessdays:\s*(\d+)\s*,\s*(\d+)\s*$/i,O=".global-input-description, .form-input-description",w=[],L=new WeakSet,P=0;function k(e){let r=e.parentElement;return r?r.closest(".form-input-wrapper, .component")??r:null}function M(e){let r,t,a,{input:l,lead:n,length:s}=e,o=(m=new Date,r=function(e){let r=I(e);for(;!T(r);)r=C(r,1);return r}(A(m,n)),t=A(r,Math.max(1,Math.trunc(s))-1),{min:r,max:t}),i=S(o.min),d=S(o.max);l.min!==i&&(l.min=i),l.max!==d&&(l.max=d);let u=function(e){if(e.description.isConnected)return e.description;let r=k(e.input)?.querySelector(O);return r&&(e.description=r),e.description}(e),c=`Choose a weekday between ${D(o.min)} and ${D(o.max)}. Weekends and holidays are unavailable.`;u.textContent!==c&&(u.textContent=c),u.id||(P+=1,u.id=`forms-date-hint-${P}`),(a=l.getAttribute("aria-describedby")??"").split(/\s+/).includes(u.id)||l.setAttribute("aria-describedby",a?`${a} ${u.id}`:u.id);var m,h=k(u)??k(l);if(h)for(let e of h.querySelectorAll("span.a11y-visible")){let r=e.textContent?.replace(/^[,\s]+/,"").replace(/[,\s]+$/,"")??"";F.test(r)&&(e.style.display="none")}let p=function(e,r){if(!e)return null;let t=function(e){if(!R.dateRegex.test(e))return null;let[r,t,a]=e.split("-").map(Number),l=new Date(r,t-1,a);return l.getFullYear()!==r||l.getMonth()!==t-1||l.getDate()!==a?null:l}(e);return t?t.getTime()<r.min.getTime()||t.getTime()>r.max.getTime()?"range":T(t)?null:"nonBusinessDay":null}(l.value,o);l.setCustomValidity("range"===p?`Please choose a date between ${D(o.min)} and ${D(o.max)}
15.`:"nonBusinessDay"===p?"Please choose a business day (MondayâFriday, excluding holidays).":"")}e.s(["setupDateRestrictions",0,function(){let e=[];for(let e=w.length-1;e>=0;e-=1)w[e].input.isConnected||(L.delete(w[e].input),w.splice(e,1));for(let r of document.querySelectorAll(O)){let t=function(e){let r=F.exec(e);if(!r)return null;let t=Number(r[1]),a=Number(r[2]);return t>365||a<1||a>365?null:{lead:t,length:a}}(r.textContent?.trim()??"");if(!t)continue;let a=k(r)?.querySelector('input[data-type="date_input"], input[type="date"]')??null;if(!a||L.has(a))continue;let l={input:a,description:r,...t};w.push(l),L.add(a),a.setAttribute("data-business-days",`${t.lead},${t.length}`);let n=()=>M(l);a.addEventListener("change",n),a.addEventListener("input",n),e.push(()=>{a.removeEventListener("change",n),a.removeEventListener("input",n)})}for(let e of w)M(e);return e}],62608)},23185,98097,81737,91328,93556,54632,95721,67018,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(58021),l=e.i(43725);e.i(70484);var n=e.i(45892);e.i(78118);var s=e.i(94102),o=e.i(84637),i=e.i(46203),d=e.i(58071),u=e.i(30392),c=e.i(25929);let m=d.BUILDING_TYPES.map(e=>({value:e.value,label:e.label})),h=d.INSTALLATION_TYPES.map(e=>({value:e.value,label:e.label})),p=d.MULTI_FAMILY_BONUS_OPTIONS.map(e=>({value:e.value,label:e.label})),g=d.MN_STATE_OPTION.map(e=>({value:e.value,label:e.label})),f=new Set(["8","13"]);function b({control:e}){let s=(0,l.useI18n)(),o=s?.t??(e=>""),{watch:i,formState:{errors:d}}=(0,a.useFormContext)(),[m,h]=(0,t.useState)(),[p,g]=(0,t.useState)(),f=i("totalUnits"),x=i("incomeEligibleUnits"),v=()=>{let e,r;(null==f||""===String(f))&&(e=(0,u.getDictionaryValue)(o,u.DICTIONARY.F.Form_Error_TotalUnitsRequired)),null==x||""===String(x)?r=(0,u.getDictionaryValue)(o,u.DICTIONARY.F.Form_Error_IncomeEligibleRequired):f&&x>f?r=(0,u.getDictionaryValue)(o,u.DICTIONARY.F.Form_Error_IncomeEligibleExceedsTotal):f&&x/f<.66&&(r="Must be at least 66% of total units for bonus eligibility"),h(e),g(r)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:e,name:"totalUnits",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Total number of housing units",value:void 0!==e.value?String(e.value):"",onChange:r=>e.onChange(r?Number(r):void 0),onBlur:()=>{e.onBlur(),v()},errorMessage:(0,c.translateFormError)(o,d.totalUnits?.message??m),required:!0})}),(0,r.jsx)(a.Controller,{control:e,name:"incomeEligibleUnits",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Number of households occupied by income eligible households",value:void 0!==e.value?String(e.value):"",onChange:r=>e.onChange(r?Number(r):void 0),onBlur:()=>{e.onBlur(),v()},errorMessage:(0,c.translateFormError)(o,d.incomeEligibleUnits?.message??p),required:!0})})]})}e.s(["InstallationSection",0,function(){let e=(0,l.useI18n)(),d=e?.t??(e=>""),{control:x,watch:v,setValue:y,formState:{errors:R}}=(0,a.useFormContext)(),[N,E]=(0,t.useState)(!1),I=v("buildingType"),C=v("multiFamilyBonus"),_=f.has(I);return(0,t.useEffect)(()=>{_||(y("multiFamilyBonus","NO"),y("totalUnits",void 0),y("incomeEligibleUnits",void 0))},[_,y]),(0,r.jsx)(o.FormSection,{number:1,title:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:x,name:"installStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(d,R.installStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:x,name:"installCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(d,R.installCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:x,name:"installState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:g,placeholder:"MN",errorMessage:(0,c.translateFormError)(d,R.installState?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:x,name:"installZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,placeholder:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Placeholder_Zip),maxLength:10,errorMessage:(0,c.translateFormError)(d,R.installZip?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:x,name:"accountNumber",render:({field:e})=>(0,r.jsx)(i.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,c.translateFormError)(d,R.accountNumber?.message)})}),(0,r.jsx)(a.Controller,{control:x,name:"buildingType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_BuildingType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:m,placeholder:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Placeholder_SelectBuildingType),errorMessage:(0,c.translateFormError)(d,R.buildingType?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:x,name:"installationType",render:({field:e})=>(0,r.jsxs)("div",{className:"sm:col-span-2 flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("label",{htmlFor:"installationType-dropdown",className:"text-body-md font-semibold text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_InstallationType)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsx)("button",{type:"button",className:"text-sm text-[var(--color-primary-blue)] underline hover:no-underline",onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onFocus:()=>E(!0),onBlur:()=>E(!1),"aria-describedby":"installation-type-tooltip",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Helper_MoreInformation)}),N&&(0,r.jsx)("div",{id:"installation-type-tooltip",role:"tooltip",className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,r.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
15webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,r.jsx)(s.Dropdown,{id:"installationType-dropdown",label:"",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:h,placeholder:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Placeholder_SelectInstallationType),errorMessage:(0,c.translateFormError)(d,R.installationType?.message)})]})}),_&&(0,r.jsx)(a.Controller,{control:x,name:"multiFamilyBonus",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:"Multi-Family Affordable Housing Bonus Rebate",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:p,placeholder:"--Select Option--",helperText:"Property must have a minimum of 66% income eligible holders to qualify",errorMessage:(0,c.translateFormError)(d,R.multiFamilyBonus?.message),required:!0})})}),"YES"===C&&(0,r.jsx)(b,{control:x})]})})}],23185);var x=e.i(30798),v=e.i(14601),y=e.i(50547),R=e.i(4625);let N=y.PURCHASER_TYPES.map(e=>({value:e.value,label:e.label}));e.s(["PurchaserSection",0,function(){let e=(0,l.useI18n)(),i=e?.t??(e=>""),{control:d,watch:m,trigger:h,setValue:p,formState:{errors:g,isSubmitted:f}}=(0,a.useFormContext)(),b=m("checkPayableTo"),E=m("additionalPurchaser"),I=m("mailingAddressDifferent"),[C,_]=(0,t.useState)(),[j,S]=(0,t.useState)(),[D,T]=(0,t.useState)(),[A,F]=(0,t.useState)(),O=(e,r)=>{r(e),"PURCHASER"===e?p("companyName",""):(p("purchaserFirstName",""),p("purchaserLastName",""),p("additionalPurchaser",!1),p("secondaryPurchaserFirstName",""),p("secondaryPurchaserLastName",""),_(void 0),S(void 0),T(void 0),F(void 0)),f&&("PURCHASER"===e?h(["purchaserFirstName","purchaserLastName"]):"COMPANY"===e&&h("companyName"))};return(0,r.jsx)(o.FormSection,{number:2,title:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:d,name:"checkPayableTo",render:({field:e})=>(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"PURCHASER",checked:"PURCHASER"===e.value,onChange:()=>O("PURCHASER",e.onChange),variant:"forms"}),(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"COMPANY",checked:"COMPANY"===e.value,onChange:()=>O("COMPANY",e.onChange),variant:"forms"})]}),g.checkPayableTo&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,c.translateFormError)(i,g.checkPayableTo.message)})]})})}),"PURCHASER"===b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"purchaserFirstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:()=>{var r;e.onBlur(),_((r=e.value)&&""!==r.trim()?R.alphaOnlyRegex.test(r)?void 0:"Please enter a valid first name.":"Please enter the first name.")},maxLength:30,errorMessage:(0,c.translateFormError)(i,g.purchaserFirstName?.message??C),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserLastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:()=>{var r;e.onBlur(),S((r=e.value)&&""!==r.trim()?R.alphaOnlyRegex.test(r)?void 0:"Please enter a valid last name.":"Please enter the last name.")},maxLength:40,errorMessage:(0,c.translateFormError)(i,g.purchaserLastName?.message??j),required:!0})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{c
15ontrol:d,name:"additionalPurchaser",render:({field:e})=>(0,r.jsx)(x.Checkbox,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value??!1,onChange:r=>{(0,e.onChange)(r),!r&&(T(void 0),F(void 0)),f&&r&&h(["secondaryPurchaserFirstName","secondaryPurchaserLastName"])},variant:"forms"})})}),E&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"secondaryPurchaserFirstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:()=>{var r;e.onBlur(),T((r=e.value)&&""!==r.trim()?R.alphaOnlyRegex.test(r)?void 0:"Please enter a valid first name.":"Please enter the first name.")},maxLength:30,errorMessage:(0,c.translateFormError)(i,g.secondaryPurchaserFirstName?.message??D),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"secondaryPurchaserLastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:()=>{var r;e.onBlur(),F((r=e.value)&&""!==r.trim()?R.alphaOnlyRegex.test(r)?void 0:"Please enter a valid last name.":"Please enter the last name.")},maxLength:40,errorMessage:(0,c.translateFormError)(i,g.secondaryPurchaserLastName?.message??A),required:!0})})]})]}),"COMPANY"===b&&(0,r.jsx)(a.Controller,{control:d,name:"companyName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(i,g.companyName?.message),required:!0})})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:d,name:"mailingAddressDifferent",render:({field:e})=>(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Option_Yes),name:"mailingAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>e.onChange("YES"),variant:"forms"}),(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Option_No),name:"mailingAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>{e.onChange("NO"),p("mailingStreet",""),p("mailingCity",""),p("mailingState","MN"),p("mailingZip","")},variant:"forms"})]}),g.mailingAddressDifferent&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,c.translateFormError)(i,g.mailingAddressDifferent.message)})]})})}),"YES"===I&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:d,name:"mailingStreet",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(i,g.mailingStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:d,name:"mailingCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(i,g.mailingCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:d,name:"mailingState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:y.STATE_OPTIONS,placeholder:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:(0,c.translateFormError)(i,g.mailingState?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:d,name:"mailingZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,c.translateFormError)(i,g.mailingZip?.message),required:!0})})]}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:N,placeholder:"--Select Purchaser Type--",errorMessage:(0,c.translateFormError)(i,g.purchaserType?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserEmail",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,c.translateFormError)(i,g.purchaserEmail?.message)})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(i,g.purchaserPhone?.message)})}),(0,r.jsx)(a.Controller,{control:d,name:"purchaserAltPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(i,u.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(i,g.purchaserAltPhone?.message)})})]})})}],98097);var E=e.i(94988),I=e.i(59369),C=e.i(52866);function _(e,r,t,a){return e?r?.value===e?r:a.has((0,C.normalizeModelNumber)(e))?null:t.find(r=>r.value===e)??null:null}function j(e,r,t){return t.has((0,C.normalizeModelNumber)(e))&&r?.value!==e}function S(e){return void 0!==e&&e>0?String(e):""}function D(e){return{btuInput:S(e?.inputRating),afue:S(e?.afue)}}function T(...e){let r=new Set,t=[];for(let a of e)for(let e of a){let a=[e.brand,e.value,e.ahri??""].join("\0");r.has(a)||(r.add(a),t.push(e))}return t}e.s(["buildHeatingSystemModelValues",0,D,"isUnpickedDuplicateModelNumber",0,j,"mergeUniqueModels",0,T,"resolveHeatingSystemModel",0,_],81737),e.s(["EquipmentSection",0,function({rebateData:e,isLoadingData:i,dataError:m}){let h=(0,l.useI18n)(),p=h?.t??(e=>""),{control:g,watch:f,setValue:b,getValues:x,formState:{errors:y}}=(0,a.useFormContext)(),[R,N]=(0,t.useState)(!1),[S,A]=(0,t.useState)(!1),[F,O]=(0,t.useState)(!1),w=(0,t.useRef)(void 0),L=f("equipmentPath"),P=f("heatingSystemType"),k=f("installationType"),M=f("brand"),V=f("modelNumber"),B=f("ahriReferenceNumber"),Y=f("afue"),U=f("rebateAmount"),z=f("thermostatBrand"),Z=f("thermostatModel"),q=f("thermostatRebateAmount"),H=f("totalRebateAmount"),$=f("installState")??"MN",G=(0,t.useRef)(!1),[Q,W]=(0,t.useState)(null),K=(0,t.useRef)(null),J=(0,t.useRef)(null),X=(0,t.useCallback)(e=>{(x("ahriReferenceNumber")??"")!==e&&(J.current=e,b("ahriReferenceNumber",e,{shouldValidate:!1}))},[x,b]),ee=(0,t.useCallback)(()=>{W(null),null!==K.current&&(K.current=null,X(""))},[X]),[er,et]=(0,t.useState)(""),[ea,el]=(0,t.useState)(!1),en=(0,t.useRef)(null),[es,eo]=(0,t.useState)(""),[ei,ed]=(0,t.useState)(!1),[eu,ec]=(0,t.useState)(!1),em=(0,t.useRef)(null),eh=(0,t.useMemo)(()=>{if(!e||!P)return[];switch(P){case"015":return e.resModels;case"018":if("MN"===$)return T(e.blrModels,e.comBlrModels);return e.blrModels;case"256":return e.condensCondoModels;case"257":return e.ngComboBlrModels;default:return[]}},[e,P,$]),ep=(0,t.useMemo)(()=>"HEATING_SYSTEM"===L?"HS":"MN"===$||"MS"===$?"HSTS":"HS",[L,$]),eg=(0,t.useMemo)(()=>{let e={value:"",label:""},r=d.REGION_EQUIPMENT_OVERRIDES[$];return r?[e,...d.EQUIPMENT_TYPES.filter(e=>r.includes(e.value)).map(e=>({value:e.value,label:e.label}))]:[e,...d.EQUIPMENT_TYPES.map(e=>({value:e.value,label:e.label}))]},[$]),ef=(0,t.useMemo)(()=>{if(!e||!P)return[];let r=[];switch(P){case"015":r=e.resBrands;break;case"018":if("MN"===$){let t=[...e.blrBrands,...e.comBlrBrands],a=new Map;
15t.forEach(e=>a.set(e.value,e)),r=Array.from(a.values()).sort((e,r)=>e.label.localeCompare(r.label))}else r=e.blrBrands;break;case"256":r=e.condensCondoBrands;break;case"257":r=e.ngComboBlrBrands;break;case"278":r=e.ngComboFurBrands;break;default:r=[]}if(B&&eh.length>0){let e=eh.filter(e=>e.ahri&&e.ahri.toLowerCase()===B.toLowerCase());if(e.length>0){let t=new Set(e.map(e=>e.brand));return r.filter(e=>t.has(e.value))}}return r},[e,P,$,B,eh]),eb=(0,t.useMemo)(()=>{if(!e||!P||!M)return[];let r=[];switch(P){case"015":r=e.resModels;break;case"018":r="MN"===$?T(e.blrModels,e.comBlrModels):e.blrModels;break;case"256":r=e.condensCondoModels;break;case"257":r=e.ngComboBlrModels;break;default:r=[]}return r.filter(e=>e.brand===M)},[e,P,M,$]),ex=(0,t.useMemo)(()=>(0,C.findDuplicateModelNumbers)(eb.map(e=>({modelNumber:e.value,ahri:e.ahri}))),[eb]),ev=(0,t.useMemo)(()=>{if(!eb.length)return[];if(!er)return eb.slice(0,50);let e=er.toLowerCase();return eb.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[eb,er]),ey=(0,t.useMemo)(()=>e?e.thermostatBrands:[],[e]),eR=(0,t.useMemo)(()=>e&&z?e.thermostatModels.filter(e=>e.brand===z):[],[e,z]),eN=(0,t.useMemo)(()=>{if(!eR.length)return[];if(!es)return eR.slice(0,50);let e=es.toLowerCase();return eR.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[eR,es]);(0,t.useEffect)(()=>{w.current!==k&&void 0!==w.current&&(b("brand","",{shouldValidate:!1}),b("modelNumber","",{shouldValidate:!1}),b("ahriReferenceNumber","",{shouldValidate:!1}),b("afue","",{shouldValidate:!1}),b("rebateAmount",0,{shouldValidate:!1}),W(null),K.current=null,et(""),el(!1),N(!1),A(!1),O(!1)),w.current=k},[k,b]),(0,t.useEffect)(()=>{b("brand","",{shouldValidate:!1}),b("modelNumber","",{shouldValidate:!1}),b("rebateAmount",0,{shouldValidate:!1}),ee(),et(""),el(!1)},[P,b,ee]),(0,t.useEffect)(()=>{if(G.current){G.current=!1;return}b("modelNumber","",{shouldValidate:!1}),b("rebateAmount",0,{shouldValidate:!1}),ee(),et(""),el(!1)},[M,b,ee]),(0,t.useEffect)(()=>{b("thermostatModel","",{shouldValidate:!1}),b("thermostatRebateAmount",0,{shouldValidate:!1}),eo(""),ed(!1)},[z,b]),(0,t.useEffect)(()=>{if(null!==J.current&&J.current===(B??"")){J.current=null;return}if(!eh.length||(b("brand","",{shouldValidate:!1}),b("modelNumber","",{shouldValidate:!1}),b("btuInput","",{shouldValidate:!1}),b("afue","",{shouldValidate:!1}),W(null),et(""),!B))return;let e=eh.find(e=>e.ahri&&e.ahri.toLowerCase()===B.toLowerCase());e&&(G.current=!0,e.brand&&b("brand",e.brand,{shouldValidate:!1}),setTimeout(()=>{e.value&&(b("modelNumber",e.value,{shouldValidate:!1}),et(e.label||e.value)),W(e)},0))},[B,eh,b]),(0,t.useEffect)(()=>{if(!e)return;let r=D(_(V,Q,eb,ex));b("btuInput",r.btuInput,{shouldValidate:!1}),b("afue",r.afue,{shouldValidate:!1})},[V,eb,e,Q,ex,b]),(0,t.useEffect)(()=>{if(!e||!P||!k||!Y)return void b("rebateAmount",0,{shouldValidate:!1});let r=parseFloat(Y);if(isNaN(r))return void b("rebateAmount",0,{shouldValidate:!1});let t=e.rules.find(e=>e.projectType===ep&&e.typeCode===P&&e.installationType===k&&void 0!==e.afueLow&&void 0!==e.afueHigh&&r>=e.afueLow&&r<=e.afueHigh);if(t&&t.custRebate){let e=parseFloat(t.custRebate);isNaN(e)?b("rebateAmount",0,{shouldValidate:!1}):b("rebateAmount",e,{shouldValidate:!1})}else b("rebateAmount",0,{shouldValidate:!1})},[Y,P,k,ep,e,b]),(0,t.useEffect)(()=>{if("HEATING_SYSTEM_WITH_THERMOSTAT"!==L||!e||!Z||!P)return void b("thermostatRebateAmount",0,{shouldValidate:!1});let r=e.thermostatModels.find(e=>e.value===Z);if(!r)return void b("thermostatRebateAmount",0,{shouldValidate:!1});let t="AR"===$||"OK"===$?"":r.tier??"",a=Y?parseFloat(Y):void 0,l=e.rules.find(e=>e.projectType===ep&&e.typeCode===P&&e.installationType===k&&e.tier===t&&(void 0===a||void 0!==e.afueLow&&void 0!==e.afueHigh&&a>=e.afueLow&&a<=e.afueHigh));if(l&&l.thermRebate){let e=parseFloat(l.thermRebate);isNaN(e)?b("thermostatRebateAmount",0,{shouldValidate:!1}):b("thermostatRebateAmount",e,{shouldValidate:!1})}else b("thermostatRebateAmount",0,{shouldValidate:!1})},[Y,L,P,k,$,ep,e,Z,b]),(0,t.useEffect)(()=>{b("totalRebateAmount",(U??0)+("HEATING_SYSTEM_WITH_THERMOSTAT"===L?q??0:0),{shouldValidate:!1})},[U,q,L,b]),(0,t.useEffect)(()=>{let e=e=>{en.current&&!en.current.contains(e.target)&&el(!1),em.current&&!em.current.contains(e.target)&&ed(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let eE=(0,t.useRef)(!1),eI=(0,t.useRef)(!1),eC=(0,t.useCallback)(e=>{W(e),b("modelNumber",e.value,{shouldValidate:!1}),et(e.label||e.value),el(!1),K.current=e.ahri??"",X(e.ahri??""),setTimeout(()=>{eE.current=!1},150)},[X,b]),e_=(0,t.useCallback)(e=>{b("thermostatModel",e.value,{shouldValidate:!1}),eo(e.label||e.value),ed(!1),setTimeout(()=>{eI.current=!1},150)},[b]);return(0,r.jsx)(o.FormSection,{number:3,title:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(a.Controller,{c
15ontrol:g,name:"equipmentPath",render:({field:e})=>(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:["Select type of Equipment ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(v.Radio,{label:"Heating System",name:"equipmentPath",value:"HEATING_SYSTEM",checked:"HEATING_SYSTEM"===e.value,onChange:()=>e.onChange("HEATING_SYSTEM"),variant:"forms"}),(0,r.jsx)(v.Radio,{label:"Heating System with Thermostat",name:"equipmentPath",value:"HEATING_SYSTEM_WITH_THERMOSTAT",checked:"HEATING_SYSTEM_WITH_THERMOSTAT"===e.value,onChange:()=>e.onChange("HEATING_SYSTEM_WITH_THERMOSTAT"),variant:"forms"})]})]})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:g,name:"heatingSystemType",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(s.Dropdown,{label:"Heating System Type",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:eg,placeholder:i?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_SelectEquipmentType),errorMessage:(0,c.translateFormError)(p,y.heatingSystemType?.message),disabled:i,required:!0})})}),(0,r.jsx)(a.Controller,{control:g,name:"ahriReferenceNumber",render:({field:e})=>(0,r.jsxs)("div",{className:"sm:col-span-2 flex flex-col gap-1",children:[(0,r.jsx)(n.InputField,{label:"AHRI Reference Number",value:e.value??"",onChange:r=>{k&&P?(K.current=null,J.current=null,e.onChange(r)):O(!0)},onBlur:e.onBlur,onFocus:()=>O(!0),maxLength:30,errorMessage:!k&&F?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):!P&&F?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectHeatingSystemTypeFirst):(0,c.translateFormError)(p,y.ahriReferenceNumber?.message),placeholder:""}),(0,r.jsxs)("p",{className:"text-body-sm text-[var(--color-text-secondary)]",children:[(0,r.jsx)("strong",{children:"Note"}),": For rebate to qualify, the new heating system must be listed on the current"," ",(0,r.jsx)("a",{href:"https://www.ahridirectory.org/Search/SearchHome?ReturnUrl=%2f",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"AHRI"})," ","or"," ",(0,r.jsx)("a",{href:"https://www.energystar.gov/productfinder/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:"ENERGY STAR"})," ","websites."]})]})}),(0,r.jsx)(a.Controller,{control:g,name:"brand",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Label_Brand),value:e.value,onChange:r=>{k&&P?e.onChange(r):N(!0)},onBlur:e.onBlur,onFocus:()=>N(!0),options:k&&P?ef:[],placeholder:i?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_LoadingBrands):(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_SelectBrand),errorMessage:!k&&R?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):!P&&R?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectEquipmentTypeFirst):(0,c.translateFormError)(p,y.brand?.message)??m??void 0,required:!0})}),(0,r.jsxs)("div",{ref:en,className:"relative",children:[(0,r.jsx)(a.Controller,{control:g,name:"modelNumber",render:({field:e})=>{let t=ea&&ev.length>0&&M&&er.length>=3;return(0,r.jsx)(n.InputField,{label:"Model Number",value:er,onChange:r=>{k&&M?(et(r),e.onChange(r),ee(),el(r.length>=3&&!!k&&!!M),r||(b("btuInput","",{shouldValidate:!1}),b("afue","",{shouldValidate:!1}))):A(!0)},onBlur:()=>{if(e.onBlur(),eE.current)return;let r=e.value;r&&(!j(r,Q,ex)&&eb.length>0&&eb.some(e=>e.value.toLowerCase()===r.toLowerCase())||(et(""),e.onChange(""),b("btuInput","",{shouldValidate:!1}),b("afue","",{shouldValidate:!1})))},onFocus:()=>A(!0),placeholder:"",errorMessage:t?void 0:!k&&S?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):!M&&S?"Select brand first":(0,c.translateFormError)(p,y.modelNumber?.message),required:"278"!==P})}}),ea&&ev.length>0&&M&&er.length>=3&&(0,r.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:ev.map(e=>(0,r.jsxs)("button",{type:"button",onMouseDown:()=>{eE.current=!0},onClick:()=>eC(e),className:(0,I.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:[(0,r.jsx)("div",{className:"font-medium",children:e.label||e.value}),e.ahri&&ex.has((0,C.normalizeModelNumber)(e.value))?(0,r.jsxs)("div",{className:"text-[12px] text-[var(--color-text-secondary)]",children:["AHRI: ",e.ahri]}):null]},`${e.brand}-${e.ahri}-${e.value}`))})]}
15),(0,r.jsx)(a.Controller,{control:g,name:"serialNumber",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Label_SerialNumber),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,c.translateFormError)(p,y.serialNumber?.message),required:!0})}),(0,r.jsx)(n.InputField,{label:"BTU/hr Input",value:f("btuInput")||"",onChange:()=>void 0,disabled:!0}),(0,r.jsx)(n.InputField,{label:"AFUE%",value:f("afue")||"",onChange:()=>void 0,disabled:!0}),(0,r.jsx)(a.Controller,{control:g,name:"installDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:`${(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Label_DateOfInstallation)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,c.translateFormError)(p,y.installDate?.message),required:!0})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(E.RebateAmountField,{label:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Label_RebateAmount),amount:U})}),"HEATING_SYSTEM_WITH_THERMOSTAT"===L&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Controller,{control:g,name:"thermostatBrand",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:"Thermostat Brand",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:ey,placeholder:i?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Placeholder_SelectThermostatBrand),errorMessage:(0,c.translateFormError)(p,y.thermostatBrand?.message),disabled:0===ey.length||i,required:!0})}),(0,r.jsxs)("div",{ref:em,className:"relative",children:[(0,r.jsx)(a.Controller,{control:g,name:"thermostatModel",render:({field:e})=>{let t=ei&&eN.length>0&&z&&es.length>=3;return(0,r.jsx)(n.InputField,{label:"Thermostat Model",value:es,onChange:r=>{z?(eo(r),e.onChange(r),ed(r.length>=3)):ec(!0)},onBlur:()=>{if(e.onBlur(),eI.current)return;let r=e.value;r&&(eR.length>0&&eR.some(e=>e.value.toLowerCase()===r.toLowerCase())||(eo(""),e.onChange("")))},onFocus:()=>ec(!0),placeholder:"",errorMessage:t?void 0:!z&&eu?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Error_SelectThermostatBrandFirst):(0,c.translateFormError)(p,y.thermostatModel?.message),required:!0})}}),ei&&eN.length>0&&z&&es.length>=3&&(0,r.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:eN.map(e=>(0,r.jsx)("button",{type:"button",onMouseDown:()=>{eI.current=!0},onClick:()=>e_(e),className:(0,I.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:(0,r.jsx)("div",{className:"font-medium",children:e.label||e.value})},`${e.brand}-${e.value}`))})]}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(E.RebateAmountField,{label:"Thermostat Rebate Amount",amount:q})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(E.RebateAmountField,{label:"Total Rebate Amount",amount:H})})]})]})]})})}],91328);var A=e.i(73282);e.s(["DealerContactSection",0,function({preFormDealerInfo:e,preFormDealerPath:i,preFormDealerId:d}){let m=(0,l.useI18n)(),h=m?.t??(e=>""),{control:p,watch:g,setValue:f,trigger:b,formState:{errors:x,submitCount:R}}=(0,a.useFormContext)(),N=(0,c.translateFormError)(h,x.dealerId?.message),[E,I]=(0,t.useState)(!1),[C,_]=(0,t.useState)(null),[j,S]=(0,t.useState)(null),D=g("dealerPath")??"",T=g("dealerId")??"";(0,t.useEffect)(()=>{e&&(f("dealerPath",i),"yes"===i?(f("dealerId",d),S(e)):(f("dealerCompanyName",e.name),f("dealerStreet",e.address),f("dealerCity",e.city),f("dealerState",e.state),f("dealerZip",e.zip)))},[e,i,d,f]);let F=async e=>{if(_(null),e){if(!/^\d{6}$/.test(e))return void _((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerIdFormat));I(!0);try{let r=await fetch("/api/forms/dealer-validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dealerId:e,formId:"HEATING_SYSTEM"})});if(!r.ok)return void _((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerVerifyFailed));let t=await r.json();if("object"!=typeof t||null===t||!("success"in t)||"boolean"!=typeof t.success)return void _((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_UnexpectedResponse));if(t.success&&t.valid&&t.dealer){(0,A.storeDealerId)({dealerId:e,dealerName:t.dealer.dealerName,dealerAddress:t.dealer.dealerAddress,dealerCityStateZip:t.dealer.dealerCityStateZip});let r={name:t.dealer.dealerName,address:t.dealer.dealerAddress,city:"",state:"",zip:"",cityStateZip:t.dealer.dealerCityStateZip};S(r),_(null)}else _(t.error??(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerNotFound)),S(null)}catch{_((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerVerifyFailed))}finally{I(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.FormSection,{number:5,title:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Section_DealerInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-[16px] font-medium text-[var(--color-text-primary)]",children:["Do you have a Dealer ID? ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Option_Yes),name:"dealerPath",value:"yes",checked:"yes"===D,onChange:()=>{f("dealerPath","yes"),_(null),!j&&e&&"yes"===i&&T===d&&S(e)},variant:"forms"}),(0,r.jsx)(v.Radio,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Option_No),name:"dealerPath",value:"no",checked:"no"===D,onChange:()=>{f("dealerPath","no"),_(null),S(null)},variant:"forms"})]}),x.dealerPath&&(0,r.jsx)("p",{className:"mt-2 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(h,x.dealerPath.message)})]}),"yes"===D&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{c
15ontrol:p,name:"dealerId",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer ID (6-digit number)",value:e.value??"",onChange:r=>{e.onChange(r),j&&S(null),_(null)},onBlur:()=>{(e.onBlur(),e.value&&""!==e.value.trim())?/^\d{6}$/.test(e.value)?F(e.value):_((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerIdFormat)):_((0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Error_DealerIdRequired))},placeholder:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Placeholder_DealerId),maxLength:6,errorMessage:(0,c.translateFormError)(h,N)??C??void 0,required:!0})}),E&&(0,r.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"Verifying dealer IDâ¦"}),j&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-secondary-grey)] p-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-body-md font-semibold text-[var(--color-text-primary)]",children:"Dealer Information"}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:j.name}),(0,r.jsx)("p",{className:"text-body-md text-[var(--color-text-primary)]",children:j.cityStateZip?`${j.address}, ${j.cityStateZip}`:`${j.address}, ${j.city}, ${j.state} ${j.zip}`})]}),(0,r.jsx)("p",{className:"text-body-sm text-[var(--color-text-secondary)] [&_a]:text-[var(--color-primary-blue)] [&_a]:underline [&_a]:hover:no-underline",dangerouslySetInnerHTML:{__html:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Helper_DealerAddressUpdate)}})]})]}),"no"===D&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:p,name:"dealerCompanyName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(h,x.dealerCompanyName?.message),required:!0})})}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(a.Controller,{control:p,name:"dealerStreet",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(h,x.dealerStreet?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(h,x.dealerCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:y.STATE_OPTIONS,placeholder:"--Select State--",errorMessage:(0,c.translateFormError)(h,x.dealerState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"dealerZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,placeholder:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Placeholder_Zi
15p),errorMessage:(0,c.translateFormError)(h,x.dealerZip?.message),required:!0})})]})]})}),("yes"===D||"no"===D)&&(0,r.jsx)(o.FormSection,{number:6,title:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Section_DealerContact),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:p,name:"rebateContactName",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Label_RebateContactName),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(h,x.rebateContactName?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:p,name:"rebateContactEmail",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Email Address",value:e.value,onChange:e.onChange,onBlur:()=>{e.onBlur(),b("rebateContactEmail"),g("confirmEmail")&&b("confirmEmail")},type:"email",maxLength:50,errorMessage:(0,c.translateFormError)(h,x.rebateContactEmail?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"confirmEmail",render:({field:e})=>{let t=g("rebateContactEmail"),a=e.value&&t&&e.value!==t?"Email addresses must match":(0,
15c.translateFormError)(h,x.confirmEmail?.message);return(0,r.jsx)(n.InputField,{label:"Verify Email Address",value:e.value,onChange:e.onChange,onBlur:()=>{e.onBlur(),b("confirmEmail")},type:"email",maxLength:50,errorMessage:a,required:!0})}}),(0,r.jsx)(a.Controller,{control:p,name:"workPhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer Telephone Number",value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"tel",maxLength:12,errorMessage:(0,c.translateFormError)(h,x.workPhone?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"additionalInfo",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(h,u.DICTIONARY.F.Form_Label_AdditionalInformation),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:500,multiline:!0,rows:4})})})]})})]})}],93556),e.s(["SignatureAndSubmitSection",0,function({termsUrl:e,onPreviewClick:t,onReset:s}){let i=(0,l.useI18n)(),d=i?.t??(e=>""),{control:m,formState:{errors:h}}=(0,a.useFormContext)();return(0,r.jsx)(o.FormSection,{number:7,title:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Section_Signature),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:m,name:"dealerSignature",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Dealer Electronic Signature",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(d,h.dealerSignature?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:m,name:"signatureDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,r.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:"By typing my digital signature above and clicking the 'I agree' box, I represent as follows:"}),(0,r.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,r.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,r.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,r.jsx)("li",{children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,r.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,r.jsxs)("li",{children:[(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_ReadAgree)," ",e?(0,r.jsx)("button",{type:"button",onClick:()=>{e&&window.open(e,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,r.jsx)("span",{children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}),(0,r.jsx)(a.Controller,{control:m,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(x.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"})}),h.agreeAndSubmit&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",children:(0,c.translateFormError)(d,h.agreeAndSubmit.message)})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Button_Preview)}),s&&(0,r.jsx)("button",{type:"button",onClick:s,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focu
15s:ring-offset-2",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Button_Reset)})]})]})})}],54632);var F=e.i(26019),O=e.i(32548);function w({number:e,title:t,children:a}){return(0,r.jsxs)("section",{className:"w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,r.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,r.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:t})]}),(0,r.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:a})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:n,onSubmit:s,isSubmitting:o,submitError:i,rebateData:m}){let{control:h,getValues:p,formState:{errors:g}}=(0,a.useFormContext)(),f=(0,t.useRef)(null),b=(0,t.useId)(),v=(0,l.useI18n)(),N=v?.t??(e=>"");(0,t.useEffect)(()=>{let r=f.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let I=p(),C="8"===I.buildingType||"13"===I.buildingType,_=C&&"YES"===I.multiFamilyBonus;return(0,r.jsx)("dialog",{ref:f,onCancel:e=>{e.preventDefault(),n()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"preview-modal-title",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(F.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,r.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,r.jsx)("h2",{id:"preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Heating System Rebate Form - Review Your Submission"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)(w,{number:1,title:"Installation Information",children:[(0,r.jsx)(O.ReadOnlyField,{label:"Street Address",value:I.installStreet??""}),(0,r.jsx)(O.ReadOnlyField,{label:"City",value:I.installCity??""}),(0,r.jsx)(O.ReadOnlyField,{label:"State",value:I.installState??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Zip Code",value:I.installZip??""}),(0,r.jsx)(O.ReadOnlyField,{label:y.GAS_ACCOUNT_NUMBER_LABEL,value:
15I.accountNumber??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Type of Building",value:(0,R.getDisplayLabel)(d.BUILDING_TYPES,I.buildingType)}),(0,r.jsx)(O.ReadOnlyField,{label:"Type of Installation",value:(0,R.getDisplayLabel)(d.INSTALLATION_TYPES,I.installationType)}),C&&(0,r.jsx)(O.ReadOnlyField,{label:"Multi-Family Affordable Housing Bonus Rebate",value:(0,R.getDisplayLabel)(d.MULTI_FAMILY_BONUS_OPTIONS,I.multiFamilyBonus)}),_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Total number of housing units",value:void 0!==I.totalUnits?String(I.totalUnits):""}),(0,r.jsx)(O.ReadOnlyField,{label:"Number of households occupied by income eligible households",value:void 0!==I.incomeEligibleUnits?String(I.incomeEligibleUnits):""})]})]}),(0,r.jsxs)(w,{number:2,title:"Purchaser Information",children:[(0,r.jsx)(O.ReadOnlyField,{label:"Check payable to",value:"COMPANY"===I.checkPayableTo?"Company":"Purchaser"}),"COMPANY"===I.checkPayableTo?(0,r.jsx)(O.ReadOnlyField,{label:"Company Name",value:I.companyName??""}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser First Name",value:I.purchaserFirstName??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser Last Name",value:I.purchaserLastName??""})]}),I.additionalPurchaser&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Secondary Purchaser First Name",value:I.secondaryPurchaserFirstName??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:I.secondaryPurchaserLastName??""})]}),(0,r.jsx)(O.ReadOnlyField,{label:"Is Rebate Mailing Address different from Installation Address?",value:"YES"===I.mailingAddressDifferent?"Yes":"No"}),"YES"===I.mailingAddressDifferent&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Street Address",value:I.mailingStreet??""}),(0,r.jsx)(O.ReadOnlyField,{label:"City",value:I.mailingCity??""}),(0,r.jsx)(O.ReadOnlyField,{label:"State",value:I.mailingState??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Zip Code",value:I.mailingZip??""})]}),(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser Type",value:(0,R.getDisplayLabel)(y.PURCHASER_TYPES,I.purchaserType)}),(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser's Email Address",value:I.purchaserEmail??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser's Telephone Number",value:I.purchaserPhone??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:I.purchaserAltPhone??""})]}),(0,r.jsxs)(w,{number:3,title:"Equipment Information",children:[(0,r.jsx)(O.ReadOnlyField,{label:"Select type of Equipment",value:"HEATING_SYSTEM_WITH_THERMOSTAT"===I.equipmentPath?"Heating System with Thermostat":"Heating System"}),(0,r.jsx)(O.ReadOnlyField,{label:"Heating System Type",value:(0,R.getDisplayLabel)(d.EQUIPMENT_TYPES,I.heatingSystemType)}),(0,r.jsx)(O.ReadOnlyField,{label:"AHRI Reference Number",value:I.ahriReferenceNumber??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Brand",value:(0,R.getDisplayLabel)((e=>{if(!m)return[];switch(e){case"015":return m.resBrands;case"018":return[...m.blrBrands,...m.comBlrBrands];case"256":return m.condensCondoBrands;case"257":return m.ngComboBlrBrands;case"278":return m.ngComboFurBrands;default:return[]}})(I.heatingSystemType??""),I.brand)}),(0,r.jsx)(O.ReadOnlyField,{label:"Model Number",value:I.modelNumber??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Serial Number",value:I.serialNumber??""}),(0,r.jsx)(O.ReadOnlyField,{label:"BTU/hr Input",value:I.btuInput??""}),(0,r.jsx)(O.ReadOnlyField,{label:"AFUE%",value:I.afue??"",highlight:!0}),(0,r.jsx)(O.ReadOnlyField,{label:"Date of Installation (MM/DD/YYYY)",value:(0,R.formatDateForDisplay)(I.installDate)}),(0,r.jsx)(E.RebateAmountField,{label:"Rebate Amount",amount:I.rebateAmount}),"HEATING_SYSTEM_WITH_THERMOSTAT"===I.equipmentPath&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Thermostat Brand",value:(0,R.getDisplayLabel)(m?.thermostatBrands??[],I.thermostatBrand)}),(0,r.jsx)(O.ReadOnlyField,{label:"Thermostat Model",value:I.thermostatModel??""}),(0,r.jsx)(E.RebateAmountField,{label:"Thermostat Rebate Amount",amount:I.thermostatRebateAmount}
15),(0,r.jsx)(E.RebateAmountField,{label:"Total Rebate Amount",amount:I.totalRebateAmount})]})]}),(0,r.jsxs)(w,{number:4,title:"Dealer Contact Information",children:[(0,r.jsx)(O.ReadOnlyField,{label:"Do you have a Dealer ID?",value:"yes"===I.dealerPath?"Yes":"no"===I.dealerPath?"No":""}),"yes"===I.dealerPath&&(0,r.jsx)(O.ReadOnlyField,{label:"Dealer ID (6-digit number)",value:I.dealerId??""}),"no"===I.dealerPath&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.ReadOnlyField,{label:"Company Name",value:I.dealerCompanyName??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Street Address",value:I.dealerStreet??""}),(0,r.jsx)(O.ReadOnlyField,{label:"City",value:I.dealerCity??""}),(0,r.jsx)(O.ReadOnlyField,{label:"State",value:I.dealerState??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Zip Code",value:I.dealerZip??""})]}),(0,r.jsx)(O.ReadOnlyField,{label:"Rebate Contact Name",value:I.rebateContactName??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Email Address",value:I.rebateContactEmail??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Verify Email Address",value:I.confirmEmail??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Dealer Telephone Number",value:I.workPhone??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Additional Information",value:I.additionalInfo??""})]}),(0,r.jsxs)(w,{number:5,title:"Signature & Submission",children:[(0,r.jsx)(O.ReadOnlyField,{label:"Dealer Electronic Signature",value:I.dealerSignature??""}),(0,r.jsx)(O.ReadOnlyField,{label:"Date",value:(0,R.formatDateForDisplay)(I.signatureDate)})]})]}),(0,r.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,r.jsx)(a.Controller,{control:h,name:"agreeAndSubmit",render:({field:e})=>(0,r.jsx)(x.Checkbox,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":g.agreeAndSubmit?b:void 0})}),g.agreeAndSubmit&&(0,r.jsx)("p",{id:b,className:"text-body-md text-[var(--color-red)]",role:"alert",children:(0,c.translateFormError)(N,g.agreeAndSubmit.message)}),i&&(0,r.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:i}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:s,disabled:o,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:o?(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Submitting):(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Submit)}),(0,r.jsx)("button",{type:"button",onClick:n,disabled:o,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_Modify)}),(0,r.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:o,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(N,u.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],95721),e.s(["ExternalIcon",0,({className:e})=>(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:(0,r.jsx)("path",{d:"M15 5L5 15M15 5H9M15 5V11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})],67018)},483,20106,56759,73106,94915,59253,7212,98698,e=>{"use strict";var r=e.i(91398),t=e.i(91788),a=e.i(58021),l=e.i(43725);e.i(70484);var n=e.i(45892);e.i(78118);var s=e.i(94102),o=e.i(84637),i=e.i(46203),d=e.i(37073),u=e.i(30392),c=e.i(25929);let m=d.LAUNDRY_BUILDING_TYPES.map(e=>({value:e.value,label:e.label})),h=d.LAUNDRY_INSTALLATION_TYPES.map(e=>({value:e.value,label:e.label}));e.s(["InstallationSection",0,function(){let e=(0,l.useI18n)(),d=e?.t??(e=>""),{control:p,formState:{errors:g}}=(0,a.useFormContext)(),[f,b]=(0,t.useState)(!1);return(0,r.jsx)(o.FormSection,{number:1,title:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{c
15ontrol:p,name:"streetAddress",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(d,g.streetAddress?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:p,name:"city",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(d,g.city?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"state",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:[{value:"MN",label:"MN"}],placeholder:"MN",errorMessage:(0,c.translateFormError)(d,g.state?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"zip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,placeholder:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Placeholder_Zi
15p),maxLength:10,errorMessage:(0,c.translateFormError)(d,g.zip?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"gasAccountNumber",render:({field:e})=>(0,r.jsx)(i.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,c.translateFormError)(d,g.gasAccountNumber?.message),customerVoice:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"buildingType",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_BuildingType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:m,placeholder:"--Select Building Type--",errorMessage:(0,c.translateFormError)(d,g.buildingType?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:p,name:"installationType",render:({field:e})=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("label",{htmlFor:"installationType-dropdown",className:"text-body-md font-semibold text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Label_InstallationType)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsx)("button",{type:"button",className:"text-sm text-[var(--color-primary-blue)] underline hover:no-underline",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onFocus:()=>b(!0),onBlur:()=>b(!1),"aria-describedby":"installation-type-tooltip",children:(0,u.getDictionaryValue)(d,u.DICTIONARY.F.Form_Helper_MoreInformation)}),f&&(0,r.jsx)("div",{id:"installation-type-tooltip",role:"tooltip",className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,r.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
15webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,r.jsx)(s.Dropdown,{id:"installationType-dropdown",label:"",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:h,placeholder:"--Select Installation Type--",errorMessage:(0,c.translateFormError)(d,g.installationType?.message)})]})})]})})}],483);var p=e.i(14601),g=e.i(30798);let f=d.LAUNDRY_PURCHASER_TYPES.map(e=>({value:e.value,label:e.label}));e.s(["PurchaserSection",0,function(){let e=(0,l.useI18n)(),t=e?.t??(e=>""),{control:i,watch:m,setValue:h,formState:{errors:b}}=(0,a.useFormContext)(),x=m("checkPayableTo"),v=m("hasAdditionalPurchaser"),y=m("isMailingAddressDifferent"),R=e=>{h("checkPayableTo",e),"company"===e?(h("firstName","",{shouldValidate:!1}),h("lastName","",{shouldValidate:!1}),h("hasAdditionalPurchaser",!1,{shouldValidate:!1}),h("secondaryFirstName","",{shouldValidate:!1}),h("secondaryLastName","",{shouldValidate:!1})):"purchaser"===e&&h("companyName","",{shouldValidate:!1})},N=e=>{h("isMailingAddressDifferent",e),"no"===e&&(h("mailingStreetAddress","",{shouldValidate:!1}),h("mailingCity","",{shouldValidate:!1}),h("mailingState","MN",{shouldValidate:!1}),h("mailingZip","",{shouldValidate:!1}))};return(0,r.jsx)(o.FormSection,{number:2,title:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsx)("legend",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_CheckPayableTo)}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(p.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"purchaser",checked:"purchaser"===x,onChange:()=>R("purchaser"),variant:"forms"}),(0,r.jsx)(p.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"company",checked:"company"===x,onChange:()=>R("company"),variant:"forms"})]})]}),"purchaser"===x&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:i,name:"firstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,b.firstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"lastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,b.lastName?.message),required:!0})})]}),(0,r.jsx)(a.Controller,{control:i,name:"hasAdditionalPurchaser",render:({field:e})=>(0,r.jsx)(g.Checkbox,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(h("secondaryFirstName","",{shouldValidate:!1}),h("secondaryLastName","",{shouldValidate:!1}))},variant:"forms"})}),v&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:i,name:"secondaryFirstName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,b.secondaryFirstName?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"secondaryLastName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,b.secondaryLastName?.message),required:!0})})]})]}
15),"company"===x&&(0,r.jsx)(a.Controller,{control:i,name:"companyName",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,c.translateFormError)(t,b.companyName?.message),required:!0})}),(0,r.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,r.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,r.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(p.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_Yes),name:"isMailingAddressDifferent",value:"yes",checked:"yes"===y,onChange:()=>N("yes"),variant:"forms"}),(0,r.jsx)(p.Radio,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Option_No),name:"isMailingAddressDifferent",value:"no",checked:"no"===y,onChange:()=>N("no"),variant:"forms"})]}),b.isMailingAddressDifferent&&(0,r.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,c.translateFormError)(t,b.isMailingAddressDifferent.message)})]}),"yes"===y&&(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:i,name:"mailingStreetAddress",render:({field:e})=>(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,c.translateFormError)(t,b.mailingStreetAddress?.message),required:!0})})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingCity",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(t,b.mailingCity?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingState",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:d.STATE_OPTIONS.map(e=>({value:e.value,label:e.label})),placeholder:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:(0,c.translateFormError)(t,b.mailingState?.message),required:!0})}),(0,r.jsx)(a.Controller,{control:i,name:"mailingZip",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,c.translateFormError)(t,b.mailingZip?.message),required:!0})})]}),(0,r.jsx)(a.Controller,{control:i,name:"purchaserType",render:({field:e})=>(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserType),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:f,placeholder:"--Select Purchaser Type--",errorMessage:(0,c.translateFormError)(t,b.purchaserType?.message),required:!0})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:i,name:"email",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,c.translateFormError)(t,b.email?.message)})}),(0,r.jsx)(a.Controller,{control:i,name:"phone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(t,b.phone?.message)})}),(0,r.jsx)(a.Controller,{control:i,name:"alternatePhone",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(t,u.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,c.translateFormError)(t,b.alternatePhone?.message)})})]})]})})}],20106);var b=e.i(94988),x=e.i(34346);function v(e,r=new Date){if(0===e.length)return 0;let t=e.filter(e=>"017"===e.typeCode);
15if(0===t.length)return 0;let a=function(e,r=new Date){let t=r.getFullYear(),a=e.map(e=>Number.parseInt(e.programYear,10)).filter(e=>Number.isFinite(e));if(0===a.length)return String(t);let l=a.filter(e=>e<=t);return String(Math.max(...l.length>0?l:a))}(t,r),l=t.find(e=>e.programYear===a);if(!l)return 0;let n=Number.parseFloat(l.custRebate);return Number.isFinite(n)?n:0}e.s(["findDryerRebateAmount",0,v],56759);var y=e.i(4625),R=e.i(59369);e.s(["EquipmentSection",0,function({onInvoiceChange:e,invoiceError:i}){let d=(0,l.useI18n)(),m=d?.t??(e=>""),{control:h,watch:p,setValue:g,formState:{errors:f}}=(0,a.useFormContext)(),N=p("brand"),E=p("modelNumber"),I=p("purchaseDate"),C=p("installDate"),[_,j]=(0,t.useState)([]),[S,D]=(0,t.useState)([]),[T,A]=(0,t.useState)([]),[F,O]=(0,t.useState)(!1),[w,L]=(0,t.useState)(null),[P,k]=(0,t.useState)(void 0),[M,V]=(0,t.useState)(""),[B,Y]=(0,t.useState)(!1),U=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(I&&C){let e=new Date(I);new Date(C)<e?k("Installation date cannot be before purchase date"):k(void 0)}else k(void 0)},[I,C]),(0,t.useEffect)(()=>{let e="dryer",r=(0,y.getCachedRebateData)(e);if(r&&r.brands?.length>0){j(r.brands.map(e=>({value:e.key,label:e.value}))),D(r.models??[]),A(r.rules??[]),O(!1);return}O(!0),L(null),fetch("/api/forms/rebate-data?equipmentType=dryer").then(e=>{if(!e.ok)throw Error("Failed to load data.");return e.json()}).then(r=>{"object"==typeof r&&null!==r&&"brands"in r&&Array.isArray(r.brands)?(j(r.brands.map(e=>({value:e.key,label:e.value}))),D(r.models??[]),A(r.rules??[]),(0,y.setCachedRebateData)(e,r)):L("Unable to load brands")}).catch(()=>{L("Unable to load brands")}).finally(()=>{O(!1)})},[]);let z=(0,t.useMemo)(()=>N?S.filter(e=>e.brand===N).map(e=>({value:e.equipModel,label:e.equipModel})):[],[S,N]),Z=(0,t.useMemo)(()=>{if(!z.length)return[];if(!M)return z.slice(0,50);let e=M.toLowerCase();return z.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[z,M]);(0,t.useEffect)(()=>{g("modelNumber","",{shouldValidate:!1}),V(""),Y(!1)},[N,g]),(0,t.useEffect)(()=>{let e=e=>{U.current&&!U.current.contains(e.target)&&Y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let q=(0,t.useRef)(!1),H=(0,t.useCallback)(e=>{g("modelNumber",e.value,{shouldValidate:!1}),V(e.label||e.value),Y(!1),setTimeout(()=>{q.current=!1},150)},[g]),$=(0,t.useMemo)(()=>E&&S.length>0&&S.some(e=>e.equipModel.toLowerCase()===E.toLowerCase())?v(T):0,[E,S,T]);return(0,r.jsx)(o.FormSection,{number:3,title:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:h,name:"purchaseDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_PurchaseDate),value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,c.translateFormError)(m,f.purchaseDate?.message),required:!0})}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("p",{className:"text-body-md font-medium text-[var(--color-text-primary)]",children:"Select type of Equipment *"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"radio",id:"equipment-dryer",checked:!0,readOnly:!0,className:"h-4 w-4 accent-[var(--color-primary-blue)]"}),(0,r.jsx)("label",{htmlFor:"equipment-dryer",className:"text-body-md text-[var(--color-text-primary)]",children:"Gas Dryer"})]})]}),(0,r.jsx)(a.Controller,{control:h,name:"brand",render:({field:e})=>(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(s.Dropdown,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_Brand),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:_,placeholder:F?(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Placeholder_LoadingBrands):(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Placeholder_SelectGasDryerBrand),errorMessage:(0,c.translateFormError)(m,f.brand?.message)??w??void 0,disabled:0===_.length||F,required:!0}),(0,r.jsxs)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:["Note: For rebate to apply, the new gas dryer must be listed on the"," ",(0,r.jsx)("button",{type:"button",onClick:()=>(0,y.openPopup)("https://www.energystar.gov/productfinder/product/certified-clothes-dryers/results"),className:"text-[var(--color-primary-blue)] underline hover:no-underline","aria-label":"Link to see if gas dryer is listed in ENERGY STAR website",children:"ENERGY STAR"})," ","website"]})]})}),(0,r.jsxs)("div",{ref:U,className:"relative",children:[(0,r.jsx)(a.Controller,{c
15ontrol:h,name:"modelNumber",render:({field:e})=>{let t=B&&Z.length>0&&N&&M.length>=3;return(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_ModelNumber),value:N?M:e.value??"",onChange:r=>{N?(V(r),e.onChange(r),Y(r.length>=3)):e.onChange(r)},onBlur:()=>{if(e.onBlur(),q.current)return;let r=e.value;r&&(S.length>0&&S.some(e=>e.equipModel.toLowerCase()===r.toLowerCase())||(V(""),e.onChange("")))},placeholder:"",errorMessage:t?void 0:(0,c.translateFormError)(m,f.modelNumber?.message),required:!0})}}),B&&Z.length>0&&N&&M.length>=3&&(0,r.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:Z.map(e=>(0,r.jsx)("button",{type:"button",onMouseDown:()=>{q.current=!0},onClick:()=>H(e),className:(0,R.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:(0,r.jsx)("div",{className:"font-medium",children:e.label||e.value})},e.value))})]}),(0,r.jsx)(a.Controller,{control:h,name:"serialNumber",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_SerialNumber),value:e.value,onChange:r=>e.onChange(r.toUpperCase()),onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(m,f.serialNumber?.message),required:!0})}),(0,r.jsx)(b.RebateAmountField,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_RebateAmount),amount:$}),(0,r.jsx)(a.Controller,{control:h,name:"installDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Label_DateOfInstallation),value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:P??(0,c.translateFormError)(m,f.installDate?.message),required:!0})})]}),e&&(0,r.jsx)(x.FileUpload,{label:"Attach Retailer Receipt/Invoice (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:e,accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:i,required:!0})]})})}],73106);var N=e.i(47657);let E="__SELECT_RETAILER__",I="__SELECT_STORE__",C=new Set(["Other","Online Retailer"]);function _({sectionNumber:e,retailerOptions:a,equipmentType:l,retailerName:i,onRetailerNameChange:d,otherRetailerName:u,onOtherRetailerNameChange:c,storeLocation:m,onStoreLocationChange:h,otherStoreName:p,onOtherStoreNameChange:g,installerName:f,onInstallerNameChange:b,installerPhone:x,onInstallerPhoneChange:v,additionalInfo:R,onAdditionalInfoChange:j,installerPhoneRequired:S=!1,errors:D={},children:T,onRetailerNameBlur:A,onRetailerNameFocus:F,onOtherRetailerNameBlur:O,onOtherRetailerNameFocus:w,onStoreLocationBlur:L,onStoreLocationFocus:P,onOtherStoreNameBlur:k,onOtherStoreNameFocus:M,onInstallerNameBlur:V,onInstallerNameFocus:B,onInstallerPhoneBlur:Y,onInstallerPhoneFocus:U,onAdditionalInfoBlur:z,onAdditionalInfoFocus:Z}){let[q,H]=(0,t.useState)([]),[$,G]=(0,t.useState)(!1),[Q,W]=(0,t.useState)(null),K=[{value:E,label:"--Select Retailer Name--"},...a],J=C.has(i);(0,t.useEffect)(()=>{let e=!1,r=`store-locations-${l}`,t=(0,y.getCachedRebateData)(r);if(t&&t.length>0){H(t),G(!1);return}return G(!0),W(null),fetch(`/api/forms/rebate-data?equipmentType=${encodeURIComponent(l)}`).then(async e=>{if(!e.ok)throw Error("Failed to load store locations.");let r=await e.json();if("object"!=typeof r||null===r||!("storeLocations"in r)||!Array.isArray(r.storeLocations))throw Error("Unexpected response format.");return r}).then(t=>{e||(H(t.storeLocations),(0,y.setCachedRebateData)(r,t.storeLocations),G(!1))}).catch(r=>{e||(W(r instanceof Error?r.message:"Failed to load store locations."),G(!1))}),()=>{e=!0}},[l]);let X=[{value:I,label:"--Select Store Location--"},...q];return(0,r.jsx)(o.FormSection,{number:e,title:"Retailer and Installer Information",children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(s.Dropdown,{label:"Retailer Name",value:i,onChange:e=>{d(e),C.has(e)||c("")}
15,onBlur:A,onFocus:F,options:K,required:!0,errorMessage:D.retailerName}),J&&(0,r.jsx)(n.InputField,{label:"Retailer Name",value:u,onChange:c,onBlur:O,onFocus:w,placeholder:"Enter retailer name",maxLength:100,required:!0,errorMessage:D.otherRetailerName}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.Dropdown,{label:"Store Location",value:m,onChange:e=>{h(e),g("")},onBlur:L,onFocus:P,options:X,placeholder:$?"Loading locationsâ¦":void 0,disabled:$,required:!0,errorMessage:D.storeLocation}),null!==Q&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-body-md text-[var(--color-red)]",role:"alert",children:[(0,r.jsx)(N.CircleInfoIcon,{className:"h-[14px] w-[14px] shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:Q})]})]}),"Other"===m&&(0,r.jsx)(n.InputField,{label:"Store Location",value:p,onChange:g,onBlur:k,onFocus:M,placeholder:"Enter store name",maxLength:100,required:!0,errorMessage:D.otherStoreName}),(0,r.jsx)(n.InputField,{label:"Installer Name",value:f,onChange:b,onBlur:V,onFocus:B,maxLength:30,optional:!0,errorMessage:D.installerName}),(0,r.jsx)(n.InputField,{label:"Installer Telephone Number",value:x,onChange:v,onBlur:Y,onFocus:U,type:"tel",maxLength:30,required:S,errorMessage:D.installerPhone}),(0,r.jsx)(n.InputField,{label:"Additional Information",value:R,onChange:j,onBlur:z,onFocus:Z,placeholder:"Any additional details you'd like to provide",maxLength:500,multiline:!0,rows:4,optional:!0}),T]})})}e.s(["RETAILER_PLACEHOLDER_VALUE",0,E,"RetailerSection",0,_,"STORE_PLACEHOLDER_VALUE",0,I],94915);var j=e.i(31444);e.s(["RetailerSectionConnected",0,function(){let{watch:e,setValue:n,formState:{errors:s}}=(0,a.useFormContext)(),o=(0,l.useI18n)(),i=o?.t??(e=>""),{data:u}=(0,j.useCIPDropdownData)("LAUNDRY","MN"),m=(0,t.useMemo)(()=>u?.RETAILER_NM??[],[u?.RETAILER_NM]),h=(0,t.useMemo)(()=>m.length>0?m.map(e=>({value:e.value,label:e.value})):d.LAUNDRY_RETAILERS,[m]),p=(0,t.useMemo)(()=>{let e=new Map;for(let r of m)e.set(r.value,r.label);return e},[m]),g=e("retailerName")??"",f=e("otherRetailerName")??"",b=e("storeLocation")??"",x=e("otherStoreName")??"",v=e("installerName")??"",y=e("installerPhone")??"",R=e("additionalInfo")??"";return(0,r.jsx)(_,{sectionNumber:4,retailerOptions:h,equipmentType:"dryer",retailerName:g,onRetailerNameChange:e=>{n("retailerName",e,{shouldValidate:!1}),n("retailerDealerId",p.get(e)??"",{shouldValidate:!1})},otherRetailerName:f,onOtherRetailerNameChange:e=>n("otherRetailerName",e,{shouldValidate:!1}),storeLocation:b,onStoreLocationChange:e=>n("storeLocation",e,{shouldValidate:!1}),otherStoreName:x,onOtherStoreNameChange:e=>n("otherStoreName",e,{shouldValidate:!1}),installerName:v,onInstallerNameChange:e=>n("installerName",e,{shouldValidate:!0}),installerPhone:y,onInstallerPhoneChange:e=>n("installerPhone",e,{shouldValidate:!0}),additionalInfo:R,onAdditionalInfoChange:e=>n("additionalInfo",e,{shouldValidate:!1}),errors:{retailerName:(0,c.translateFormError)(i,s.retailerName?.message),otherRetailerName:(0,c.translateFormError)(i,s.otherRetailerName?.message),storeLocation:(0,c.translateFormError)(i,s.storeLocation?.message),otherStoreName:(0,c.translateFormError)(i,s.otherStoreName?.message),installerName:(0,c.translateFormError)(i,s.installerName?.message),installerPhone:(0,c.translateFormError)(i,s.installerPhone?.message)}})}],59253),e.s(["SignatureSection",0,function({onPreview:e,onReset:s,termsUrl:i}){let d=(0,l.useI18n)(),m=d?.t??(e=>""),{control:h,formState:{errors:p,isSubmitting:f}}=(0,a.useFormContext)(),b=(0,t.useId)();return(0,r.jsx)(o.FormSection,{number:5,title:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Section_Signature),children:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)(a.Controller,{control:h,name:"purchaserSignature",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Purchaser Electronic Signature",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,c.translateFormError)(m,p.purchaserSignature?.message),required:!0})}
15),(0,r.jsx)(a.Controller,{control:h,name:"signatureDate",render:({field:e})=>(0,r.jsx)(n.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,r.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,r.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:"By typing my digital signature above and clicking the 'I agree' box, I represent as follows:"}),(0,r.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,r.jsx)("li",{children:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,r.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,r.jsxs)("li",{children:[(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Agreement_ReadAgree)," ",i?(0,r.jsx)("button",{type:"button",onClick:()=>{i&&window.open(i,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,r.jsx)("span",{children:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}),(0,r.jsx)(a.Controller,{control:h,name:"agreementChecked",render:({field:e})=>(0,r.jsx)(g.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":p.agreementChecked?b:void 0})}),p.agreementChecked&&(0,r.jsx)("p",{id:b,className:"mt-1 text-body-sm text-[var(--color-red)]",role:"alert",children:(0,c.translateFormError)(m,p.agreementChecked.message)})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:e,disabled:f,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50 submit-button",children:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Button_Preview)}),(0,r.jsx)("button",{type:"button",onClick:s,disabled:f,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(m,u.DICTIONARY.F.Form_Button_Reset)})]})]})})}],7212);var S=e.i(26019),D=e.i(32548),T=e.i(50547);let A=e=>{if(!e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let[r,t,a]=e.split("-");return`${t}/${a}/${r}`};function F({number:e,title:t,children:a}){return(0,r.jsxs)("section",{className:"w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,r.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,r.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:t})]}),(0,r.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:a})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:a,onConfirm:n,isSubmitting:s,submitError:o,values:i}){let c,m=(0,t.useRef)(null),h=(0,l.useI18n)(),p=h?.t??(e=>"");return((0,t.useEffect)(()=>{if(!e)return;let r=m.current;if(!r)return;let t=r.querySelector(".rebate-preview-printable");t&&t.scrollTo(0,0);let l=r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=l[0],s=l[l.length-1];n?.focus();let o=e=>{"Escape"===e.key?a():"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),s?.focus()):document.activeElement===s&&(e.preventDefault(),n?.focus()))};return r.addEventListener("keydown",o),()=>r.removeEventListener("keydown",o)},[e,a]),e)?(0,r.jsx)("div",{ref:m,className:"rebate-preview-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"laundry-preview-modal-title",children:(0,r.jsxs)("div",{className:"rebate-preview-printable max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl",children:[(0,r.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,r.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleStr
15ing("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,r.jsx)("h2",{id:"laundry-preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Laundry Rebate Form - Review Your Application"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)(F,{number:1,title:"Installation Information",children:[(0,r.jsx)(D.ReadOnlyField,{label:"Street Address",value:i.streetAddress??""}),(0,r.jsx)(D.ReadOnlyField,{label:"City",value:i.city??""}),(0,r.jsx)(D.ReadOnlyField,{label:"State",value:i.state??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Zip Code",value:i.zip??""}),(0,r.jsx)(D.ReadOnlyField,{label:T.GAS_ACCOUNT_NUMBER_LABEL_CUSTOMER,value:i.gasAccountNumber??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Type of Building",value:(0,y.getDisplayLabel)(d.LAUNDRY_BUILDING_TYPES,i.buildingType)}),(0,r.jsx)(D.ReadOnlyField,{label:"Type of Installation",value:(0,y.getDisplayLabel)(d.LAUNDRY_INSTALLATION_TYPES,i.installationType)})]}),(0,r.jsxs)(F,{number:2,title:"Purchaser Information",children:[(0,r.jsx)(D.ReadOnlyField,{label:"Check payable to",value:"company"===i.checkPayableTo?"Company":"Purchaser"}),"purchaser"===i.checkPayableTo?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser First Name",value:i.firstName??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser Last Name",value:i.lastName??""}),i.hasAdditionalPurchaser&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D.ReadOnlyField,{label:"Secondary Purchaser First Name",value:i.secondaryFirstName??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:i.secondaryLastName??""})]})]}):(0,r.jsx)(D.ReadOnlyField,{label:"Company Name",value:i.companyName??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Is Rebate Mailing Address different from Installation Address?",value:"yes"===i.isMailingAddressDifferent?"Yes":"No"}),"yes"===i.isMailingAddressDifferent&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D.ReadOnlyField,{label:"Street Address",value:i.mailingStreetAddress??""}),(0,r.jsx)(D.ReadOnlyField,{label:"City",value:i.mailingCity??""}),(0,r.jsx)(D.ReadOnlyField,{label:"State",value:(0,y.getDisplayLabel)(d.STATE_OPTIONS,i.mailingState??"")}),(0,r.jsx)(D.ReadOnlyField,{label:"Zip Code",value:i.mailingZip??""})]}),(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser Type",value:(0,y.getDisplayLabel)(d.LAUNDRY_PURCHASER_TYPES,i.purchaserType)}),(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser's Email Address",value:i.email??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser's Telephone Number",value:i.phone??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:i.alternatePhone??""})]}),(0,r.jsxs)(F,{number:3,title:"Equipment Information",children:[(0,r.jsx)(D.ReadOnlyField,{label:"Purchase Date",value:A(i.purchaseDate??"")}),(0,r.jsx)(D.ReadOnlyField,{label:"Select type of Equipment",value:"Gas Dryer"}),(0,r.jsx)(D.ReadOnlyField,{label:"Brand",value:(0,y.getDisplayLabel)((c=(0,y.getCachedRebateData)("dryer"),c?.brands?c.brands.map(e=>({value:e.key,label:e.value})):[]),i.brand)}),(0,r.jsx)(D.ReadOnlyField,{label:"Model Number",value:i.modelNumber??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Serial Number",value:i.serialNumber??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Date of Installation",value:A(i.installDate??"")})]}),(0,r.jsxs)(F,{number:4,title:"Retailer and Installer Information",children:[(0,r.jsx)(D.ReadOnlyField,{label:"Retailer Name",value:i.otherRetailerName||(0,y.getDisplayLabel)(d.LAUNDRY_RETAILERS,i.retailerName??"")}),(0,r.jsx)(D.ReadOnlyField,{label:"Store Location",value:i.otherStoreName||i.storeLocation||""}),(0,r.jsx)(D.ReadOnlyField,{label:"Installer Name",value:i.installerName??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Installer Telephone Number",value:i.installerPhone??""}),(0,r.jsx)("div",{className:"sm:col-span-2",children:(0,r.jsx)(D.ReadOnlyField,{label:"Additional Information",value:i.additionalInfo??""})})]}),(0,r.jsxs)(F,{number:5,title:"Signature",children:[(0,r.jsx)(D.ReadOnlyField,{label:"Purchaser Electronic Signature",value:i.purchaserSignature??""}),(0,r.jsx)(D.ReadOnlyField,{label:"Date",value:A(i.signatureDate??"")})]})]}),o&&(0,r.jsx)("div",{className:"rebate-preview-no-print mt-6 rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-4 text-body-md text-[var(--color-red)]",role:"alert",children:o}),(0,r.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-wrap gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:n,disabled:s,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focu
15s:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:s?(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Button_Submitting):(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Button_Submit)}),(0,r.jsx)("button",{type:"button",onClick:a,disabled:s,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Button_Modify)}),(0,r.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:s,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(p,u.DICTIONARY.F.Form_Button_PrintPreview)})]})]})}):null}],98698)},92068,e=>{"use strict";let r=e=>{if(!e)return!0;let r=e.trim().toLowerCase();if(""===r||"undefined"===r)return!0;let t=r.split(/\s*-\s*/)[0].trim();return/\b0*1[-/.]0*1[-/.]0*1(?!\d)/.test(r)||/,\s*0*1\s*$/.test(t)},t=["january","february","march","april","may","june","july","august","september","october","november","december"],a=/^([a-z]+)\s+(\d{1,2}),\s*(\d{4})\s*-\s*(\d{1,2}):(\d{2})\s*(am|pm)$/i,l=e=>{if(r(e))return null;let l=a.exec(e.trim());if(!l)return null;let[,n,s,o,i,d,u]=l,c=t.indexOf(n.toLowerCase());if(-1===c)return null;let m=Number(s),h=Number(o),p=Number(d),g=Number(i);if(g<1||g>12||p>59||m<1||m>31||h<100)return null;"am"===u.toLowerCase()?12===g&&(g=0):12!==g&&(g+=12);let f=new Date(Date.UTC(h,c,m,g,p));return isNaN(f.getTime())||f.getUTCMonth()!==c||f.getUTCDate()!==m?null:f};e.s(["isPlaceholderReleaseDate",0,r,"parseIndexedReleaseDateTime",0,l,"toLocalReleaseDateTime",0,(e,r)=>{let t=l(e);if(!t)return null;try{return{date:t.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:r}),time:t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:r})}}catch{return null}}])},68841,e=>{"use strict";var r=e.i(91398),t=e.i(91788);let a=` 16<ol class="terms-list"> 17 <li> 18 <strong><u>Participant's representations:</u></strong> The Participant represents that: (a) Participant 19 owns or rents and resides in the residential dwelling identified above and that the dwelling is located in 20 CenterPoint Energy's electric service territory; (b) the dwelling has a fully operational central cooling system in 21 good working condition; (c) Wi-Fi internet connectivity is present in the dwelling and Participant will 22 have either a mobile device, tablet or PC available to register the smart thermostat during installation; 23 (d) Participant currently participates in CenterPoint Energy's Summer Cycler Programs; and (e) Participant has not 24 previously received a rebate from CenterPoint Energy for a smart enabled thermostat. 25 </li> 26 27 <li> 28 <strong><u>Access to Participant's Residential Dwelling:</u></strong> The Participant will provide access to the residential dwelling for the Installer to install a smart enabled thermostat for each air conditioning unit at the dwelling, up to a maximum of two thermostats per home. The installation will include ensuring that the thermostat is connected to Participant's Wi-Fi internet service. The Installer will remove up to two existing thermostats and replace them with a smart enabled thermostat. The Installer will properly dispose of thermostats containing a mercury switch. Participant agrees that the CenterPoint Energy and Installer are not responsible for aesthetic issues (e.g. unpainted areas, holes, etc.) caused by removal of the existing thermostat and installation of the new thermostat. Once the installation is complete, Participant will assume ownership of the new smart enabled thermostat and will be solely responsible for all operation and maintenance thereafter, including subsequent removal of the smart enable thermostat. <strong>Upon installation, the thermostat will be enrolled in Smart Thermostat 29 Rewards program and will remain in the program for a minimum of 3 years.</strong> Participant may be 30 subject to additional fees for early termination. Participant is not eligible to re
30ceive a rebate for the 31 smart enabled thermostat(s) installed for this program. 32 </li> 33 34 <li> 35 <strong><u>Participant's Acknowledgements:</u></strong> I acknowledge that: 36 <p>(a) my participation in the Smart Cycle Rewards program is voluntary.</p> 37 <p>(b) I am eligible to receive a smart enabled thermostat for each air conditioning unit at my dwelling, up to a maximum of two (2) thermostats.</p> 38 <p>(c) CenterPoint Energy shall have the right, at its sole discretion, but subject to the terms and conditions set forth herein, to conduct Cycling Events as necessary to reduce electric demand.</p> 39 <p>(d) I shall participate in surveys related to the Smart Cycle Rewards program that will assist CenterPoint Energy in evaluating the effectiveness of the program.</p> 40 <p>(e) CenterPoint Energy does not guarantee that the energy efficiency measures installed or services provided through this program will result in either energy or cost savings.</p> 41 <p>(f) Not all HVAC systems are compatible with smart thermostats; therefore, CenterPoint Energy does not guarantee installation of the smart enabled thermostat in a customer's home.</p> 42 <p>(g) Issues related to the installation of the thermostat should be directed to the installer within 48 hours of installation.</p> 43 <p>(h) Technical questions/issues related to the smart thermostat should be directed to smart thermostat manufacturer and questions related to the Smart Cycle program should be directed to CenterPoint Energy's Customer Service at 1-800-227-1376. If you have questions related to your HVAC system, direct those to your contractor. CenterPoint Energy is not responsible for the condition or performance of your HVAC system.</p> 44 <p>(i) CenterPoint Energy has my permission to share my energy usage and billing data collected during the data collection period with third parties who have a need to know the information, especially third parties who evaluate the effectiveness of the program.</p> 45 </li> 46 47 <li> 48 <strong><u>Release and Hold Harmless:</u></strong> I agree to release and hold CenterPoint Energy, its officers, directors, employees and agents, harmless from any and all claims, losses, damages, liabilities and costs, including reasonable attorneys' fees, arising from or related to this agreement and/or my participation in the Wi-Fi Thermostat Rewards Program, except to the extent of CenterPoint Energy's gross negligence. 49 </li> 50 51 <li> 52 <strong><u>Limitation of Liability:</u></strong> In no event shall either Party be liable to the other for any indirect, incidental, special, or consequential damages, whether in an action of contract or tort, including negligence and strict liability, even if advised of the possibility of such damages and neither party's cumulative liability shall exceed the bill credit amount for two months for participating in the Smart Cycle events. 53 </li> 54</ol> 55`;e.s(["TermsModal",0,function({isOpen:e,onClose:l,content:n}){let s=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let r=s.current;r&&(e?r.open||r.showModal():r.open&&r.close())},[e]),(0,r.jsx)("dialog",{ref:s,onCancel:e=>{e.preventDefault(),l()},className:"m-auto max-h-[90vh] w-full max-w-3xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"terms-modal-title",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{id:"terms-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Terms and conditions"}),(0,r.jsx)("div",{className:"terms-content max-w-none text-[var(--color-text-primary)] [&_.terms-list]:list-decimal [&_.terms-list]:space-y-4 [&_.terms-list]:pl-6 [&_.terms-list_li]:pl-2 [&_.terms-list_p]:mt-2 [&_.terms-list_p]:ml-0 [&_strong]:font-semibold [&_u]:underline",dangerouslySetInnerHTML:{__html:n||a}}),(0,r.jsx)("div",{className:"mt-8 flex justify-center",children:(0,r.jsx)("button",{type:"button",onClick:l,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focu
55s:ring-offset-2",children:"Close"})})]})})}])},67705,e=>{"use strict";var r=e.i(91398),t=e.i(6139),a=e.i(59369),l=e.i(97844);e.s(["RichTextWrapper",0,({field:e,className:n,isEditing:s=!1})=>{if(!(e?.value&&""!==e.value.trim())&&!s)return null;let o=!s&&e?.value?{...e,value:(0,l.injectTableDataLabels)(e.value)}:e;return(0,r.jsx)("div",{className:(0,a.cn)("rich-text w-full",n),children:(0,r.jsx)("div",{className:"component-content",children:(0,r.jsx)(t.RichText,{field:o})})})}])},53372,e=>{"use strict";var r=e.i(91398),t=e.i(5035),a=e.i(28562),l=e.i(4392),n=e.i(7337),s=e.i(30305);let o=e=>{let{page:l}=(0,a.useSitecore)(),o=l?.mode?.isEditing??!1,{region:i}=(0,s.useRegion)(),{fields:d}=e,u=d?.Link,c=d?.Regions||[];if(!(0,n.shouldDisplayByRegion)(o,i,c))return null;let m=u?.value?.href,h=u?.value?.text||u?.value?.title;return o||m?(0,r.jsx)(t.Link,{field:u,className:"rounded-[8px] py-[4px] text-md font-medium leading-[1.5] text-primary-blue no-underline transition-colors hover:text-primary-blue-hover hover:underline focus-visible:border-2 focus-visible:border-primary-blue-hover focus-visible:text-primary-blue-hover focus-visible:underline focus-visible:outline-none active:text-primary-blue-active active:underline",children:h||m||(o?"[No link text - click to edit]":"")}):null},i=(0,l.withDatasourceCheck)()(o);e.s(["Default",0,o,"default",0,i])},15069,e=>{"use strict";var r=e.i(88986);let t="<svg viewBox='0 0 556 1440' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='1'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(-26.142 44.851 -31.732 -67.538 442.92 394.99)'><stop stop-color='rgba(255,255,255,1)' offset='0'/><stop stop-color='rgba(255,255,255,0)' offset='1'/></radialGradient></defs></svg>",a={medium:["linear-gradient(180deg, var(--Color-Darkest-Blue, #1A4570) 13.94%, rgba(20, 103, 118, 0.50) 82.69%, rgba(20, 103, 118, 0.70) 100%)","linear-gradient(180deg, rgba(26, 69, 112, 0.70) 0%, rgba(20, 103, 118, 0.00) 42.1%)"],light:["linear-gradient(180deg, rgba(26, 69, 112, 0.70) 0%, rgba(20, 103, 118, 0.00) 42.1%)","linear-gradient(0deg, rgba(26, 69, 112, 0.70) -33.82%, rgba(20, 103, 118, 0.00) 27.68%)"]},l=e=>e.toLowerCase().includes("medium"),n=e=>e.toLowerCase().includes("medium")?"medium":"light",s=e=>a[n(e)],o=e=>s(e);e.s(["GRADIENTS_BY_THEME",0,a,"LINEAR_GRADIENTS_BY_THEME",0,a,"RADIAL_GRADIENT_SVG",0,t,"buildBackgroundImage",0,(e,t,a)=>{let l=o(e),n=t&&a?(0,r.buildTransformationUrl)(t,a):t||"";return[...l,`url('${n}')`].join(",\n")},"getGradientsByTheme",0,o,"getLinearGradientsByTheme",0,s,"getRadialGradientSvgUrl",0,e=>`url("data:image/svg+xml;utf8,${t}")`,"getTextColorClass",0,(e,r)=>"Light"===r?" text-white":"Dark"===r?" text-dark-grey":l(e)?" text-white":"","getThemeClassName",0,e=>{let r=n(e);return`theme-${r}`},"getThemeType",0,n,"isMediumTheme",0,l])},65018,e=>{"use strict";var r=e.i(91398),t=e.i(88986);e.s(["LandingHeroImage",0,({src:e,alt:a="",transformations:l,linearGradients:n=[],radialGradientUrl:s,gradients:o=[],className:i=""})=>{let d=(0,t.buildTransformationUrl)(e,l.desktop),u=(0,t.buildTransformationUrl)(e,l.mobile),c=n.length>0?n:o,m=c.length>0?{background:c.join(", ")}:void 0;return(0,r.jsxs)("div",{className:`relative overflow-hidden ${i}`,children:[(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{media:"(min-width: 1024px)",srcSet:d}),(0,r.jsx)("img",{src:u,alt:a,fetchPriority:"high",loading:"eager",decoding:"async",className:"w-full h-full object-cover object-center"})]}),s&&(0,r.jsx)("div",{className:"absolute inset-0 z-[1] pointer-events-none flex items-center justify-center overflow-hidden","aria-hidden":"true",children:(0,r.jsx)("div",{className:"-rotate-90 w-[550px] lg:w-[1000px] h-[1920px] flex-none",style:{backgroundImage:s,backgroundSize:"100% 100%"}})}),m&&(0,r.jsx)("div",{className:"absolute inset-0 z-[1] pointer-events-none",style:m,"aria-hidden":"true"})]})}])},98077,60269,99658,93327,29137,18633,62813,3661,38760,25244,83580,e=>{"use strict";let r=`query AutomatedCardContainerQuery { 56 search( 57 where: { 58 AND: [ 59 { name: "_templates", value: "{28CA2034-9F18-46AB-9D71-9662EEEFFD34}", operator: CONTAINS } 60 ##CATEGORY_CONDITIONS## 61 ##CURRENT_PAGE_EXCLUSION## 62 ] 63 } 64 orderBy: { name: "ReleaseDate", direction: DESC } 65 first: 3 66 ) { 67 results { 68 id 69 url {
70 path 71 } 72 pageTitle: field(name: "Title") { 73 jsonValue 74 } 75 shortDescription: field(name: "ShortDescription") { 76 jsonValue 77 } 78 thumbnail: field(name: "CardThumbnail") { 79 jsonValue 80 } 81 cardShortDescription: field(name: "CardShortDescription") { 82 jsonValue 83 } 84 readTime: field(name: "ReadTime") { 85 jsonValue 86 } 87 author: field(name: "Author") { 88 jsonValue 89 } 90 categories : field(name: "Categories") { 91 jsonValue 92 } 93 topic: field(name: "Topic") { 94 jsonValue 95 } 96 releaseDate: field(name: "ReleaseDate") { 97 jsonValue 98 } 99 availableRegions: field(name: "AvailableRegions") { 100 jsonValue 101 } 102 } 103 } 104} 105`,t=`query GetItemAncestors($itemId: String!, $language: String!) { 106 item(path: $itemId, language: $language) { 107 id 108 name 109 path 110 ancestors(hasLayout: true) { 111 id 112 name 113 path 114 url { 115 path 116 } 117 ... on Item { 118 title: field(name: "Title") { 119 jsonValue 120 } 121 navigationTitle: field(name: "NavigationTitle") { 122 jsonValue 123 } 124 } 125 } 126 } 127} 128`,a=`query CardReleaseQuery { 129 search( 130 where: { 131 AND: [ 132 { OR: [ 133 { name: "_templates", value: "{28CA2034-9F18-46AB-9D71-9662EEEFFD34}", operator: CONTAINS } 134 { name: "_templates", value: "{89664D5B-9120-47B1-89B7-C85BAB914486}", operator: CONTAINS } 135 ] } 136 ##CATEGORY_CONDITIONS## 137 ##CURRENT_PAGE_EXCLUSION## 138 ] 139 } 140 orderBy: { name: "ReleaseDate", direction: DESC } 141 first: ##LIMIT## 142 ) { 143 results { 144 id 145 url { 146 path 147 } 148 pageTitle: field(name: "Title") { 149 jsonValue 150 } 151 CardShortDescription: field(name: "CardShortDescription") { 152 jsonValue 153 } 154 releaseDate: field(name: "ReleaseDate") { 155 jsonValue 156 } 157 releaseTime: field(name: "ReleaseTime") { 158 jsonValue 159 } 160 } 161 } 162} 163`,l=`query FallbackImageQuery { 164 item(path: "/sitecore/content/CenterPoint/Shared/Settings/Fallback Image", language: "##LANGUAGE##") { 165 image: field(name: "Image") { 166 jsonValue 167 } 168 } 169} 170`,n=`query RegionsQuery { 171 search( 172 where: { 173 AND: [ 174 { name: "_templates", value: "{1A6136C6-E6EB-4440-9DF9-047746385E13}", operator: CONTAINS } 175 { name: "_path", value: "{440982C9-B9A7-48CA-88E3-67D15F0E867C}", operator: CONTAINS } 176 ] 177 } 178 first: 100 179 ) { 180 results { 181 id 182 name 183 cookieName: field(name: "CookieName") { 184 value 185 } 186 } 187 } 188}`,s=`query SiteRootItemQuery { 189 item(path: "/sitecore/content/CenterPoint/##SITE_NAME##", language: "##LANGUAGE##") { 190 id 191 } 192} 193`;e.s(["AutomatedCardContainerQuery",0,r,"BreadcrumbAncestorsQuery",0,t,"CardReleaseQuery",0,a,"FallbackImageQuery",0,l,"RegionsQuery",0,n,"SiteRootItemQuery",0,s],98077),e.s(["BRANCH_TEMPLATE_EXCLUSION",0,', { name: "_name", value: "$name", operator: NEQ }'],60269);var o=e.i(91398),i=e.i(59369),d=e.i(91592),u=e.i(78652),c=e.i(45886);let m="w-full h-full object-cover",h="text-h6 text-(--color-primary-blue) m-0 w-full min-w-full",p="m-0 relative shrink-0";e.s(["BioCard",0,({image:e,imageSrc:r,transformations:t,imageAlt:a="",name:l,title1:n,title2:s,committee1:g,committee2:f,href:b,target:x="_self",headingTag:v="h3",onClick:y,className:R="",isEditing:N})=>{let E=(0,i.cn)("simple-card flex flex-col items-start bg-white rounded-image border border-solid border-(--color-grey-3) w-full h-full max-w-[432px] max-md:max-w-[326px] max-sm:max-w-full min-[1900px]:max-w-none transition-[border-width,box-shadow] duration-200 ease-in-out overflow-hidden focus-visible:outline-2 focus-visible:outline-(--color-dark-blue) focus-visible:outline-offset-2 no-underline",b&&"cursor-pointer hover:border-2 hover:border-(--color-grey-3) hover:shadow-hero-card active:border-2","motion-reduce:transition-none","contrast-more:border-[2px] contrast-more:border-current","contrast-more:focus-visible:outline-[3px]",R),I=r||e||N,C="string"==typeof l?l:l?.value?String(l.value):"View profile",_="string"==typeof l?l:l?.value,j="string"==typeof n?n:n?.value,S="string"==typeof s?s:s?.value,D="str
193ing"==typeof g?g:g?.value,T="string"==typeof f?f:f?.value,A=(0,o.jsxs)(o.Fragment,{children:[I&&(0,o.jsx)("div",{className:"relative w-full aspect-square overflow-hidden rounded-t-image flex-shrink-0",children:N?(0,o.jsx)(u.NextImage,{className:m,field:e}):r&&t&&(0,o.jsx)(c.CHImage,{src:r,alt:"string"==typeof e?.value?.alt?e.value.alt:a,transformations:t,className:m,loading:"lazy"})}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 px-6 py-9 w-full",children:[N?"string"==typeof l?_&&(0,o.jsx)("h3",{className:h,children:_}):(0,o.jsx)(d.Text,{field:l,tag:v,className:h}):_&&(0,o.jsx)("h3",{className:h,children:_}),(0,o.jsxs)("div",{className:"flex flex-col gap-5 items-start w-full",children:[(j||S||N)&&(0,o.jsxs)("div",{className:"flex flex-col gap-2 items-start w-full text-[16px] font-medium leading-[1.5] text-(--color-dark-blue)",children:[N?"string"==typeof n?j&&(0,o.jsx)("p",{className:p,children:j}):(0,o.jsx)("p",{className:p,children:(0,o.jsx)(d.Text,{field:n})}):j&&(0,o.jsx)("p",{className:p,children:j}),N?"string"==typeof s?S&&(0,o.jsx)("p",{className:p,children:S}):(0,o.jsx)("p",{className:p,children:(0,o.jsx)(d.Text,{field:s})}):S&&(0,o.jsx)("p",{className:p,children:S})]}),(D||T||N)&&(0,o.jsxs)("div",{className:"flex flex-col gap-2 items-start w-full text-[12px] font-medium leading-[12px] text-(--color-medium-grey)",children:[N?"string"==typeof g?D&&(0,o.jsx)("p",{className:p,children:D}):(0,o.jsx)("p",{className:p,children:(0,o.jsx)(d.Text,{field:g})}):D&&(0,o.jsx)("p",{className:p,children:D}),N?"string"==typeof f?T&&(0,o.jsx)("p",{className:p,children:T}):(0,o.jsx)("p",{className:p,children:(0,o.jsx)(d.Text,{field:f})}):T&&(0,o.jsx)("p",{className:p,children:T})]})]})]})]});return b&&!N?(0,o.jsx)("a",{href:b,target:x,rel:"_blank"===x?"noopener noreferrer":void 0,className:E,onClick:y,"aria-label":C,children:A}):(0,o.jsx)("article",{className:E,"aria-label":C,children:A})}],99658),e.s([],93327);var g=e.i(40733),f=e.i(4625),b=e.i(25929);let x=g.z.object({formId:g.z.literal("ASI"),streetAddress:g.z.string({required_error:b.ERROR_STREET_ADDRESS_REQUIRED}).min(1,b.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(f.addressRegex,b.ERROR_STREET_ADDRESS_INVALID),city:g.z.string({required_error:b.ERROR_CITY_REQUIRED}).min(1,b.ERROR_CITY_REQUIRED).max(30).regex(f.alphaOnlyRegex,b.ERROR_CITY_INVALID),state:g.z.string({required_error:b.ERROR_STATE_REQUIRED}).min(1,b.ERROR_STATE_REQUIRED),zip:g.z.string({required_error:b.ERROR_ZIP_REQUIRED}).min(1,b.ERROR_ZIP_REQUIRED).regex(f.zipRegex,f.ZIP_CODE_MESSAGE),gasAccountNumber:g.z.string().refine(e=>!e||""===e||f.gasAccountRegex.test(e),b.ERROR_GAS_ACCOUNT_INVALID).optional().or(g.z.literal("")),propertyType:g.z.string({required_error:b.ERROR_SELECT_PROPERTY_TYPE}).min(1,b.ERROR_SELECT_PROPERTY_TYPE),checkPayableTo:g.z.enum(["purchaser","company"],{required_error:b.ERROR_SELECT_CHECK_PAYABLE}),firstName:g.z.string().max(30).regex(f.alphaOnlyRegex,b.ERROR_FIRST_NAME_INVALID).optional().or(g.z.literal("")),lastName:g.z.string().max(40).regex(f.alphaOnlyRegex,b.ERROR_LAST_NAME_INVALID).optional().or(g.z.literal("")),companyName:g.z.string().max(40).regex(f.companyNameRegex,b.ERROR_COMPANY_NAME_INVALID).optional().or(g.z.literal("")),hasAdditionalPurchaser:g.z.boolean().default(!1),secondaryFirstName:g.z.string().max(30).regex(f.alphaOnlyRegex,b.ERROR_FIRST_NAME_INVALID).optional().or(g.z.literal("")),secondaryLastName:g.z.string().max(40).regex(f.alphaOnlyRegex,b.ERROR_LAST_NAME_INVALID).optional().or(g.z.literal("")),isMailingAddressDifferent:g.z.enum(["yes","no",""],{message:b.ERROR_SELECT_OPTION}),mailingStreetAddress:g.z.string().max(60).regex(f.addressRegex,b.ERROR_STREET_ADDRESS_INVALID).optional().or(g.z.literal("")),mailingCity:g.z.string().max(30).regex(f.alphaOnlyRegex,b.ERROR_CITY_INVALID).optional().or(g.z.literal("")),mailingState:g.z.string().optional().default(""),mailingZip:g.z.string().refine(e=>!e||""===e||f.zipRegex.test(e),f.ZIP_CODE_MESSAGE).optional().default(""),email:g.z.string().email(b.ERROR_EMAIL_REQUIRED).max(50).optional().or(g.z.literal("")),phone:g.z.string().refine(e=>!e||""===e||f.phoneRegex.test(e),b.ERROR_PHONE_INVALID).optional().or(g.z.literal("")),alternatePhone:g.z.string().refine(e=>!e||""===e||f.phoneRegex.test(e),b.ERROR_PHONE_INVALID).optional().or(g.z.literal("")),installationDate:g.z.string({required_error:b.ERROR_INSTALL_DATE_REQUIRED}).min(1,b.ERROR_INSTALL_DATE_REQUIRED).regex(f.dateRegex,b.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,f.parseDate)(e)<=new Date,b.ERROR_INSTALL_DATE_FUTURE),installer:g.z.string({required_error:b.ERROR_SELECT_INSTALLER}).optional().or(g.z.literal("")),otherInstaller:g.z.boolean().default(!1),otherInstallerCompanyName:g.z.string().max(40).regex(f.companyNameRegex,b.ERROR_COMPANY_NAME_INVALID).optional().or(g.z.literal("")),otherInstallerStreetAddress:g.z.string().max(60).regex(f.addressRegex,b.ERROR_STREET_ADDRESS_INVALID).optional().or(g.z.literal("")),otherInstallerCity:g.z.string().max(30).regex(f.alphaOnlyRegex,b.ERROR_CITY_INVALID).optional().or(g.z.literal("")),otherInstallerState:g.z.string().optional().default(""),otherInstallerZip:g.z.string().refine(e=>!e||""===e||f.zipRegex.test(e),f.ZIP_CODE_MESSAGE).optional().default(""),otherInstallerPhone:g.z.string().refine(e=>!e||""===e||f.phoneRegex.test(e),b.ERROR_PHONE_INVALID).optional().or(g.z.literal("")),otherInstallerEmail:g.z.string().email(b.ERROR_EMAIL_REQUIRED).max(50).optional().or(g.z.literal("")),otherInstallerVerifyEmail:g.z.string().email(b.ERROR_EMAIL_REQUIRED).max(50).optional().or(g.z.literal("")),installerEmail:g.z.string({required_error:b.ERROR_EMAIL_REQUIRED}).email(b.ERROR_EMAIL_REQUIRED).max(50),installerVerifyEmail:g.z.string({required_error:b.ERROR_EMAIL_REQUIRED}).email(b.ERROR_EMAIL_REQUIRED).max(50),installerPhone:g.z.string({required_error:b.ERROR_PHONE_REQUIRED}).refine(e=>!e||""===e||f.phoneRegex.test(e),b.ERROR_PHONE_INVALID),buildingHeight:g.z.string().optional().or(g.z.literal("")),windShielding:g.z.string().optional().or(g.z.literal("")),airSealingComplete:g.z.boolean().default(!1),blowerDoorPre:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),blowerDoorPost:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),atticInsulationComplete:g.z.boolean().default(!1),atticPreRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),atticPostRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),atticSquareFootage:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),atticCost:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),wallInsulationComplete:g.z.boolean().default(!1),wallPreRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),wallPostRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),wallSquareFootage:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),wallCost:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),rimJoistComplete:g.z.boolean().default(!1),rimJoistPreRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),rimJoistPostRValue:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),rimJoistLinearFeet:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),rimJoistCost:g.z.string().refine(e=>!e||""===e||f.decimalRegex.test(e),b.ERROR_NUMBER_INVALID).optional().or(g.z.literal("")),installerSignature:g.z.string({required_error:b.ERROR_CREW_LEADER_SIGNATURE_REQUIRED}).min(1,b.ERROR_CREW_LEADER_SIGNATURE_REQUIRED).max(30),signatureDate:g.z.string({required_error:b.ERROR_DATE_REQUIRED}).regex(f.dateRegex,b.ERROR_DATE_REQUIRED).refine(e=>(0,f.parseDate)(e)<=new Date,b.ERROR_SIGNATURE_DATE_FUTURE),authorizationNumber:g.z.string().optional().or(g.z.literal("")),additionalInformation:g.z.string().max(500).optional().or(g.z.literal("")),agreementChecked:g.z.boolean().refine(e=>
193!0===e,{message:b.ERROR_TERMS_REQUIRED})}).superRefine((e,r)=>{"purchaser"===e.checkPayableTo&&(e.firstName&&""!==e.firstName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_FIRST_NAME_REQUIRED,path:["firstName"]}),e.lastName&&""!==e.lastName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_LAST_NAME_REQUIRED,path:["lastName"]})),"company"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),e.hasAdditionalPurchaser&&(e.secondaryFirstName&&""!==e.secondaryFirstName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_FIRST_NAME_REQUIRED,path:["secondaryFirstName"]}),e.secondaryLastName&&""!==e.secondaryLastName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_LAST_NAME_REQUIRED,path:["secondaryLastName"]})),"yes"!==e.isMailingAddressDifferent&&"no"!==e.isMailingAddressDifferent&&r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_SELECT_OPTION,path:["isMailingAddressDifferent"]}),"yes"===e.isMailingAddressDifferent&&(e.mailingStreetAddress&&""!==e.mailingStreetAddress.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_STREET_ADDRESS_REQUIRED,path:["mailingStreetAddress"]}),e.mailingCity&&""!==e.mailingCity.trim()?f.alphaOnlyRegex.test(e.mailingCity)||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_CITY_INVALID,path:["mailingCity"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_CITY_REQUIRED,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_STATE_REQUIRED,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?f.zipRegex.test(e.mailingZip)||r.addIssue({code:g.z.ZodIssueCode.custom,message:f.ZIP_CODE_MESSAGE,path:["mailingZip"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_ZIP_REQUIRED,path:["mailingZip"]})),e.otherInstaller||!e.installer||""===e.installer.trim()||e.authorizationNumber&&""!==e.authorizationNumber.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_AUTHORIZATION_NUMBER_REQUIRED,path:["authorizationNumber"]}),e.installerEmail&&""!==e.installerEmail.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_EMAIL_REQUIRED,path:["installerEmail"]}),e.installerVerifyEmail&&""!==e.installerVerifyEmail.trim()?e.installerEmail&&e.installerVerifyEmail!==e.installerEmail&&r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_EMAIL_MISMATCH,path:["installerVerifyEmail"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_EMAIL_REQUIRED,path:["installerVerifyEmail"]}),e.installerPhone&&""!==e.installerPhone.trim()?f.phoneRegex.test(e.installerPhone)||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_PHONE_INVALID,path:["installerPhone"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_PHONE_REQUIRED,path:["installerPhone"]}),e.otherInstaller&&(e.otherInstallerCompanyName&&""!==e.otherInstallerCompanyName.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_COMPANY_NAME_REQUIRED,path:["otherInstallerCompanyName"]}),e.otherInstallerStreetAddress&&""!==e.otherInstallerStreetAddress.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_STREET_ADDRESS_REQUIRED,path:["otherInstallerStreetAddress"]}),e.otherInstallerCity&&""!==e.otherInstallerCity.trim()?f.alphaOnlyRegex.test(e.otherInstallerCity)||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_CITY_INVALID,path:["otherInstallerCity"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_CITY_REQUIRED,path:["otherInstallerCity"]}),e.otherInstallerState&&""!==e.otherInstallerState.trim()||r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_STATE_REQUIRED,path:["otherInstallerState"]}),e.otherInstallerZip&&""!==e.otherInstallerZip.trim()?f.zipRegex.test(e.otherInstallerZip)||r.addIssue({code:g.z.ZodIssueCode.custom,message:f.ZIP_CODE_MESSAGE,path:["otherInstallerZip"]}):r.addIssue({code:g.z.ZodIssueCode.custom,message:b.ERROR_ZIP_REQUIRED,path:["otherInstallerZip"]}))});e.s(["airSealingInsulationRebateSchema",0,x],29137);var v=e.i(91788);let y=[{value:"",label:""},{value:"O",label:"OWNER"},{value:"R",label:"RENTER"}],R=[{value:"",label:""},{value:"1",label:"1 STORY"},{value:"2",label:"1.5 OR 2 STORY"},{value:"3",label:"OVER 2 STORY"}],N=[{value:"",label:""},{value:"E",label:"EXPOSED (RURAL)"},{value:"N",label:"NORMAL (SUBURBAN)"},{value:"W",label:"WELL SHIELDED (URBAN)"}],E=[{value:"",label:"--Select Installer--"},{value:"AAI",label:"ADVANCED ATTIC INSULATION"},{value:"AEI",label:"APPLIED ENERGY INNOVATIONS"},{value:"AFF",label:"AFFORDABLE INSULATION"},{value:"AFI",label:"ADVANTAGE FOAM INSULATORS"},{value:"AST",label:"AIR SEAL TECH"},{value:"BRI",label:"BRIAN'S INSULATION"},{value:"BUD",label:"BUDGET INSULATION"},{value:"CHI",label:"CRAFTSMEN HOME IMPROVEMENTS"},{value:"COC",label:"COCOON INSULATION"},{value:"COZ",label:"COZY INSULATION"},{value:"CTL",label:"CENTRAL INSULATION"},{value:"CTY",label:"CENTURY INSULATION"},{value:"DES",label:"DR ENERGY SAVERS"},{value:"ELE",label:"ELEMENT INSULATION"},{value:"EMD",label:"EMOND INSULATION"},{value:"ENS",label:"ENERGY SAVERS INSULATION"},{value:"FRA",label:"FRANEK CONSTRUCTION"},{value:"FRE",label:"FREEDOM INSULATION"},{value:"GHD",label:"GREEN HOME DOCTORS"},{value:"GRD",label:"GR DANIELSON & SON"},{value:"GRF",label:"GREEN RETROFIT CO"},{value:"GUE",label:"GUEVARA INSULATION"},{value:"GUN",label:"GUNNER INSULATION"},{value:"HOU",label:"HOULE INSULATION"},{value:"HPA",label:"HOME PRO AMERICA"},{value:"HSI",label:"HOME SEAL INSULATION"},{value:"IBS",label:"INSTALLED BUILDING SOLUTIONS"},{value:"INS",label:"INSULATION INC"},{value:"LEW",label:"LEWIS INSULATION"},{value:"MAX",label:"MAXLO SPRAY FOAM"},{value:"MER",label:"MERIT INSULATION"},{value:"MGT",label:"MGT REMODELING & INSULATION"},{value:"MHI",label:"METRO HOME INSULATION"},{value:"MID",label:"MIDWEST ATTIC SOLUTIONS"},{value:"MIP",label:"MN INSULATION PLUS"},{value:"NHS",label:"NORTHERN HOME SEAL & PRODUCTS"},{value:"NSI",label:"NORTHSTAR INSULATION"},{value:"NWW",label:"NORTHWIND WINTERIZATION"}
193,{value:"PEC",label:"PROGRESSIVE ENERGY CORPORATION"},{value:"PFI",label:"PERFORMANCE FOAM INSULATION"},{value:"PSF",label:"PEAK SPRAY FOAM LLC"},{value:"REI",label:"REICHEL INSULATION"},{value:"RET",label:"RETROGREEN ENERGY"},{value:"RLC",label:"ROBERT LINDEN CONSTRUCTION"},{value:"SEL",label:"SELECT INSULATION SYSTEMS"},{value:"SFI",label:"SPRAY FOAM INSULATION PLUS"},{value:"SGR",label:"STORM GROUP ROOFING"},{value:"SMX",label:"SUSTAINMAX"},{value:"STC",label:"ST CROIX ENERGY SOLUTIONS"},{value:"STI",label:"STINSON SERVICES"},{value:"STR",label:"STRUCTIS CONSTRUCTION"},{value:"TCI",label:"TWIN CITY INSULATION"},{value:"USA",label:"USA INSULATION"},{value:"UZI",label:"UZ INSULATION"},{value:"KOA",label:"KOALA INSULATION OF ST PAUL"}],I=[{value:"",label:"--Please select state--"},{value:"AL",label:"AL"},{value:"AK",label:"AK"},{value:"AZ",label:"AZ"},{value:"AR",label:"AR"},{value:"CA",label:"CA"},{value:"CO",label:"CO"},{value:"CT",label:"CT"},{value:"DE",label:"DE"},{value:"DC",label:"DC"},{value:"FL",label:"FL"},{value:"GA",label:"GA"},{value:"HI",label:"HI"},{value:"ID",label:"ID"},{value:"IL",label:"IL"},{value:"IN",label:"IN"},{value:"IA",label:"IA"},{value:"KS",label:"KS"},{value:"KY",label:"KY"},{value:"LA",label:"LA"},{value:"ME",label:"ME"},{value:"MD",label:"MD"},{value:"MA",label:"MA"},{value:"MI",label:"MI"},{value:"MN",label:"MN"},{value:"MS",label:"MS"},{value:"MO",label:"MO"},{value:"MT",label:"MT"},{value:"NE",label:"NE"},{value:"NV",label:"NV"},{value:"NH",label:"NH"},{value:"NJ",label:"NJ"},{value:"NM",label:"NM"},{value:"NY",label:"NY"},{value:"NC",label:"NC"},{value:"ND",label:"ND"},{value:"OH",label:"OH"},{value:"OK",label:"OK"},{value:"OR",label:"OR"},{value:"PA",label:"PA"},{value:"RI",label:"RI"},{value:"SC",label:"SC"},{value:"SD",label:"SD"},{value:"TN",label:"TN"},{value:"TX",label:"TX"},{value:"UT",label:"UT"},{value:"VT",label:"VT"},{value:"VA",label:"VA"},{value:"WA",label:"WA"},{value:"WV",label:"WV"},{value:"WI",label:"WI"},{value:"WY",label:"WY"}],C=[{value:"",label:"--Please select State--"},{value:"IA",label:"IA"},{value:"MN",label:"MN"},{value:"SD",label:"SD"},{value:"WI",label:"WI"}];e.s(["BUILDING_HEIGHTS",0,R,"INSTALLERS",0,E,"INSTALLER_STATE_OPTIONS",0,C,"PROPERTY_TYPES",0,y,"STATE_OPTIONS",0,I,"WIND_SHIELDING_OPTIONS",0,N],18633);let _={installers:E.map(e=>({value:e.value,label:e.label,authorizedNumbers:[]})),propertyTypes:y.map(e=>({value:e.value,label:e.label})),buildingHeights:R.map(e=>({value:e.value,label:e.label})),windShielding:N.map(e=>({value:e.value,label:e.label}))};e.s(["useASIData",0,function(e="MN"){let[r,t]=(0,v.useState)(null),[a,l]=(0,v.useState)(!0),[n,s]=(0,v.useState)(null);(0,v.useEffect)(()=>{!async function(){l(!0),s(null);try{let r=await fetch(`/api/forms/asi-data?region=${e}`);if(!r.ok){console.warn("ASI data API returned error, using default data"),t(_),s("Using cached installer data");return}let a=await r.json();t(a)}catch(e){console.warn("Error fetching ASI data, using default data:",e),s(e instanceof Error?e.message:"Failed to fetch ASI data"),t(_)}finally{l(!1)}}()},[e]);let o=(0,v.useCallback)(e=>{if(r)return r.installers.find(r=>r.value===e)},[r]),i=(0,v.useCallback)((e,t)=>{if(!r||!e||!t)return!1;
193let a=r.installers.find(r=>r.value===e);return!!a&&(0===a.authorizedNumbers.length||a.authorizedNumbers.includes(t.trim()))},[r]);return{data:r,isLoading:a,error:n,validateAuthorizationNumber:i,getInstallerByValue:o}}],62813);var j=e.i(58021),S=e.i(43725);e.i(70484);var D=e.i(45892);e.i(78118);var T=e.i(94102),A=e.i(84637),F=e.i(46203),O=e.i(30392);let w=y.map(e=>({value:e.value,label:e.label})),L=[{value:"MN",label:"MN"}];e.s(["InstallationSection",0,function(){let e=(0,S.useI18n)(),r=e?.t??(e=>""),{control:t,formState:{errors:a}}=(0,j.useFormContext)();return(0,o.jsx)(A.FormSection,{number:1,title:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:t,name:"streetAddress",render:({field:e})=>(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,b.translateFormError)(r,a.streetAddress?.message),required:!0})})}),(0,o.jsx)(j.Controller,{control:t,name:"city",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(r,a.city?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"state",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:L,placeholder:"--Select State--",errorMessage:(0,b.translateFormError)(r,a.state?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"zip",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,placeholder:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Placeholder_Zi
193p),maxLength:10,errorMessage:(0,b.translateFormError)(r,a.zip?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"propertyType",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:"Property Type",value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:w,placeholder:"--Select Property Type--",errorMessage:(0,b.translateFormError)(r,a.propertyType?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"gasAccountNumber",render:({field:e})=>(0,o.jsx)(F.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,b.translateFormError)(r,a.gasAccountNumber?.message)})})]})})}],3661);var P=e.i(14601),k=e.i(30798);e.s(["PurchaserSection",0,function(){let e=(0,S.useI18n)(),r=e?.t??(e=>""),{control:t,watch:a,setValue:l,formState:{errors:n}}=(0,j.useFormContext)(),s=a("checkPayableTo"),i=a("hasAdditionalPurchaser"),d=a("isMailingAddressDifferent"),u=e=>{l("checkPayableTo",e),"company"===e?(l("firstName","",{shouldValidate:!1}),l("lastName","",{shouldValidate:!1}),l("hasAdditionalPurchaser",!1,{shouldValidate:!1}),l("secondaryFirstName","",{shouldValidate:!1}),l("secondaryLastName","",{shouldValidate:!1})):"purchaser"===e&&l("companyName","",{shouldValidate:!1})},c=e=>{l("isMailingAddressDifferent",e),"no"===e&&(l("mailingStreetAddress","",{shouldValidate:!1}),l("mailingCity","",{shouldValidate:!1}),l("mailingState","MN",{shouldValidate:!1}),l("mailingZip","",{shouldValidate:!1}))};return(0,o.jsx)(A.FormSection,{number:2,title:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,o.jsxs)("legend",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:[(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,o.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,o.jsx)(P.Radio,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"purchaser",checked:"purchaser"===s,onChange:()=>u("purchaser"),variant:"forms"}),(0,o.jsx)(P.Radio,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"company",checked:"company"===s,onChange:()=>u("company"),variant:"forms"})]})]}),"purchaser"===s&&(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:t,name:"firstName",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(r,n.firstName?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"lastName",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,b.translateFormError)(r,n.lastName?.message),required:!0})})]}),(0,o.jsx)(j.Controller,{control:t,name:"hasAdditionalPurchaser",render:({field:e})=>(0,o.jsx)(k.Checkbox,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(l("secondaryFirstName","",{shouldValidate:!1}),l("secondaryLastName","",{shouldValidate:!1}))},variant:"forms"})}),i&&(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:t,name:"secondaryFirstName",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(r,n.secondaryFirstName?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"secondaryLastName",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,b.translateFormError)(r,n.secondaryLastName?.message),required:!0})})]})]}
193),"company"===s&&(0,o.jsx)(j.Controller,{control:t,name:"companyName",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,b.translateFormError)(r,n.companyName?.message),required:!0})}),(0,o.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,o.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,o.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,o.jsx)(P.Radio,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Option_Yes),name:"isMailingAddressDifferent",value:"yes",checked:"yes"===d,onChange:()=>c("yes"),variant:"forms"}),(0,o.jsx)(P.Radio,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Option_No),name:"isMailingAddressDifferent",value:"no",checked:"no"===d,onChange:()=>c("no"),variant:"forms"})]}),n.isMailingAddressDifferent&&(0,o.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,b.translateFormError)(r,n.isMailingAddressDifferent.message)})]}),"yes"===d&&(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:t,name:"mailingStreetAddress",render:({field:e})=>(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,b.translateFormError)(r,n.mailingStreetAddress?.message),required:!0})})}),(0,o.jsx)(j.Controller,{control:t,name:"mailingCity",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(r,n.mailingCity?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"mailingState",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:I.map(e=>({value:e.value,label:e.label})),placeholder:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Placeholder_SelectState),errorMessage:(0,b.translateFormError)(r,n.mailingState?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:t,name:"mailingZip",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,b.translateFormError)(r,n.mailingZip?.message),required:!0})})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:t,name:"email",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,b.translateFormError)(r,n.email?.message)})}),(0,o.jsx)(j.Controller,{control:t,name:"phone",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,b.translateFormError)(r,n.phone?.message)})}),(0,o.jsx)(j.Controller,{control:t,name:"alternatePhone",render:({field:e})=>(0,o.jsx)(D.InputField,{label:(0,O.getDictionaryValue)(r,O.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,b.translateFormError)(r,n.alternatePhone?.message)})})]})]})})}],38760);var M=e.i(34346),V=e.i(26019),B=e.i(32548),Y=e.i(50547);function U({number:e,title:r,children:t}){return(0,o.jsxs)("section",{className:"w-full",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,o.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,o.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:r})]}),(0,o.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,o.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:t})})]})}function z(e,r){let t=e.find(e=>e.value===r);return t?.label??r}function Z({isOpen:e,onClose:r,onSubmit:t,isSubmitting:a,submitError:l,installer
193s:n}){let{getValues:s}=(0,j.useFormContext)(),i=(0,v.useRef)(null),d=(0,S.useI18n)(),u=d?.t??(e=>"");(0,v.useEffect)(()=>{let r=i.current;r&&(e?(r.open||r.showModal(),r.scrollTo(0,0)):r.open&&r.close())},[e]);let c=s();return(0,o.jsx)("dialog",{ref:i,onCancel:e=>{e.preventDefault(),r()},className:"rebate-preview-printable m-auto max-h-[90vh] w-full max-w-3xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl backdrop:bg-black/50","aria-labelledby":"asi-preview-modal-title",children:(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)(V.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,o.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,o.jsx)("h2",{id:"asi-preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Air Sealing & Insulation Rebate Form - Review Your Submission"}),(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsxs)(U,{number:1,title:"Installation Information",children:[(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(B.ReadOnlyField,{label:"Street Address",value:c.streetAddress??""})}),(0,o.jsx)(B.ReadOnlyField,{label:"City",value:c.city??""}),(0,o.jsx)(B.ReadOnlyField,{label:"State",value:c.state??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Zip Code",value:c.zip??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Property Type",value:z(y,c.propertyType??"")}),(0,o.jsx)(B.ReadOnlyField,{label:Y.GAS_ACCOUNT_NUMBER_LABEL,value:c.gasAccountNumber??""})]}),(0,o.jsxs)(U,{number:2,title:"Purchaser Information",children:[(0,o.jsx)(B.ReadOnlyField,{label:"Check payable to",value:"purchaser"===c.checkPayableTo?"Purchaser":"Company"}),"purchaser"===c.checkPayableTo?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B.ReadOnlyField,{label:"Purchaser First Name",value:c.firstName??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Purchaser Last Name",value:c.lastName??""}),c.hasAdditionalPurchaser&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B.ReadOnlyField,{label:"Secondary Purchaser First Name",value:c.secondaryFirstName??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:c.secondaryLastName??""})]})]}):(0,o.jsx)(B.ReadOnlyField,{label:"Company Name",value:c.companyName??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Is Rebate Mailing Address different from Installation Address?",value:"yes"===c.isMailingAddressDifferent?"Yes":"no"===c.isMailingAddressDifferent?"No":""}),"yes"===c.isMailingAddressDifferent&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(B.ReadOnlyField,{label:"Street Address",value:c.mailingStreetAddress??""})}),(0,o.jsx)(B.ReadOnlyField,{label:"City",value:c.mailingCity??""}),(0,o.jsx)(B.ReadOnlyField,{label:"State",value:z(I,c.mailingState??"")}),(0,o.jsx)(B.ReadOnlyField,{label:"Zip Code",value:c.mailingZip??""})]}),(0,o.jsx)(B.ReadOnlyField,{label:"Purchaser's Email Address",value:c.email??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Purchaser's Telephone Number",value:c.phone??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:c.alternatePhone??""})]}),(0,o.jsxs)(U,{number:3,title:"Rebate Eligible Installer Certification",children:[(0,o.jsx)(B.ReadOnlyField,{label:"Date of Installation (MM/DD/YYYY)",value:(0,f.formatDateForDisplay)(c.installationDate)}),c.otherInstaller?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B.ReadOnlyField,{label:"Other Installer (Not listed)",value:"Yes"}),(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(B.ReadOnlyField,{label:"Company Name",value:c.otherInstallerCompanyName??""})}),(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(B.ReadOnlyField,{label:"Street Address",value:c.otherInstallerStreetAddress??""})}),(0,o.jsx)(B.ReadOnlyField,{label:"City",value:c.otherInstallerCity??""}),(0,o.jsx)(B.ReadOnlyField,{label:"State",value:z(C,c.otherInstallerState??"")}),(0,o.jsx)(B.ReadOnlyField,{label:"Zip Code",value:c.otherInstallerZip??""})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B.ReadOnlyField,{label:"Select Rebate Eligible Installer",value:(e=>{if(!e||"--Select Installer--"===e)return"";let r=n.find(r=>r.value===e);return r?.label??""})(c.installer??"")}),(0,o.jsx)(B.ReadOnlyField,{label:"Authorization Number",value:c.authorizationNumber??""})]}),(0,o.jsx)(B.ReadOnlyField,{label:"Email Address",value:c.installerEmail??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Verify Email Address",value:c.installerVerifyEmail??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Telephone Number",value:c.installerPhone??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Building Height",value:z(R,c.buildingHeight??"")}),(0,o.jsx)(B.ReadOnlyField,{label:"Wind Shielding",value:z(N,c.windShielding??"")}),(0,o.jsx)("div",{className:"sm:col-span-2 mt-4 border-t border-[var(--color-grey-3)] pt-4",children:(0,o.jsx)("h4",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Attic Weatherization"})}),(0,o.jsx)(B.ReadOnlyField,{label:"Air Sealing Completed",value:c.airSealingComplete?"Yes":"No"}),(0,o.jsx)(B.ReadOnlyField,{label:"Blower Door Pre (cfm@50pa)",value:c.blowerDoorPre??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Blower Door Post (cfm@50pa)",value:c.blowerDoorPost??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Attic Insulation Completed",value:c.atticInsulationComplete?"Yes":"No"}),(0,o.jsx)(B.ReadOnlyField,{label:"Pre R-Value",value:c.atticPreRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Post R-Value",value:c.atticPostRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Square Footage",value:c.atticSquareFootage??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Qualifying Attic Cost",value:c.atticCost??""}),(0,o.jsx)("div",{className:"sm:col-span-2 mt-4 border-t border-[var(--color-grey-3)] pt-4",children:(0,o.jsx)("h4",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Wall Insulation"})}),(0,o.jsx)(B.ReadOnlyField,{label:"Wall Insulation Completed",value:c.wallInsulationComplete?"Yes":"No"}),(0,o.jsx)(B.ReadOnlyField,{label:"Pre R-Value",value:c.wallPreRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Post R-Value",value:c.wallPostRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Square Footage",value:c.wallSquareFootage??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Qualifying Wall Cost",value:c.wallCost??""}),(0,o.jsx)("div",{className:"sm:col-span-2 mt-4 border-t border-[var(--color-grey-3)] pt-4",children:(0,o.jsx)("h4",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Rim Joist"})}),(0,o.jsx)(B.ReadOnlyField,{label:"Rim Joist Completed",value:c.rimJoistComplete?"Yes":"No"}),(0,o.jsx)(B.ReadOnlyField,{label:"Pre R-Value",value:c.rimJoistPreRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Post R-Value",value:c.rimJoistPostRValue??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Linear Feet",value:c.rimJoistLinearFeet??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Qualifying Cost",value:c.rimJoistCost??""}),(0,o.jsx)("div",{className:"sm:col-span-2 mt-4 border-t border-[var(--color-grey-3)] pt-4",children:(0,o.jsx)("h4",{className:"mb-3 text-body-md font-bold text-[var(--color-text-primary)]",children:"Signature"})}),(0,o.jsx)(B.ReadOnlyField,{label:"Installer Crew Leader Signature",value:c.installerSignature??""}),(0,o.jsx)(B.ReadOnlyField,{label:"Date",value:(0,f.formatDateForDisplay)(c.signatureDate)}),(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(B.ReadOnlyField,{label:"Additional Information",value:c.additionalInformation??""})})]})]}),l&&(0,o.jsx)("div",{className:"rebate-preview-no-print mt-6 rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-4 text-body-md text-[var(--color-red)]",role:"alert",children:l}),(0,o.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-wrap gap-4",children:[(0,o.jsx)("button",{type:"button",onClick:t,disabled:a,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focu
193s:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:a?(0,O.getDictionaryValue)(u,O.DICTIONARY.F.Form_Button_Submitting):(0,O.getDictionaryValue)(u,O.DICTIONARY.F.Form_Button_Submit)}),(0,o.jsx)("button",{type:"button",onClick:r,disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,O.getDictionaryValue)(u,O.DICTIONARY.F.Form_Button_Modify)}),(0,o.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,O.getDictionaryValue)(u,O.DICTIONARY.F.Form_Button_PrintPreview)})]})]})})}e.s(["PreviewModal",0,Z],25244);let q=R.map(e=>({value:e.value,label:e.label})),H=N.map(e=>({value:e.value,label:e.label}));e.s(["REICSection",0,function({onSubmit:e,onReset:r,isSubmitting:t,submitError:a,termsUrl:l,onAttachmentChange:n,attachmentError:s,asiData:i,asiLoading:d,validateAuthorizationNumber:u,onPreviewClick:c,isPreviewOpen:m,onPreviewClose:h}){let p=(0,S.useI18n)(),g=p?.t??(e=>""),{control:f,watch:x,setValue:y,formState:{errors:R}}=(0,j.useFormContext)(),N=(0,v.useId)(),E=x("otherInstaller"),I=x("installer"),_=x("authorizationNumber"),F=x("airSealingComplete"),w=x("atticInsulationComplete"),L=x("wallInsulationComplete"),P=x("rimJoistComplete"),[V,B]=(0,v.useState)(void 0),Y=i?.installers.map(e=>({value:e.value,label:e.label}))??[{value:"",label:"--Select Installer--"}];(0,v.useEffect)(()=>{d?B(void 0):!E&&I&&_&&!u(I,_)&&_.length>0?B("Invalid authorization number for the selected installer"):B(void 0)},[I,_,E,u,d]);let U=e=>{y("otherInstaller",e),e?(y("installer",""),y("authorizationNumber","")):(y("otherInstallerCompanyName",""),y("otherInstallerStreetAddress",""),y("otherInstallerCity",""),y("otherInstallerState",""),y("otherInstallerZip",""))};return(0,o.jsx)(A.FormSection,{number:3,title:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Section_REICInfo),children:(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:(0,o.jsx)(j.Controller,{control:f,name:"installationDate",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Date of Installation (MM/DD/YYYY)",value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,b.translateFormError)(g,R.installationDate?.message),required:!0})})}),!E&&(0,o.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:(0,o.jsx)(j.Controller,{control:f,name:"installer",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:"Select Rebate Eligible Installer",value:e.value??"",onChange:r=>{e.onChange(r),y("authorizationNumber",""),B(void 0)},onBlur:e.onBlur,options:Y,placeholder:"--Select Installer--",errorMessage:(0,b.translateFormError)(g,R.installer?.message),disabled:d})})}),(0,o.jsx)(j.Controller,{control:f,name:"otherInstaller",render:({field:e})=>(0,o.jsx)(k.Checkbox,{label:"Other Installer (Not listed)",checked:e.value,onChange:U,variant:"forms"})}),E&&(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"otherInstallerCompanyName",render:({field:e})=>(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(D.InputField,{label:"Company Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,b.translateFormError)(g,R.otherInstallerCompanyName?.message),required:!0})})}),(0,o.jsx)(j.Controller,{control:f,name:"otherInstallerStreetAddress",render:({field:e})=>(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(D.InputField,{label:"Street Address",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,b.translateFormError)(g,R.otherInstallerStreetAddress?.message),required:!0})})}
193),(0,o.jsx)(j.Controller,{control:f,name:"otherInstallerCity",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"City",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.otherInstallerCity?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:f,name:"otherInstallerState",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:"State",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:C.map(e=>({value:e.value,label:e.label})),placeholder:"--Select State--",errorMessage:(0,b.translateFormError)(g,R.otherInstallerState?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:f,name:"otherInstallerZip",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Zip Code",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:10,errorMessage:(0,b.translateFormError)(g,R.otherInstallerZip?.message),required:!0})})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"installerEmail",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,b.translateFormError)(g,R.installerEmail?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:f,name:"installerVerifyEmail",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Verify Email Address",type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,b.translateFormError)(g,R.installerVerifyEmail?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:f,name:"installerPhone",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Telephone Number",type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,b.translateFormError)(g,R.installerPhone?.message),required:!0})})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"buildingHeight",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:"Building Height",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:q,placeholder:"",errorMessage:(0,b.translateFormError)(g,R.buildingHeight?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"windShielding",render:({field:e})=>(0,o.jsx)(T.Dropdown,{label:"Wind Shielding",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:H,placeholder:"",errorMessage:(0,b.translateFormError)(g,R.windShielding?.message)})})]}),(0,o.jsxs)("div",{className:"border-t border-[var(--color-grey-3)] pt-6",children:[(0,o.jsx)("h4",{className:"mb-4 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Attic Weatherization"}),(0,o.jsx)(j.Controller,{control:f,name:"airSealingComplete",render:({field:e})=>(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)(k.Checkbox,{label:"Air Sealing Completed",checked:e.value,onChange:e.onChange,variant:"forms"}),R.airSealingComplete&&(0,o.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-red)]",role:"alert",children:(0,b.translateFormError)(g,R.airSealingComplete.message)})]})}),F&&(0,o.jsxs)("div",{className:"mb-4 ml-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"blowerDoorPre",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Blower Door Pre (cfm@50pa)",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:5,errorMessage:(0,b.translateFormError)(g,R.blowerDoorPre?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"blowerDoorPost",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Blower Door Post (cfm@50pa)",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:5,errorMessage:(0,b.translateFormError)(g,R.blowerDoorPost?.message)})}),(0,o.jsx)("div",{className:"sm:col-span-2",children:(0,o.jsx)(j.Controller,{control:f,name:"atticInsulationComplete",render:({field:e})=>(0,o.jsx)(k.Checkbox,{label:"Attic Insulation Completed",checked:e.value,onChange:e.onChange,variant:"forms"})})}),w&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(j.Controller,{control:f,name:"atticPreRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Pre R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,R.atticPreRValue?.message)})}
193),(0,o.jsx)(j.Controller,{control:f,name:"atticPostRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Post R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,R.atticPostRValue?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"atticSquareFootage",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Square Footage",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.atticSquareFootage?.message)})})]}),(0,o.jsx)(j.Controller,{control:f,name:"atticCost",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Qualifying Attic Cost",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.atticCost?.message)})})]})]}),(0,o.jsxs)("div",{className:"border-t border-[var(--color-grey-3)] pt-6",children:[(0,o.jsx)("h4",{className:"mb-4 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Wall Insulation"}),(0,o.jsx)(j.Controller,{control:f,name:"wallInsulationComplete",render:({field:e})=>(0,o.jsx)("div",{className:"mb-4",children:(0,o.jsx)(k.Checkbox,{label:"Wall Insulation Completed",checked:e.value,onChange:e.onChange,variant:"forms"})})}),L&&(0,o.jsxs)("div",{className:"ml-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"wallPreRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Pre R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,R.wallPreRValue?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"wallPostRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Post R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,R.wallPostRValue?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"wallSquareFootage",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Square Footage",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.wallSquareFootage?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"wallCost",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Qualifying Wall Cost",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.wallCost?.message)})})]})]}),(0,o.jsxs)("div",{className:"border-t border-[var(--color-grey-3)] pt-6",children:[(0,o.jsx)("h4",{className:"mb-4 text-body-md font-bold text-[var(--color-text-primary)]",children:"Qualifying Rim Joist"}),(0,o.jsx)(j.Controller,{control:f,name:"rimJoistComplete",render:({field:e})=>(0,o.jsx)("div",{className:"mb-4",children:(0,o.jsx)(k.Checkbox,{label:"Rim Joist Completed",checked:e.value,onChange:e.onChange,variant:"forms"})})}),P&&(0,o.jsxs)("div",{className:"ml-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"rimJoistPreRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Pre R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:2,errorMessage:(0,b.translateFormError)(g,R.rimJoistPreRValue?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"rimJoistPostRValue",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Post R-Value",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:2,errorMessage:(0,b.translateFormError)(g,R.rimJoistPostRValue?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"rimJoistLinearFeet",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Linear Feet",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,R.rimJoistLinearFeet?.message)})}),(0,o.jsx)(j.Controller,{control:f,name:"rimJoistCost",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Qualifying Cost",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:7,errorMessage:(0,b.translateFormError)(g,R.rimJoistCost?.message)})})]})]}),(0,o.jsx)("div",{className:"border-t border-[var(--color-grey-3)] pt-6",children:(0,o.jsx)(M.FileUpload,{label:"Attach Invoice and Supporting Documents (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:n,accept:["image/jpeg","image/gif","
193image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:s,required:!0})}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,o.jsx)(j.Controller,{control:f,name:"installerSignature",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Installer Crew Leader Signature",value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,b.translateFormError)(g,R.installerSignature?.message),required:!0})}),(0,o.jsx)(j.Controller,{control:f,name:"signatureDate",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})}),!E&&(0,o.jsx)(j.Controller,{control:f,name:"authorizationNumber",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Authorization Number",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:3,errorMessage:(0,b.translateFormError)(g,V??R.authorizationNumber?.message),required:!0})})]}),(0,o.jsx)(j.Controller,{control:f,name:"additionalInformation",render:({field:e})=>(0,o.jsx)(D.InputField,{label:"Additional Information",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:500,multiline:!0,rows:6,errorMessage:(0,b.translateFormError)(g,R.additionalInformation?.message)})}),(0,o.jsx)(Z,{isOpen:m,onClose:h,onSubmit:e,isSubmitting:t,submitError:a,installers:i?.installers??[]}),(0,o.jsxs)("div",{className:"rounded-lg border border-[var(--color-grey-3)] bg-[var(--color-grey-1)] p-4",children:[(0,o.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:'By typing my digital signature above and clicking the "I agree" box, I represent as follows:'}),(0,o.jsxs)("ul",{className:"mb-4 list-inside list-disc space-y-2 text-body-sm text-[var(--color-text-secondary)]",children:[(0,o.jsx)("li",{children:"I have performed the work as detailed on this Online Rebate Form submission for the customer listed above."}),(0,o.jsx)("li",{children:"I am submitting this Online Rebate Form on behalf of the customer listed above."}),(0,o.jsx)("li",{children:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,o.jsx)("li",{children:"I have included proof of purchase and service provided."}),(0,o.jsxs)("li",{children:[(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Agreement_ReadAgree)," ",l?(0,o.jsx)("button",{type:"button",onClick:()=>{l&&window.open(l,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,o.jsx)("span",{children:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}),(0,o.jsx)(j.Controller,{control:f,name:"agreementChecked",render:({field:e})=>(0,o.jsx)(k.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":R.agreementChecked?N:void 0})}),R.agreementChecked&&(0,o.jsx)("p",{id:N,className:"mt-1 text-body-sm text-[var(--color-red)]",role:"alert",children:(0,b.translateFormError)(g,R.agreementChecked.message)})]}),(0,o.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,o.jsx)("button",{type:"button",onClick:c,disabled:t,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Button_Preview)}),(0,o.jsx)("button",{type:"button",onClick:r,disabled:t,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,O.getDictionaryValue)(g,O.DICTIONARY.F.Form_Button_Reset)})]})]})})}],83580)},5035,e=>{"use strict";var r=e.i(91398),t=e.i(14216);let a=e=>(0,r.jsx)(t.Link,{prefetch:!1,...e});a.displayName="CnpLink",e.s(["Link",0,a])},6139,97844,e=>{"use strict";var r=e.i(91398),t=e.i(5939);let a=e=>(0,r.jsx)(t.RichText,{prefetchLinks:!1,...e});function l(e,r){let t=e.match(/class\s*=\s*"([^"]*)"/i);return!!t&&t[1].split(/\s+/).includes(r)}function n(e){let r=e.match(/<table\b[^>]*>/i),t=r?r[0]:"",a=l(t,"static"),n=l(t,"responsive")||l(t,"stacked");if(a)return`<div class="table-scroll-wrapper">${e}</div>`;if(n)return s(e);if(!/<thead\b[^>]*>[\s\S]*?<\/thead>/i.test(e)){var o;let r=(o="static-table",e.replace(/<table\b([^>]*)>/i,(e,r)=>{let t=r.match(/class\s*=\s*"([^"]*)"/i);if(t){let a=t[1];if(a.split(/\s+/).includes(o))return e;let l=r.replace(/class\s*=\s*"([^"]*)"/i,`class="${a} ${o}"`);return`<table${l}>`}return`<table class="${o}"${r}>`}));return`<div class="table-scroll-wrapper">${r}</div>`}return s(e)}function s(e){let r,t=e.match(/<thead\b[^>]*>([\s\S]*?)<\/thead>/i);if(!t)return e;let a=[],l=/<th\b[^>]*>([\s\S]*?)<\/th>/gi;for(;null!==(r=l.exec(t[1]));)a.push(r[1].replace(/<[^>]+>/g,"").trim());return a.length?e.replace(/<tbody\b[^>]*>([\s\S]*?)<\/tbody>/gi,e=>e.replace(/<tr\b[^>]*>([\s\S]*?)<\/tr>/gi,e=>{let r=0;return e.replace(/<td([^>]*)>/gi,(e,t)=>{let l=a[r++];if(!l)return`<td${t}>`;let n=l.replace(/&/g,"&").replace(/"/g,""");return`<td${t} data-label="${n}">`})})):e}a.displayName="CnpRichText",e.s(["RichText",0,a],6139),e.s(["injectTableDataLabels",0,function(e){return e.replace(/<table\b[^>]*>[\s\S]*?<\/table>/gi,n)}],97844)},56558,e=>{"use strict";e.i(50547),e.s(["BUILDING_TYPES",0,[{value:"",label:""},{value:"1",label:"Single Family"},{value:"7",label:"Townhome"},{value:"8",label:"Two-Plex to Four-Plex"}],"CHECK_PAYABLE_TYPES",0,[{value:"PURCHASER",label:"Purchaser"},{value:"COMPANY",label:"Company"}],"INSTALLATION_TYPES",0,[{value:"",label:""},{value:"NEW_CONSTRUCTION",label:"New Construction"},{value:"REPLACEMENT",label:"Replacement"}],"MN_STATE_OPTION",0,[{value:"MN",label:"MN"}],"TYPE_CODE",0,"277","TYPE_CODE_LABEL",0,"Ducted Air Source Heat Pump."])},1820,e=>{"use strict";var r=e.i(40733),t=e.i(4625),a=e.i(25929);let l=r.z.object({preFormDealerPath:r.z.enum(["yes","no",""]),preFormDealerId:r.z.string().optional(),preFormDealerCompanyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),preFormDealerStreet:r.z.string().regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),preFormDealerCity:r.z.string().regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),preFormDealerState:r.z.string().min(1,a.ERROR_STATE_REQUIRED).optional().or(r.z.literal("")),preFormDealerZip:r.z.string().max(10).regex(t.zipRegex,t.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),installStreet:r.z.string({required_error:a.ERROR_STREET_ADDRESS_REQUIRED}).min(1,a.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID),installCity:r.z.string({required_error:a.ERROR_CITY_REQUIRED}).min(1,a.ERROR_CITY_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID),installState:r.z.string({required_error:a.ERROR_STATE_REQUIRED}).min(1,a.ERROR_STATE_REQUIRED),installZip:r.z.string({required_error:a.ERROR_ZIP_REQUIRED}).min(1,a.ERROR_ZIP_REQUIRED).max(10).regex(t.zipRegex,t.ZIP_CODE_MESSAGE),accountNumber:r.z.string().max(14).refine(e=>!e||""===e||t.gasAccountRegex.test(e),a.ERROR_GAS_ACCOUNT_INVALID).optional().or(r.z.literal("")),buildingType:r.z.string({required_error:a.ERROR_SELECT_BUILDING_TYPE}).min(1,a.ERROR_SELECT_BUILDING_TYPE),installationType:r.z.string({required_error:a.ERROR_SELECT_INSTALLATION_TYPE}).min(1,a.ERROR_SELECT_INSTALLATION_TYPE),checkPayableTo:r.z.enum(["PURCHASER","COMPANY"]).optional(),purchaserFirstName:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),purchaserLastName:r.z.string().max(40).regex(t.alphaOnlyRegex,a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),additionalPurchaser:r.z.boolean().default(!1),secondaryPurchaserFirstName:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),secondaryPurchaserLastName:r.z.string().max(40).regex(t.alphaOnlyRegex,a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),companyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),pointOfSaleDealerId:r.z.string().max(6).regex(t.alphanumericRegex,"Please enter a valid dealer ID (letters and numbers only)").optional().or(r.z.literal("")),rebateAddressDifferent:r.z.enum(["YES","NO",""],{message:a.ERROR_SELECT_OPTION}),purchaserStreet:r.z.string().max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),purchaserCity:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),purchaserState:r.z.string().optional(),purchaserZip:r.z.string().max(10).refine(e=>!e||""===e||t.zipRegex.test(e),t.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),purchaserType:r.z.string({required_error:a.ERROR_SELECT_PURCHASER_TYPE}).min(1,a.ERROR_SELECT_PURCHASER_TYPE),purchaserEmail:r.z.string().max(50).email(a.ERROR_EMAIL_INVALID).optional().or(r.z.literal("")),purchaserPhone:r.z.string().max(30).refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),purchaserAltPhone:r.z.string().max(30).refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),typeCode:r.z.string().default("DUCTED_AIR_SOURCE_HEAT_PUMP"),ahriReferenceNumber:r.z.string({required_error:a.ERROR_AHRI_REQUIRED}).min(1,a.ERROR_AHRI_REQUIRED).max(30),condenserBrand:r.z.string().max(30).optional(),condenserModelNumber:r.z.string().max(75).optional().or(r.z.literal("")),condenserSerialNumber:r.z.string({required_error:a.ERROR_SERIAL_REQUIRED}).min(1,a.ERROR_SERIAL_REQUIRED).max(30),evaporatorCoilBrand:r.z.string().max(30).optional(),evaporatorCoilModelNumber:r.z.string().max(75).optional().or(r.z.literal("")),evaporatorCoilSerialNumber:r.z.string({required_error:a.ERROR_SERIAL_REQUIRED}).min(1,a.ERROR_SERIAL_REQUIRED).max(30),furnaceModelNo:r.z.string().max(75).optional(),installDate:r.z.string({required_error:a.ERROR_INSTALL_DATE_REQUIRED}).min(1,a.ERROR_INSTALL_DATE_REQUIRED).regex(t.dateRegex,a.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,t.parseDate)(e)<=new Date,a.ERROR_INSTALL_DATE_FUTURE),switchoverTemperature:r.z.string({required_error:a.ERROR_SWITCHOVER_TEMPERATURE_REQUIRED}).min(1,a.ERROR_SWITCHOVER_TEMPERATURE_REQUIRED).max(2).refine(e=>!e||/^\d{1,2}$/.test(e),a.ERROR_SWITCHOVER_TEMPERATURE_REQUIRED),hspf2Rating:r.z.string().optional(),manufacturerType:r.z.string().optional(),dealerPath:r.z.enum(["yes","no",""]),dealerId:r.z.string().max(30).optional(),dealerCompanyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),dealerStreet:r.z.string().max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),dealerCity:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),dealerState:r.z.string().min(1,a.ERROR_STATE_REQUIRED).optional().or(r.z.literal("")),dealerZip:r.z.string().max(10).regex(t.zipRegex,t.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),rebateContactName:r.z.string({required_error:a.ERROR_FIRST_NAME_REQUIRED}).min(1,a.ERROR_FIRST_NAME_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID),dealerEmail:r.z.string({required_error:a.ERROR_EMAIL_REQUIRED}).min(1,a.ERROR_EMAIL_REQUIRED).max(50).email(a.ERROR_EMAIL_INVALID),dealerEmailVerify:r.z.string({required_error:a.ERROR_EMAIL_REQUIRED}).min(1,a.ERROR_EMAIL_REQUIRED).max(50).email(a.ERROR_EMAIL_INVALID),dealerPhone:r.z.string({required_error:a.ERROR_PHONE_REQUIRED}).min(1,a.ERROR_PHONE_REQUIRED).max(30).regex(t.phoneRegex,a.ERROR_PHONE_INVALID),additionalInfo:r.z.string().max(500).optional(),dealerSignature:r.z.string({required_error:a.ERROR_SIGNATURE_REQUIRED}).min(1,a.ERROR_SIGNATURE_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID),signatureDate:r.z.string({required_error:a.ERROR_DATE_REQUIRED}).min(1,a.ERROR_DATE_REQUIRED).max(10).regex(t.dateRegex,a.ERROR_DATE_REQUIRED),agreeAndSubmit:r.z.boolean().refine(e=>!0===e,{message:a.ERROR_TERMS_REQUIRED})}).superRefine((e,l)=>
193{"yes"!==e.preFormDealerPath&&"no"!==e.preFormDealerPath&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["preFormDealerPath"]}),"yes"!==e.dealerPath&&"no"!==e.dealerPath&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["dealerPath"]}),"no"===e.preFormDealerPath?(e.preFormDealerCompanyName||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["preFormDealerCompanyName"]}),e.preFormDealerStreet||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["preFormDealerStreet"]}),e.preFormDealerCity&&""!==e.preFormDealerCity.trim()?t.alphaOnlyRegex.test(e.preFormDealerCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["preFormDealerCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["preFormDealerCity"]}),e.preFormDealerState||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["preFormDealerState"]}),e.preFormDealerZip&&""!==e.preFormDealerZip.trim()?t.zipRegex.test(e.preFormDealerZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["preFormDealerZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["preFormDealerZip"]})):"yes"!==e.preFormDealerPath||e.preFormDealerId&&/^\d{6}$/.test(e.preFormDealerId)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_DEALER_ID_INVALID,path:["preFormDealerId"]}),"PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["purchaserLastName"]})),"COMPANY"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),e.additionalPurchaser&&"PURCHASER"===e.checkPayableTo&&(e.secondaryPurchaserFirstName&&""!==e.secondaryPurchaserFirstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["secondaryPurchaserFirstName"]}),e.secondaryPurchaserLastName&&""!==e.secondaryPurchaserLastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["secondaryPurchaserLastName"]})),"YES"!==e.rebateAddressDifferent&&"NO"!==e.rebateAddressDifferent&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["rebateAddressDifferent"]}),"YES"===e.rebateAddressDifferent&&(e.purchaserStreet||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["purchaserStreet"]}),e.purchaserCity&&""!==e.purchaserCity.trim()?t.alphaOnlyRegex.test(e.purchaserCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["purchaserCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["purchaserCity"]}),e.purchaserState||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["purchaserState"]}),e.purchaserZip&&""!==e.purchaserZip.trim()?t.zipRegex.test(e.purchaserZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["purchaserZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["purchaserZip"]})),"no"===e.dealerPath?(e.dealerCompanyName||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["dealerCompanyName"]}),e.dealerStreet||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["dealerStreet"]}),e.dealerCity&&""!==e.dealerCity.trim()?t.alphaOnlyRegex.test(e.dealerCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["dealerCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["dealerCity"]}),e.dealerState||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["dealerState"]}),e.dealerZip&&""!==e.dealerZip.trim()?t.zipRegex.test(e.dealerZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["dealerZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["dealerZip"]})):"yes"!==e.dealerPath||e.dealerId&&/^\d{6}$/.test(e.dealerId)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_DEALER_ID_INVALID,path:["dealerId"]}),e.dealerEmail!==e.dealerEmailVerify&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_EMAIL_MISMATCH,path:["dealerEmailVerify"]})});e.s(["ductedHeatPumpRebateSchema",0,l])},64873,e=>{"use strict";e.i(50547),e.s(["BUILDING_TYPES",0,[{value:"",label:""},{value:"1",label:"SINGLE FAMILY"},{value:"7",label:"TOWNHOME"},{value:"8",label:"TWO-PLEX TO FOUR-PLEX"},{value:"10",label:"BUSINESS"},{value:"9",label:"MULTI-FAMILY 5+ UNITS"}],"FIREPLACE_PRODUCTS",0,[{value:"",label:""},{value:"028",label:"Gas Fireplace Insert"},{value:"068",label:"Gas Fireplace"},{value:"076",label:"Free Standing Fireplace"}],"IGNITION_BRANDS",0,[{value:"",label:""},{value:"GREENSMART",label:"GREENSMART"},{value:"INTELLIFIRE",label:"INTELLIFIRE"},{value:"IPI",label:"IPI"},{value:"MAESTRO CONTROL",label:"MAESTRO CONTROL"},{value:"SIGNATURE COMMAND",label:"SIGNATURE COMMAND"},{value:"SUREFIRE",label:"SUREFIRE"},{value:"VALORSTAT PLUS",label:"VALORSTAT PLUS"},{value:"BURNGREEN",label:"BURNGREEN"},{value:"MAXITROL",label:"MAXITROL"},{value:"TRUFLAME",label:"TRU FLAME"}],"INSTALLATION_TYPES",0,[{value:"",label:""},{value:"N",label:"NEW CONSTRUCTION"},{value:"Y",label:"REPLACEMENT"},{value:"C",label:"COMMERCIAL"}],"MN_STATE_OPTION",0,[{value:"MN",label:"MN"}],"MULTI_FAMILY_BONUS_OPTIONS",0,[{value:"",label:""},{value:"2",label:"No"},{value:"1",label:"Yes"},{value:"3",label:"Unknown"}]])},39903,e=>{"use strict";var r=e.i(40733),t=e.i(4625),a=e.i(25929);let l=r.z.object({dealerPath:r.z.enum(["yes","no",""]),dealerId:r.z.string().optional(),dealerCompanyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),dealerStreet:r.z.string().max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),dealerCity:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),dealerState:r.z.string().optional(),dealerZip:r.z.string().max(10).refine(e=>!e||""===e||t.zipRegex.test(e),t.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),installStreet:r.z.string({required_error:a.ERROR_STREET_ADDRESS_REQUIRED}).min(1,a.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID),installCity:r.z.string({required_error:a.ERROR_CITY_REQUIRED}).min(1,a.ERROR_CITY_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID),installState:r.z.literal("MN"),installZip:r.z.string({required_error:a.ERROR_ZIP_REQUIRED}).min(1,a.ERROR_ZIP_REQUIRED).regex(t.zipRegex,t.ZIP_CODE_MESSAGE),accountNumber:r.z.string().max(14).refine(e=>!e||""===e||t.gasAccountRegex.test(e),a.ERROR_GAS_ACCOUNT_INVALID).optional().or(r.z.literal("")),buildingType:r.z.string({required_error:a.ERROR_SELECT_BUILDING_TYPE}).min(1,a.ERROR_SELECT_BUILDING_TYPE),installationType:r.z.string({required_error:a.ERROR_SELECT_INSTALLATION_TYPE}).min(1,a.ERROR_SELECT_INSTALLATION_TYPE),multiFamilyBonus:r.z.string().optional(),totalHousingUnits:r.z.string().optional(),incomeEligibleHouseholds:r.z.string().optional(),checkPayableTo:r.z.enum(["PURCHASER","COMPANY"],{message:a.ERROR_SELECT_CHECK_PAYABLE}),companyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),purchaserFirstName:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),purchaserLastName:r.z.string().max(40).regex(t.alphaOnlyRegex,a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),additionalPurchaser:r.z.boolean().default(!1),secondaryFirstName:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),secondaryLastName:r.z.string().max(40).regex(t.alphaOnlyRegex,a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),mailingAddressDifferent:r.z.enum(["YES","NO",""],{message:a.ERROR_SELECT_OPTION}),mailingStreet:r.z.string().max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),mailingCity:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),mailingState:r.z.string().optional(),mailingZip:r.z.string().max(10).refine(e=>!e||""===e||t.zipRegex.test(e),t.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),purchaserType:r.z.string({required_error:a.ERROR_SELECT_PURCHASER_TYPE}).min(1,a.ERROR_SELECT_PURCHASER_TYPE),purchaserEmail:r.z.string().max(50).email(a.ERROR_EMAIL_INVALID).optional().or(r.z.literal("")),purchaserPhone:r.z.string().max(30).refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),purchaserAltPhone:r.z.string().max(30).refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),fireplaceProduct:r.z.string({required_error:a.ERROR_SELECT_OPTION}).min(1,a.ERROR_SELECT_OPTION),brand:r.z.string({required_error:a.ERROR_SELECT_BRA
193ND}).min(1,a.ERROR_SELECT_BRAND),modelNumber:r.z.string({required_error:a.ERROR_MODEL_REQUIRED}).min(1,a.ERROR_MODEL_REQUIRED).max(75),serialNumber:r.z.string({required_error:a.ERROR_SERIAL_REQUIRED}).min(1,a.ERROR_SERIAL_REQUIRED).max(50),btuInput:r.z.string({required_error:a.ERROR_BTU_INPUT_REQUIRED}).min(1,a.ERROR_BTU_INPUT_REQUIRED).max(6).regex(t.btuRangeRegex,a.ERROR_BTU_INPUT_RANGE),ignitionBrand:r.z.string({required_error:a.ERROR_SELECT_BRAND}).min(1,a.ERROR_SELECT_BRAND),installDate:r.z.string({required_error:a.ERROR_INSTALL_DATE_REQUIRED}).regex(t.dateRegex,a.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,t.parseDate)(e)<=new Date,a.ERROR_INSTALL_DATE_FUTURE),rebateAmount:r.z.string().optional(),rebateContactName:r.z.string({required_error:a.ERROR_FIRST_NAME_REQUIRED}).min(1,a.ERROR_FIRST_NAME_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID),rebateContactEmail:r.z.string({required_error:a.ERROR_EMAIL_REQUIRED}).email(a.ERROR_EMAIL_INVALID).max(50),confirmEmail:r.z.string({required_error:a.ERROR_EMAIL_REQUIRED}).email(a.ERROR_EMAIL_INVALID).max(50),dealerPhone:r.z.string({required_error:a.ERROR_PHONE_REQUIRED}).regex(t.phoneRegex,a.ERROR_PHONE_INVALID).max(30),additionalInfo:r.z.string().max(500).optional(),dealerSignature:r.z.string({required_error:a.ERROR_SIGNATURE_REQUIRED}).min(1,a.ERROR_SIGNATURE_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID),signatureDate:r.z.string({required_error:a.ERROR_DATE_REQUIRED}).regex(t.dateRegex,a.ERROR_DATE_REQUIRED),agreeAndSubmit:r.z.boolean().refine(e=>!0===e,{message:a.ERROR_TERMS_REQUIRED})}).superRefine((e,l)=>{"yes"!==e.dealerPath&&"no"!==e.dealerPath&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["dealerPath"]}),"no"===e.dealerPath?(e.dealerCompanyName||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["dealerCompanyName"]}),e.dealerStreet||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["dealerStreet"]}),e.dealerCity&&""!==e.dealerCity.trim()?t.alphaOnlyRegex.test(e.dealerCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["dealerCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["dealerCity"]}),e.dealerState&&""!==e.dealerState.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["dealerState"]}),e.dealerZip&&""!==e.dealerZip.trim()?t.zipRegex.test(e.dealerZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["dealerZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["dealerZip"]})):"yes"!==e.dealerPath||e.dealerId&&/^\d{6}$/.test(e.dealerId)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_DEALER_ID_INVALID,path:["dealerId"]}),"COMPANY"!==e.checkPayableTo||e.companyName||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),"PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["purchaserLastName"]})),e.additionalPurchaser&&(e.secondaryFirstName&&""!==e.secondaryFirstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["secondaryFirstName"]}),e.secondaryLastName&&""!==e.secondaryLastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["secondaryLastName"]})),"YES"!==e.mailingAddressDifferent&&"NO"!==e.mailingAddressDifferent&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["mailingAddressDifferent"]}),"YES"===e.mailingAddressDifferent&&(e.mailingStreet&&""!==e.mailingStreet.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["mailingStreet"]}),e.mailingCity&&""!==e.mailingCity.trim()?t.alphaOnlyRegex.test(e.mailingCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["mailingCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?t.zipRegex.test(e.mailingZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["mailingZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["mailingZip"]})),e.rebateContactEmail!==e.confirmEmail&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_EMAIL_MISMATCH,path:["confirmEmail"]}),"9"===e.buildingType&&(e.multiFamilyBonus||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_MULTI_FAMILY_BONUS,path:["multiFamilyBonus"]}),"1"===e.multiFamilyBonus&&(e.totalHousingUnits&&""!==e.totalHousingUnits.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_TOTAL_UNITS_REQUIRED,path:["totalHousingUnits"]}),e.incomeEligibleHouseholds&&""!==e.incomeEligibleHouseholds.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_INCOME_ELIGIBLE_REQUIRED,path:["incomeEligibleHouseholds"]})))});e.s(["fireplaceRebateSchema",0,l])},58071,e=>{"use strict";e.i(50547),e.s(["BUILDING_TYPES",0,[{value:"",label:""},{value:"1",label:"Single Family"},{value:"7",label:"Townhome"},{value:"8",label:"Two-Plex to Four-Plex"},{value:"10",label:"Other"},{value:"13",label:"Multifamily"},{value:"16",label:"Condominium"},{value:"20",label:"Office 3-4 Story"},{value:"21",label:"Office 5-9 Story"},{value:"22",label:"Office 10+ Story"},{value:"30",label:"Convenience Store"},{value:"35",label:"Restaurant"},{value:"41",label:"Hotel/Motel"},{value:"44",label:"Retail-Large (>30,000 sq ft)"},{value:"47",label:"Retail-Strip Mall (<30,000 sq ft)"},{value:"50",label:"Health/Medical-Clinic"},{value:"52",label:"Health/Medical-Hospital"},{value:"60",label:"Education-College/University"},{value:"61",label:"Education-Primary"},{value:"62",label:"Education-Secondary"},{value:"80",label:"Warehouse"},{value:"81",label:"Manufacturing"}],"EQUIPMENT_TYPES",0,[{value:"",label:"",code:""},{value:"015",label:"Furnace, Inside-Gas [015]",code:"015"},{value:"018",label:"Boiler, Gas [018]",code:"018"},{value:"256",label:"Condensing Condo Pak [256]",code:"256"},{value:"257",label:"Natural Gas Combi Boiler [257]",code:"257"},{value:"278",label:"Natural Gas Combi Furnace [278]",code:"278"}],"INSTALLATION_TYPES",0,[{value:"",label:""},{value:"N",label:"New Construction"},{value:"Y",label:"Replacement"},{value:"C",label:"Commercial"}],"MN_STATE_OPTION",0,[{value:"MN",label:"MN"}],"MULTI_FAMILY_BONUS_OPTIONS",0,[{value:"",label:""},{value:"NO",label:"No"},{value:"YES",label:"Yes"},{value:"UNKNOWN",label:"Unknown"}],"REGION_EQUIPMENT_OVERRIDES",0,{OK:["015","018"],AR:["015","018"]}])},36921,e=>{"use strict";let r,t;var a=e.i(40733),l=e.i(4625),n=e.i(25929);let s=e=>a.z.string({required_error:e}).min(1,e),o=e=>a.z.string().regex(l.alphaOnlyRegex,e).optional().or(a.z.literal("")),i=a.z.string().max(50).email(n.ERROR_EMAIL_INVALID).optional().or(a.z.literal("")),d=a.z.string().regex(l.phoneRegex,n.ERROR_PHONE_INVALID).optional().or(a.z.literal("")),u=a.z.object({dealerPath:a.z.enum
193(["yes","no",""]),dealerId:a.z.string().optional(),dealerCompanyName:a.z.string().max(40).regex(l.companyNameRegex,n.ERROR_COMPANY_NAME_INVALID).optional().or(a.z.literal("")),dealerStreet:a.z.string().max(60).regex(l.addressRegex,n.ERROR_STREET_ADDRESS_INVALID).optional().or(a.z.literal("")),dealerCity:a.z.string().max(30).regex(l.alphaOnlyRegex,n.ERROR_CITY_INVALID).optional().or(a.z.literal("")),dealerState:a.z.string().optional(),dealerZip:a.z.string().refine(e=>!e||""===e||l.zipRegex.test(e),l.ZIP_CODE_MESSAGE).optional().or(a.z.literal("")),installStreet:s(n.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(l.addressRegex,n.ERROR_STREET_ADDRESS_INVALID),installCity:(r=n.ERROR_CITY_REQUIRED,t=n.ERROR_CITY_INVALID,s(r).regex(l.alphaOnlyRegex,t)).max(30),installState:s(n.ERROR_STATE_REQUIRED),installZip:s(n.ERROR_ZIP_REQUIRED).regex(l.zipRegex,l.ZIP_CODE_MESSAGE),accountNumber:a.z.string().max(14).refine(e=>!e||""===e||l.gasAccountRegex.test(e),n.ERROR_GAS_ACCOUNT_INVALID).optional().or(a.z.literal("")),buildingType:s(n.ERROR_SELECT_BUILDING_TYPE),installationType:s(n.ERROR_SELECT_INSTALLATION_TYPE),multiFamilyBonus:a.z.enum(["NO","YES","UNKNOWN"],{required_error:n.ERROR_SELECT_OPTION,invalid_type_error:n.ERROR_SELECT_OPTION}),totalUnits:a.z.number().int().positive().optional(),incomeEligibleUnits:a.z.number().int().positive().optional(),checkPayableTo:a.z.enum(["PURCHASER","COMPANY"],{required_error:n.ERROR_SELECT_CHECK_PAYABLE,invalid_type_error:n.ERROR_SELECT_CHECK_PAYABLE}),companyName:a.z.string().max(40).regex(l.companyNameRegex,n.ERROR_COMPANY_NAME_INVALID).optional().or(a.z.literal("")),purchaserFirstName:o(n.ERROR_FIRST_NAME_INVALID).transform(e=>e??""),purchaserLastName:o(n.ERROR_LAST_NAME_INVALID).transform(e=>e??""),additionalPurchaser:a.z.boolean().default(!1),secondaryPurchaserFirstName:o(n.ERROR_FIRST_NAME_INVALID).transform(e=>e??""),secondaryPurchaserLastName:o(n.ERROR_LAST_NAME_INVALID).transform(e=>e??""),purchaserStreet:a.z.string().max(60).regex(l.addressRegex,n.ERROR_STREET_ADDRESS_INVALID).optional().or(a.z.literal("")),purchaserCity:a.z.string().max(30).regex(l.alphaOnlyRegex,n.ERROR_CITY_INVALID).optional().or(a.z.literal("")),purchaserState:a.z.string().optional().or(a.z.literal("")),purchaserZip:a.z.string().refine(e=>!e||""===e||l.zipRegex.test(e),l.ZIP_CODE_MESSAGE).optional().or(a.z.literal("")),mailingAddressDifferent:a.z.enum(["YES","NO",""],{message:n.ERROR_SELECT_OPTION}),mailingStreet:a.z.string().max(60).regex(l.addressRegex,n.ERROR_STREET_ADDRESS_INVALID).optional().or(a.z.literal("")),mailingCity:a.z.string().max(30).regex(l.alphaOnlyRegex,n.ERROR_CITY_INVALID).optional().or(a.z.literal("")),mailingState:a.z.string().optional(),mailingZip:a.z.string().refine(e=>!e||""===e||l.zipRegex.test(e),l.ZIP_CODE_MESSAGE).optional().or(a.z.literal("")),purchaserType:s(n.ERROR_SELECT_PURCHASER_TYPE),purchaserEmail:i.transform(e=>e??""),purchaserPhone:d.transform(e=>e??""),purchaserAltPhone:d.transform(e=>e??""),equipmentPath:a.z.enum(["","HEATING_SYSTEM","HEATING_SYSTEM_WITH_THERMOSTAT"]),electricReplacement:a.z.enum(["YES","NO"]).optional(),heatingSystemType:s(n.ERROR_SELECT_OPTION),ahriReferenceNumber:a.z.string().max(30).optional().or(a.z.literal("")),brand:s(n.ERROR_SELECT_BRAND),modelNumber:s(n.ERROR_MODEL_REQUIRED).max(75),serialNumber:s(n.ERROR_SERIAL_REQUIRED).max(50),btuInput:a.z.string().optional(),afue:a.z.string().optional(),installDate:s(n.ERROR_INSTALL_DATE_REQUIRED).regex(l.dateRegex,n.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,l.parseDate)(e)<=new Date,n.ERROR_INSTALL_DATE_FUTURE),rebateAmount:a.z.number().default(0),thermostatBrand:a.z.string().optional(),thermostatModel:a.z.string().optional(),thermostatRebateAmount:a.z.number().optional(),totalRebateAmount:a.z.number().optional(),rebateContactName:s(n.ERROR_FIRST_NAME_REQUIRED).max(30).regex(l.alphaOnlyRegex,n.ERROR_FIRST_NAME_INVALID),rebateContactEmail:s(n.ERROR_EMAIL_REQUIRED).email(n.ERROR_EMAIL_INVALID).max(50),confirmEmail:s(n.ERROR_EMAIL_REQUIRED).email(n.ERROR_EMAIL_INVALID).max(50),workPhone:s(n.ERROR_PHONE_REQUIRED).regex(l.phoneRegex,n.ERROR_PHONE_INVALID),altPhone:d.transform(e=>e??""),additionalInfo:a.z.string().max(500).optional(),dealerSignature:s(n.ERROR_SIGNATURE_REQUIRED).max(30).regex(l.alphaOnlyRegex,n.ERROR_FIRST_NAME_INVALID),signatureDate:s(n.ERROR_DATE_REQUIRED).regex(l.dateRegex,n.ERROR_DATE_REQUIRED),agreeAndSubmit:a.z.boolean().refine(e=>!0===e,{message:n.ERROR_TERMS_REQUIRED})}).superRefine((e,r)=>
193{"yes"!==e.dealerPath&&"no"!==e.dealerPath&&r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_SELECT_OPTION,path:["dealerPath"]}),"yes"===e.dealerPath?e.dealerId&&/^\d{6}$/.test(e.dealerId)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_DEALER_ID_INVALID,path:["dealerId"]}):"no"===e.dealerPath&&(e.dealerCompanyName&&""!==e.dealerCompanyName.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_COMPANY_NAME_REQUIRED,path:["dealerCompanyName"]}),e.dealerStreet&&""!==e.dealerStreet.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_STREET_ADDRESS_REQUIRED,path:["dealerStreet"]}),e.dealerCity&&""!==e.dealerCity.trim()?l.alphaOnlyRegex.test(e.dealerCity)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_CITY_INVALID,path:["dealerCity"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_CITY_REQUIRED,path:["dealerCity"]}),e.dealerState&&""!==e.dealerState.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_STATE_REQUIRED,path:["dealerState"]}),e.dealerZip&&""!==e.dealerZip.trim()?l.zipRegex.test(e.dealerZip)||r.addIssue({code:a.z.ZodIssueCode.custom,message:l.ZIP_CODE_MESSAGE,path:["dealerZip"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_ZIP_REQUIRED,path:["dealerZip"]})),"PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()?l.alphaOnlyRegex.test(e.purchaserFirstName)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_FIRST_NAME_INVALID,path:["purchaserFirstName"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_FIRST_NAME_REQUIRED,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()?l.alphaOnlyRegex.test(e.purchaserLastName)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_LAST_NAME_INVALID,path:["purchaserLastName"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_LAST_NAME_REQUIRED,path:["purchaserLastName"]}),e.additionalPurchaser&&(e.secondaryPurchaserFirstName&&""!==e.secondaryPurchaserFirstName.trim()?l.alphaOnlyRegex.test(e.secondaryPurchaserFirstName)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_FIRST_NAME_INVALID,path:["secondaryPurchaserFirstName"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_FIRST_NAME_REQUIRED,path:["secondaryPurchaserFirstName"]}),e.secondaryPurchaserLastName&&""!==e.secondaryPurchaserLastName.trim()?l.alphaOnlyRegex.test(e.secondaryPurchaserLastName)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_LAST_NAME_INVALID,path:["secondaryPurchaserLastName"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_LAST_NAME_REQUIRED,path:["secondaryPurchaserLastName"]}))),"COMPANY"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),"YES"!==e.mailingAddressDifferent&&"NO"!==e.mailingAddressDifferent&&r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_SELECT_OPTION,path:["mailingAddressDifferent"]}),"YES"===e.mailingAddressDifferent&&(e.mailingStreet&&""!==e.mailingStreet.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_STREET_ADDRESS_REQUIRED,path:["mailingStreet"]}),e.mailingCity&&""!==e.mailingCity.trim()?l.alphaOnlyRegex.test(e.mailingCity)||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_CITY_INVALID,path:["mailingCity"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_CITY_REQUIRED,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_STATE_REQUIRED,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?l.zipRegex.test(e.mailingZip)||r.addIssue({code:a.z.ZodIssueCode.custom,message:l.ZIP_CODE_MESSAGE,path:["mailingZip"]}):r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_ZIP_REQUIRED,path:["mailingZip"]})),"YES"===e.multiFamilyBonus&&(e.totalUnits||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_TOTAL_UNITS_REQUIRED,path:["totalUnits"]}),e.incomeEligibleUnits||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_INCOME_ELIGIBLE_REQUIRED,path:["incomeEligibleUnits"]}),e.totalUnits&&e.incomeEligibleUnits&&(e.incomeEligibleUnits>e.totalUnits&&r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_INCOME_ELIGIBLE_EXCEEDS_TOTAL,path:["incomeEligibleUnits"]}),e.incomeEligibleUnits/e.totalUnits<.66&&r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_INCOME_ELIGIBLE_EXCEEDS_TOTAL,path:["incomeEligibleUnits"]}))),e.equipmentPath||r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_SELECT_OPTION,path:["equipmentPath"]}),"HEATING_SYSTEM_WITH_THERMOSTAT"===e.equipmentPath&&(e.thermostatBrand||r.addIssue({code:a.z.ZodIssueCode.custom,message:"Please select the thermostat brand",path:["thermostatBrand"]}),e.thermostatModel||r.addIssue({code:a.z.ZodIssueCode.custom,message:"Please select the thermostat model",path:["thermostatModel"]})),e.rebateContactEmail!==e.confirmEmail&&r.addIssue({code:a.z.ZodIssueCode.custom,message:n.ERROR_EMAIL_MISMATCH,path:["confirmEmail"]})});e.s(["heatingSystemRebateSchema",0,u])},37073,e=>{"use strict";e.s(["LAUNDRY_BUILDING_TYPES",0,[{value:"",label:""},{value:"1",label:"Single Family"},{value:"7",label:"Townhome"},{value:"8",label:"Two-Plex to Four-Plex"}],"LAUNDRY_INSTALLATION_TYPES",0,[{value:"",label:""},{value:"N",label:"New Construction"},{value:"Y",label:"Replacement"}],"LAUNDRY_PURCHASER_TYPES",0,[{value:"",label:""},{value:"A",label:"Agency"},{value:"B",label:"Builder"},{value:"L",label:"Landlord"},{value:"O",label:"Owner"},{value:"R",label:"Renter"}],"LAUNDRY_RETAILERS",0,[{value:"",label:""},{value:"Other",label:"Other"},{value:"amazon",label:"Amazon"},{value:"appliance-smart",label:"Appliance Smart"},{value:"benusa",label:"Benusa"},{value:"best-buy",label:"Best Buy"},{value:"cullens",label:"Cullen's Home Center"},{value:"degroods",label:"DeGrood's"},{value:"jcpenney",label:"JCPenney's"},{value:"lowes",label:"Lowe's"},{value:"menards",label:"Menards"},{value:"Online Retailer",label:"Online Retailer"},{value:"sears",label:"Sears"},{value:"the-home-depot",label:"The Home Depot"},{value:"warner-stellian",label:"Warner Stellian"}],"STATE_OPTIONS",0,[{value:"",label:""},{value:"AL",label:"AL"},{value:"AK",label:"AK"},{value:"AZ",label:"AZ"},{value:"AR",label:"AR"},{value:"CA",label:"CA"},{value:"CO",label:"CO"},{value:"CT",label:"CT"},{value:"DE",label:"DE"},{value:"DC",label:"DC"},{value:"FL",label:"FL"},{value:"GA",label:"GA"},{value:"HI",label:"HI"},{value:"ID",label:"ID"},{value:"IL",label:"IL"},{value:"IN",label:"IN"},{value:"IA",label:"IA"},{value:"KS",label:"KS"},{value:"KY",label:"KY"},{value:"LA",label:"LA"},{value:"ME",label:"ME"},{value:"MD",label:"MD"},{value:"MA",label:"MA"},{value:"MI",label:"MI"},{value:"MN",label:"MN"},{value:"MS",label:"MS"},{value:"MO",label:"MO"},{value:"MT",label:"MT"},{value:"NE",label:"NE"},{value:"NV",label:"NV"},{value:"NH",label:"NH"},{value:"NJ",label:"NJ"},{value:"NM",label:"NM"},{value:"NY",label:"NY"},{value:"NC",label:"NC"},{value:"ND",label:"ND"},{value:"OH",label:"OH"},{value:"OK",label:"OK"},{value:"OR",label:"OR"},{value:"PA",label:"PA"},{value:"RI",label:"RI"},{value:"SC",label:"SC"},{value:"SD",label:"SD"},{value:"TN",label:"TN"},{value:"TX",label:"TX"},{value:"UT",label:"UT"},{value:"VT",label:"VT"},{value:"VA",label:"VA"},{value:"WA",label:"WA"},{value:"WV",label:"WV"},{value:"WI",label:"WI"},{value:"WY",label:"WY"}]])},60872,e=>{"use strict";var r=e.i(40733),t=e.i(4625),a=e.i(25929);let l=r.z.object({formId:r.z.literal("LAUNDRY"),streetAddress:r.z.string({required_error:a.ERROR_STREET_ADDRESS_REQUIRED}).min(1,a.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID),city:r.z.string({required_error:a.ERROR_CITY_REQUIRED}).min(1,a.ERROR_CITY_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID),state:r.z.literal("MN"),zip:r.z.string({required_error:a.ERROR_ZIP_REQUIRED}).min(1,a.ERROR_ZIP_REQUIRED).regex(t.zipRegex,t.ZIP_CODE_MESSAGE),gasAccountNumber:r.z.string().refine(e=>!e||""===e||t.gasAccountRegex.test(e),a.ERROR_GAS_ACCOUNT_INVALID).optional().or(r.z.literal("")),buildingType:r.z.string({required_error:a.ERROR_SELECT_BUILDING_TYPE}).min(1,a.ERROR_SELECT_BUILDING_TYPE),installationType:r.z.string({required_error:a.ERROR_SELECT_INSTALLATION_TYPE}).min(1,a.ERROR_SELECT_INSTALLATION_TYPE),checkPayableTo:r.z.enum(["purchaser","company"],{required_error:a.ERROR_SELECT_CHECK_PAYABLE}),firstName:r.z.string().max(30).refine(e=>!e||""===e||t.alphaOnlyRegex.test(e),a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),lastName:r.z.string().max(40).refine(e=>!e||""===e||t.alphaOnlyRegex.test(e),a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),hasAdditionalPurchaser:r.z.boolean().default(!1),secondaryFirstName:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),secondaryLastName:r.z.string().max(40).regex(t.alphaOnlyRegex,a.ERROR_LAST_NAME_INVALID).optional().or(r.z.literal("")),companyName:r.z.string().max(40).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),isMailingAddressDifferent:r.z.enum(["yes","no",""],{message:a.ERROR_SELECT_OPTION}),mailingStreetAddress:r.z.string().max(60).regex(t.addressRegex,a.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),mailingCity:r.z.string().max(30).regex(t.alphaOnlyRegex,a.ERROR_CITY_INVALID).optional().or(r.z.literal("")),mailingState:r.z.string().optional().default(""),mailingZip:r.z.string().refine(e=>!e||""===e||t.zipRegex.test(e),t.ZIP_CODE_MESSAGE).optional().default(""),purchaserType:r.z.string({required_error:a.ERROR_SELECT_PURCHASER_TYPE}).min(1,a.ERROR_SELECT_PURCHASER_TYPE),email:r.z.string().email(a.ERROR_EMAIL_INVALID).max(50).optional().or(r.z.literal("")),phone:r.z.string().regex(t.phoneRegex,a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),alternatePhone:r.z.string().refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().default(""),purchaseDate:r.z.string({required_error:a.ERROR_PURCHASE_DATE_REQUIRED}).regex(t.dateRegex,a.ERROR_PURCHASE_DATE_REQUIRED).refine(e=>(0,t.parseDate)(e)<=new Date,a.ERROR_PURCHASE_DATE_FUTURE),brand:r.z.string({required_error:a.ERROR_SELECT_BRA
193ND}).min(1,a.ERROR_SELECT_BRAND),modelNumber:r.z.string({required_error:a.ERROR_MODEL_REQUIRED}).min(1,a.ERROR_MODEL_REQUIRED),serialNumber:r.z.string({required_error:a.ERROR_SERIAL_REQUIRED}).min(1,a.ERROR_SERIAL_REQUIRED).max(30),installDate:r.z.string({required_error:a.ERROR_INSTALL_DATE_REQUIRED}).regex(t.dateRegex,a.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,t.parseDate)(e)<=new Date,a.ERROR_INSTALL_DATE_FUTURE),retailerName:r.z.string({required_error:a.ERROR_SELECT_BRAND}).min(1,a.ERROR_SELECT_BRAND).refine(e=>"__SELECT_RETAILER__"!==e,a.ERROR_SELECT_BRAND),otherRetailerName:r.z.string().max(30).regex(t.companyNameRegex,a.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),retailerDealerId:r.z.string().optional().default(""),storeLocation:r.z.string().optional().default(""),otherStoreName:r.z.string().max(30).optional().default(""),installerName:r.z.string().max(30).refine(e=>!e||""===e||t.alphaOnlyRegex.test(e),a.ERROR_FIRST_NAME_INVALID).optional().or(r.z.literal("")),installerPhone:r.z.string().max(30).refine(e=>!e||""===e||t.phoneRegex.test(e),a.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),additionalInfo:r.z.string().max(500).optional().default(""),purchaserSignature:r.z.string({required_error:a.ERROR_SIGNATURE_REQUIRED}).min(1,a.ERROR_SIGNATURE_REQUIRED).max(30).regex(t.alphaOnlyRegex,a.ERROR_FIRST_NAME_INVALID),signatureDate:r.z.string({required_error:a.ERROR_DATE_REQUIRED}).regex(t.dateRegex,a.ERROR_DATE_REQUIRED).refine(e=>(0,t.parseDate)(e)<=new Date,a.ERROR_SIGNATURE_DATE_FUTURE),agreementChecked:r.z.boolean().refine(e=>!0===e,{message:a.ERROR_AGREEMENT_REQUIRED})}).superRefine((e,l)=>{if("purchaser"===e.checkPayableTo&&(e.firstName&&""!==e.firstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["firstName"]}),e.lastName&&""!==e.lastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["lastName"]})),"company"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),e.hasAdditionalPurchaser&&(e.secondaryFirstName&&""!==e.secondaryFirstName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_FIRST_NAME_REQUIRED,path:["secondaryFirstName"]}),e.secondaryLastName&&""!==e.secondaryLastName.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_LAST_NAME_REQUIRED,path:["secondaryLastName"]})),"yes"!==e.isMailingAddressDifferent&&"no"!==e.isMailingAddressDifferent&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_SELECT_OPTION,path:["isMailingAddressDifferent"]}),"yes"===e.isMailingAddressDifferent&&(e.mailingStreetAddress&&""!==e.mailingStreetAddress.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STREET_ADDRESS_REQUIRED,path:["mailingStreetAddress"]}),e.mailingCity&&""!==e.mailingCity.trim()?t.alphaOnlyRegex.test(e.mailingCity)||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_INVALID,path:["mailingCity"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_CITY_REQUIRED,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_STATE_REQUIRED,path:["mailingState"]}),e.mailingZip&&""!==e.mailingZip.trim()?t.zipRegex.test(e.mailingZip)||l.addIssue({code:r.z.ZodIssueCode.custom,message:t.ZIP_CODE_MESSAGE,path:["mailingZip"]}):l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_ZIP_REQUIRED,path:["mailingZip"]})),new Set(["Other","Online Retailer"]).has(e.retailerName)&&(!e.otherRetailerName||""===e.otherRetailerName.trim())&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_COMPANY_NAME_REQUIRED,path:["otherRetailerName"]}),e.purchaseDate&&e.installDate){let n=(0,t.parseDate)(e.purchaseDate);(0,t.parseDate)(e.installDate)<n&&l.addIssue({code:r.z.ZodIssueCode.custom,message:a.ERROR_INSTALL_BEFORE_PURCHASE,path:["installDate"]})}});e.s(["laundryRebateSchema",0,l])},21339,76511,10445,16506,27635,52072,31444,6276,41081,34227,24911,26529,58978,17130,76476,81265,86191,21938,53583,86767,3966,92751,28759,e=>{"use strict";var r=e.i(40733);let t=r.z.object({confirmed:r.z.boolean().refine(e=>!0===e,{message:"You must confirm un-installation."}),installerName:r.z.string().min(1,"Installer name is required.").max(50,"Installer name must be 50 characters or fewer.")}),a=r.z.object({reasonForOptOut:r.z.string().min(1,"Please select a reason.")});e.s(["deenrollStep3ASchema",0,t,"deenrollStep3BSchema",0,a],21339),e.s(["DEENROLL_OPT_OUT_REASONS",0,[{value:"",label:"Select an option"},{value:"1",label:"Not enough wires"},{value:"2",label:"System is not compatible"},{value:"3",label:"Customer doesn't want a Nest"},{value:"4",label:"Customer would like to remain on the Summer Cycler program"}]],76511);var l=e.i(91398),n=e.i(91788);let s=(0,n.createContext)(null);
193e.s(["SiteSettingsProvider",0,function({children:e,siteSettings:r}){return(0,l.jsx)(s.Provider,{value:r??null,children:e})},"useSiteSettings",0,function(){return(0,n.useContext)(s)}],10445);var o=e.i(43725),i=e.i(59369),d=e.i(58711),u=e.i(30392),c=e.i(14601);let m=[{value:"newest-to-oldest",label:"Newest to Oldest"},{value:"oldest-to-newest",label:"Oldest to Newest"},{value:"a-to-z",label:"A to Z"},{value:"z-to-a",label:"Z to A"}];e.s(["SearchPageSortPanel",0,function({isOpen:e,value:r,onChange:t,onClose:a}){let s=(0,n.useRef)(null),{t:h}=(0,o.useI18n)();return((0,n.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&a()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,a]),(0,n.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed inset-0 z-40 backdrop-blur-[32px] opacity-70 lg:opacity-90 bg-[linear-gradient(180deg,var(--color-med-blue)_0%,var(--color-light-blue)_38.94%,var(--color-white)_97.12%)]",onClick:a,"aria-hidden":"true"}),(0,l.jsxs)("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"sort-title",className:(0,i.cn)("fixed right-0 top-0 h-screen flex flex-col items-start z-50","w-[342px] lg:w-[415px]"),children:[(0,l.jsxs)("div",{className:"flex h-[72px] px-6 py-3 justify-between items-center w-full bg-[var(--color-white)]",children:[(0,l.jsx)("h2",{id:"sort-title",className:"text-center text-lg font-semibold leading-[150%] text-[var(--color-dark-blue)]",children:(0,u.getDictionaryValue)(h,u.DICTIONARY.S.Sort)}),(0,l.jsx)("button",{type:"button",onClick:a,className:"w-6 h-6 flex items-center justify-center text-[var(--color-primary-blue)] hover:opacity-80 transition-opacity","aria-label":(0,u.getDictionaryValue)(h,u.DICTIONARY.C.CloseSortPanel),children:(0,l.jsx)(d.XmarkLightIcon,{className:"w-6 h-6"})})]}),(0,l.jsx)("div",{className:"flex flex-1 px-5 py-10 flex-col items-start gap-1 w-full border-t border-[var(--color-light-grey)] bg-[var(--color-secondary-grey)]",role:"radiogroup","aria-labelledby":"sort-title",children:m.map(e=>(0,l.jsx)(c.default,{label:e.label,checked:e.value===r,onChange:()=>{t(e.value)},variant:"filter",name:"search-sort",value:e.value,className:"w-full"},e.value))}),(0,l.jsx)("div",{className:"flex px-6 py-[33px] flex-col items-start gap-2.5 w-full bg-[var(--color-white)]",children:(0,l.jsx)("button",{type:"button",onClick:a,className:(0,i.cn)("w-full","flex items-center justify-center","px-6 py-[18px]","rounded-full","font-bold text-base leading-[1.5] text-white","transition-all duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","bg-gradient-to-r from-darkest-blue to-[var(--color-blue-green)] hover:opacity-90 focus-visible:ring-darkest-blue"),children:"View Results"})})]})]}):null}],16506),e.s([],27635);var h=e.i(4625),p=e.i(25929);let g=/^[A-Za-zÃ-É\s'.-]+$/;function f(e){return!e||""===e.trim()||g.test(e.trim())}let b=r.z.object({installStreet:r.z.string({required_error:p.ERROR_STREET_ADDRESS_REQUIRED}).min(1,p.ERROR_STREET_ADDRESS_REQUIRED).max(60).regex(h.addressRegex,p.ERROR_STREET_ADDRESS_INVALID),installCity:r.z.string({required_error:p.ERROR_CITY_REQUIRED}).min(1,p.ERROR_CITY_REQUIRED).max(30).refine(f,p.ERROR_CITY_INVALID),installState:r.z.string({required_error:p.ERROR_STATE_REQUIRED}).min(1,p.ERROR_STATE_REQUIRED),installZip:r.z.string({required_error:p.ERROR_ZIP_REQUIRED}).max(10).min(1,p.ERROR_ZIP_REQUIRED).regex(h.zipRegex,h.ZIP_CODE_MESSAGE),accountNumber:r.z.string().max(14).refine(e=>!e||""===e||h.gasAccountRegex.test(e),p.ERROR_GAS_ACCOUNT_INVALID).optional().or(r.z.literal("")),buildingType:r.z.string({required_error:p.ERROR_SELECT_BUILDING_TYPE}).min(1,p.ERROR_SELECT_BUILDING_TYPE),installationType:r.z.string({required_error:p.ERROR_SELECT_INSTALLATION_TYPE}).min(1,p.ERROR_SELECT_INSTALLATION_TYPE),checkPayableTo:r.z.enum(["PURCHASER","COMPANY"],{errorMap:()=>({message:p.ERROR_SELECT_OPTION})}),purchaserFirstName:r.z.string().max(30).refine(f,p.ERROR_FIRST_NAME_INVALID).optional(),purchaserLastName:r.z.string().max(40).refine(f,p.ERROR_FIRST_NAME_INVALID).optional(),companyName:r.z.string().max(40).regex(h.companyNameRegex,p.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),additionalPurchaser:r.z.boolean().default(!1),secondPurchaserFirstName:r.z.string().max(30).refine(f,p.ERROR_FIRST_NAME_INVALID).optional(),secondPurchaserLastName:r.z.string().max(40).refine(f,p.ERROR_FIRST_NAME_INVALID).optional(),mailingAddressDifferent:r.z.enum(["YES","NO",""],{message:p.ERROR_SELECT_OPTION}),mailingStreet:r.z.string().max(60).regex(h.addressRegex,p.ERROR_STREET_ADDRESS_INVALID).optional().or(r.z.literal("")),mailingCity:r.z.string().max(30).refine(f,p.ERROR_CITY_INVALID).optional(),mailingState:r.z.string().optional(),mailingZip:r.z.string().refine(e=>!e||""===e||h.zipRegex.test(e),h.ZIP_CODE_MESSAGE).optional().or(r.z.literal("")),purchaserType:r.z.string({required_error:p.ERROR_SELECT_PURCHASER_TYPE}).min(1,p.ERROR_SELECT_PURCHASER_TYPE),purchaserEmail:r.z.string().email(p.ERROR_EMAIL_INVALID).max(50).optional().or(r.z.literal("")),purchaserPhone:r.z.string().max(30).refine(e=>!e||""===e||h.phoneRegex.test(e),p.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),purchaserAltPhone:r.z.string().max(30).refine(e=>!e||""===e||h.phoneRegex.test(e),p.ERROR_PHONE_INVALID).optional().or(r.z.literal("")),thermostatTypeBeingReplaced:r.z.string({required_error:p.ERROR_SELECT_OPTION}).min(1,p.ERROR_SELECT_OPTION),installationTypeCheckboxes:r.z.array(r.z.string()).optional(),purchaseDate:r.z.string({required_error:p.ERROR_PURCHASE_DATE_REQUIRED}).min(1,p.ERROR_PURCHASE_DATE_REQUIRED).regex(h.dateRegex,p.ERROR_PURCHASE_DATE_REQUIRED).refine(e=>(0,h.parseDate)(e)<=new Date,p.ERROR_PURCHASE_DATE_FUTURE),brand:r.z.string({required_error:p.ERROR_SELECT_BRA
193ND}).min(1,p.ERROR_SELECT_BRAND),modelNumber:r.z.string({required_error:p.ERROR_MODEL_REQUIRED}).min(1,p.ERROR_MODEL_REQUIRED).max(75),installDate:r.z.string({required_error:p.ERROR_INSTALL_DATE_REQUIRED}).min(1,p.ERROR_INSTALL_DATE_REQUIRED).regex(h.dateRegex,p.ERROR_INSTALL_DATE_REQUIRED).refine(e=>(0,h.parseDate)(e)<=new Date,p.ERROR_INSTALL_DATE_FUTURE),rebateAmount:r.z.number().default(0),retailerName:r.z.string({required_error:p.ERROR_SELECT_BRAND}).min(1,p.ERROR_SELECT_BRAND).refine(e=>"__SELECT_RETAILER__"!==e,p.ERROR_SELECT_BRAND),otherRetailerName:r.z.string().max(30).regex(h.companyNameRegex,p.ERROR_COMPANY_NAME_INVALID).optional().or(r.z.literal("")),storeLocation:r.z.string({required_error:p.ERROR_SELECT_OPTION}).min(1,p.ERROR_SELECT_OPTION).refine(e=>"__SELECT_STORE__"!==e,p.ERROR_SELECT_OPTION),otherStoreName:r.z.string().max(30).optional().or(r.z.literal("")),installerName:r.z.string().max(30).optional().or(r.z.literal("")),installerPhone:r.z.string().optional(),additionalInfo:r.z.string().optional(),purchaserSignature:r.z.string({required_error:p.ERROR_SIGNATURE_REQUIRED}).min(1,p.ERROR_SIGNATURE_REQUIRED).max(30).regex(h.alphaOnlyRegex,p.ERROR_FIRST_NAME_INVALID),signatureDate:r.z.string({required_error:p.ERROR_DATE_REQUIRED}).min(1,p.ERROR_DATE_REQUIRED).regex(h.dateRegex,p.ERROR_DATE_REQUIRED),agreeAndSubmit:r.z.boolean().refine(e=>!0===e,{message:p.ERROR_AGREEMENT_REQUIRED})}).superRefine((e,t)=>{if("PURCHASER"===e.checkPayableTo&&(e.purchaserFirstName&&""!==e.purchaserFirstName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_FIRST_NAME_REQUIRED,path:["purchaserFirstName"]}),e.purchaserLastName&&""!==e.purchaserLastName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_LAST_NAME_REQUIRED,path:["purchaserLastName"]})),"COMPANY"!==e.checkPayableTo||e.companyName&&""!==e.companyName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_COMPANY_NAME_REQUIRED,path:["companyName"]}),e.additionalPurchaser&&(e.secondPurchaserFirstName&&""!==e.secondPurchaserFirstName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_FIRST_NAME_REQUIRED,path:["secondPurchaserFirstName"]}),e.secondPurchaserLastName&&""!==e.secondPurchaserLastName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_LAST_NAME_REQUIRED,path:["secondPurchaserLastName"]})),"YES"!==e.mailingAddressDifferent&&"NO"!==e.mailingAddressDifferent&&t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_SELECT_OPTION,path:["mailingAddressDifferent"]}),"YES"===e.mailingAddressDifferent&&(e.mailingStreet&&""!==e.mailingStreet.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_STREET_ADDRESS_REQUIRED,path:["mailingStreet"]}),e.mailingCity&&""!==e.mailingCity.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_CITY_REQUIRED,path:["mailingCity"]}),e.mailingState&&""!==e.mailingState.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_STATE_REQUIRED,path:["mailingState"]}),e.mailingZip&&h.zipRegex.test(e.mailingZip)||t.addIssue({code:r.z.ZodIssueCode.custom,message:h.ZIP_CODE_MESSAGE,path:["mailingZip"]})),new Set(["Other","Online Retailer"]).has(e.retailerName)&&(!e.otherRetailerName||""===e.otherRetailerName.trim())&&t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_COMPANY_NAME_REQUIRED,path:["otherRetailerName"]}),"Other"!==e.storeLocation||e.otherStoreName&&""!==e.otherStoreName.trim()||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_COMPANY_NAME_REQUIRED,path:["otherStoreName"]}),e.installerPhone&&""!==e.installerPhone.trim()&&h.phoneRegex.test(e.installerPhone)||t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_PHONE_INVALID,path:["installerPhone"]}),e.purchaseDate&&e.installDate&&h.dateRegex.test(e.purchaseDate)&&h.dateRegex.test(e.installDate)){let a=(0,h.parseDate)(e.purchaseDate);(0,h.parseDate)(e.installDate)<a&&t.addIssue({code:r.z.ZodIssueCode.custom,message:p.ERROR_INSTALL_BEFORE_PURCHASE,path:["installDate"]})}});
193e.s(["retailThermostatRebateSchema",0,b],52072),e.s(["useCIPDropdownData",0,function(e,r){let[t,a]=(0,n.useState)(null),[l,s]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let t=!1;return s(!0),i(null),fetch("/api/cip/dropdown-data",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({formId:e,region:r})}).then(async e=>{if(!e.ok)throw Error("Failed to load dropdown data");let r=await e.json();if("object"!=typeof r||null===r||!("success"in r)||!r.success||!("data"in r))throw Error("Unexpected response format");return r.data}).then(e=>{t||(a(e),s(!1))}).catch(e=>{t||(i(e instanceof Error?e.message:"Failed to load dropdown data"),s(!1))}),()=>{t=!0}},[e,r]),{data:t,isLoading:l,error:o}}],31444);var x=e.i(58021),v=e.i(84637);e.i(78118);var y=e.i(94102);e.i(70484);var R=e.i(45892);let N="__SELECT_RETAILER__",E="__SELECT_STORE__",I=new Set(["Other","Online Retailer"]);e.s(["RETAILER_PLACEHOLDER_VALUE",0,N,"RetailerSectionConnected",0,function({retailerOptions:e,storeLocationOptions:r}){let t=(0,o.useI18n)(),a=t?.t??(e=>""),{watch:n,setValue:s,formState:{errors:i}}=(0,x.useFormContext)(),d=n("retailerName")??"",c=n("otherRetailerName")??"",m=n("storeLocation")??"",h=n("otherStoreName")??"",g=[{value:N,label:"--Select Retailer Name--"},...e],f=I.has(d),b=[{value:E,label:"--Select Store Location--"},...r];return(0,l.jsx)(v.FormSection,{number:4,title:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Section_RetailerInfo),children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(y.Dropdown,{label:"Retailer Name",value:d,onChange:e=>{s("retailerName",e,{shouldValidate:!1}),I.has(e)||s("otherRetailerName","",{shouldValidate:!1})},options:g,required:!0,errorMessage:(0,p.translateFormError)(a,i.retailerName?.message)}),f&&(0,l.jsx)(R.InputField,{label:"Retailer Name",value:c,onChange:e=>{s("otherRetailerName",e,{shouldValidate:!1})},placeholder:"Enter retailer name",maxLength:30,required:!0,errorMessage:(0,p.translateFormError)(a,i.otherRetailerName?.message)}),(0,l.jsx)(y.Dropdown,{label:"Store Location",value:m,onChange:e=>{s("storeLocation",e,{shouldValidate:!1}),s("otherStoreName","",{shouldValidate:!1})},options:b,required:!0,errorMessage:(0,p.translateFormError)(a,i.storeLocation?.message)}),"Other"===m&&(0,l.jsx)(R.InputField,{label:"Store Location",value:h,onChange:e=>{s("otherStoreName",e,{shouldValidate:!1})},placeholder:"Enter store name",maxLength:30,required:!0,errorMessage:(0,p.translateFormError)(a,i.otherStoreName?.message)})]})})},"STORE_PLACEHOLDER_VALUE",0,E],6276);var C=e.i(46203),_=e.i(50547);e.s(["InstallationSection",0,function({buildingTypes:e,installationTypes:r,isLoadingOptions:t}){let a=(0,o.useI18n)(),s=a?.t??(e=>""),{control:i,formState:{errors:d}}
193=(0,x.useFormContext)(),[c,m]=(0,n.useState)(!1);return(0,l.jsx)(v.FormSection,{number:1,title:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Section_InstallationInfo),children:(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,l.jsx)(x.Controller,{control:i,name:"installStreet",render:({field:e})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,p.translateFormError)(s,d.installStreet?.message),required:!0})})}),(0,l.jsx)(x.Controller,{control:i,name:"installCity",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_City),value:e.value,onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,p.translateFormError)(s,d.installCity?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:i,name:"installState",render:({field:e})=>(0,l.jsx)(y.Dropdown,{label:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_State),value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:_.MN_STATE_OPTION,placeholder:"--Select State--",errorMessage:(0,p.translateFormError)(s,d.installState?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:i,name:"installZip",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value,onChange:e.onChange,onBlur:e.onBlur,placeholder:"XXXXX",maxLength:10,errorMessage:(0,p.translateFormError)(s,d.installZip?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:i,name:"accountNumber",render:({field:e})=>(0,l.jsx)(C.GasAccountNumberField,{value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,errorMessage:(0,p.translateFormError)(s,d.accountNumber?.message),customerVoice:!0,showHelpText:!0})}),(0,l.jsx)(x.Controller,{control:i,name:"buildingType",render:({field:r})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(y.Dropdown,{label:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_BuildingType),value:r.value,onChange:r.onChange,onBlur:r.onBlur,options:e,placeholder:t?(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Placeholder_SelectBuildingType),disabled:t,errorMessage:(0,p.translateFormError)(s,d.buildingType?.message),required:!0})})}),(0,l.jsx)(x.Controller,{control:i,name:"installationType",render:({field:e})=>(0,l.jsxs)("div",{className:"sm:col-span-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:"text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Label_InstallationType)," ",(0,l.jsx)("span",{className:"text-[var(--color-red)]",children:"*"})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("button",{type:"button",className:"text-[var(--color-primary-blue)] underline hover:no-underline text-sm",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onFocus:()=>m(!0),onBlur:()=>m(!1),"aria-label":"More information about installation types",children:(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Helper_MoreInformation)}),c&&(0,l.jsx)("div",{className:"absolute left-0 top-full z-50 mt-2 w-[330px] rounded-lg border border-[var(--color-grey-3)] bg-white p-4 shadow-lg",children:(0,l.jsx)("img",{src:"https://assets.centerpointenergy.com/api/public/content/cip-installation-type-Optimized_Web_Image.
193webp?v=54a91595",alt:"Installation type information showing the difference between New Construction and Replacement",className:"w-full"})})]})]}),(0,l.jsx)(y.Dropdown,{value:e.value,onChange:e.onChange,onBlur:e.onBlur,options:r,placeholder:t?(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(s,u.DICTIONARY.F.Form_Placeholder_SelectInstallationType),disabled:t,errorMessage:(0,p.translateFormError)(s,d.installationType?.message),required:!0})]})})]})})}],41081);var j=e.i(30798);let S=[{value:"1",label:"SINGLE FAMILY"},{value:"7",label:"TOWNHOME"},{value:"8",label:"TWO-PLEX TO FOUR-PLEX"},{value:"10",label:"OTHER"},{value:"13",label:"MULTIFAMILY"},{value:"16",label:"CONDOMINIUM"},{value:"20",label:"OFFICE 3-4 STORY"},{value:"21",label:"OFFICE 5-9 STORY"},{value:"22",label:"OFFICE 10+ STORY"},{value:"30",label:"CONVENIENCE STORE"},{value:"35",label:"RESTAURANT"},{value:"41",label:"HOTEL/MOTEL"},{value:"44",label:"RETAIL-LARGE(>30,000 SQ FT)"},{value:"47",label:"RETAIL-STRIP MALL(<30,000 SQ FT)"},{value:"50",label:"HEALTH/MEDICAL-CLINIC"},{value:"52",label:"HEALTH/MEDICAL-HOSPITAL"},{value:"60",label:"EDUCATION-COLLEGE/UNIVERSITY"},{value:"61",label:"EDUCATION-PRIMARY"},{value:"62",label:"EDUCATION-SECONDARY"},{value:"80",label:"WAREHOUSE"},{value:"81",label:"MANUFACTURING"}],D=[{value:"Y",label:"Replacement"},{value:"N",label:"New Construction"},{value:"C",label:"Commercial"},{value:"REPLACEMENT",label:"Replacement"},{value:"NEW_CONSTRUCTION",label:"New Construction"},{value:"COMMERCIAL",label:"Commercial"}],T=[{value:"MANUAL",label:"Manual"},{value:"PROGRAMMABLE",label:"Programmable"},{value:"WIFI_PROGRAMMABLE",label:"Wi-Fi Programmable"},{value:"WIFI_LEARNING",label:"Wi-Fi Learning"},{value:"UNKNOWN_OTHER",label:"Unknown/Other"}],A=[{value:"AMAZON",label:"Amazon"},{value:"BEST_BUY",label:"Best Buy"},{value:"HOME_DEPOT",label:"Home Depot"},{value:"LOWES",label:"Lowe's"},{value:"MENARDS",label:"Menards"},{value:"TARGET",label:"Target"},{value:"WALMART",label:"Walmart"},{value:"COSTCO",label:"Costco"},{value:"ACE_HARDWARE",label:"Ace Hardware"},{value:"TRUE_VALUE",label:"True Value"},{value:"MILLS_FLEET_FARM",label:"Mills Fleet Farm"},{value:"Online Retailer",label:"Online Retailer"},{value:"Other",label:"Other"}];e.s(["INSTALLATION_TYPES",0,D,"RETAIL_THERMOSTAT_BUILDING_TYPES",0,S,"RETAIL_THERMOSTAT_RETAILERS",0,A,"THERMOSTAT_TYPES_BEING_REPLACED",0,T],34227),e.s(["PurchaserSection",0,function({purchaserTypes:e,isLoadingOptions:r}){let t=(0,o.useI18n)(),a=t?.t??(e=>""),{control:n,watch:s,setValue:i,formState:{errors:d}}=(0,x.useFormContext)(),m=s("checkPayableTo"),h=s("additionalPurchaser"),g=s("mailingAddressDifferent"),f=e=>{"COMPANY"===e?(i("purchaserFirstName","",{shouldValidate:!1}),i("purchaserLastName","",{shouldValidate:!1}),i("additionalPurchaser",!1,{shouldValidate:!1}),i("secondPurchaserFirstName","",{shouldValidate:!1}),i("secondPurchaserLastName","",{shouldValidate:!1})):"PURCHASER"===e&&i("companyName","",{shouldValidate:!1})},b=e=>{"NO"===e&&(i("mailingStreet","",{shouldValidate:!1}),i("mailingCity","",{shouldValidate:!1}),i("mailingState","MN",{shouldValidate:!1}),i("mailingZip","",{shouldValidate:!1}))};return(0,l.jsx)(v.FormSection,{number:2,title:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Section_PurchaserInfo),children:(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(x.Controller,{control:n,name:"checkPayableTo",render:({field:e})=>(0,l.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,l.jsxs)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_CheckPayableTo)," ",(0,l.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)(c.Radio,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Option_Purchaser),name:"checkPayableTo",value:"PURCHASER",checked:"PURCHASER"===e.value,onChange:()=>{e.onChange("PURCHASER"),f("PURCHASER")},variant:"forms"}),(0,l.jsx)(c.Radio,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Option_Company),name:"checkPayableTo",value:"COMPANY",checked:"COMPANY"===e.value,onChange:()=>{e.onChange("COMPANY"),f("COMPANY")},variant:"forms"})]}),d.checkPayableTo&&(0,l.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,p.translateFormError)(a,d.checkPayableTo.message)})]})})}),"PURCHASER"===m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Controller,{c
193ontrol:n,name:"purchaserFirstName",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,p.translateFormError)(a,d.purchaserFirstName?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:n,name:"purchaserLastName",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,p.translateFormError)(a,d.purchaserLastName?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:n,name:"additionalPurchaser",render:({field:e})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(j.Checkbox,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_AdditionalPurchaser),checked:e.value,onChange:r=>{e.onChange(r),r||(i("secondPurchaserFirstName","",{shouldValidate:!1}),i("secondPurchaserLastName","",{shouldValidate:!1}))},variant:"forms"})})}),!0===h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Controller,{control:n,name:"secondPurchaserFirstName",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_SecondaryPurchaserFirstName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,p.translateFormError)(a,d.secondPurchaserFirstName?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:n,name:"secondPurchaserLastName",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_SecondaryPurchaserLastName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,p.translateFormError)(a,d.secondPurchaserLastName?.message),required:!0})})]})]}),"COMPANY"===m&&(0,l.jsx)(x.Controller,{control:n,name:"companyName",render:({field:e})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_CompanyName),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:40,errorMessage:(0,p.translateFormError)(a,d.companyName?.message),required:!0})})}),(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,l.jsxs)("legend",{className:"mb-2 text-body-md font-medium text-[var(--color-text-primary)]",children:[(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_MailingAddressDifferent)," ",(0,l.jsx)("span",{className:"text-[var(--color-red)]","aria-hidden":"true",children:"*"})]}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(0,l.jsx)(x.Controller,{control:n,name:"mailingAddressDifferent",render:({field:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Radio,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Option_Yes),name:"mailingAddressDifferent",value:"YES",checked:"YES"===e.value,onChange:()=>{e.onChange("YES"),b("YES")},variant:"forms"}),(0,l.jsx)(c.Radio,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Option_No),name:"mailingAddressDifferent",value:"NO",checked:"NO"===e.value,onChange:()=>{e.onChange("NO"),b("NO")},variant:"forms"})]})})})]})}),"YES"===g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Controller,{control:n,name:"mailingStreet",render:({field:e})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_StreetAddress),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:60,errorMessage:(0,p.translateFormError)(a,d.mailingStreet?.message),required:!0})})}),(0,l.jsx)(x.Controller,{control:n,name:"mailingCity",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_City),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:30,errorMessage:(0,p.translateFormError)(a,d.mailingCity?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:n,name:"mailingState",render:({field:e})=>(0,l.jsx)(y.Dropdown,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_State),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,options:_.STATE_OPTIONS,placeholder:"--Select State--",errorMessage:(0,p.translateFormError)(a,d.mailingState?.message),required:!0})}
193),(0,l.jsx)(x.Controller,{control:n,name:"mailingZip",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_ZipCode),value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,placeholder:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Placeholder_Zip),maxLength:10,errorMessage:(0,p.translateFormError)(a,d.mailingZip?.message),required:!0})})]}),(0,l.jsx)(x.Controller,{control:n,name:"purchaserType",render:({field:t})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(y.Dropdown,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserType),value:t.value,onChange:t.onChange,onBlur:t.onBlur,options:e,placeholder:r?(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Placeholder_SelectPurchaserType),disabled:r,errorMessage:(0,p.translateFormError)(a,d.purchaserType?.message),required:!0})})}),(0,l.jsx)(x.Controller,{control:n,name:"purchaserEmail",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserEmail),type:"email",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:50,errorMessage:(0,p.translateFormError)(a,d.purchaserEmail?.message)})}),(0,l.jsx)(x.Controller,{control:n,name:"purchaserPhone",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserTelephoneNumber),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,p.translateFormError)(a,d.purchaserPhone?.message)})}),(0,l.jsx)(x.Controller,{control:n,name:"purchaserAltPhone",render:({field:e})=>(0,l.jsx)(R.InputField,{label:(0,u.getDictionaryValue)(a,u.DICTIONARY.F.Form_Label_PurchaserAltPhone),type:"tel",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,p.translateFormError)(a,d.purchaserAltPhone?.message)})})]})})}],24911);var F=e.i(94988),O=e.i(34346);let w={REPLACEMENT:"Y",NEW_CONSTRUCTION:"N",COMMERCIAL:"C",Y:"Y",N:"N",C:"C"};e.s(["EquipmentSection",0,function({thermostatTypes:e,brands:r,rebateRules:t,rebateModels:a,isLoadingOptions:s,receiptFiles:d,receiptFileKey:c,receiptError:m,onReceiptChange:g}){let f=(0,o.useI18n)(),b=f?.t??(e=>""),{control:N,watch:E,setValue:I,formState:{errors:C}}=(0,x.useFormContext)(),S=E("brand"),D=E("modelNumber"),T=E("installationType"),A=E("rebateAmount"),[L,P]=(0,n.useState)(""),[k,M]=(0,n.useState)(!1),V=(0,n.useRef)(null),[B,Y]=(0,n.useState)(!1),[U,z]=(0,n.useState)(!1),Z=(0,n.useRef)(T);(0,n.useEffect)(()=>{Z.current!==T&&void 0!==Z.current&&(I("brand","",{shouldValidate:!1}),I("modelNumber","",{shouldValidate:!1}),I("rebateAmount",0,{shouldValidate:!1}),P(""),M(!1),Y(!1),z(!1)),Z.current=T},[T,I]);let q=(0,n.useMemo)(()=>S?a.filter(e=>e.brand===S).map(e=>({value:e.equipModel,label:e.equipModel})):[],[a,S]),H=(0,n.useMemo)(()=>{if(!q.length)return[];if(!L)return q.slice(0,50);let e=L.toLowerCase();return q.filter(r=>r.value.toLowerCase().includes(e)||r.label.toLowerCase().includes(e)).slice(0,50)},[q,L]),$=(0,n.useMemo)(()=>{if(!D)return"";let e=a.find(e=>e.equipModel===D);return e?.tier??""},[D,a]),G=(0,n.useMemo)(()=>{if(!$||!T)return 0;let e=w[T];if(!e)return 0;let r=new Date().getFullYear().toString(),a=t.find(t=>t.tier===$&&t.installationType===e&&t.programYear===r);if(a&&a.custRebate){let e=parseFloat(a.custRebate);if(!isNaN(e))return e}return 0},[$,T,t]);(0,n.useEffect)(()=>{I("rebateAmount",G,{shouldValidate:!1})},[G,I]),(0,n.useEffect)(()=>{I("modelNumber","",{shouldValidate:!1}),P(""),M(!1)},[S,I]),(0,n.useEffect)(()=>{let e=e=>{V.current&&!V.current.contains(e.target)&&M(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=(0,n.useRef)(!1),W=(0,n.useCallback)(e=>{I("modelNumber",e.value,{shouldValidate:!1}),P(e.label||e.value),M(!1),setTimeout(()=>{Q.current=!1},150)},[I]);return(0,l.jsx)(v.FormSection,{number:3,title:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Section_EquipmentInfo),children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,l.jsx)(x.Controller,{c
193ontrol:N,name:"thermostatTypeBeingReplaced",render:({field:r})=>(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(y.Dropdown,{label:"What type of thermostat was removed before the new thermostat was installed?",value:r.value,onChange:r.onChange,onBlur:r.onBlur,options:e,placeholder:s?(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_Loading):(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_SelectThermostatType),disabled:s,errorMessage:(0,p.translateFormError)(b,C.thermostatTypeBeingReplaced?.message),required:!0})})}),(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsxs)("fieldset",{className:"border-0 p-0",children:[(0,l.jsx)("legend",{className:"mb-3 text-body-md font-medium text-[var(--color-text-primary)]",children:"Check all that Apply"}),(0,l.jsx)("p",{className:"mb-2 text-body-sm text-[var(--color-text-secondary)]",children:"Dealer Installation Type"}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(0,l.jsx)(x.Controller,{control:N,name:"installationTypeCheckboxes",render:({field:e})=>(0,l.jsx)(l.Fragment,{children:_.INSTALLATION_TYPE_CHECKBOXES.map(r=>{let t=e.value??[],a=t.includes(r.value);return(0,l.jsx)(j.Checkbox,{label:r.label,checked:a,onChange:a=>{let l=a?[...t,r.value]:t.filter(e=>e!==r.value);e.onChange(l)},variant:"forms"},r.value)})})})})]})}),(0,l.jsx)(x.Controller,{control:N,name:"purchaseDate",render:({field:e})=>(0,l.jsx)(R.InputField,{label:`${(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_PurchaseDate)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,p.translateFormError)(b,C.purchaseDate?.message),required:!0})}),(0,l.jsx)(x.Controller,{control:N,name:"brand",render:({field:e})=>(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)(y.Dropdown,{label:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_Brand),value:e.value,onChange:r=>{T?e.onChange(r):Y(!0)},onBlur:e.onBlur,onFocus:()=>Y(!0),options:r,placeholder:s?(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_LoadingBrands):(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Placeholder_SelectBrand),errorMessage:!T&&B?(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Error_SelectInstallationTypeFirst):(0,p.translateFormError)(b,C.brand?.message),disabled:0===r.length||s,required:!0}),(0,l.jsx)("button",{type:"button",onClick:()=>(0,h.openPopup)("https://assets.centerpointenergy.com/api/public/content/thermostat-tier-resource-guide-thermostat-tier-resource-guide?v=e6343a30"),className:"text-[var(--color-primary-blue)] underline hover:no-underline text-sm","aria-label":"Link to see list of eligible thermostat brands and model numbers",children:"List of eligible thermostat brands and model numbers."})]})}),(0,l.jsxs)("div",{ref:V,className:"relative",children:[(0,l.jsx)(x.Controller,{control:N,name:"modelNumber",render:({field:e})=>{let r=k&&H.length>0&&S&&L.length>=3;return(0,l.jsx)(R.InputField,{label:"Model Number",value:L,onChange:r=>{T?(P(r),e.onChange(r),M(r.length>=3)):z(!0)},onBlur:()=>{if(e.onBlur(),Q.current)return;let r=e.value;r&&(a.length>0&&a.some(e=>e.equipModel.toLowerCase()===r.toLowerCase())||(P(""),e.onChange("")))},onFocus:()=>z(!0),placeholder:"",errorMessage:r?void 0:!T&&U?"Select installation type first":(0,p.translateFormError)(b,C.modelNumber?.message),disabled:!S||0===q.length,required:!0})}}),k&&H.length>0&&S&&L.length>=3&&(0,l.jsx)("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--color-grey-3)] bg-white shadow-lg",children:H.map(e=>(0,l.jsx)("button",{type:"button",onMouseDown:()=>{Q.current=!0},onClick:()=>W(e),className:(0,i.cn)("w-full px-3 py-2 text-left cursor-pointer","hover:bg-[var(--color-secondary-grey)] hover:border-[var(--color-medium-grey)] hover:rounded-[12px]","border border-transparent","text-[18px] leading-[1.5] text-[var(--color-text-primary)] font-light","transition-colors duration-150"),children:(0,l.jsx)("div",{className:"font-medium",children:e.label||e.value})},e.value))})]}),(0,l.jsx)(x.Controller,{control:N,name:"installDate",render:({field:e})=>(0,l.jsx)(R.InputField,{label:`${(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_DateOfInstallation)} (MM/DD/YYYY)`,value:e.value,onChange:e.onChange,onBlur:e.onBlur,type:"date",errorMessage:(0,p.translateFormError)(b,C.installDate?.message),required:!0})}),(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(F.RebateAmountField,{label:(0,u.getDictionaryValue)(b,u.DICTIONARY.F.Form_Label_RebateAmount),amount:A})})]}),(0,l.jsx)(O.FileUpload,{label:"Attach Retailer Receipt/Invoice (JPEG, PDF, GIF, PNG)",helperText:"(MAX 5MB)",onChange:e=>{g(e)}
193,accept:["image/jpeg","image/gif","image/png","application/pdf"],maxSizeMB:5,maxFiles:5,multiple:!0,errorMessage:m,required:!0},c),d.length>0&&(0,l.jsxs)("p",{className:"text-body-sm text-[var(--color-text-secondary)]",children:[d.length," file",1!==d.length?"s":""," selected"]})]})})}],26529),e.s(["InstallerSection",0,function({termsUrl:e,onPreview:r,onReset:t}){let a=(0,o.useI18n)(),n=a?.t??(e=>""),{control:s,formState:{errors:i,isSubmitting:d}}=(0,x.useFormContext)();return(0,l.jsx)(v.FormSection,{number:5,title:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Section_InstallerContact),children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,l.jsx)(x.Controller,{control:s,name:"installerName",render:({field:e})=>(0,l.jsx)(R.InputField,{label:"Installer Name",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12})}),(0,l.jsx)(x.Controller,{control:s,name:"installerPhone",render:({field:e})=>(0,l.jsx)(R.InputField,{label:"Installer Telephone Number",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,type:"tel",maxLength:12,errorMessage:(0,p.translateFormError)(n,i.installerPhone?.message),required:!0})}),(0,l.jsx)("div",{className:"sm:col-span-2",children:(0,l.jsx)(x.Controller,{control:s,name:"additionalInfo",render:({field:e})=>(0,l.jsx)(R.InputField,{label:"Additional Information",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,placeholder:"Any additional details you'd like to provide",maxLength:500,multiline:!0,rows:4})})})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,l.jsx)(x.Controller,{control:s,name:"purchaserSignature",render:({field:e})=>(0,l.jsx)(R.InputField,{label:"Purchaser Electronic Signature",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,maxLength:12,errorMessage:(0,p.translateFormError)(n,i.purchaserSignature?.message),helperText:"",required:!0})}),(0,l.jsx)(x.Controller,{control:s,name:"signatureDate",render:({field:e})=>(0,l.jsx)(R.InputField,{label:"Date",type:"date",value:e.value??"",onChange:e.onChange,onBlur:e.onBlur,disabled:!0})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"mb-4 text-body-md text-[var(--color-text-primary)]",children:'By typing my digital signature above and clicking the "I agree" box, I represent as follows:'}),(0,l.jsxs)("ul",{className:"mb-6 list-disc space-y-2 pl-6 text-body-md text-[var(--color-text-primary)]",children:[(0,l.jsx)("li",{children:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Agreement_InfoTrue)}),(0,l.jsx)("li",{children:"I have included proof of purchase and installation."}),(0,l.jsxs)("li",{children:[(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Agreement_ReadAgree)," ",e?(0,l.jsx)("button",{type:"button",onClick:()=>{e&&window.open(e,"","width=800,height=850,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")},className:"text-[var(--color-primary-blue)] underline hover:no-underline",children:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Agreement_TermsConditions)}):(0,l.jsx)("span",{children:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Agreement_TermsConditions)}),"."]})]}),(0,l.jsx)(x.Controller,{control:s,name:"agreeAndSubmit",render:({field:e})=>(0,l.jsxs)("div",{children:[(0,l.jsx)(j.Checkbox,{label:"I AGREE, SUBMIT *",checked:e.value,onChange:e.onChange,variant:"forms"}),i.agreeAndSubmit&&(0,l.jsx)("p",{className:"mt-1 text-body-sm text-[var(--color-error)]",role:"alert",children:(0,p.translateFormError)(n,i.agreeAndSubmit.message)})]})})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,l.jsx)("button",{type:"button",onClick:r,disabled:d,className:"rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Button_Preview)}),(0,l.jsx)("button",{type:"button",onClick:t,disabled:d,className:"rounded-full border border-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-[var(--color-primary-blue)] hover:bg-[var(--color-primary-blue)] hover:text-white focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focu
193s:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(n,u.DICTIONARY.F.Form_Button_Reset)})]})]})})}],58978);var L=e.i(26019),P=e.i(32548);function k(e,r,t){return(0,h.getDisplayLabel)(e&&e.length>0?e:r,t)}function M({number:e,title:r,children:t}){return(0,l.jsxs)("section",{className:"w-full",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 bg-[var(--color-dark-blue)] px-6 py-4 text-white",children:[(0,l.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-white text-sm font-bold",children:e}),(0,l.jsx)("h3",{className:"text-[18px] font-semibold leading-[1.4] text-white",children:r})]}),(0,l.jsx)("div",{className:"border border-t-0 border-[var(--color-grey-3)] p-6",children:(0,l.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:t})})]})}e.s(["PreviewModal",0,function({isOpen:e,onClose:r,onSubmit:t,isSubmitting:a,submitError:s,buildingTypes:i,installationTypes:d,purchaserTypes:c,thermostatTypes:m,retailerOptions:g}){let f,b,{control:v,getValues:y,formState:{errors:R}}=(0,x.useFormContext)(),N=(0,n.useRef)(null),E=(0,n.useId)(),I=(0,o.useI18n)(),C=I?.t??(e=>"");if((0,n.useEffect)(()=>{if(!e)return;let t=N.current;if(!t)return;let a=t.querySelector(".rebate-preview-printable");a&&a.scrollTo(0,0);let l=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=l[0],s=l[l.length-1];n?.focus();let o=e=>{"Escape"===e.key?r():"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),s?.focus()):document.activeElement===s&&(e.preventDefault(),n?.focus()))};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[e,r]),!e)return null;let O=y();return(0,l.jsx)("div",{ref:N,className:"rebate-preview-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"rtr-preview-modal-title",children:(0,l.jsxs)("div",{className:"rebate-preview-printable max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-8 shadow-xl",children:[(0,l.jsx)("div",{className:"rebate-preview-print-only mb-6 hidden bg-[var(--color-dark-blue)] px-6 py-4 print:block",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(L.default,{src:"/centerpointenergy-logo-white.svg",alt:"CenterPoint Energy",width:180,height:62,className:"h-10 w-auto"}),(0,l.jsxs)("span",{className:"text-sm text-white",children:["Printed: ",new Date().toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})]})]})}),(0,l.jsx)("h2",{id:"rtr-preview-modal-title",className:"mb-6 text-[24px] font-bold text-[var(--color-dark-blue)]",children:"Retail Thermostat Rebate Form - Review Your Submission"}),(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)(M,{number:1,title:"Installation Information",children:[(0,l.jsx)(P.ReadOnlyField,{label:"Street Address",value:O.installStreet??""}),(0,l.jsx)(P.ReadOnlyField,{label:"City",value:O.installCity??""}),(0,l.jsx)(P.ReadOnlyField,{label:"State",value:O.installState??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Zip Code",value:O.installZip??""}),(0,l.jsx)(P.ReadOnlyField,{label:_.GAS_ACCOUNT_NUMBER_LABEL_CUSTOMER,value:O.accountNumber??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Type of Building",value:k(i,S,O.buildingType)}),(0,l.jsx)(P.ReadOnlyField,{label:"Type of Installation",value:k(d,D,O.installationType)})]}),(0,l.jsxs)(M,{number:2,title:"Purchaser Information",children:[(0,l.jsx)(P.ReadOnlyField,{label:"Check payable to",value:"COMPANY"===O.checkPayableTo?"Company":"Purchaser"}),"PURCHASER"===O.checkPayableTo&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser First Name",value:O.purchaserFirstName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser Last Name",value:O.purchaserLastName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Additional Purchaser Name",value:O.additionalPurchaser?"Yes":"No"}),O.additionalPurchaser&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(P.ReadOnlyField,{label:"Secondary Purchaser First Name",value:O.secondPurchaserFirstName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Secondary Purchaser Last Name",value:O.secondPurchaserLastName??""})]})]}),"COMPANY"===O.checkPayableTo&&(0,l.jsx)(P.ReadOnlyField,{label:"Company Name",value:O.companyName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Is Rebate Mailing Address different from Installation Address?",value:"YES"===O.mailingAddressDifferent?"Yes":"No"}),"YES"===O.mailingAddressDifferent&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(P.ReadOnlyField,{label:"Street Address",value:O.mailingStreet??""}),(0,l.jsx)(P.ReadOnlyField,{label:"City",value:O.mailingCity??""}),(0,l.jsx)(P.ReadOnlyField,{label:"State",value:(0,h.getDisplayLabel)(_.STATE_OPTIONS,O.mailingState??"")}),(0,l.jsx)(P.ReadOnlyField,{label:"Zip Code",value:O.mailingZip??""})]}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser Type",value:k(c,_.PURCHASER_TYPES,O.purchaserType)}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser's Email Address",value:O.purchaserEmail??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser's Telephone Number",value:O.purchaserPhone??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser's Alternate Telephone Number",value:O.purchaserAltPhone??""})]}),(0,l.jsxs)(M,{number:3,title:"Equipment Information",children:[(0,l.jsx)(P.ReadOnlyField,{label:"What type of thermostat was removed before the new thermostat was installed?",value:k(m,T,O.thermostatTypeBeingReplaced)}),(0,l.jsx)(P.ReadOnlyField,{label:"Check all that Apply",value:0===(f=O.installationTypeCheckboxes??[]).length?"":f.map(e=>{let r=_.INSTALLATION_TYPE_CHECKBOXES.find(r=>r.value===e);return r?.label??e}).join(", ")}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchase Date (MM/DD/YYYY)",value:(0,h.formatDateForDisplay)(O.purchaseDate)}),(0,l.jsx)(P.ReadOnlyField,{label:"Brand",value:(0,h.getDisplayLabel)((b=(0,h.getCachedRebateData)("retail-thermostat-mn"),b?.brands?b.brands.map(e=>({value:e.key,label:e.value})):[]),O.brand)}),(0,l.jsx)(P.ReadOnlyField,{label:"Model Number",value:O.modelNumber??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Date of Installation (MM/DD/YYYY)",value:(0,h.formatDateForDisplay)(O.installDate)}
193),(0,l.jsx)(F.RebateAmountField,{label:"Rebate Amount",amount:O.rebateAmount})]}),(0,l.jsxs)(M,{number:4,title:"Retailer Information",children:[(0,l.jsx)(P.ReadOnlyField,{label:"Retailer Name",value:k(g,A,O.retailerName)}),(0,l.jsx)(P.ReadOnlyField,{label:"Retailer Name",value:O.otherRetailerName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Store Location",value:O.storeLocation??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Store Location",value:O.otherStoreName??""})]}),(0,l.jsxs)(M,{number:5,title:"Installer Contact Information",children:[(0,l.jsx)(P.ReadOnlyField,{label:"Installer Name",value:O.installerName??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Installer Telephone Number",value:O.installerPhone??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Additional Information",value:O.additionalInfo??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Purchaser Electronic Signature",value:O.purchaserSignature??""}),(0,l.jsx)(P.ReadOnlyField,{label:"Date",value:(0,h.formatDateForDisplay)(O.signatureDate)})]})]}),(0,l.jsxs)("div",{className:"rebate-preview-no-print mt-8 flex flex-col gap-4",children:[(0,l.jsx)(x.Controller,{control:v,name:"agreeAndSubmit",render:({field:e})=>(0,l.jsx)(j.Checkbox,{label:"I AGREE, SUBMIT â I certify that the information provided is accurate and complete.",checked:e.value,onChange:e.onChange,variant:"forms","aria-describedby":R.agreeAndSubmit?E:void 0})}),R.agreeAndSubmit&&(0,l.jsx)("p",{id:E,className:"text-body-md text-[var(--color-red)]",role:"alert",children:(0,p.translateFormError)(C,R.agreeAndSubmit.message)}),s&&(0,l.jsx)("p",{className:"rounded-lg border border-[var(--color-red)] bg-[var(--color-red)]/10 p-3 text-body-md text-[var(--color-red)]",role:"alert",children:s}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,l.jsx)("button",{type:"button",onClick:t,disabled:a,className:"submit-button rounded-full bg-[var(--color-primary-blue)] px-8 py-3 text-[16px] font-semibold text-white hover:bg-[var(--color-dark-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:a?(0,u.getDictionaryValue)(C,u.DICTIONARY.F.Form_Button_Submitting):(0,u.getDictionaryValue)(C,u.DICTIONARY.F.Form_Button_Submit)}),(0,l.jsx)("button",{type:"button",onClick:r,disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(C,u.DICTIONARY.F.Form_Button_Modify)}),(0,l.jsx)("button",{type:"button",onClick:()=>window.print(),disabled:a,className:"rounded-full border border-[var(--color-dark-grey)] px-8 py-3 text-[16px] font-semibold text-[var(--color-text-primary)] hover:border-[var(--color-primary-blue)] focus:outline-none focus:ring-2 focus:ring-[var(--color-dark-blue)] focus:ring-offset-2 disabled:opacity-50",children:(0,u.getDictionaryValue)(C,u.DICTIONARY.F.Form_Button_PrintPreview)})]})]})]})})}],17130);let V=!1;function B(){return!!window.google?.maps&&"function"==typeof window.google.maps.importLibrary}function Y(e,r){}e.s(["useGoogleMapsLoader",0,function({apiKey:e,isEditing:r}){let[t,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(r)return;if(window.google?.maps&&"function"==typeof window.google.maps.importLibrary)return void a(!0);if(V){let e=Date.now(),r=setInterval(()=>{window.google?.maps&&"function"==typeof window.google.maps.importLibrary?(a(!0),clearInterval(r)):Date.now()-e>15e3&&clearInterval(r)},100);return()=>clearInterval(r)}if(!e)return;V=!0;let t=document.createElement("script");t.src=`https://maps.googleapis.com/maps/api/js?key=${e}&loading=async`,t.async=!0,t.defer=!0,t.onload=()=>a(!0),t.onerror=()=>{V=!1},document.head.appendChild(t)},[r,e]),{scriptLoaded:t}}],76476),e.s(["useGoogleAutocompleteService",0,function({scriptLoaded:e,isEditing:r}){let[t,a]=(0,n.useState)([]),[l,s]=(0,n.useState)(!1),o=(0,n.useCallback)(async t=>{if(!t.trim()||!e||r){a([]),s(!1);return}if(!B()){Y("Google Maps API not loaded"),a([]),s(!1);return}try{let{AutocompleteSuggestion:e}=await google.maps.importLibrary("places"),r=await e.fetchAutocompleteSuggestions({input:t,includedReg
193ionCodes:["us"],locationRestriction:void 0});if(r.suggestions&&r.suggestions.length>0){let e=r.suggestions.map(e=>({place_id:e.placePrediction?.placeId||"",description:e.placePrediction?.text?.text||""})).filter(e=>e.place_id&&e.description);e.length>0?(a(e),s(!0)):(a([]),s(!1))}else a([]),s(!1)}catch(e){Y("Unable to fetch address suggestions:",e),a([]),s(!1)}},[e,r]);return{suggestions:t,isDropdownVisible:l,fetchPredictions:o,fetchPlaceDetails:(0,n.useCallback)(async(t,a)=>{if(!e||r){Y("Google Maps not ready"),a(null);return}if(!B()){Y("Google Maps API not loaded"),a(null);return}try{let{Place:e}=await google.maps.importLibrary("places"),r=new e({id:t});await r.fetchFields({fields:["formattedAddress","addressComponents","location","id"]});let l={place_id:r.id||t,formatted_address:r.formattedAddress||void 0,address_components:r.addressComponents?.map(e=>({long_name:e.longText||"",short_name:e.shortText||"",types:e.types||[]})),geometry:r.location?{location:r.location,viewport:void 0}:void 0};a(l)}catch(e){Y("Unable to get address details:",e),a(null)}},[e,r]),closeDropdown:(0,n.useCallback)(()=>{s(!1),a([])},[])}}],81265),e.s(["useDebounce",0,function(e,r){let[t,a]=(0,n.useState)(e);return(0,n.useEffect)(()=>{let t=setTimeout(()=>{a(e)},r);return()=>{clearTimeout(t)}},[e,r]),t}],86191);let U=["TX","IN"],z=["TEXAS","INDIANA"],Z={TX:"texas",IN:"indiana",TEXAS:"texas",INDIANA:"indiana"};e.s(["buildTrackerUrl",0,function(e,r,t){let a=btoa(JSON.stringify({address:r})),l=e;return t&&e.includes("{region}")&&(l=e.replace("{region}",t)),`${l}?location=${a}`},"extractRegionFromPlace",0,function(e){if(e.address_components){for(let r of e.address_components)if(r.types.includes("administrative_area_level_1")){let e=r.short_name?.toUpperCase(),t=r.long_name?.toUpperCase();if(e&&Z[e])return Z[e];if(t&&Z[t])return Z[t]}}},"validateAddressCoverage",0,function({place:e,validationErrorMessage:r}){return!function(e){if(!e.address_components)return!1;let r=!1,t=!1;for(let a of e.address_components){let e=a.short_name?.toUpperCase(),l=a.long_name?.toUpperCase();a.types.includes("country")&&(r="US"===e),a.types.includes("administrative_area_level_1")&&(t=U.includes(e||"")||z.includes(l||""))}return r&&t}(e)?{isValid:!1,errorMessage:r}:{isValid:!0}}],21938);let q=()=>(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",className:"block w-[18px] h-[18px] shrink-0",children:[(0,l.jsxs)("g",{clipPath:"url(#clip0_4295_213)",children:[(0,l.jsx)("path",{d:"M11.9964 11.042L17.9998 17.0453L17.0452 17.9999L11.0418 11.9965L11.9964 11.042Z",fill:"white"}),(0,l.jsx)("path",{d:"M7.07164 1.28571C5.5245 1.28571 4.07164 1.88571 2.97878 2.97857C1.88592 4.07143 1.28592 5.52429 1.28592 7.07143C1.28592 8.61857 1.88592 10.0714 2.97878 11.1643C4.07164 12.2571 5.5245 12.8571 7.07164 12.8571C8.61878 12.8571 10.0716 12.2571 11.1645 11.1643C12.2574 10.0714 12.8574 8.61857 12.8574 7.07143C12.8574 5.52429 12.2574 4.07143 11.1645 2.97857C10.0716 1.88571 8.61878 1.28571 7.07164 1.28571ZM7.07164 0C10.9759 0 14.1431 3.16714 14.1431 7.07143C14.1431 10.9757 10.9759 14.1429 7.07164 14.1429C3.16735 14.1429 0.000208855 10.9757 0.000208855 7.07143C0.000208855 3.16714 3.16735 0 7.07164 0Z",fill:"white"})]}),(0,l.jsx)("defs",{children:(0,l.jsx)("clipPath",{id:"clip0_4295_213",children:(0,l.jsx)("rect",{width:"18",height:"18",fill:"white",transform:"matrix(-1 0 0 1 18 0)"})})})]});e.s(["SearchIcon",0,q],53583);var H=e.i(46071);let $=(0,n.forwardRef)(({value:e,onChange:r,onKeyDown:t,onBlur:a,placeholder:s,errorMessage:d,isLoading:c,onSearchClick:m,onSearchButtonPointerDown:h,onBackClick:p,isDropdownOpen:g=!1,clearLabel:f,searchLabel:b,activeDescendantId:x},v)=>{let{t:y}=(0,o.useI18n)(),R=e.length>0,N=f||(0,u.getDictionaryValue)(y,u.DICTIONARY.C.Clear),E=b||(0,u.getDictionaryValue)(y,u.DICTIONARY.S.Submit),I=(0,n.useRef)(!1),{isKeyboardFocused:C,handleFocus:_,handleBlur:j}=(0,H.useFieldFocus)();return(0,l.jsxs)("div",{className:"relative max-w-[526px] z-20",children:[(0,l.jsx)("label",{htmlFor:"address-search",className:"sr-only",children:(0,u.getDictionaryValue)(y,u.DICTIONARY.S.SearchForAddress)}),R&&p&&(0,l.jsx)("button",{type:"button",onClick:p,className:(0,i.cn)("absolute left-4 top-1/2 -translate-y-1/2 z-10","hidden @max-[399px]:flex items-center justify-center","w-5 h-5 rounded-full","bg-gradient-to-r from-darkest-blue to-blue-green","hover:from-hover hover:to-hover","transition-colors duration-200","cursor-pointer","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue focus-visible:ring-offset-1"),"aria-label":N,children:(0,l.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-white",children:(0,l.jsx)("path",{d:"M7.5 11L2.5 6L7.5 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,l.jsx)("input",{ref:v,id:"address-search",type:"text",value:e,onCh
193ange:r,onKeyDown:t,onFocus:_,onBlur:e=>{j(),a?.(e)},placeholder:s,autoComplete:"off",className:(0,i.cn)("w-full rounded-full","outline-none",C&&"ring-2 ring-primary-blue ring-offset-1","h-12 pr-12 text-base font-normal","pl-4",R&&"@max-[399px]:pl-12","@container (min-width: 400px):h-14 @container (min-width: 400px):pl-6 @container (min-width: 400px):pr-16 @container (min-width: 400px):text-lg @container (min-width: 400px):font-light",d?"border-2 border-red bg-[var(--color-alert-severe-bg)] text-red placeholder:text-red":g?"border-transparent bg-transparent focus:bg-transparent text-dark-grey placeholder:text-dark-grey":"border border-dark-grey bg-white focus:bg-white text-dark-grey placeholder:text-dark-grey"),role:"combobox","aria-autocomplete":"list","aria-expanded":g,"aria-controls":"address-suggestions","aria-activedescendant":x,"aria-invalid":!!d,"aria-describedby":d?"address-error":void 0,disabled:c}),(0,l.jsx)("button",{type:"button",onTouchStart:()=>{I.current=!0,h?.()},onTouchEnd:()=>{m(),setTimeout(()=>{I.current=!1},300)},onMouseDown:e=>{I.current||(e.preventDefault(),h?.())},onClick:()=>{I.current||m()},className:(0,i.cn)("absolute z-10","rounded-full grid place-items-center","bg-gradient-to-r from-darkest-blue to-blue-green","hover:from-hover hover:to-hover","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue focus-visible:ring-offset-1","transition-colors duration-200","cursor-pointer","touch-action-manipulation","right-1 top-1 w-10 h-10 rounded-full","@container (min-width: 400px):right-1.5 @container (min-width: 400px):top-[7px] @container (min-width: 400px):w-[42px] @container (min-width: 400px):h-[42px] @container (min-width: 400px):rounded-full"),style:{touchAction:"manipulation"},"aria-label":E,disabled:c,children:c?(0,l.jsx)("svg",{"aria-busy":"true","aria-hidden":"true",focusable:"false",role:"progressbar",viewBox:"0 0 20 20",className:"h-5 w-5 animate-spin text-white",children:(0,l.jsx)("path",{fill:"currentColor",d:"M7.229 1.173a9.25 9.25 0 1 0 11.655 11.412 1.25 1.25 0 1 0-2.4-.698 6.75 6.75 0 1 1-8.506-8.329 1.25 1.25 0 1 0-.75-2.385z"})}):(0,l.jsx)(q,{})})]})});$.displayName="AddressSearchInput",e.s(["AddressSearchInput",0,$],86767),e.s(["ErrorMessage",0,function({message:e}){return e?(0,l.jsx)("div",{id:"address-error",role:"alert","aria-live":"polite",className:"mt-2 text-md font-normal leading-[1.8] text-red [&_*]:!text-md [&_*]:!font-normal [&_*]:!leading-[1.8] [&_*]:!bg-transparent [&_p]:!m-0 [&_span]:!text-red [&_span]:!inline [&_a]:!text-primary-blue [&_a]:!no-underline [&_a]:!font-medium [&_a_span]:!text-primary-blue [&_a:hover]:!text-hover [&_a:hover]:!underline [&_a:hover]:!underline-offset-2 [&_a:hover]:!decoration-1 [&_a:hover_span]:!text-hover [&_a:focus-visible]:!text-hover [&_a:focus-visible]:!underline [&_a:focus-visible]:!underline-offset-2 [&_a:focus-visible]:!decoration-1 [&_a:focus-visible_span]:!text-hover [&_a:active]:!text-active [&_a:active]:!no-underline [&_a:active_span]:!text-active",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})}):null}],3966);var G=e.i(40363);e.s(["AutocompleteDropdown",0,function({suggestions:e,onSelect:r,isVisible:t,highlightedIndex:a}){let s=(0,n.useRef)(null),d=(0,n.useRef)([]),{t:c}=(0,o.useI18n)();return((0,n.useEffect)(()=>{a>=0&&d.current[a]&&d.current[a]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[a]),t&&0!==e.length)?(0,l.jsxs)("div",{ref:s,role:"listbox",id:"address-suggestions",className:(0,i.cn)("absolute z-10 w-full max-w-[526px] top-0","bg-gradient-to-b from-white from-[48px] to-secondary-grey to-[48px]","@container (min-width: 400px):from-[56px] @container (min-width: 400px):to-[56px]","border border-dark-grey rounded-[28px]","shadow-[0px_0px_20px_rgba(0,71,130,0.28)]","overflow-y-auto","pt-[60px] @container (min-width: 400px):pt-[68px]","pb-[28px]"),children:[(0,l.jsx)("p",{className:"text-sm font-medium leading-[1.8] text-dark-grey pl-6 @max-[399px]:pl-12 pr-[6px] mb-3",children:(0,u.getDictionaryValue)(c,u.DICTIONARY.S.SuggestedResults)}),(0,l.jsx)("div",{className:"flex flex-col gap-3 pl-6 @max-[399px]:pl-12 pr-[6px]",children:e.map((e,t)=>{let n=(0,G.getAnalyticsSafeObjectId)("outage-search-autocomplete");return(0,l.jsx)("button",{ref:e=>{d.current[t]=e,e&&(e.s_objectID=n)},type:"button",id:`suggestion-${t}`,role:"option",tabIndex:-1,"aria-selected":t===a,onClick:()=>r(e.place_id),"data-s-object-id":n,className:(0,i.cn)("w-full text-left transition-colors","text-lg text-dark-grey",t===a?"font-semibold":"font-light hover:font-semibold"),children:e.description},e.place_id)})})]}):null}],92751),e.s(["useCookieBannerOffset",0,function(){let[e,r]=(0,n.use
193State)(0);return(0,n.useEffect)(()=>{if("u"<typeof ResizeObserver)return void console.warn("ResizeObserver not supported, LocationBanner may overlap cookie banner");let e=null,t=null,a=a=>{(e=new ResizeObserver(e=>{let t=e[0];t&&r(t.target.getBoundingClientRect().height)})).observe(a),r(a.getBoundingClientRect().height),t&&(t.disconnect(),t=null)},l=document.querySelector("#truste-consent-track");return l?a(l):(t=new MutationObserver(()=>{let e=document.querySelector("#truste-consent-track");e&&a(e)})).observe(document.body,{childList:!0,subtree:!0}),()=>{e?.disconnect(),t?.disconnect()}},[]),{bottomOffset:e}}],28759)},28223,92861,70593,37881,34636,e=>{"use strict";var r=e.i(40733),t=e.i(4625);let a=r.z.object({accountNumber:r.z.string().min(1,"Please enter an account number.").regex(t.gasAccountRegex,"Please enter a valid Gas Account Number (Ex: 123456-0)."),houseNumber:r.z.string().min(1,"Please enter house number."),hasWifi:r.z.enum(["Yes","No"],{required_error:"Please select if you have Wi-Fi."}),thermostatCount:r.z.enum(["Zero","One","Two","ThreeOrMore"],{required_error:"Please select an option."}),hasExistingSmartThermostat:r.z.enum(["Yes","No"]).optional(),centralAirCount:r.z.enum(["Zero","One","Two","ThreeOrMore"],{required_error:"Please select an option."}),gasHeatingType:r.z.enum(["Gas","Electric","Other"],{required_error:"Please select an option."}),ownerFirstName:r.z.string().min(1,"Please enter the first name.").regex(t.alphaOnlyRegex,"Please enter a valid first name."),ownerLastName:r.z.string().min(1,"Please enter the last name.").regex(t.alphaOnlyRegex,"Please enter a valid last name."),email:r.z.string().min(1,"Please enter an email address.").email("Please enter a valid email address. (ex: [email protected])"),daytimePhone:r.z.string().min(1,"Please enter phone number.").regex(t.phoneRegex,"Please enter a valid phone number. (ex: 713 555 1234)"),alternatePhone:r.z.string().optional().refine(e=>!e||t.phoneRegex.test(e),"Please enter a valid phone number. (ex: 713 555 1234)"),howDidYouHear:r.z.string().optional(),agreeToTerms:r.z.literal(!0,{errorMap:()=>({message:"Please select that you agree to Smart Cycle program terms and conditions."})})}).superRefine((e,t)=>{"Zero"===e.thermostatCount||e.hasExistingSmartThermostat||t.addIssue({code:r.z.ZodIssueCode.custom,message:"Please select yes or no.",path:["hasExistingSmartThermostat"]})});e.s(["smartCycleEnrollmentSchema",0,a],28223),e.s(["ENROLLMENT_ERROR_MESSAGES",0,{SUBMIT_ERROR:"Error submitting the form data, please try again"}],92861),e.s(["CENTRAL_AIR_COUNT_OPTIONS",0,[{value:"Zero",label:"0"},{value:"One",label:"1"},{value:"Two",label:"2"},{value:"ThreeOrMore",label:"3 or more"}],"GAS_HEATING_TYPE_OPTIONS",0,[{value:"Gas",label:"Gas"},{value:"Electric",label:"Electric"},{value:"Other",label:"Other"}],"HOW_DID_YOU_HEAR_OPTIONS",0,[{value:"",label:"Select"},{value:"01",label:"Direct Mail"},{value:"02",label:"Phone"},{value:"03",label:"Email"},{value:"04",label:"Word of Mouth"},{value:"05",label:"Website"},{value:"06",label:"Flyer"},{value:"07",label:"Other"}],"THERMOSTAT_COUNT_OPTIONS",0,[{value:"Zero",label:"0"},{value:"One",label:"1"},{value:"Two",label:"2"},{value:"ThreeOrMore",label:"3 or more"}],"gasHeatingTypeToApi",0,function(e){switch(e){case"Gas":return"NG";case"Electric":return"EL";case"Other":return"PP";default:return""}},"thermostatCountToApi",0,function(e){switch(e){case"Zero":default:return"0";case"One":return"1";case"Two":case"ThreeOrMore":return"2"}}],70593);var l=e.i(91398),n=e.i(91788),s=e.i(30943),o=e.i(59369);e.i(47530);var i=e.i(96499);function d({alignment:e,position:r}){return(0,l.jsx)("div",{className:(0,o.cn)("flex items-center w-full",{left:"justify-start pl-[30px]",center:"justify-center",right:"justify-end pr-[30px]"}[e]),"aria-hidden":"true",children:(0,l.jsx)("div",{className:(0,o.cn)("size-[11px]","bg-secondary-grey","border-darkest-blue","top"===r&&"border-b-2 border-r-2 rotate-45 -mt-[5px]","bottom"===r&&"border-t-2 border-l-2 rotate-45 -mb-[5px]")})})}function u(e,r,t){return t<r?r:Math.min(Math.max(e,r),t)}let c=(0,n.forwardRef)(function({title:e,description:r,imageSrc:t,imageAlt:a,isOpen:c,onClose:m,position:h="bottom",alignment:p="center",triggerRef:g,className:f,id:b,openedOnHover:x=!1},v){let y=(0,n.useId)(),R=b||`tooltip-${y}`,N=`${R}-title`,E=`${R}-description`,I=`${R}
193-close`,[C,_]=(0,n.useState)({top:0,left:0,position:h}),[j,S]=(0,n.useState)(!1),[D,T]=(0,n.useState)(null),[A,F]=(0,n.useState)(!1),O=(0,n.useRef)(null);(0,n.useEffect)(()=>(S(!0),()=>S(!1)),[]),(0,n.useEffect)(()=>{c||(T(null),F(!1))},[c]);let w=(0,n.useCallback)(()=>{let e=O.current;if(!e)return;let{width:r,height:t}=e.getBoundingClientRect();0!==r&&0!==t&&T(e=>e&&e.width===r&&e.height===t?e:{width:r,height:t})},[]),L=(0,n.useCallback)(()=>{let e=g.current;if(!e||!D)return;let r=e.getBoundingClientRect(),t=function({trigger:e,tooltip:r,viewport:t,position:a,alignment:l,gap:n=8,padding:s=16}){let o,i=e.top-n-s,d=t.height-e.bottom-n-s,c=e=>("top"===e?i:d)>=r.height,m=a;if(!c(a)){let e="top"===a?"bottom":"top";c(e)&&(m=e)}let h="top"===m?e.top-n-r.height:e.bottom+n,p=e.left+e.width/2;return o="left"===l?e.left-20:"right"===l?e.right-r.width+20:p-r.width/2,{position:m,top:u(h,s,t.height-r.height-s),left:u(o,s,t.width-r.width-s)}}({trigger:{top:r.top,bottom:r.bottom,left:r.left,right:r.right,width:r.width},tooltip:D,viewport:{width:window.innerWidth,height:window.innerHeight},position:h,alignment:p});_(e=>e.top===t.top&&e.left===t.left&&e.position===t.position?e:t),F(!0)},[g,D,h,p]);(0,n.useEffect)(()=>{if(!c||!j)return;let e=O.current;if(!e)return;w();let r=new ResizeObserver(()=>w());return r.observe(e),()=>r.disconnect()},[c,j,w]),(0,n.useEffect)(()=>{c&&L()},[c,L]),(0,n.useEffect)(()=>{if(!c)return;let e=()=>L();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[c,L]);let P=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!c){P.current=!1;return}x||!A||P.current||(document.getElementById(I)?.focus(),P.current=!0)},[c,A,I,x]);let k=(0,n.useCallback)(e=>{O.current=e,"function"==typeof v?v(e):v&&(v.current=e)},[v]);if(!c||!j)return null;let M=!x,V=(0,l.jsxs)("div",{ref:k,id:R,role:"dialog","aria-modal":"true","aria-labelledby":e?N:void 0,"aria-label":e?void 0:"More information","aria-describedby":r?E:void 0,className:(0,o.cn)("fixed z-50",t?"w-[400px]":"w-[280px]","flex","top"===C.position?"flex-col-reverse":"flex-col",f),style:{top:C.top,left:C.left,visibility:A?"visible":"hidden"},children:[(0,l.jsx)(d,{position:C.position,alignment:p}),(0,l.jsx)("div",{className:(0,o.cn)("bg-secondary-grey","border-2 border-darkest-blue","rounded-[20px]","p-5","shadow-[0px_0px_20px_0px_rgba(0,71,130,0.28)]"),children:(0,l.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(e||M)&&(0,l.jsxs)("div",{className:"flex items-start justify-between gap-0.5",children:[e?(0,l.jsx)("h3",{id:N,className:"flex-1 text-lg font-semibold leading-[1.5] text-dark-grey",children:e}):(0,l.jsx)("span",{className:"flex-1"}),M&&(0,l.jsx)("button",{id:I,type:"button",onClick:m,"aria-label":"Close tooltip",className:(0,o.cn)("flex-shrink-0","text-primary-blue","hover:text-primary-blue-hover","active:text-primary-blue-active","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-blue focus-visible:ring-offset-2","rounded"),children:(0,l.jsx)(i.Icon,{name:"xmark",size:18})})]}),r&&(0,l.jsx)("p",{id:E,className:"text-base leading-[1.8] text-black",children:r}),t&&(0,l.jsx)("img",{src:t,alt:a||"",className:"mt-3 w-full rounded"})]})})]});return(0,s.createPortal)(V,document.body)});e.s(["Tooltip",0,c],37881),e.s(["useTooltip",0,function(e={}){let{defaultOpen:r=!1,onOpen:t,onClose:a}=e,[l,s]=(0,n.useState)(r),[o,i]=(0,n.useState)("bottom"),[d,u]=(0,n.use
193State)("center"),c=(0,n.useRef)(null),m=(0,n.useRef)(null),h=(0,n.useId)(),p=(0,n.useCallback)(()=>{if(!c.current)return"bottom";let e=c.current.getBoundingClientRect(),r=e.top,t=window.innerHeight-e.bottom;return t<200&&r>t?"top":"bottom"},[]),g=(0,n.useCallback)(()=>{if(!c.current)return"center";let e=c.current.getBoundingClientRect(),r=window.innerWidth,t=e.left+e.width/2;return t-140<16?"left":t+140>r-16?"right":"center"},[]),f=(0,n.useCallback)(()=>{i(p()),u(g()),s(!0),t?.()},[p,g,t]),b=(0,n.useCallback)(()=>{s(!1),a?.()},[a]),x=(0,n.useCallback)(()=>{b(),c.current?.focus()},[b]),v=(0,n.useCallback)(()=>{l?x():f()},[l,f,x]);return(0,n.useEffect)(()=>{if(!l)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),x())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l,x]),(0,n.useEffect)(()=>{if(!l)return;let e=e=>{let r=e.target;c.current?.contains(r)||m.current?.contains(r)||x()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l,x]),(0,n.useEffect)(()=>{if(!l)return;let e=()=>{i(p()),u(g())};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[l,p,g]),{isOpen:l,open:f,close:x,closeWithoutFocus:b,toggle:v,position:o,alignment:d,triggerRef:c,tooltipRef:m,tooltipId:`tooltip-${h}`}}],34636)},51476,e=>{"use strict";e.s(["buildAnchorHref",0,(e,r)=>r?e?e.includes("#")?e:`${e}#${r}`:`#${r}`:e,"formatDate",0,e=>{if(!e)return"";try{let r=new Date(e);if(isNaN(r.getTime()))return"";return r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})}catch{return""}},"formatTime",0,e=>{if(!e)return"";try{let r=new Date(e);if(isNaN(r.getTime()))return"";return r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:"UTC"})}catch{return""}}])},12277,e=>{"use strict";e.s(["getContentHubImageAlt",0,(e,r,t)=>{if("string"==typeof r){let e=r.match(/alt="([^"]*)"/);if(e||(e=r.match(/alt='([^']*)'/)),e&&e[1])return e[1]}let a=e?.value?.alt;return"string"==typeof a?a:"string"==typeof t?t:""},"getContentHubImageUrl",0,(e,r,t)=>{let a=e?.value?.href;if("string"==typeof a)return a;let l=e?.value?.src;if("string"==typeof l)return l;if("string"==typeof r){let e=r.match(/src="([^"]*)"/);if(e||(e=r.match(/src='([^']*)'/)),e&&e[1])return e[1]}if("string"==typeof t)return t},"transformContentHubImageField",0,e=>!e?.value||e.value.src?e:e.value.href&&"string"==typeof e.value.href?{...e,value:{src:e.value.href,alt:e.value.alt,width:e.value.width,height:e.value.height}}:e])},45137,e=>{"use strict";e.s(["getBackgroundClass",0,e=>({"white-bg":"White","clean-bg":"container-clean-background","color-bg":"container-color-background","dark-bg":"container-dark-background","grey-bg":"container-gray-background","blue-bg":"Blue","white-background-dark-blue-card":"WhiteDarkBlueCard","white-background-light-blue-card":"WhiteLightBlueCard","blue-background-white-card":"Blue"})[e]??""])},30038,e=>{"use strict";let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z?$/,t=e=>{if(!e)return null;let t=e.trim();if(""===t||"undefined"===t.toLowerCase())return null;let a=r.exec(t),l=new Date(a?`${a[1]}-${a[2]}-${a[3]}T${a[4]}:${a[5]}:${a[6]}Z`:t);return isNaN(l.getTime())||1>=l.getUTCFullYear()?null:l};e.s(["parseSitecoreDate",0,t,"resolvePublicationDate",0,e=>{for(let r of e){let e=t(r);if(e)return e.toISOString()}}])},52221,e=>{"use strict";let r=new Set(["SharkFinTop","SharkFinTopAndBottom","SharkFinTopAndBottomFull"]),t=new Set(["SharkFinBottom","SharkFinTopAndBottom"]),a=new Set(["SharkFinTopAndBottomFull"]);e.s(["isSharkFinBottomFullVisible",0,e=>a.has(e),"isSharkFinBottomVisible",0,e=>t.has(e),"isSharkFinTopVisible",0,e=>r.has(e)])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.