define(["exports","./edu-vendor","./edu-main","systemjs"],function(e,t,i,n){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var r=s(n).default;const a=["dropdownList"],o=["button"],d=(e,t,i,n,s,r,a)=>({"ng-wh-error":e,"drp-b-darker":t,second:i,third:n,selected:s,opened:r,disabled:a});function l(e,i){if(1&e&&t.ɵɵelement(0,"span",11),2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.placeholder),t.ɵɵattribute("tabindex",e.tabindex)("aria-expanded",e.opened)}}function c(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",12),t.ɵɵlistener("onClick",function(i){const n=t.ɵɵrestoreView(e).index,s=t.ɵɵnextContext();return t.ɵɵresetView(s.selectItem(i,n))}),t.ɵɵelementEnd()}if(2&e){const e=i.$implicit,n=i.index,s=t.ɵɵnextContext();t.ɵɵclassProp("active",s.activeidx==n),t.ɵɵproperty("cleanHTML",e),t.ɵɵattribute("aria-selected",s.activeidx==n)("id",s.optionid+"-"+n)}}function h(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",13),t.ɵɵlistener("onClick",function(i){t.ɵɵrestoreView(e);const n=t.ɵɵnextContext();return t.ɵɵresetView(n.clickExternalLink(i))}),t.ɵɵelementEnd()}if(2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.externalLinkOptionText)}}function u(e,i){1&e&&(t.ɵɵelementStart(0,"li",14)(1,"span"),t.ɵɵtext(2,'"Featured"'),t.ɵɵelementEnd(),t.ɵɵtext(3," means the products are ranked based on advertiser status."),t.ɵɵelementEnd())}function p(e,i){1&e&&t.ɵɵelement(0,"span",15),2&e&&t.ɵɵattribute("aria-hidden",!0)}function g(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"span",16),t.ɵɵlistener("onClick",function(i){t.ɵɵrestoreView(e);const n=t.ɵɵnextContext();return t.ɵɵresetView(n.Clear(i))}),t.ɵɵelementEnd()}}const _=(e,t,i,n,s)=>({"ng-wh-error":e,"drp-b-darker":t,second:i,selected:n,opened:s});function v(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"span",12),t.ɵɵlistener("onClick",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(!0)}),t.ɵɵelementEnd()}if(2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.placeholder)}}function m(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"span",13),t.ɵɵlistener("onClick",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(!0)}),t.ɵɵelementEnd()}if(2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.value)}}class f{set value(e){this.noselection=!e,this._value=e,this.items&&(this.activeidx=this.items.indexOf(e)),this.usemap&&this.itemsMap&&this.itemsMap.length&&(!i.isNumber(this.activeidx)||this.activeidx<0)&&(this.activeidx=this.itemsMap.indexOf(this._value))}get value(){return this.itemsMap&&i.isNumber(this.activeidx)?(this.itemsMap[this.activeidx]||this._value||"").toString():this._value}get value_ui(){if(!this.itemsMap||!i.isNumber(this.activeidx))return this._value;if(this.usemap&&this.itemsMap&&this.itemsMap.length&&i.isNumber(this.activeidx)){let e=(this.items[this.activeidx]||this._value||"").toString();if(-1==this.activeidx){let t=this.itemsMap.indexOf(this._value);t>-1?e=(this.items[t]||this._value||"").toString():!i.isNullorUndefined(this._value)&&i.isNumber(this._value)&&(t=this.itemsMap.indexOf(this._value.toString()),t>-1&&(e=(this.items[t]||this._value||"").toString()))}return e}return(this.itemsMap[this.activeidx]||this._value||"").toString()}controlList(e,t){this.disabled||(this.opened=void 0!==t?t:!this.opened,this.onTapped.emit(this),this.fixOverflow(),this._android_delay=!0,setTimeout(()=>{this._android_delay=!1},100))}close(){this.opened=!1}open(){this.opened=!0}PreventClose(e){e&&e.srcEvent&&(e.srcEvent.cancelBubble=!0,e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation()),e&&e.stopPropagation&&e.stopPropagation()}selectItem(e,t=0){this.PreventClose(e),this._android_delay||(this._value=this.items[t],this.activeidx=t,this.valueChange.emit(this.value),this.noselection=!1,this.selected.emit({eventName:"select",value:this.value,index:t}),this.activedescendant=this.optionid+"-"+this.activeidx,this.close(),this._cd.detectChanges(),this.listbutton&&this.listbutton.nativeElement.focus())}Clear(e){this._value=null,this.activeidx=null,this.valueChange.emit(this.value),this.noselection=!0,this.selected.emit({eventName:"select",value:this.value,index:null}),this.activedescendant=null,this._cd.detectChanges(),this.listbutton&&this.listbutton.nativeElement.focus(),e.preventDefault(),e.stopPropagation()}trackByFn(e){return e}constructor(e){this._cd=e,this.tabindex=0,this.placeholder="Select...",this.items=[],this.darker=!1,this.invalid=!1,this.disabled=!1,this.bounds_check=!1,this.labelledby="",this.clearable=!1,this.hasExternalLinkOption=!1,this.externalLinkOptionText="Add New",this.usemap=!1,this.valueChange=new t.EventEmitter,this.selected=new t.EventEmitter,this.onTapped=new t.EventEmitter,this.onExternalLinkTap=new t.EventEmitter,this.noselection=!0,this.opened=!1,this.activeidx=null,this._android_delay=!1}ngOnInit(){this.optionid=i.uniqid("opt-"),this.value&&this.items.indexOf(this.value)>-1&&(this.activeidx=this.items.indexOf(this.value),this.activedescendant=this.optionid+"-"+this.activeidx)}_BoundsCheck(e,t){this.bounds_check&&t.y+t.height>window.innerHeight&&e.classList.add("upwards")}fixOverflow(){let e=this.dropdownList&&this.dropdownList.nativeElement,t=e&&e.parentElement;i.reqAnimationFrame(()=>{try{let i=e.getBoundingClientRect();t.getBoundingClientRect().x+i.width>=window.innerWidth?e.classList.add("sticky-right"):e.classList.remove("sticky-right"),e.classList.remove("upwards"),this._BoundsCheck(e,i)}catch(e){throw e}})}clickExternalLink(e){this.PreventClose(e),this.onExternalLinkTap.emit(!0)}}f.ɵfac=function(e){return new(e||f)(t.ɵɵdirectiveInject(t.ChangeDetectorRef))},f.ɵdir=t.ɵɵdefineDirective({type:f,viewQuery:function(e,i){if(1&e&&(t.ɵɵviewQuery(a,5,t.ElementRef),t.ɵɵviewQuery(o,5,t.ElementRef)),2&e){let e;t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.dropdownList=e.first),t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.listbutton=e.first)}},inputs:{tabindex:"tabindex",placeholder:"placeholder",items:"items",itemsMap:"itemsMap",second:"second",third:"third",darker:[0,"dark-borders","darker"],invalid:"invalid",disabled:"disabled",bounds_check:[0,"bounds-check","bounds_check"],labelledby:"labelledby",clearable:"clearable",hasExternalLinkOption:"hasExternalLinkOption",externalLinkOptionText:"externalLinkOptionText",usemap:"usemap",value:"value"},outputs:{valueChange:"valueChange",selected:"selected",onTapped:"onTapped",onExternalLinkTap:"onExternalLinkTap"}});class w extends f{}w.ɵfac=(()=>{let e;return function(i){return(e||(e=t.ɵɵgetInheritedFactory(w)))(i||w)}})(),w.ɵcmp=t.ɵɵdefineComponent({type:w,selectors:[["ng-dropdown"]],standalone:!1,features:[t.ɵɵInheritDefinitionFeature],decls:11,vars:25,consts:[["button",""],["dropdownList",""],["zing-touch","","data-tap-bubbles","true",1,"dropdown",3,"onClick","onClickOutside","ngClass","zing-no-touch"],["role","button","aria-haspopup","listbox","class","dropdown-placeholder",3,"cleanHTML",4,"ngIf"],["role","button","aria-haspopup","listbox",1,"dropdown-selected",3,"ng-hidden","cleanHTML"],["role","listbox","tabindex","0",1,"dropdown-list","ng-enter-element",3,"ng-hidden"],["class","dropdown-item","role","option","zing-touch","",3,"active","cleanHTML","onClick",4,"ngFor","ngForOf","ngForTrackBy"],["class","dropdown-item external-link","role","option","zing-touch","",3,"cleanHTML","onClick",4,"ngIf"],["class","drp-featured",4,"ngIf"],["tabindex","-1","class","dropdown-arrow  bf-icon-down-open",4,"ngIf"],["zing-touch","","tabindex","0","aria-role","button","aria-label","Clear Selection","class","dropdown-close bf-icon-cross",3,"onClick",4,"ngIf"],["role","button","aria-haspopup","listbox",1,"dropdown-placeholder",3,"cleanHTML"],["role","option","zing-touch","",1,"dropdown-item",3,"onClick","cleanHTML"],["role","option","zing-touch","",1,"dropdown-item","external-link",3,"onClick","cleanHTML"],[1,"drp-featured"],["tabindex","-1",1,"dropdown-arrow","bf-icon-down-open"],["zing-touch","","tabindex","0","aria-role","button","aria-label","Clear Selection",1,"dropdown-close","bf-icon-cross",3,"onClick"]],template:function(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",2),t.ɵɵlistener("onClick",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.controlList(n))})("onClickOutside",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.controlList(n,!1))}),t.ɵɵtemplate(1,l,1,3,"span",3),t.ɵɵelement(2,"span",4,0),t.ɵɵelementStart(4,"ul",5,1),t.ɵɵtemplate(6,c,1,5,"li",6)(7,h,1,1,"li",7)(8,u,4,0,"li",8),t.ɵɵelementEnd(),t.ɵɵtemplate(9,p,1,1,"span",9)(10,g,1,0,"span",10),t.ɵɵelementEnd()}2&e&&(t.ɵɵproperty("ngClass",t.ɵɵpureFunction7(17,d,i.invalid,i.darker,i.second,i.third,!i.noselection,i.opened,i.disabled))("zing-no-touch",!0),t.ɵɵadvance(),t.ɵɵproperty("ngIf",i.placeholder&&i.noselection),t.ɵɵadvance(),t.ɵɵproperty("ng-hidden",i.noselection)("cleanHTML",i.value_ui),t.ɵɵattribute("tabindex",i.noselection?i.tabindex:-1)("aria-hidden",i.noselection)("aria-expanded",i.opened),t.ɵɵadvance(2),t.ɵɵproperty("ng-hidden",!i.opened),t.ɵɵattribute("aria-labelledby",i.labelledby)("aria-activedescendant",i.activedescendant),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",i.items)("ngForTrackBy",i.trackByFn),t.ɵɵadvance(),t.ɵɵproperty("ngIf",i.hasExternalLinkOption),t.ɵɵadvance(),t.ɵɵproperty("ngIf",null==i.items?null:i.items.includes("Featured")),t.ɵɵadvance(),t.ɵɵproperty("ngIf",!(i.disabled||i.clearable&&!i.noselection)),t.ɵɵadvance(),t.ɵɵproperty("ngIf",!i.disabled&&i.clearable&&!i.noselection))},dependencies:[t.NgClass,t.NgForOf,t.NgIf,i.TouchGesturesDirective,i.ngHidden,i.ngCleanHTML],encapsulation:2});class b{}b.ɵfac=function(e){return new(e||b)},b.ɵmod=t.ɵɵdefineNgModule({type:b}),b.ɵinj=t.ɵɵdefineInjector({imports:[t.CommonModule,i.DirectivesModule]});class k extends f{constructor(){super(...arguments),this.text="Some text to display",this.name="",this.label="",this.booleanValue=null}Check(e){void 0!==e&&(this.booleanValue===e?(this.booleanValue=null,this.value=null):(this.booleanValue=e,this.value=e?"Yes":"No"),this.valueChange.emit(this.value))}}k.ɵfac=(()=>{let e;return function(i){return(e||(e=t.ɵɵgetInheritedFactory(k)))(i||k)}})(),k.ɵcmp=t.ɵɵdefineComponent({type:k,selectors:[["ng-dropdown-bool"]],inputs:{text:"text",name:"name",label:"label"},standalone:!1,features:[t.ɵɵInheritDefinitionFeature],decls:19,vars:18,consts:[["dropdownList",""],["zing-touch","",1,"dropdown",3,"onClick","onClickOutside","ngClass","zing-no-touch"],["zing-touch","","class","dropdown-placeholder",3,"cleanHTML","onClick",4,"ngIf"],["zing-touch","","class","dropdown-selected",3,"cleanHTML","onClick",4,"ngIf"],[1,"dropdown-list","ng-enter-element",3,"ng-hidden"],[1,"text"],[1,"boolean-items"],[1,"checkbox"],["type","checkbox","value","",3,"change","checked","name"],[1,"track","bf-icon-ok"],[1,"name"],[1,"dropdown-arrow","bf-icon-down-open"],["zing-touch","",1,"dropdown-placeholder",3,"onClick","cleanHTML"],["zing-touch","",1,"dropdown-selected",3,"onClick","cleanHTML"]],template:function(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",1),t.ɵɵlistener("onClick",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.controlList(n))})("onClickOutside",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.controlList(n,!1))}),t.ɵɵtemplate(1,v,1,1,"span",2)(2,m,1,1,"span",3),t.ɵɵelementStart(3,"div",4,0)(5,"p",5),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"div",6)(8,"label",7)(9,"input",8),t.ɵɵlistener("change",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.Check(!0))}),t.ɵɵelementEnd(),t.ɵɵelement(10,"i",9),t.ɵɵelementStart(11,"span",10),t.ɵɵtext(12,"Yes"),t.ɵɵelementEnd()(),t.ɵɵelementStart(13,"label",7)(14,"input",8),t.ɵɵlistener("change",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.Check(!1))}),t.ɵɵelementEnd(),t.ɵɵelement(15,"i",9),t.ɵɵelementStart(16,"span",10),t.ɵɵtext(17,"No"),t.ɵɵelementEnd()()()(),t.ɵɵelement(18,"i",11),t.ɵɵelementEnd()}2&e&&(t.ɵɵproperty("ngClass",t.ɵɵpureFunction5(12,_,i.invalid,i.darker,i.second,!i.noselection,i.opened))("zing-no-touch",!0),t.ɵɵadvance(),t.ɵɵproperty("ngIf",i.placeholder&&i.noselection),t.ɵɵadvance(),t.ɵɵproperty("ngIf",!i.noselection),t.ɵɵadvance(),t.ɵɵproperty("ng-hidden",!i.opened),t.ɵɵadvance(3),t.ɵɵtextInterpolate(i.text),t.ɵɵadvance(2),t.ɵɵattribute("aria-label",i.label),t.ɵɵadvance(),t.ɵɵproperty("checked",!0===i.booleanValue)("name",i.name),t.ɵɵadvance(4),t.ɵɵattribute("aria-label",i.label),t.ɵɵadvance(),t.ɵɵproperty("checked",!1===i.booleanValue)("name",i.name))},dependencies:[t.NgClass,t.NgIf,i.TouchGesturesDirective,i.ngHidden,i.ngCleanHTML],encapsulation:2});class x{}x.ɵfac=function(e){return new(e||x)},x.ɵmod=t.ɵɵdefineNgModule({type:x}),x.ɵinj=t.ɵɵdefineInjector({imports:[t.CommonModule,i.DirectivesModule]});class C{get insuredvalue(){return this.insuredparam.toString()}constructor(e){this._cd=e,this.typeList=[],this.age=null,this.insured="Yes",this.zipcode="",this.layoutType=1,this.ages=["16-20","21-24","25-34","35-44","45-54","55-65","65+"],this.ageparam="",this.insuredparam=!0,this._ages_param=["18","22","30","39","49","59","65"],this.loading=!1,this.invalid={type:!1,zip:!1,age:!1,rpc:!1},this.show_error=!1,this.error_msg="",this.pass_validation=!1,this.ad_view_id="",this.ad_click_id="",this.is_tabletmode=!1,this._ajax_error_timer=null}SetAdView(e){this.ad_click_id=e.click,this.ad_view_id=e.view,this._cd.detectChanges()}ChangeInsurance(e){this.insured=e,this.insuredparam="Yes"==e||!0===e,this._cd.detectChanges()}ChangeZip(e){this.zipcode=e.target.value,this.invalid.zip=!1,this.show_error=!1,clearTimeout(this._ajax_error_timer),this._cd.detectChanges()}SetAge(e){this.age=e,this.ageparam=this._ages_param[this.ages.indexOf(this.age)],this.show_error=!1,this.invalid.age=!1,clearTimeout(this._ajax_error_timer),this._cd.detectChanges()}_ajaxError(){clearTimeout(this._ajax_error_timer),this.error_msg="something went wrong, please retry.",this.show_error=!0,this._cd.detectChanges(),this._ajax_error_timer=setTimeout(()=>{this.show_error=!1,this._cd.detectChanges()},2500)}GetQuote(e){if(!this.loading){if(this.pass_validation=!1,this.show_error)return this.show_error=!1,this._cd.detectChanges(),void setTimeout(()=>{this.show_error=!0,this._cd.detectChanges()});0==/^\d+$/.test(this.zipcode)||5!==this.zipcode.length?(this.invalid.zip=!0,this.show_error=!0,this.error_msg="please provide a valid U.S zipcode"):this.age?(this.loading=!0,this.pass_validation=!0):(this.invalid.age=!0,this.show_error=!0,this.error_msg="please select an age"),this._cd.detectChanges(),this.show_error||(i.Cookies.set("wh_zipcode",this.zipcode,3650),i.Cookies.set("wh_age",this.ageparam,3650),i.Cookies.set("wh_currently_insured",this.insuredparam?1:0,3650),i.$http({url:i.ajaxUrl(),method:"GET",data:Object.assign({action:"Profiles.FindInsurers",age:this.ageparam,zip:this.zipcode,currently_insured:this.insuredparam,viewid:this.ad_view_id,clickid:this.ad_click_id},e||{}),after:()=>{this.loading=!1,this._cd.detectChanges()}}).then(e=>{e.error?this._ajaxError():window.open(e.goto_link,"_self")}).catch(e=>{this._ajaxError()}))}}ngOnInit(){i.isNode()||(this.is_tabletmode=window.innerWidth>=768&&window.innerWidth<=1003,i.Cookies.get("wh_zipcode")&&""!=i.Cookies.get("wh_zipcode")?(this.zipcode=i.Cookies.get("wh_zipcode"),this._cd.detectChanges()):i.$http({url:i.ajaxUrl(),method:"GET",data:{action:"Calculators.MortgageIpToZip",loggedIn:!1}}).then(e=>{e.zip?this.zipcode=e.zip:"-"!=e[7]&&(this.zipcode=e[7]||""),this._cd.detectChanges()}).catch(e=>{this._ajaxError()}),i.Cookies.get("wh_age")&&""!=i.Cookies.get("wh_age")&&(this.ageparam=i.Cookies.get("wh_age"),this.age=this.ages[this._ages_param.indexOf(this.ageparam)],this._cd.detectChanges()),i.Cookies.get("wh_currently_insured")&&""!=i.Cookies.get("wh_currently_insured")&&(this.insured="1"==i.Cookies.get("wh_currently_insured")?"Yes":"No",this.insuredparam="1"==i.Cookies.get("wh_currently_insured"),this._cd.detectChanges()))}ngOnDestroy(){clearTimeout(this._ajax_error_timer)}}C.ɵfac=function(e){return new(e||C)(t.ɵɵdirectiveInject(t.ChangeDetectorRef))},C.ɵdir=t.ɵɵdefineDirective({type:C,inputs:{typeList:[0,"type-list","typeList"],age:"age",insured:"insured",zipcode:"zipcode",layoutType:[0,"layout-type","layoutType"]}});class I extends C{constructor(e){super(e),this.adview_ready=!1}ChangeInsurance(e){this.insuredparam=e,this._cd.detectChanges()}_GetSesId(){return i.$http({url:i.baseUrl()+"/sid.php",data:{a:"1"},method:"GET",events:!1,retry:2}).then(e=>(e&&e.__whid&&(this.adview_extra={adview_offer_type:"Car_Insurance_Widget",session_id:e.__whid}),this.adview_ready=!0,this._cd.detectChanges(),null)).catch(e=>{console.warn("could not get session id",e),this.adview_ready=!0,this._cd.detectChanges()})}ngOnInit(){super.ngOnInit(),i.isNode()||(this.adview_extra={adview_offer_type:"Car_Insurance_Widget"},this._GetSesId())}}I.ɵfac=function(e){return new(e||I)(t.ɵɵdirectiveInject(t.ChangeDetectorRef))},I.ɵdir=t.ɵɵdefineDirective({type:I,features:[t.ɵɵInheritDefinitionFeature]});const y=["input"];function E(e,i){if(1&e&&t.ɵɵelement(0,"div",6),2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.label)}}function L(e,i){if(1&e&&t.ɵɵelement(0,"div",7),2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("cleanHTML",e.label)("zing-url-container",!0)}}class T{get required(){return this._required}set required(e){this._required=!!e}constructor(e,i){this._cd=e,this.renderer=i,this.name=null,this.label=null,this.has_links=!1,this.arialabel=null,this.checkedChange=new t.EventEmitter,this.checked=!1,this.disabled=!1,this.clicktoggle=!1}ngOnInit(){this.name||(this.name="toggle-"+i.uniqid())}Check(){this.clicktoggle||(this.checked=!this.checked,this.checkedChange.emit(this.checked))}Click(e){this.clicktoggle&&!this.disabled&&(e.preventDefault(),setTimeout(()=>{this.checked=!this.checked,this.checkedChange.emit(this.checked),this._cd.detectChanges()}))}ngAfterViewInit(){i.isNode()&&this.checked&&this.renderer.setAttribute(this.checkbox.nativeElement,"checked","checked")}}T.ɵfac=function(e){return new(e||T)(t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(t.Renderer2))},T.ɵdir=t.ɵɵdefineDirective({type:T,viewQuery:function(e,i){if(1&e&&t.ɵɵviewQuery(y,5,t.ElementRef),2&e){let e;t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.checkbox=e.first)}},inputs:{required:"required",name:"name",label:"label",has_links:[0,"label-with-links","has_links"],arialabel:"arialabel",checked:"checked",disabled:"disabled",clicktoggle:"clicktoggle"},outputs:{checkedChange:"checkedChange"}});class z extends T{}z.ɵfac=(()=>{let e;return function(i){return(e||(e=t.ɵɵgetInheritedFactory(z)))(i||z)}})(),z.ɵcmp=t.ɵɵdefineComponent({type:z,selectors:[["ng-checkbox"]],standalone:!1,features:[t.ɵɵInheritDefinitionFeature],decls:6,vars:8,consts:[["input",""],["role","checkbox","tabindex","0",1,"checkbox",3,"click"],["type","checkbox","value","","aria-hidden","true","tabindex","-1",3,"change","checked","required","disabled","name"],[1,"track","bf-icon-ok"],["class","name",3,"cleanHTML",4,"ngIf"],["class","name text-select","zing-touch","",3,"cleanHTML","zing-url-container",4,"ngIf"],[1,"name",3,"cleanHTML"],["zing-touch","",1,"name","text-select",3,"cleanHTML","zing-url-container"]],template:function(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"label",1),t.ɵɵlistener("click",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.Click(n))}),t.ɵɵelementStart(1,"input",2,0),t.ɵɵlistener("change",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.Check())}),t.ɵɵelementEnd(),t.ɵɵelement(3,"span",3),t.ɵɵtemplate(4,E,1,1,"div",4)(5,L,1,2,"div",5),t.ɵɵelementEnd()}2&e&&(t.ɵɵattribute("aria-label",i.arialabel||i.label)("aria-checked",i.checked?"true":"false"),t.ɵɵadvance(),t.ɵɵproperty("checked",i.checked)("required",i.required)("disabled",i.disabled)("name",i.name),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",i.label&&!i.has_links),t.ɵɵadvance(),t.ɵɵproperty("ngIf",i.label&&i.has_links))},dependencies:[t.NgIf,i.TouchGesturesDirective,i.ngCleanHTML],encapsulation:2});class V{}V.ɵfac=function(e){return new(e||V)},V.ɵmod=t.ɵɵdefineNgModule({type:V}),V.ɵinj=t.ɵɵdefineInjector({imports:[t.CommonModule,i.DirectivesModule]});const S=["AdPixelViewTrigger"],O=["AdPixelViewReferrer"],M=["AdPixelViewClick"];class j{constructor(e){this._dservice=e,this._scrolling=!1,this._obs=[]}AttachEvents(){this.onScrollEnd=new t.BehaviorSubject(null),this.onResize=new t.Subject,i.isNode()||(this._subs=this._dservice.onScroll.subscribe(e=>{this._scrolling&&clearTimeout(this._scrolltimer),this._scrolling=!0,this._scrolltimer=setTimeout(()=>{this._scrolling=!1,this.onScrollEnd.next(e)},500)}),this._resize=new t.Subject,this._obs.push(t.fromEvent(window,"resize")),this._resizesubs=this._obs[this._obs.length-1].pipe(t.takeUntil(this._resize)).subscribe(()=>{this.onResize.next(null)}))}DetachEvents(){this._subs&&(this._subs.unsubscribe(),this._subs=null),this._resizesubs&&(this._resizesubs.unsubscribe(),this._resizesubs=null),this._resize&&(this._resize.next(null),this._resize.complete(),this._resize=null),this.onScrollEnd&&(this.onScrollEnd.complete(),this.onScrollEnd=null),this.onResize&&(this.onResize.complete(),this.onResize=null),this._obs=null}}j.ɵfac=function(e){return new(e||j)(t.ɵɵinject(i.ScrollerService))},j.ɵprov=t.ɵɵdefineInjectable({token:j,factory:j.ɵfac});class R{set ad_view_trigger(e){this._ad_view_trigger=e,e&&setTimeout(()=>{this._CheckElements("all"),this._cd.detectChanges()})}get ad_view_trigger(){return this._ad_view_trigger}set adId(e){e!=this._adId&&this._ng_init&&setTimeout(()=>{this._ResetnCheck(),this._cd.detectChanges()}),this._adId=e}get adId(){return this._adId}set recheck(e){e&&this._ng_init&&this._ResetnCheck(),this._recheck=e}get recheck(){return this._recheck}get _adlocation(){let e=this._loc.path().replace("/ng-home/","/");return e=e.split("?")[0],e}constructor(e,n,s,r,a,o){this.mainElement=e,this._dservice=n,this._renderer=s,this._srv=r,this._loc=a,this._cd=o,this.ad_disabled=!1,this._ad_view_trigger=!0,this.triggerRatio=.15,this.debug=!1,this.referrerUrl="",this.clickUrl="",this.section="",this.position=0,this.totals=0,this.without_adview_version=!1,this.ignore_default_queries=!1,this.ad_use_parent_el=!1,this.pixel_on_click=!1,this.uniqueClickId=!1,this.viewId="",this.is_viewed=!1,this.clickId="",this.sbs=new t.Subscription,this.obs=[],this.is_intersecting=!1,this.is_main_intersct=!1,this.adViewed=new t.EventEmitter,this.adClick=new t.EventEmitter,this.adSet=new t.EventEmitter,this._ng_init=!1,this._CheckForIntersection=e=>{if(!this.is_viewed)for(let t=0,n=e.length;t<n;t++){let n=e[t];if(i.isNullorUndefined(n.isIntersecting)&&this._isInViewport(n,!0)){this.is_intersecting=!0;break}if(n.isIntersecting){this.is_intersecting=!0;break}this.is_intersecting=!1}},this.use_IntersectionObserver=!(i.isNode()||!window.IntersectionObserver),this.debug&&console.log("use_IntersectionObserver is : ",this.use_IntersectionObserver)}ngOnInit(){this._ng_init=!0,this.ad_disabled||(this.viewId=i.uniqid(),this.clickId=i.uniqid(),i.isNode()||(this.viewport=this._getViewportSize()),this.adSet.emit({viewid:this.viewId,clickid:this.clickId}))}ngAfterViewInit(){if(this._PixelReferrer(),this._PixelAddClickId(),i.isNode())return;this.clicksList&&!this.ad_disabled&&this.clicksList.forEach(e=>{const i=t.fromEvent(e.nativeElement,"click");this.obs.push(i),this.sbs.add(i.subscribe(t=>{this._PixelClicked(e),this.adClick.emit({view:this.viewId,click:this.clickId})}))}),this.referrersList&&!this.ad_disabled&&this.referrersList.forEach(e=>{const i=t.fromEvent(e.nativeElement,"click");this.obs.push(i),this.sbs.add(i.subscribe(e=>{this.is_viewed||this._PixelTrigger()}))});let e=(this.use_IntersectionObserver?this._RegisterIntersectElements:this._CheckElements).bind(this);if(this.clicksList&&this.sbs.add(this.clicksList.changes.subscribe(t=>{this.ad_disabled||e(this.clicksList),this._PixelAddClickId()})),!this.ad_disabled&&this.triggersList&&this.sbs.add(this.triggersList.changes.subscribe(t=>{e(this.triggersList)})),this.referrersList&&this.sbs.add(this.referrersList.changes.subscribe(t=>{this._PixelReferrer(),this.ad_disabled||e(this.referrersList)})),this.ad_disabled)return;const n=this._srv.onScrollEnd,s=this._srv.onResize;this.use_IntersectionObserver?(this._intersectionObserver=new IntersectionObserver(e=>{this._CheckForIntersection(e)},{threshold:this.triggerRatio}),this._RegisterIntersectElements("all"),this.sbs.add(n.subscribe(e=>{this.is_intersecting&&this._PixelTrigger()}))):this.sbs.add(n.subscribe(e=>{this._CheckElements("all")})),this.sbs.add(s.subscribe(e=>{this.viewport=this._getViewportSize(),this.debug&&console.log("new viewport size : ",this.viewport),this.use_IntersectionObserver||this._CheckElements("all")})),setTimeout(()=>{this._CheckElements("all")})}_RegisterIntersectElements(e){let t=!0,i=e=>{this._intersectionObserver?("function"==typeof this._intersectionObserver.unobserve&&this._intersectionObserver.unobserve(e.nativeElement),this._intersectionObserver.observe(e.nativeElement),t=!1):console.error("IntersectionObserver is not initialized.")};if("all"==e?(this.triggersList&&this.triggersList.forEach(i),this.referrersList&&this.referrersList.forEach(i),this.clicksList&&this.clicksList.forEach(i)):e.forEach(i),this.is_main_intersct=t,t){let e=this.mainElement.nativeElement,t=this.ad_use_parent_el?e.parentNode:e;this._intersectionObserver.observe(t)}}_CheckElements(e){if(this.is_viewed)return;let t=!0,i=e=>{t=!1,this._isInViewport(e)&&this._PixelTrigger()};if("all"==e?(this.triggersList&&this.triggersList.forEach(e=>{i(e)}),this.referrersList&&this.referrersList.forEach(e=>{i(e)}),this.clicksList&&this.clicksList.forEach(e=>{i(e)})):e&&e.forEach(e=>{i(e)}),this.is_main_intersct=t,t){let e=this.mainElement.nativeElement,t=this.ad_use_parent_el?{nativeElement:e.parentNode}:this.mainElement;i(t)}}_isInViewport(e,t){if(!this.viewport)return!1;var i=t?e.boundingClientRect:e.nativeElement.getBoundingClientRect(),n=i.height||i.bottom-i.top,s=i.width||i.right-i.left;return!(!n||!s)&&!(i.top+i.height*(this.is_main_intersct?this.triggerRatio:1)>this.viewport.h||i.bottom<0)}_getViewportSize(){var e=window;if(null!=e.innerWidth)return{w:e.innerWidth,h:e.innerHeight};var t=e.document;return{w:t.body.clientWidth,h:t.body.clientWidth}}_ResetnCheck(){i.isNode()||(this.is_viewed=!1,this.viewId=i.uniqid(),this.clickId=i.uniqid(),this._PixelReferrer(),this._PixelAddClickId(),this._CheckElements("all"))}_PixelTrigger(){this.ad_view_trigger&&(this.is_viewed||(this.is_viewed=!0,this.adViewed.emit({view:this.viewId,click:this.clickId}),this._httpCall()))}_PixelClicked(e,t=!1){this.is_viewed||this._PixelTrigger(),(this.pixel_on_click||t)&&this._httpCall({adview_click:this.clickId}),i.reqAnimationFrame(()=>{this._PixelAddClickId()})}TriggerClickPixel(e){if(this._PixelClicked(null,!0),this.clickUrl){let t=this.clickUrl+(this.clickUrl.indexOf("?")>-1?"&":"?")+`clickId=${this.clickId}&viewId=${this.viewId}`;e&&(t+=i.objectSerialize(e)),window.open(t,""+(this.same_tab?"_self":"_blank"))}}TriggerViewPixel(){this._PixelTrigger()}_PixelAddClickId(){this.clicksList&&this.clicksList.forEach(e=>{const t=this.clickUrl;if(i.isNode())return void this._renderer.setAttribute(e.nativeElement,"href",t);const n=this.clickId;this.uniqueClickId&&(this.clickId=i.uniqid());let s=t+(t.indexOf("?")>-1?"&":"?")+`clickId=${n}&viewId=${this.viewId}`;this.ad_disabled&&(s=t);const r=e.nativeElement;r.dataset&&r.dataset.clickparams&&(s.indexOf("?")>-1?s+="&":s+="?",s+=r.dataset.clickparams),this._renderer.setAttribute(e.nativeElement,"href",s)})}_PixelReferrer(){this.referrersList&&this.referrersList.forEach(e=>{const t=this.referrerUrl;let n=t;i.isNode()||this.ad_disabled||(n+=(t.indexOf("?")>-1?"&":"?")+`viewReferrer=${this.viewId}`),this._renderer.setAttribute(e.nativeElement,"href",n)})}_httpCall(e={}){let t={adview_id:this.viewId,adview_pid:this.adId,adview_page:this._adlocation,adview_version:2,adview_section:this.section,adview_position:this.position||0,adview_totals:this.totals||0};this.without_adview_version&&delete t.adview_version,this.ignore_default_queries&&this.addlQueries&&(t={});let n=Object.assign(t,this.addlQueries,e),s=i.baseUrl()+"/pixel.png";n.adview_section||delete n.adview_section,n.adview_pid||delete n.adview_pid,(0==n.adview_totals&&0==n.adview_position||-1==n.adview_totals&&-1==n.adview_position)&&(delete n.adview_position,delete n.adview_totals),Object.keys(n).forEach(e=>{null!==n[e]&&void 0!==n[e]||delete n[e]}),i.$http({method:"GET",data:n,events:!1,url:s,expectedType:"text",retry:1}).catch(e=>{}),this.debug&&console.log(this.adId," AdPixelView fired.")}ngOnDestroy(){this.sbs.unsubscribe(),this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=null),this.obs=[]}}R.ɵfac=function(e){return new(e||R)(t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(i.ScrollerService),t.ɵɵdirectiveInject(t.Renderer2),t.ɵɵdirectiveInject(j),t.ɵɵdirectiveInject(t.Location),t.ɵɵdirectiveInject(t.ChangeDetectorRef))},R.ɵdir=t.ɵɵdefineDirective({type:R,selectors:[["","ad-pixel",""]],contentQueries:function(e,i,n){if(1&e&&(t.ɵɵcontentQuery(n,S,5,t.ElementRef),t.ɵɵcontentQuery(n,O,5,t.ElementRef),t.ɵɵcontentQuery(n,M,5,t.ElementRef)),2&e){let e;t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.triggersList=e),t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.referrersList=e),t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.clicksList=e)}},inputs:{ad_disabled:[0,"ad-disabled","ad_disabled"],ad_view_trigger:[0,"ad-view-trigger","ad_view_trigger"],addlQueries:[0,"addl-queries","addlQueries"],triggerRatio:[0,"trigger-ratio","triggerRatio"],debug:"debug",referrerUrl:[0,"referrer-url","referrerUrl"],clickUrl:[0,"click-url","clickUrl"],section:[0,"adview-section","section"],position:[0,"adview-position","position"],totals:[0,"adview-totals","totals"],same_tab:[0,"same-tab","same_tab"],without_adview_version:[0,"without-adview-version","without_adview_version"],ignore_default_queries:[0,"ignore-default-queries","ignore_default_queries"],adId:[0,"ad-id","adId"],ad_use_parent_el:[0,"ad-use-parent","ad_use_parent_el"],pixel_on_click:[0,"ad-pixel-click","pixel_on_click"],uniqueClickId:[0,"unique-click-id","uniqueClickId"],recheck:[0,"ad-pixel-recheck","recheck"]},outputs:{adViewed:"adViewed",adClick:"adClick",adSet:"adSet"},standalone:!1});class q{constructor(e){this._srv=e,this._srv.AttachEvents()}ngOnDestroy(){this._srv.DetachEvents()}}q.ɵfac=function(e){return new(e||q)(t.ɵɵinject(j))},q.ɵmod=t.ɵɵdefineNgModule({type:q}),q.ɵinj=t.ɵɵdefineInjector({providers:[j],imports:[t.CommonModule,i.DirectivesModule]});const N=["adForm"];function P(e,i){if(1&e&&t.ɵɵelement(0,"h3",17),2&e){const e=t.ɵɵnextContext();t.ɵɵproperty("innerHTML",e.title,t.ɵɵsanitizeHtml)}}function D(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",18),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){const e=t.ɵɵnextContext();t.ɵɵadvance(),t.ɵɵtextInterpolate(e.error_msg)}}function H(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",19),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){const e=t.ɵɵnextContext();t.ɵɵadvance(),t.ɵɵtextInterpolate(e.error_msg)}}r.import("css:/ci-shortcode.css").then(()=>{},()=>{});class F extends I{constructor(e){super(e)}ngOnInit(){this.data?this.title=this.data:""==this.data&&(this.title=null),super.ngOnInit()}ngAfterViewInit(){this.adView.is_viewed=!0,this._cd.detectChanges()}}F.ɵfac=function(e){return new(e||F)(t.ɵɵdirectiveInject(t.ChangeDetectorRef))},F.ɵcmp=t.ɵɵdefineComponent({type:F,selectors:[["div",8,"car-insurance-widget"]],viewQuery:function(e,i){if(1&e&&t.ɵɵviewQuery(N,5,R),2&e){let e;t.ɵɵqueryRefresh(e=t.ɵɵloadQuery())&&(i.adView=e.first)}},standalone:!1,features:[t.ɵɵInheritDefinitionFeature],decls:20,vars:20,consts:[["adForm",""],["form-submit","","ad-pixel","",1,"form-ci-widget",3,"onSubmit","adViewed","unique-click-id","ad-pixel-recheck","ad-id","addl-queries"],["class","ciw-head",3,"innerHTML",4,"ngIf"],[1,"ciw-row","test-ciw-row"],[1,"ciw-box","first"],["id","zip-ipt-label","for","zip-ipt",3,"hidden"],["type","tel","placeholder","Zip Code","name","zip","maxlength","5","id","zip-ipt","role","textbox","aria-labelledby","zip-ipt-label",1,"single","textfield","ciw-zip",3,"input","value"],[1,"ciw-box","second"],["id","age-ipt-label",3,"hidden"],["placeholder","Age",3,"valueChange","items","second","invalid","value","labelledby"],["class","ciw-error-age semi-bold-font mob ng-enter-element",4,"ngIf"],[1,"ciw-box","ciw-block","ci-checkbox"],["label","Currently Insured?","name","currently_insured",3,"checkedChange","checked"],[1,"ciw-box","ciw-block"],["type","submit",1,"btn","blue","ciw-btn","with-loader"],[1,"btn-loader"],["class","ciw-error-age semi-bold-font desk ng-enter-element",4,"ngIf"],[1,"ciw-head",3,"innerHTML"],[1,"ciw-error-age","semi-bold-font","mob","ng-enter-element"],[1,"ciw-error-age","semi-bold-font","desk","ng-enter-element"]],template:function(e,i){if(1&e){const e=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"form",1,0),t.ɵɵlistener("onSubmit",function(){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.GetQuote())})("adViewed",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.SetAdView(n))}),t.ɵɵtemplate(2,P,1,1,"h3",2),t.ɵɵelementStart(3,"div",3)(4,"div",4)(5,"label",5),t.ɵɵtext(6,"Zip Code"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"input",6),t.ɵɵlistener("input",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.ChangeZip(n))}),t.ɵɵelementEnd()(),t.ɵɵelementStart(8,"div",7)(9,"label",8),t.ɵɵtext(10,"Age"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"ng-dropdown",9),t.ɵɵlistener("valueChange",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.SetAge(n))}),t.ɵɵelementEnd()(),t.ɵɵtemplate(12,D,2,1,"div",10),t.ɵɵelementStart(13,"div",11)(14,"ng-checkbox",12),t.ɵɵlistener("checkedChange",function(n){return t.ɵɵrestoreView(e),t.ɵɵresetView(i.ChangeInsurance(n))}),t.ɵɵelementEnd()(),t.ɵɵelementStart(15,"div",13)(16,"button",14),t.ɵɵtext(17,"Find Insurers"),t.ɵɵelement(18,"span",15),t.ɵɵelementEnd()()(),t.ɵɵtemplate(19,H,2,1,"div",16),t.ɵɵelementEnd()}2&e&&(t.ɵɵproperty("unique-click-id",!0)("ad-pixel-recheck",i.adview_ready)("ad-id",5e6)("addl-queries",i.adview_extra),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",i.title),t.ɵɵadvance(3),t.ɵɵproperty("hidden",!0),t.ɵɵadvance(2),t.ɵɵclassProp("ng-wh-error",i.invalid.zip),t.ɵɵproperty("value",i.zipcode),t.ɵɵadvance(2),t.ɵɵproperty("hidden",!0),t.ɵɵadvance(2),t.ɵɵproperty("items",i.ages)("second",!0)("invalid",i.invalid.age)("value",i.age)("labelledby","age-ipt-label"),t.ɵɵadvance(),t.ɵɵproperty("ngIf",i.show_error),t.ɵɵadvance(2),t.ɵɵproperty("checked",i.insuredparam),t.ɵɵadvance(2),t.ɵɵclassProp("loadactive",i.loading),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",i.show_error))},dependencies:[t.NgIf,w,z,i.ngFormSubmit,R],encapsulation:2,changeDetection:0});class A{}A.ɵfac=function(e){return new(e||A)},A.ɵmod=t.ɵɵdefineNgModule({type:A}),A.ɵinj=t.ɵɵdefineInjector({imports:[t.CommonModule,i.DirectivesModule,b,V,i.FormSubmitModule,q]}),e.CIShortCode=F,e.CIShortCodeBase=I,e.DropDown=w,e.DropDownModule=b,e.NGCIShortCodeModule=A});