(()=>{var U=Object.defineProperty,s=(e,t,r)=>(r=r,(t="symbol"!=typeof t?t+"":t)in(e=e)?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r),G=(e=>(e.GRANTED="GRANTED",e.DENIED="DENIED",e.UNSPECIFIED="UNSPECIFIED",e))({});var H=(e=>(e.ADD_LEAD_TAG="addLeadTag",e.ADD_LEAD_PHONE="addLeadPhone",e.ADD_CONSENT="addConsent",e.ADD_LEAD_STAGE="addLeadStage",e))({}),f={lead:{email:"",phoneNumbers:[],tag:"",tags:[],firstName:"",lastName:"",adOptimizationConsent:"UNSPECIFIED",leadStage:"",contact:"",leadAddress:"",leadCity:"",leadStreet:"",leadState:"",leadCountry:"",leadZipCode:""},source:{sourceLinkTags:"",fbAdsetId:0,googleAdId:0,bingAdGroupId:0,hyrosCampaignId:0,gClickId:"",wBraId:"",gBraId:"",fbClickId:"",tiktokAdGroupId:0,snapchatAdSetId:0,twitterAdgroupId:0,linkedinCampaignId:0,ttClickId:"",rdtAdGroupId:"",rdtClickId:"",bingSpecialCampaign:!1,gSpecialCampaign:!1,gAdgroupId:0,pinterestAdgroupId:0},config:{cookieEnabled:!0,origin:"",sessionId:"",prevUrl:"",refUrl:"",leadGenSessionId:"",dvfp:"",i:"",o:"",cartId:null,l:void 0,u:!1,h:"",tpsFromCache:"",m:"",platform:""},checkout:{paypalUniqueCheckoutId:"",uniqueCheckoutId:0},conversionInfo:[],processedData:{p:!1,email:null,g:null,v:!1,I:!1,C:[],T:[],_:[],R:[],P:[],S:[],k:[],A:[],O:[],N:[],D:[],L:[],F:[],U:"",G:!1,H:[],V:null,B:null,j:!0,W:[],q:[],K:!1,J:null}},M=(e=>(e.TRACKING_URL="https://203962.t.hyros.com/v1/lst",e.FRONTEND_URL="https://app.hyros.com",e.LEAD_GEN_URL="https://lg.hyr.so/v1/lst",e.ORIGIN="SHOPIFY",e.PRODUCT_HASH="15cde0d3914fee97484e0b10e3a3668c376dadbb3fec32b12e354fa81b53fcd4",e.CUSTOM_TAG="\!clicked",e.SESSION_ID="",e.PREVIOUS_OVERRIDE="",e.REFERER_OVERRIDE="",e.CALL_TRACKING_POOL_HASH="",e.FINGERPRINT_SCRIPT="",e.DEVICE_FINGERPRINT="dvfp",e.THIRD_PARTY_TRACKING_PROVIDER="bdex-pixel",e))({}),V=(e=>(e.PRODUCT_ID=203962,e))({}),B=(e=>(e.SPA_ENABLED=false,e.IGNORE_PREVIOUS_URL=false,e.EMBED_SCRIPTS_ON_IFRAME=false,e.CALL_TRACKING_ENABLED=false,e.FINGERPRINT_ENABLED=false,e.FETCH_KEEP_ALIVE_ENABLED=true,e.SHOPIFY_POST_PURCHASE_ENABLED=false,e.NO_SWAP_NUMBERS_ENABLED=false,e.DELETE_TRACKING_PARAMS_ENABLED=false,e.FB_EVENT_ID_RETRIEVAL=true,e.PHONE_OPT_IN_ENABLED=true,e.TIME_SPENT_TRACKING=false,e.THIRD_PARTY_TRACKING=false,e.UNIFIED_CLICK_EVENT=false,e))({}),n=(()=>{var e=[...Object.keys(B),...Object.keys(M),...Object.keys(V)];let t={};return e.forEach(e=>{e in B?t[e]=B[e]:e in M?t[e]=M[e]:e in V&&(t[e]=V[e])}),t})(),e=class{},t=(s(e,"origin",n.ORIGIN),s(e,"customTag",n.CUSTOM_TAG),s(e,"callTrackingPoolHash",n.CALL_TRACKING_POOL_HASH),s(e,"sessionId",n.SESSION_ID),s(e,"prevOverride",n.PREVIOUS_OVERRIDE),s(e,"refOverride",n.REFERER_OVERRIDE),s(e,"facebookEventIdRetrieval",n.FB_EVENT_ID_RETRIEVAL),s(e,"spaEnabled",n.SPA_ENABLED),s(e,"ignorePrevUrl",n.IGNORE_PREVIOUS_URL),s(e,"embedScriptOnIframes",n.EMBED_SCRIPTS_ON_IFRAME),s(e,"trackDeviceFingerprint",n.FINGERPRINT_ENABLED),s(e,"useFetchKeepAlive",n.FETCH_KEEP_ALIVE_ENABLED),s(e,"callTrackingEnabled",n.CALL_TRACKING_ENABLED),s(e,"shopifyPostPurchasePageScript",n.SHOPIFY_POST_PURCHASE_ENABLED),s(e,"noSwapNumbersEnabled",n.NO_SWAP_NUMBERS_ENABLED),s(e,"clientUseCustomConsentEvent",!1),s(e,"deleteParams",n.DELETE_TRACKING_PARAMS_ENABLED),s(e,"phoneOptInEnabled",n.PHONE_OPT_IN_ENABLED),s(e,"timeSpentTrackingEnabled",n.TIME_SPENT_TRACKING),s(e,"thirdPartyTracking",n.THIRD_PARTY_TRACKING),s(e,"unifiedClickEvent",n.UNIFIED_CLICK_EVENT),class{constructor(){}}),r=(s(t,"id",n.PRODUCT_ID),s(t,"hash",n.PRODUCT_HASH),class{}),a=(s(r,"trackingBase",n.TRACKING_URL),s(r,"leadGenBase",n.LEAD_GEN_URL),s(r,"generateLeadGenSessionId",r.leadGenBase+"/session"),s(r,"processClick",r.trackingBase+"/pc"),s(r,"generateUUID",r.trackingBase+"/gusid"),s(r,"errorEndpoint","/error"),s(r,"unifiedEvent","/hte"),s(r,"clickUpdate","/pcu"),s(r,"pingPongRequest","/../sv"),s(r,"customActionProcessing","/cap"),s(r,"dniRequest","/cte"),s(r,"matchingTrigger","/tpten"),r),g=class{constructor(){}},x=(s(g,"product",t),s(g,"config",e),s(g,"endpoints",a),s(g,"href",location.href),s(g,"documentUrl",document.URL),s(g,"documentReferrer",document.referrer),(e=>(e.HYROS_FIRST_NAME="hyros-first-name",e.FIRST_NAME="firstname",e.NAME="name",e.FIRST_NAME_DASHED="first-name",e.F_NAME_DASHED="f-name",e.FIRST_NAME_SNAKE="first_name",e.F_NAME_SNAKE="f_name",e.FIRST_NAME_SPACED="first name",e.F_NAME_SPACED="f name",e))({})),j=(e=>(e.HYROS_LAST_NAME="hyros-last-name",e.LAST_NAME="lastname",e.LAST_NAME_DASHED="last-name",e.L_NAME_DASHED="l-name",e.LAST_NAME_SNAKE="last_name",e.L_NAME_SNAKE="l_name",e.LAST_NAME_SPACED="last name",e.L_NAME_SPACED="l name",e))({}),W=(e=>(e.HYROS_FULL_NAME="hyros-full-name",e.FULL_NAME_DASHED="full-name",e.FULL_NAME_SNAKE="full_name",e.FULL_NAME_SPACED="full name",e.FULL_NAME_SINGLE="fullname",e.FULL_NAME_ELLIPSIS="full name...",e.COMPLETE_NAME_DASHED="complete-name",e.COMPLETE_NAME_SNAKE="complete_name",e.COMPLETE_NAME_SPACED="complete name",e.COMPLETE_NAME_SINGLE="completename",e.INVITEE_FULL_NAME="invitee_full_name",e))({}),q=(e=>(e.EMAIL="Email",e.EMAIL_LOWER="email",e.INVITEE_EMAIL="invitee_email",e.HEMAIL="hemail",e.HE="he",e.CEMAIL="cemail",e.PAYER_EMAIL="payer_email",e.CHECKOUTEMAIL="checkoutemail",e.CUSTOMER_EMAIL="customer_email",e.EMAIL_ADDRESS_LEAD="email-address-lead",e.EMAIL_LEAD="email-lead",e.BUYER_EMAIL="buyer_email",e.INF_FIELD_EMAIL="inf_field_Email",e.EMAIL_FORM1="email_form1",e.WJ_LEAD_EMAIL="wj_lead_email",e.EW_EMAIL="ew_email",e.PERSONEMAIL="PersonEmail",e.M="m",e))({});var K=(e=>(e.SOURCE_LINK="sl",e.FB_AD_SET_ID="fbc_id",e.G_CAMPAIGN_ID="gc_id",e.G_ADGROUP_ID="h_ga_id",e.G_SPECIAL_CAMPAIGN="CustomGSpecialCampaign",e.G_CLICK_ID="gclid",e.W_BRA_ID="wbraid",e.G_BRA_ID="gbraid",e.FB_CLICK_ID="fbclid",e.EMAIL_SOURCE="el",e.EMAIL_TRAFFIC="he",e.HYROS_AD_ID="h_ad_id",e.BING_AD_GROUP_ID="bng_id",e.BING_SPECIAL_CAMPAIGN="CustomBingSpecialCampaign",e.HYROS_CAMPAIGN_ID="h_campaign_id",e.MANY_CHAT_PARAMS="mch",e.TT_AD_GROUP_ID="ttc_id",e.SN_AD_SET_ID="snc_id",e.LNK_CAMPAIGN_ID="lnk_id",e.TWT_ADGROUP_ID="twt_id",e.PNT_AD_GROUP_ID="pnt_id",e.TT_CLICK_ID="ttclid",e.RDT_AD_GROUP_ID="rdt_id",e.RDT_CLICK_ID="rdt_clid",e.PAYPAL_UNIQUE_CHECKOUT_ID="tx",e.HYROS_TRAFFIC_SOURCE="htrafficsource",e.HYROS_CATEGORY="hcategory",e.HYROS_GOAL="hgoal",e.HYROS_KEYWORD_ID="h_keyword_id",e.HYROS_KEYWORD="h_keyword",e.HYROS_PLACEMENT="h_placement",e.HYROS_AD_NAME="h_ad_name",e.APL_CAMPAIGN_ID="apl_id",e.HYROS_CAMPAIGN_NAME="h_campaign_name",e))({});var J=(e=>(e.SOURCE_LINK="sl",e.FB_AD_SET_ID="fbc_id",e.G_CAMPAIGN_ID="gc_id",e.G_ADGROUP_ID="h_ga_id",e.G_CLICK_ID="gclid",e.G_SPECIAL_CAMPAIGN="g_special_campaign",e.W_BRA_ID="wbraid",e.G_BRA_ID="gbraid",e.FB_CLICK_ID="fbclid",e.EMAIL_SOURCE="el",e.EMAIL_TRAFFIC="he",e.HYROS_AD_ID="h_ad_id",e.BING_AD_GROUP_ID="bng_id",e.BING_SPECIAL_CAMPAIGN="bng_special_campaign",e.HYROS_CAMPAIGN_ID="h_campaign_id",e.MANY_CHAT_PARAMS="mch",e.TT_AD_GROUP_ID="ttc_id",e.SN_AD_SET_ID="snc_id",e.LNK_CAMPAIGN_ID="lnk_id",e.TWT_ADGROUP_ID="twt_id",e.PNT_AD_GROUP_ID="pnt_id",e.TT_CLICK_ID="ttclid",e.RDT_AD_GROUP_ID="rdt_id",e.RDT_CLICK_ID="rdt_clid",e.PAYPAL_UNIQUE_CHECKOUT_ID="tx",e.HYROS_TRAFFIC_SOURCE="htrafficsource",e.HYROS_CATEGORY="hcategory",e.HYROS_GOAL="hgoal",e.HYROS_KEYWORD_ID="h_keyword_id",e.HYROS_KEYWORD="h_keyword",e.HYROS_PLACEMENT="h_placement",e.HYROS_AD_NAME="h_ad_name",e.APL_CAMPAIGN_ID="apl_id",e.HYROS_CAMPAIGN_NAME="h_campaign_name",e))({});function z(){return Object.values(J)}var X=null!=(r=null==console?void 0:console.log)&&r.bind?console.log.bind(console):()=>{},o=class{constructor(){}static log(e,t){X("%c [UTS] "+e,"color: "+t+";")}static info(e){this.log(e,"green")}static error(e){this.log(e,"red")}static warn(e){this.log(e,"#ff9966")}static X(e,t){X("%c [UTS] "+e,"color: green;",t)}},c=class c{constructor(){}static decodeUrlParam(r){if(null===r)return r;{let e=r,t="";for(;e!==t;){t=e;try{e=decodeURIComponent(t)}catch(e){return o.warn("[DCD] Fail during decoding: "+t+" , error: "+e),t}}return e}}static $(e,t,r){try{return g.config.deleteParams?e:t}catch(e){return o.error(r+e),g.config.deleteParams=!1,t}}static Z(){return this.$(g.href,location.href,"E_BHREF: ")}static Y(){return this.$(g.documentUrl,document.URL,"E_DURL: ")}static ee(){return this.$(g.documentReferrer,document.referrer,"E_DREF: ")}static getUrlParam(e,t,r,a){r=r||this.Z(),e="[\\?&]"+(e=(e=e.toString().replace(/[[]/,"\\[").replace(/[\]]/,"\\]")).toString().replace(/ /g,"\\+"))+'=([^&#,"]*)',e=new RegExp(e).exec(r);let i=e?e[1]:null;return i=null!==i&&(t&&(i=c.decodeUrlParam(i)),a)?i&&i.replace(/["},]/g,""):i}static te(e,t,r){for(var a,i=r||c.Z(),r="[\\?&]"+(e=e.toString().replace(/[[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",s=new RegExp(r,"g"),n=[];null!==(a=s.exec(i));){let e=a[1];t&&(e=c.decodeUrlParam(e)),n.push(e)}return n}static re(){this.Z(),this.Y(),this.ee()}static ae(e,t,r,a){var i,t=c.getUrlParam(t,r,a,!0);if(t)return t;let s=[];Array.isArray(e)?s=e:"string"==typeof e&&(s=e.split(",").map(e=>e.trim()));for(i of s)try{var n=c.getUrlParam(i,r,a,!0);if(n)return n}catch(e){o.error(`[getUrlValueFromCustomParam][e_cp] param: ${i}, error: `+e)}return null}static ie(e,t,r,a){e=Array.isArray(e)?e:[e],e=c.ae(e,t,r,a);return e?Number(e):null}static se(e,t,r,a){e=Array.isArray(e)?e:[e],e=c.ae(e,t,r,a);return e?Boolean(e):null}static ne(e){for(var t of e){t=this.getUrlParam(t,!0);if(t)return t}return null}static oe(){var t={},r=window.location.search.substring(1).split("&");for(let e=0;e<r.length;e++){var a=r[e].split("=");2===a.length&&(c.ce(a[1])?t[a[0]]=decodeURIComponent(a[1]):t[a[0]]=a[1])}return t}static ce(e){try{return decodeURIComponent(e),!0}catch(e){return!1}}static le(e){let t=c.ae("sl","sl",!1,e);return t||(t=c.ae("el","el",!1,e),f.processedData.v=!!t),t}},l=(s(c,"isMatchingCustomParam",(e,t)=>e.split(",").map(e=>e.trim().toLowerCase()).includes(t.toLowerCase())),c),d=class{constructor(){}static de(e,t=!1){return this.ue(document.getElementById(e),t)}static he(e,t,r=!1){return this.ue(e.getElementById(t),r)}static me(e){return document.getElementsByTagName(e)}static pe(){return this.ue(this.fe(".hyros-first-name:not(input)"))}static ge(){return this.ue(this.fe(".hyros-last-name:not(input)"))}static ve(){return this.ue(this.fe(".hyros-full-name:not(input)"))}static ue(e,t=!1){return null!==e?t?e.textContent:e.innerText:""}static fe(e){return document.querySelector(e)}static Ie(e){for(var t,r=[],a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);t=a.nextNode();)r.push(t);return r}static Ce(){return Array.from(document.querySelectorAll("*")).filter(e=>e.shadowRoot).map(e=>e.shadowRoot)}},t=class rt{Te(){var e,t=d.de("hyros-email",!0);if(t)return t;for(e of d.Ce()){var r=d.he(e,"hyros-email",!0);if(r)return r}return""}_e(){var e=Array.from(d.me("input")),t=d.Ce().flatMap(e=>[...e.querySelectorAll("input")]);return[...e,...t]}static create(e){return new("SHOPIFY"!==e?rt:$)}},$=class extends t{Te(){return this.we("p")||this.we("span")||this.ye()||""}Ee(e){e=e.trim();return e.includes("@")&&!e.includes(" ")}we(e){var t=d.me(e);for(let e=0;e<t.length;e++){var r=t.item(e).innerText.trim();if(this.Ee(r))return r}}ye(){var e=document.cookie.match("(^|;)\\s*hyrosemail\\s*=\\s*([^;]+)"),e=e&&0<e.length?e.pop():void 0;return e?(o.info("[h_email] "+e),e):null}},Z=t.create(g.config.origin),i=class{constructor(){}static be(e){return e?e.trim():""}static Re(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}static Pe(){var e=Z.Te();return this.be(e)}static Se(){return l.ne(Object.values(q))}},u=class{constructor(){}static ke(e){return{[0]:Object.values(x),1:Object.values(j),2:Object.values(W)}[e]||[]}static Ae(e){e=this.ke(e);return l.ne(e)}},Y=(e=>(e.HYROS_PHONE="hyrosphone",e.HYROS_PHONE_SNAKE="hyros_phone",e.HYROS_PHONE_DASHED="hyros-phone",e.HYROS_PHONE_SPACED="hyros phone",e.HYROS_PHONE_NUMBER_SNAKE="hyros_phone_number",e.HYROS_PHONE_NUMBER_DASHED="hyros-phone-number",e.HYROS_PHONE_NUMBER_SPACED="hyros phone number",e))({});var h={Oe:["h-address"],Ne:["h-street"],De:["h-country"],Le:["h-city"],Fe:["h-state"],Ue:["h-zip-code"]},Q=(e=>(e.HCONTACT="hcontact",e))(Q||{});function ee(){return Object.values(Q)}var te=(e=>(e.TEXT_REMINDER_NUMBER="text_reminder_number",e.SMS_NUMBER="sms_number",e.ANSWER="answer_",e.ANSWER_1="answer_1",e.EVENT_START_TIME="event_start_time",e.INF_CUSTOM_PHONE_NUMBER_OR_SKYPE_ID="inf_custom_PhonenumberorSkypeID",e.INF_FIELD_PHONE1="inf_field_Phone1",e.PHONE1="Phone1",e.PHONE="phone",e.MOBILE="mobile",e.CUSTOMER_VALID_PHONE="customer_valid_phone",e.TEL="tel",e))(te||{});var re=["%"],ae="===",m=class{constructor(){}static Ge(e){return e.trim().replace(/\s+/g," ")}static He(e){var t;return e?1==(e=e.trim().split(/[ +]+/).filter(e=>0<e.length)).length?e:(t=e.pop(),[e.join(" "),t]):[]}static Me(e){return e?e.trim().replace(/[^a-zA-Z]/g,""):""}static Ve(e){return e?e.trim():""}static Be(t){var r=re;if(null!=t)for(let e=0;e<r.length;e++){var a=t.indexOf(r[e]);-1!=a&&(o.warn("[fbclid][IC]: "+t[a]),t=t.substring(0,a))}return t}static xe(t,r){for(let e=0;e<r.length;e++)if(0===t.indexOf(r[e]))return!0;return!1}static je(e){return null==e||"undefined"===e||"string"==typeof e&&0===e.trim().length}static We(e){for(var t of e)if(/^\d+$/.test(t))return t;return null}static qe(e){for(var t of e)if(!/^\d+$/.test(t))return t;return null}static getSubstringBetween(e,t,r){if(""==e)return"";var a=e.indexOf(t);if(!(0<=a))return"";if(e=e.substring(a+t.length),r){if(!(0<=(a=e.indexOf(r))))return"";e=e.substring(0,a)}return e}},p=class{constructor(){}static Ke(){let e;return e=l.Y()&&"about:blank"!=l.Y()&&"about:srcdoc"!=l.Y()?l.Y():parent.document?parent.document.URL:l.ee(),l.ce(e)?e:encodeURI(e)}static Je(e){e=new URL(e);return e.pathname.endsWith("/")||(e.pathname+="/"),e.href}},ie=(s(p,"getPreviousUrl",function(){return g.config.spaEnabled&&f.config.o?f.config.o:l.ee()}),class at{constructor(){}static ze(){return document.cookie.split("; ").reduce((e,t)=>{var[t,...r]=t.split("="),r=r.join("=");return t&&e.set(t.trim(),r),e},new Map)}static Xe(e){return null!=(e=this.ze().get(e))?e:null}static $e(e){e=at.Xe(e);return e?JSON.parse(decodeURIComponent(e)):void 0}}),v=class{constructor(){}static Ze(e){var t;return this.Ye(e)?(t=this.Qe(this.et(["_fbc"])),m.Be(t)):m.Be(e)}static tt(e){return this.Ye(e)?this.rt(this.et(["_gcl_aw","_gcl_dc"])):e}static it(e){return this.Ye(e)?this.st(this.et(["ttclid"])):e}static nt(e){return this.Ye(e)?this.st(this.et(["rdt_clid","rdt_cid"])):e}static Qe(e){var t,e=this.st(e);return!e||(e=e.split(".")).length<4||"fb"!==e[0].toLowerCase()||(t=Number.parseInt(e[2],10),Number.isNaN(t))||Date.now()-1e3*t>this.MAX_CLICK_ID_AGE_MS?null:this.ot(e.slice(3).join("."))}static rt(e){var t,r,e=this.st(e);return!e||(e=e.split(".")).length<3||([e,t,...r]=e,"gcl"!==e.toLowerCase())||(e=Number.parseInt(t,10),Number.isNaN(e))||Date.now()-1e3*e>this.MAX_CLICK_ID_AGE_MS?null:this.ot(r.join("."))}static et(e){for(var t of e){t=ie.Xe(t);if(this.ot(t))return t}return null}static st(e){e=this.ot(e);if(!e)return null;let t=e,r="";for(;t!==r;){r=t;try{t=decodeURIComponent(r)}catch{break}}return this.ot(t)}static Ye(e){return"string"!=typeof e||""===e.trim()}static ot(e){return"string"!=typeof e||!(e=e.trim())||/\s/.test(e)||"deleted"===e.toLowerCase()?null:e}},se=(s(v,"MAX_CLICK_ID_AGE_MS",6048e5),(e,t)=>{f.processedData.T.push(e),f.processedData.email=e,f.lead.email=e,f.lead.leadAddress=l.ne(h.Oe)||f.lead.leadAddress,f.lead.leadStreet=l.ne(h.Ne)||f.lead.leadStreet,f.lead.leadCity=l.ne(h.Le)||f.lead.leadCity,f.lead.leadState=l.ne(h.Fe)||f.lead.leadState,f.lead.leadCountry=l.ne(h.De)||f.lead.leadCountry,f.lead.leadZipCode=l.ne(h.Ue)||f.lead.leadZipCode,f.lead.phoneNumbers=ne()||f.lead.phoneNumbers,f.lead.tag=g.config.customTag,f.lead.tags=(()=>{const e=f.processedData.R;if(!e.includes(g.config.customTag))e.push(g.config.customTag);return e})(),f.lead.leadStage=f.processedData.U,f.lead.firstName=u.Ae(0)||f.lead.firstName,f.lead.lastName=u.Ae(1)||f.lead.lastName,f.lead.contact=l.ne(ee())||f.lead.contact,f.source.sourceLinkTags=t,f.source.fbAdsetId=l.ie("fbc_id","fbc_id",!0),f.source.bingAdGroupId=l.ie("bng_id","bng_id",!0),f.source.bingSpecialCampaign=l.se("CustomBingSpecialCampaign","bng_special_campaign",!0),f.source.hyrosCampaignId=l.ie("h_campaign_id","h_campaign_id",!0),f.source.googleAdId=l.ie("gc_id","gc_id",!0),f.source.gAdgroupId=l.ie("h_ga_id","h_ga_id",!0),f.source.gSpecialCampaign=l.se("CustomGSpecialCampaign","g_special_campaign",!0),f.source.gClickId=l.ae("gclid","gclid",!0),f.source.wBraId=l.ae("wbraid","wbraid",!0),f.source.gBraId=l.ae("gbraid","gbraid",!0),f.source.fbClickId=m.Be(l.ae("fbclid","fbclid",!0)),f.source.tiktokAdGroupId=l.ie("ttc_id","ttc_id",!0),f.source.snapchatAdSetId=l.ie("snc_id","snc_id",!0),f.source.twitterAdgroupId=l.ie("twt_id","twt_id",!0),f.source.pinterestAdgroupId=l.ie("pnt_id","pnt_id",!0),f.source.linkedinCampaignId=l.ie("lnk_id","lnk_id",!0),f.source.ttClickId=l.ae("ttclid","ttclid",!0),f.source.rdtClickId=l.ae("rdt_clid","rdt_clid",!0),f.source.fbClickId=v.Ze(f.source.fbClickId),f.source.gClickId=v.tt(f.source.gClickId),f.source.ttClickId=v.it(f.source.ttClickId),f.source.rdtClickId=v.nt(f.source.rdtClickId),f.checkout.paypalUniqueCheckoutId=l.ae("tx","tx",!0),f.config.cookieEnabled=navigator.cookieEnabled,f.config.refUrl=p.Ke(),f.config.prevUrl=l.ee()}),ne=()=>{var t,r=l.oe(),e=Object.values(te);for(t in r)if(m.xe(t,e)){let e=r[t];t.includes("answer_")&&(e=C.ct(e)),C.lt(e)&&C.dt(e)&&(e=C.ut(e),f.processedData._.includes(e)||f.processedData._.push(e))}var a=C.ut(C.ht());return C.dt(a)&&!f.processedData._.includes(a)&&f.processedData._.push(a),f.processedData._},I=class I{constructor(){}static lt(e){return/^\+?\d{1,4}?[-.\s]?\d{1,4}?[-.\s]?\(?\d{1,4}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$/.test(e)}static ft(e){return/^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/.test(e)}static ut(e){return e?e.trim().replace(/[^\d+,]/g,""):""}static dt(e){return!!e&&8<=(e=this.ut(e)).length&&e.length<=16}static ct(e){try{return(e=decodeURIComponent(e))?"+"+e.trim().replace(/\+/g,"").replace(/\s/g,""):""}catch(e){return o.error(e.toString()),""}}static gt(e){e=this.ut(e);return!!this.ft(e)&&8<=e.length&&e.length<=16}static vt(t,r){let a=!1;for(let e=0;e<t.length&&!a;e++){var i=this.It(t[e],r);a=i===r}return a}static Ct(t){for(let e=0;e<this.phoneFormats.length;e++)if(this.phoneFormats[e].Tt.test(t))return this.phoneFormats[e].format;return""}static It(e,t){var r=this.Ct(t),a=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(!a)return null;switch(r){case"FORMAT1":return[a[2],"-",a[3],"-",a[4]].join("");case"FORMAT2":return["(",a[2],") ",a[3],"-",a[4]].join("");case"FORMAT3":return["(",a[2],") ",a[3]," ",a[4]].join("");case"FORMAT4":return["+","1"===t[1]?"1":"",a[2],a[3],a[4]].join("");case"FORMAT5":return[a[2],"-",a[3],a[4]].join("");case"FORMAT6":return[a[2],"/",a[3],"-",a[4]].join("");default:return["(",a[2],") ",a[3],"-",a[4],r.toString()].join("")}}static ht(){var e=d.fe("#hyros-phone:not(input)");return null!==(e=null===e?d.fe(".hyros-phone:not(input)"):e)?e.innerText:""}static _t(e){var t,r=Object.values(Y);if(e.className){var a,i=[...e.classList].map(e=>e.toLowerCase());for(a of r)if(i.includes(a))return!0}return r.includes(null==(t=e.id)?void 0:t.toLowerCase())||r.includes(null==(t=e.placeholder)?void 0:t.toLowerCase())||this.wt(e)}static wt(e){return!!e&&("tel"===e.inputMode||"tel"===e.type)}static yt(e){return I.lt(e)&&(!I.dt(e)||!g.config.phoneOptInEnabled||0<f.processedData.T.length)}},C=(s(I,"phoneFormats",[{format:"FORMAT1",Tt:/^\d{3}-\d{3}-\d{4,}$/},{format:"FORMAT2",Tt:/^\(\d{3}\) \d{3}-\d{4,}$/},{format:"FORMAT3",Tt:/^\(\d{3}\) \d{3} \d{4,}$/},{format:"FORMAT4",Tt:/^\+\d{4,}$/},{format:"FORMAT5",Tt:/^\d{3}-\d{7}$/},{format:"FORMAT6",Tt:/^\d{3}\/\d{3}-\d{4}$/}]),I),oe=(e=>(e.BURL="BURL",e.BIP="BIP",e))({});function ce(){return Object.values(oe)}var T=class{constructor(){}static Et(e=!1){var t=[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"},{key:"UI-Framework",value:f.config.m},{key:"Platform",value:f.config.platform}];return e?t.reduce((e,{key:t,value:r})=>(e[t]=r,e),{}):t}static bt(e){return[{key:"Product-ID",value:g.product.id},{key:"Ref-Url",value:g.config.refOverride||p.Ke()},{key:"fp",value:e},{key:"UI-Framework",value:f.config.m},{key:"Platform",value:f.config.platform}]}static Rt(){return[{key:"Access-Control-Allow-Headers",value:"Product-ID"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Product-ID",value:g.product.id}]}static Pt(e=!1){var t=[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"},{key:"Session-ID",value:f.config.sessionId},{key:"Product-ID",value:g.product.id},{key:"L-Gen-ID",value:f.config.leadGenSessionId},{key:"UI-Framework",value:f.config.m},{key:"Platform",value:f.config.platform}];return e?t.reduce((e,{key:t,value:r})=>(e[t]=r,e),{}):t}static St(e){let r={};return e.trim().split(/[\r\n]+/).forEach(e=>{var e=e.split(": "),t=null==(t=e.shift())?void 0:t.trim(),e=e.join(": ").trim();t&&(r[t]=e)}),r}},le=class{constructor(e){s(this,"baseUrl"),this.kt=e}At(e,t,r,a){return this.doBodyRequest("POST",this.Ot(e),t,r,a)}put(e,t,r,a){return this.doBodyRequest("PUT",this.Ot(e),t,r,a)}get(a,i,s=!1,n,o){return new Promise((e,t)=>{var r=this.Nt("GET",this.Ot(a),!0,i,s);this.Dt(r,e,t,null,n,o)})}doBodyRequest(i,s,n,o,c){return new Promise((e,t)=>{var r="string"==typeof n?n:Object.keys(n).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n[e])}).join("&"),a=this.Nt(i,s,!0,o,c);this.Dt(a,e,t,r)})}Nt(e,t,r,a,i){a=m.je(a)?T.Et():a;var s,n=new XMLHttpRequest;n.open(e,t,r),n.withCredentials=i;for(s of a=Array.isArray(a)?a:[a])n.setRequestHeader(s.key,s.value);return n}Lt(a,i,s,n,o){return new Promise((t,r)=>{n=m.je(n)?T.Et(!0):n;var e={method:i,headers:n,credentials:o?"include":"omit",keepalive:!0};"GET"!==i&&(e.body=s),fetch(this.Ot(a),e).then(function(e){return e.text()}).then(function(e){(e=e?JSON.parse(e):{})&&"error"===e.status?r(new Error("KeepAliveFetch Error: "+(e.body||"Network request failed"))):t(e)}).catch(r)})}Dt(r,a,i,e,s,n=!1){r.onload=function(){if(200===r.status||null!=s&&s.includes(r.status))try{let e=null;if(r.responseText&&"undefined"!==r.responseText&&""!==r.responseText&&(e=JSON.parse(r.responseText)),!n)return a(e);var t=T.St(r.getAllResponseHeaders());a({data:e,headers:t})}catch(e){t=e instanceof Error?e.message:JSON.stringify(e);i("ERROR Processing Response: "+t)}else i("HTTP error status: "+r.status+" - "+r.responseText)},r.onerror=function(){i("XMLHttpRequest Error: "+(r.responseText||"Network request failed"))},r.send(e)}Ot(e){return this.kt+e}},_={id:null,sessionId:null,productId:null,creationDate:null,dvfp:null,uniqueCheckoutId:null,cartId:null,phoneNumber:null,couponCode:null,firstName:null,lastName:null,leadCity:null,leadAddress:null,leadStreet:null,leadState:null,leadCountry:null,leadZipCode:null,dniNumber:null,timeSpent:null,pixelEvents:null,thirdPartySessionId:null,tpsFromCache:null},w=new class{constructor(){s(this,"httpClient"),s(this,"leadGenHttpClient"),this.Ft=new le(a.trackingBase),this.Ut=new le(a.leadGenBase)}Gt(e,t={}){return this.Ht(t)?this.Ft.Lt(a.unifiedEvent,"POST",e,T.Pt(!0),!0):this.Ft.At(a.unifiedEvent,e,T.Pt(),!0)}Ht(e={}){return(g.config.useFetchKeepAlive||!(null==e||!e.Mt))&&this.Vt()}Vt(){if("function"!=typeof fetch||"function"!=typeof Request)return!1;try{return!0===new Request("https://example.com",{method:"POST",body:"",keepalive:!0}).keepalive}catch{return!1}}Bt(e){return g.config.useFetchKeepAlive?this.Ft.Lt(g.endpoints.clickUpdate,"PUT",e,T.Pt(!0),!0):this.Ft.put(g.endpoints.clickUpdate,e,T.Pt(),!0)}xt(){var e=g.endpoints.trackingBase+g.endpoints.clickUpdate;_.id=f.config.l.clickId,_.productId=g.product.id,_.creationDate=f.config.l.creationDate,_.sessionId=f.config.sessionId,_.tpsFromCache=f.config.tpsFromCache,navigator.sendBeacon(e,JSON.stringify(_))&&o.info("[pcu]."),Object.keys(_).forEach(e=>{_[e]=null})}processClick(e){e=g.endpoints.processClick+e;return g.config.useFetchKeepAlive?this.Ft.Lt(e,"GET",{},T.Pt(!0),!0):this.Ft.get(e,T.Pt(),!0)}jt(e){return g.config.useFetchKeepAlive?this.Ft.Lt(a.dniRequest,"POST",e,T.Pt(!0),!1):this.Ft.At(a.dniRequest,e,T.Pt(),!1)}Wt(e){return g.config.useFetchKeepAlive?this.Ft.Lt(a.generateUUID,"POST",e,T.Pt(!0),!0):this.Ft.At(a.generateUUID,e,T.Pt(),!0)}async qt(e,t){let r=a.generateUUID;e&&(r+=e);var{data:e,headers:t}=await this.Ft.get(r,T.bt(t),!0,[304],!0);return this.Kt(e,t)}Kt(e,t){var r=t["Session-ID".toLowerCase()]||t["Session-ID"];if(r&&"undefined"!==r&&""!==r&&"null"!==r)return{sessionId:r,Jt:!1};if("disabled"===(null==e?void 0:e.body))return{sessionId:null,Jt:!0};throw new Error(`[PROCESS_SESSION_ID] Invalid response: ${JSON.stringify(e)} - Headers: ${JSON.stringify(t)} `)}async zt(){var e=(await this.Ut.get(a.generateLeadGenSessionId,T.Et(),!0,[],!0)).headers;return this.Xt(e)}Xt(e){var t=e["L-Gen-ID".toLowerCase()]||e["L-Gen-ID"];if(t&&"undefined"!==t&&"null"!==t)return t;throw new Error("[PROCESS_LEAD_GEN_SESSION_ID] Headers: "+JSON.stringify(e))}$t(e){return this.Ft.put(a.pingPongRequest+"/verify",e,T.Pt(),!0)}Zt(e){return this.Ft.Lt(a.customActionProcessing,"POST",e,T.Pt(!0),!1)}Yt(e,t){return this.Ft.At(g.endpoints.errorEndpoint+"?"+t.toString(),JSON.stringify(e),T.Pt(),!0)}},y=new class{Qt(e,t,r={}){this.er(e,"["+t+"]",r),o.error("[ERROR]["+t+"]: "+e)}er(e,t,r){r={serviceWhereErrorOriginated:r.serviceWhereErrorOriginated,errorType:r.errorType,dataString:t+" - "+this.tr(e)},t=new URLSearchParams;t.append("script","UNIFIED_TRACKING_SCRIPT"),w.Yt(r,t)}tr(e){return e instanceof Error?e.stack||e.message||"Unexpected error":JSON.stringify(e)}},de=class{constructor(){}static rr(e,t,r={}){return!(g.config.useFetchKeepAlive||!e||(ce().includes(e.body)?(o.warn("[WARN]["+e.body+"]"),0):"error"!==e.status||(y.Qt(e.body,t,r),0)))}},E=new class{ar(e){var t,r;g.config.timeSpentTrackingEnabled||g.config.thirdPartyTracking||g.config.unifiedClickEvent?(t=e,r=_.pixelEvents,Object.assign(_,t),r&&(_.pixelEvents=[...r,...t.pixelEvents||[]])):w.Bt(JSON.stringify(e)).then(()=>o.info("[pcu].")).catch(this.ir)}ir(e){y.Qt(e,"pcu",{serviceWhereErrorOriginated:"CLICK_PROCESSING_SERVICE",errorType:"ENDPOINT_DID_NOT_RETURN_200"})}sr(e,t){e&&(t={id:f.config.l.clickId,productId:g.product.id,[t]:e,creationDate:f.config.l.creationDate},this.ar(t))}nr(e,t,r){t&&(f.lead[e]=t,this.sr(t,r))}cr(e){var t;e&&!f.processedData._.includes(e)&&(C.lt(e)&&C.dt(e)&&(t=C.ut(e),f.lead.phoneNumbers=[t]),this.sr(e,"phoneNumber"))}lr(e){this.sr(e,"couponCode")}dr(e){this.nr("firstName",e,"firstName")}ur(e){this.nr("lastName",e,"lastName")}hr(e){this.nr("leadCity",e,"leadCity")}mr(e){this.nr("leadAddress",e,"leadAddress")}pr(e){this.nr("leadStreet",e,"leadStreet")}gr(e){this.nr("leadState",e,"leadState")}vr(e){this.nr("leadCountry",e,"leadCountry")}Ir(e){this.nr("leadZipCode",e,"leadZipCode")}Cr(e){e&&this.sr(e,"cartId")}Tr(e){e&&0<e.length&&this.sr(e,"pixelEvents")}_r(e){f.config.tpsFromCache=e,this.sr(e,"tpsFromCache")}wr(e){if(e){o.info("[_fbp_c] "+e);var t,r,a=[];for(t of e)t.startsWith("fb.")&&((r={}).fbpId=t,r.adspendType="FACEBOOK",a.push(r));this.Tr(a)}}yr(e){this.sr(e,"dniNumber")}},ue=new class{constructor(){s(this,"resetStageandConsent",function(){f.processedData.U="",f.lead.adOptimizationConsent="UNSPECIFIED",f.lead.leadStage=""})}async Er(e,t){try{var r=this.br(e,t);await w.Zt(r),this.resetStageandConsent()}catch(e){o.error("[CAP]: "+e)}}br(e,t){return JSON.stringify({type:e,value:Array.isArray(t)?[...t]:[t]})}},b=new class{constructor(){s(this,"successHte",function(e){de.rr(e,"hte",{serviceWhereErrorOriginated:"LEAD_PROCESSING_SERVICE",errorType:"BACKEND_REJECTED_REQUEST"})||o.info("[hte].")})}Rr(e,t){({[0]:e=>this.Pr(e),1:e=>setTimeout(()=>this.Sr(e),500),2:e=>this.kr(e),3:e=>this.Ar(e),4:e=>this.Or(e),5:e=>this.Nr(e),6:e=>this.Dr(e),7:e=>this.Lr(e),8:e=>this.Fr(e),9:e=>this.Ur(e),10:e=>this.Gr(e),11:e=>this.Hr(e)})[t](e)}Mr(e){var e=e.detail,t=e.value,e=e.type;switch(e){case"addLeadTag":this.Vr(t);break;case"addLeadPhone":this.Sr(t);break;case"addConsent":this.Br(t);break;case"addLeadStage":this.jr(t);break;default:return void o.error("[LU_UT]")}this.Wr(e,t)}Wr(e,t){let r=f.processedData.email||f.processedData.g;if(r&&i.Re(r))return f.config.sessionId?(f.processedData.T.includes(r)&&(f.processedData.T=f.processedData.T.filter(e=>e!==r)),void this.qr(r,l.le())):void(f.processedData.K=!0);e&&t&&(e=class{constructor(){}static Kr(t,r){return Object.keys(t).find(e=>t[e]===r)}}.Kr(H,e),f.config.sessionId?ue.Er(e,t):(f.processedData.J={Jr:e,value:t},o.info("[CAP] Event cached")))}Sr(e,t={}){e=C.ut(e),C.dt(e)&&!f.processedData._.includes(e)&&(f.config.l&&(E.cr(e),f.processedData._.push(e)),this.qr(e,l.le(),t))}qr(e,t,r={}){this.zr(e,t)&&w.Gt(JSON.stringify({productId:g.product.id,firstName:f.lead.firstName,lastName:f.lead.lastName,contact:f.lead.contact,email:f.lead.email,phoneNumbers:f.lead.phoneNumbers,tag:g.config.customTag,tags:f.lead.tags,leadStage:f.lead.leadStage,adOptimizationConsent:f.lead.adOptimizationConsent,leadAddress:f.lead.leadAddress,leadStreet:f.lead.leadStreet,leadCity:f.lead.leadCity,leadState:f.lead.leadState,leadCountry:f.lead.leadCountry,leadZipCode:f.lead.leadZipCode,sourceLinkTags:f.source.sourceLinkTags,fbAdsetId:f.source.fbAdsetId,bingAdGroupId:f.source.bingAdGroupId,bingSpecialCampaign:f.source.bingSpecialCampaign,hyrosCampaignId:f.source.hyrosCampaignId,googleAdId:f.source.googleAdId,gAdgroupId:f.source.gAdgroupId,gSpecialCampaign:f.source.gSpecialCampaign,gClickId:f.source.gClickId,wBraId:f.source.wBraId,gBraId:f.source.gBraId,fbClickId:f.source.fbClickId,rdtAdGroupId:f.source.rdtAdGroupId,tiktokAdGroupId:f.source.tiktokAdGroupId,snapchatAdSetId:f.source.snapchatAdSetId,twitterAdgroupId:f.source.twitterAdgroupId,pinterestAdgroupId:f.source.pinterestAdgroupId,linkedinCampaignId:f.source.linkedinCampaignId,ttClickId:f.source.ttClickId,rdtClickId:f.source.rdtClickId,paypalUniqueCheckoutId:f.checkout.paypalUniqueCheckoutId,origin:f.config.origin,cookieEnabled:f.config.cookieEnabled,refUrl:f.config.refUrl,dvfp:f.config.deviceFingerprint,prevUrl:f.config.prevUrl,sessionId:f.config.sessionId,leadGenSessionId:f.config.leadGenSessionId,uniqueCheckoutId:f.checkout.uniqueCheckoutId}),r).then(this.successHte).catch(e=>y.Qt(e,"hte",{serviceWhereErrorOriginated:"LEAD_PROCESSING_SERVICE",errorType:"FAILED_TO_CREATE_HTE"}))}zr(e,t){return!f.processedData.T.includes(e)&&!C.yt(e)&&(se(e,t),f.lead.firstName&&f.lead.lastName||this.Nr(u.Ae(2)),!0)}Vr(e){f.processedData.R.includes(e)||f.processedData.R.push(e)}kr(e){e=m.Ve(e),f.config.l&&(E.lr(e),f.processedData.P.push(e))}Pr(e){e=i.be(e),i.Re(e)&&this.qr(e,l.le())}Ar(e){e=m.Me(e);var t=f.config.l.clickId;f.processedData.L.includes(e+t)||f.config.l&&(E.dr(e),f.processedData.L.push(e+t))}Or(e){e=m.Me(e);var t=f.config.l.clickId;f.processedData.F.includes(e+t)||f.config.l&&(E.ur(e),f.processedData.F.push(e+t))}Nr(e){e=m.He(e);0<e.length&&this.Ar(e[0]),1<e.length&&this.Or(e[1])}Xr(e){f.config.l&&(e={id:f.config.l.clickId,productId:g.product.id,dniNumber:e,creationDate:f.config.l.creationDate},E.ar(e))}Br(e){Object.values(G).includes(e)&&e!==f.lead.adOptimizationConsent&&(f.lead.adOptimizationConsent=e,g.config.$r=!0)}jr(e){f.processedData.U!==e&&(f.processedData.U=e)}Fr(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.N.includes(e+t)||f.config.l&&(E.hr(e),f.processedData.N.push(e+t))}Gr(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.A.includes(e+t)||f.config.l&&(E.vr(e),f.processedData.A.push(e+t))}Ur(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.O.includes(e+t)||f.config.l&&(E.gr(e),f.processedData.O.push(e+t))}Lr(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.k.includes(e+t)||f.config.l&&(E.pr(e),f.processedData.k.push(e+t))}Hr(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.D.includes(e+t)||f.config.l&&(E.Ir(e),f.processedData.D.push(e+t))}Dr(e){e=m.Ge(e);var t=f.config.l.clickId;f.processedData.S.includes(e+t)||f.config.l&&(E.mr(e),f.processedData.S.push(e+t))}},e=new class{Zr(){this.Yr("leadUpdate",e=>b.Mr(e))}Yr(e,t){window.addEventListener(e,t)}},r=new class{init(){window.hrs=(()=>{let t=(e,t,r="leadUpdate")=>{window.dispatchEvent(new CustomEvent(r,{detail:{value:t,type:e}}))};return{addLeadTag:function(e){t("addLeadTag",e)},addLeadPhone:function(e){t("addLeadPhone",e)},addLeadConsent:function(e){t("addConsent",e)},addLeadStage:function(e){t("addLeadStage",e)}}})()}},he=new class{constructor(){s(this,"startTime"),s(this,"totalTimeSpent"),s(this,"lastMouseMoveTime"),this.Qr()}getStartTime(){return this.startTime}Qr(){this.ea=0,this.startTime=null,this.ta=null}ra(){var e=0===this.ea?this.aa():this.ea;return 16e8<e?0:e}ia(){var e=this.sa();this.startTime||(this.startTime=e),this.ta=e}na(){null!==this.startTime&&null!==this.ta&&(this.ea+=this.aa(),this.startTime=null)}oa(){if(g.config.timeSpentTrackingEnabled){let e;document.addEventListener("mousemove",()=>{clearTimeout(e),this.getStartTime()||this.ia(),e=setTimeout(()=>this.na(),3e3)})}}aa(){return this.sa()-this.startTime}sa(){return Math.floor(Date.now()/1e3)}},me=()=>{_.timeSpent=he.ra().toString(),w.xt()};function pe(e,r,a,i,s,n){{var o=r,c=a,l=i;r=s,i="POST",a=!!(a=n),s="string"==typeof o?o:Object.keys(o).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(o[e])}).join("&");let t=fe(i,e,!0,r,a);t.onload=function(){if(200===t.status)try{var e;null!=t.responseText&&"undefined"!=t.responseText&&""!=t.responseText?(e=JSON.parse(t.responseText),c(e)):c()}catch(e){l("ERROR Procesing Response: "+(e instanceof Error?e.message:e))}else l("http status: "+t.status+" - "+t.responseText)},t.onerror=function(){l("Error XMLHttp: "+(t.responseText||"Network request failed"))},t.send(s)}}function fe(e,t,r,a,i){i=!!i,a=null==a||"undefined"==a?[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"}]:a;var s,n=new XMLHttpRequest;n.open(e,t,r),n.withCredentials=i;for(s of a)n.setRequestHeader(s.key,s.value);return n}var ge=(e=>(e.GOOGLE="wickedsource",e.FACEBOOK="WickedSource",e))({}),ve=(e=>(e.GOOGLE="wickedid",e.FACEBOOK="WickedID",e))({}),Ie=(e=>(e.SNAPCHAT="snapchat",e))({}),Ce=(e=>(e.FACEBOOK="fbadid",e.GOOGLE="gadid",e.TIKTOK="ttadid",e.TIKTOK_OR_FACEBOOK="tw_adid",e))({});var Te=(e=>(e.SOURCE_LINK_TAG="sourceLinkTag",e.FB_AD_SET_ID="fbAdSetId",e.BING_AD_GROUP_ID="bingAdGroupId",e.HYROS_CAMPAIGN_ID="hyrosCampaignId",e.GOOGLE_CAMPAIGN_ID="googleCampaignId",e.GOOGLE_ADGROUP_ID="googleAdgroupId",e.HYROS_AD_ID="hyrosAdId",e.TIKTOK_AD_GROUP_ID="tiktokAdGroupId",e.SNAPCHAT_AD_SET_ID="snapchatAdSetId",e.LINKEDIN_CAMPAIGN_ID="linkedinCampaignId",e.TWITTER_ADGROUP_ID="twitterAdgroupId",e.PINTEREST_AD_GROUP_ID="pinterestAdGroupId",e.WR_AD_ID="wrAdId",e.TW_AD_ID="twAdId",e.HYROS_AD_NAME="hyrosAdName",e))({});var _e=new class{ca(){l.re();try{g.config.deleteParams&&history.replaceState({},document.title,this.la())}catch(e){g.config.deleteParams=!1,o.error("E_P: "+(e instanceof Error?e.message:e))}}da(){var t={};if(t.previousUrl=g.config.prevOverride||p.getPreviousUrl(),t.userAgent=navigator.userAgent,t.uniqueCheckoutId=f.checkout.uniqueCheckoutId,t.ua=g.config.ua,t.refUrl=g.config.refOverride||p.Ke(),this.ha(t,l.Z()),this.ma(t)||t.refUrl===l.Z()||this.ha(t,t.refUrl),g.config.ignorePrevUrl||this.ma(t)||this.ha(t,t.previousUrl),this.ma(t)||0<(a=performance.getEntriesByType("navigation").filter(t=>z().some(function(e){return t.name.includes(e)}))).length&&(t.refUrl=encodeURI(a[0].name),this.ha(t,t.refUrl)),t.fbClickId=m.Be(t.fbClickId),!this.ma(t)){var r,a=l.ae("mch","mch");let e=[];for(r of e=null!==a?decodeURIComponent(a).split(ae):e){var i=r.split("=")[0],s=r.split("=")[1];"sl"!==i&&!l.isMatchingCustomParam("sl",i)||(t.sourceLinkTag=s),"el"!==i&&!l.isMatchingCustomParam("el",i)||(t.sourceLinkTag=s),t.v="el"===i||l.isMatchingCustomParam("el",i),"fbc_id"!==i&&!l.isMatchingCustomParam("fbc_id",i)||(t.fbAdSetId=s),"bng_id"!==i&&!l.isMatchingCustomParam("bng_id",i)||(t.bingAdGroupId=s),"bng_special_campaign"!==i&&!l.isMatchingCustomParam("CustomBingSpecialCampaign",i)||(t.bingSpecialCampaign="true"===s),"h_campaign_id"!==i&&!l.isMatchingCustomParam("h_campaign_id",i)||(t.hyrosCampaignId=s),"gc_id"!==i&&!l.isMatchingCustomParam("gc_id",i)||(t.googleCampaignId=s),"h_ga_id"!==i&&!l.isMatchingCustomParam("h_ga_id",i)||(t.pa=s),"g_special_campaign"!==i&&!l.isMatchingCustomParam("CustomGSpecialCampaign",i)||(t.gSpecialCampaign="true"===s),"fbclid"!==i&&!l.isMatchingCustomParam("fbclid",i)||(t.fbClickId=s),"gclid"!==i&&!l.isMatchingCustomParam("gclid",i)||(t.googleClickId=s),"wbraid"!==i&&!l.isMatchingCustomParam("wbraid",i)||(t.wBraId=s),"gbraid"!==i&&!l.isMatchingCustomParam("gbraid",i)||(t.gBraId=s),"h_ad_id"!==i&&!l.isMatchingCustomParam("h_ad_id",i)||(t.hyrosAdId=s),"ttclid"!==i&&!l.isMatchingCustomParam("ttclid",i)||(window.tiktokClickId=s),"rdt_id"!==i&&!l.isMatchingCustomParam("rdt_id",i)||(window.rdtAdGroupId=s),"rdt_clid"!==i&&!l.isMatchingCustomParam("rdt_clid",i)||(t.rdtClickId=s),"fb_cl_id"==i&&(t.fbClickId=s),"g_cl_id"==i&&(t.googleClickId=s),"is_el"==i&&(t.v="true"==s),"ttclid"==i&&(window.tiktokClickId=s),"rdt_clid"==i&&(t.rdtClickId=s),"apl_id"==i&&(t.fa=s)}}return this.ma(t)||(t.ga=this.va(),t.Ia=this.Ca(t)),this.ma(t)||(a=this.Ta())&&(t._a=this.wa(),t.ya=a),t.fbClickId=v.Ze(t.fbClickId),t.googleClickId=v.tt(t.googleClickId),t.tiktokClickId=v.it(t.tiktokClickId),t.rdtClickId=v.nt(t.rdtClickId),t.v=f.processedData.v,t}la(){var e=location.href.replace("/?","?"),[e,t]=e.substring(e.lastIndexOf("/")+1).split("?");let r=new URLSearchParams(t);return z().forEach(e=>r.delete(e)),Object.values(K).forEach(e=>{e.split(",").map(e=>e.trim()).filter(Boolean).forEach(e=>r.delete(e))}),e+((r.toString()&&"?")+decodeURIComponent(r.toString()))}wa(){var e=l.Z();return e.includes("fbadid")?"facebook":e.includes("gadid")?"google":e.includes("ttadid")?"tiktok":e.includes("tw_adid")?this.Ea("tw_source")||this.Ea("utm_source"):""}Ea(e){e=l.getUrlParam(e);return"fb"===e||"ig"===e||"instagram"===e||"facebook_instagram"===e||"msg"===e||"an"===e?"facebook":"tiktok"===e||"facebook"===e||"google"===e?e:""}Ta(){var e,t;for(t of Object.values(Ce))if(e=l.getUrlParam(t))return e;return null}ha(e,t){e.sourceLinkTag=l.le(t),e.fbAdSetId=l.ae("fbc_id","fbc_id",!0,t),e.bingAdGroupId=l.ae("bng_id","bng_id",!0,t),e.bingSpecialCampaign="true"==l.ae("CustomBingSpecialCampaign","bng_special_campaign",!0,t),e.hyrosCampaignId=l.ae("h_campaign_id","h_campaign_id",!0,t),e.googleCampaignId=l.ae("gc_id","gc_id",!0,t),e.pa=l.ae("h_ga_id","h_ga_id",!0,t),e.gSpecialCampaign="true"==l.ae("CustomGSpecialCampaign","g_special_campaign",!0,t),e.fbClickId=l.ae("fbclid","fbclid",!0,t),e.googleClickId=l.ae("gclid","gclid",!0,t),e.wBraId=l.ae("wbraid","wbraid",!0,t),e.gBraId=l.ae("gbraid","gbraid",!0,t),e.hyrosAdId=l.ae("h_ad_id","h_ad_id",!0,t),e.tiktokAdGroupId=l.ae("ttc_id","ttc_id",!0,t),e.rdtAdGroupId=l.ae("rdt_id","rdt_id",!0,t),e.rdtClickId=l.ae("rdt_clid","rdt_clid",!0,t),e.snapchatAdSetId=l.ae("snc_id","snc_id",!0,t),e.linkedinCampaignId=l.ae("lnk_id","lnk_id",!0,t),e.tiktokClickId=l.ae("ttclid","ttclid",!0,t),e.twitterAdgroupId=l.ae("twt_id","twt_id",!0,t),e.pinterestAdgroupId=l.ae("pnt_id","pnt_id",!0,t),e.paypalUniqueCheckoutId=l.ae("tx","tx",!0,t),e.ba=l.ae("h_keyword","h_keyword",!0,t),e.Ra=l.ae("h_placement","h_placement",!0,t),e.Pa=l.ae("h_ad_name","h_ad_name",!0,t),e.fa=l.ae("apl_id","apl_id",!0,t),e.Sa=l.ae("h_campaign_name","h_campaign_name",!0,t);var r=l.ae("h_keyword_id","h_keyword_id",!0,t);r&&(r=new RegExp("kwd-(\\d+)").exec(r),e.ka=r?r[1]:null),this.Aa(e,t)}Aa(e,t){var r={...e};delete r.sourceLinkTag,this.ma(r)||null===e.sourceLinkTag||(e.Oa=l.ae("htrafficsource","htrafficsource",!1,t),e.Na=l.ae("hcategory","hcategory",!1,t),e.Da=l.ae("hgoal","hgoal",!1,t))}Ca(e){switch(e.ga){case"google":var t=l.te("wickedid");return null===e.googleClickId&&(e.googleClickId=m.qe(t)),m.We(t);case"Facebook":{let e;for(var r of Object.values(ve))if(e=l.getUrlParam(r))return e;return e}default:return null}}va(){var e=this.La();return e||this.Fa()}La(){var e,t;for(t of Object.values(ge))if(e=l.getUrlParam(t))return e;return null}Fa(){var e,t=l.getUrlParam("utm_source");for(e of Object.values(Ie))if(t===e)return t;return null}ma(e){return 0<Object.entries(e).filter(([e,t])=>Object.values(Te).includes(e)&&null!==t).length}};var we=new class{Ua(){let t=setInterval(()=>{try{var e;f.config.cartId?clearInterval(t):(e=this.Ga())&&(clearInterval(t),E.Cr(e))}catch(e){o.error("[cartId]"+(e instanceof Error?e.stack:e))}},3e3)}Ga(){e="cart";var e=2===(e=("; "+document.cookie).split("; "+e+"=")).length?e.pop().split(";").shift():null,e=null==e?void 0:e.split("%3Fkey")[0];return e?(o.info("[cartId] "+e),f.config.cartId=e):null}},R=class R{static Ha(e){return R.discardedEvents[e.adspendType].includes(e.name)}static Ma(e,t){return R.Ha(e)||(null==t?void 0:t.includes(e))}static Va(e){o.X(R.dudupLogPrefix+" ["+R.adspendPrefix[e.adspendType]+"]",e)}},P=(s(R,"discardedEvents",{FACEBOOK:["AddPaymentInfo","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent","PageView","Login"],GOOGLE:["page_view","add_to_cart","begin_checkout","add_to_wishlist","add_payment_info","add_shipping_info","view_item","view_item_list","select_item","disqualify_lead","qualify_lead","close_convert_lead","remove_from_cart","search","sign_up","login","exception","select_promotion","view_search_results","working_lead","view_promotion","share","view_cart","refund","earn_virtual_currency","spend_virtual_currency","tutorial_begin","tutorial_complete","level_up","select_content","unlock_achievement","join_group","complete_registration","start_trial","post_score","subscribe"],TIKTOK:["AddPaymentInfo","AddToCart","AddToWishlist","ClickButton","CompleteRegistration","Download","InitiateCheckout","ApplicationApproval","Search","SubmitForm","Subscribe","ViewContent","PageView","FindLocation","CustomizeProduct","Schedule","StartTrial","SubmitApplication"],REDDIT:["PageVisit","ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase"],SNAPCHAT:["PAGE_VIEW","VIEW_CONTENT","ADD_CART","START_CHECKOUT","APP_OPEN","ADD_BILLING","SIGN_UP","SEARCH","SAVE","COMPLETE_REGISTRATION","CUSTOMIZE_PRODUCT","SUBSCRIBE","START_TRIAL","COMPLETE_TUTORIAL","INVITE","LOGIN","SHARE","RESERVE","ACHIEVE_LEVEL","AD_CLICK","LEVEL_COMPLETE","AD_VIEW","ACHIEVEMENT_UNLOCKED","ADD_TO_WISHLIST","SPENT_CREDITS","RATE","LIST_VIEW"]}),s(R,"adspendPrefix",{FACEBOOK:["FB"],GOOGLE:["GG"],TIKTOK:["TT"],REDDIT:["RD"],SNAPCHAT:["SN"]}),s(R,"dudupLogPrefix","[DD]"),R),ye=class{constructor(e,t,r){this.Ba=e,this.xa=t,this.ja=r}Wa(e,t){e.forEach(e=>t.push(e.name))}qa(e,t,r){var a=e.getEntries().filter(e=>["img","fetch","xmlhttprequest"].includes(e.initiatorType)&&e.name.includes("facebook")&&(e.name.includes("/tr/")||e.name.includes("/tr?"))&&e.name.includes("eid=")),i=e.getEntries().filter(e=>"img"===e.initiatorType&&e.name.includes("reddit")&&e.name.includes("/rp.gif")),e=e.getEntries().filter(e=>e.name.includes("googleadservices")&&e.name.includes("oid=")&&e.name.includes("conversion/"));0<a.length&&this.Wa(a,this.Ba),0<i.length&&this.Wa(i,this.xa),0<e.length&&this.Wa(e,this.ja),0<r&&console.warn(r+" entries were dropped because the buffer was full.")}Ka(){new PerformanceObserver((...e)=>this.qa(...e)).observe({type:"resource",buffered:!0})}},Ee=class{constructor(e,t){this.Ja=e,this.za=t,s(this,"originalSendBeacon"),this.Xa=navigator.sendBeacon.bind(navigator)}$a(t,r){if(t.includes("tiktok")&&t.includes("/api")&&t.includes("/pixel")&&!t.includes("/act")){let e;try{e=JSON.parse(r)}catch(e){o.error("[tt_error]"+(e instanceof Error?e.stack:e))}e.event_id&&""!==e.event_id&&(t={eventId:e.event_id,pixelId:e.context.pixel.code,name:e.event.toString()},this.Ja.push(t))}}Za(e,t){var r;if("https://tr.snapchat.com/p"===e)try{null!=(r=JSON.parse(t).req)&&r.forEach(e=>{var e=e.t;e&&(e={clientDedupId:e.cdid,transactionId:e.e_tid,name:e.ev,pixelId:e.pid},this.za.push(e))})}catch(e){o.error("[snap_error]"+(e instanceof Error?e.stack:e))}}Ka(){navigator.sendBeacon=(...e)=>{var[t,r]=e;return this.$a(t,r),this.Za(t,r),this.Xa(...e)}}},S=new class{constructor(e,t,r,a,i){this.Ja=e,this.xa=t,this.Ba=r,this.ja=a,this.za=i,s(this,"observers"),this.Ya=[new ye(this.Ba,this.xa,this.ja),new Ee(this.Ja,this.za)]}Qa(){for(var e of this.Ya)e.Ka()}async ei(){this.ti(),g.config.facebookEventIdRetrieval&&await this.ri()}async ri(){if(this.Ba&&0<this.Ba.length){var e,t=[];for(e of this.Ba){var r={};r.eventId=l.getUrlParam("eid",!1,e),r.fbpId=l.getUrlParam("fbp",!1,e),r.pixelId=l.getUrlParam("id",!1,e),r.name=l.getUrlParam("ev",!1,e),r.adspendType="FACEBOOK",P.Ma(r,t)||(t.push(r),P.Va(r))}E.Tr(t)}else await this.ai(1e3),await this.ri()}async ii(){if(0<performance.getEntriesByType("resource").filter(e=>e.name.includes("tiktok")&&e.name.includes("/pixel")&&e.name.includes("/pixel")&&!e.name.includes("/act")).length&&0<this.Ja.length){var e,t=[];for(e of this.Ja){var r={};r.eventId=e.eventId,r.pixelId=e.pixelId,r.name=e.name,r.adspendType="TIKTOK",P.Ma(r,t)||(t.push(r),P.Va(r))}E.Tr(t)}else await this.ai(1e3),await this.ii()}async si(){if(0<this.za.length){var e,t=[];for(e of this.za){var r={};r.clientDedupId=e.clientDedupId,r.transactionId=e.transactionId,r.pixelId=e.pixelId,r.name=e.name,r.adspendType="SNAPCHAT",P.Ma(r,t)||(t.push(r),P.Va(r))}E.Tr(t)}else await this.ai(1e3),await this.si()}async ni(){if(this.ja&&0<this.ja.length){var e,t=[];for(e of this.ja){var r=this.oi(e);null===r||P.Ma(r,t)||(t.push(r),P.Va(r))}E.Tr(t)}else await this.ai(1e3),await this.ni()}oi(e){var t,r,a=l.getUrlParam("data",!0,e);return null===a?(y.Qt("Data param not found: "+e,"gl_url",{serviceWhereErrorOriginated:"GOOGLE_PIXEL_EVENT",errorType:"INVALID_EVENT_URL"}),null):null===(a=new URLSearchParams(a.replace(";","&")).get("event"))?(y.Qt("Event value not found: "+e,"gl_url",{serviceWhereErrorOriginated:"GOOGLE_PIXEL_EVENT",errorType:"INVALID_EVENT_URL"}),null):null===(t=l.getUrlParam("oid",!0,e))||t.includes("{{")||t.includes("}}")?(y.Qt("TransactionId param not valid: "+e,"gl_url",{serviceWhereErrorOriginated:"GOOGLE_PIXEL_EVENT",errorType:"INVALID_EVENT_URL"}),null):null===(r=m.getSubstringBetween(e,"conversion/","/"))||0===r.length?(y.Qt("PixelId not found: "+e,"gl_url",{serviceWhereErrorOriginated:"GOOGLE_PIXEL_EVENT",errorType:"INVALID_EVENT_URL"}),null):((e={}).transactionId=t,e.name=a,e.pixelId=r,e.adspendType="GOOGLE",e)}async ci(){var e="external_id",t="m.conversionId";if(this.xa&&0<this.xa.length){var r,a=[];for(r of this.xa){var i={},s=l.getUrlParam(e,!1,r),s=(this.li(s,e)||(i.transactionId=s),l.getUrlParam("uuid",!1,r)),s=(this.li(s,"uuid")||(i.redditUUID=s),l.getUrlParam(t,!1,r)),s=(this.li(s,t)||(i.redditConversionId=s),l.getUrlParam("event",!1,r)),s=(this.li(s,"event")||(i.name=s),l.getUrlParam("id",!1,r));this.li(s,"id")||(i.pixelId=s),i.adspendType="REDDIT",P.Ma(i,a)||(a.push(i),P.Va(i))}E.Tr(a)}else await this.ai(1e3),await this.ci()}ti(){let t=setInterval(function(){try{var e=document.cookie.match("(^|;)\\s*_fbp\\s*=\\s*([^;]+)");e&&0<e.length&&(clearInterval(t),E.wr(e))}catch(e){o.error("[fbp]"+e.stack)}},3e3)}li(e,t){return"0000000000000000000000000000000000000000000000000000000000000001"===e&&(o.error("[reddit] Default placeholders are being used. Invalid param: "+t),!0)}async ai(t){return new Promise(e=>{setTimeout(e,t)})}}([],[],[],[],[]),be=class it{static di(){g.config.trackDeviceFingerprint&&"undefined"==typeof HyrosFP&&(n.FINGERPRINT_SCRIPT?f.processedData.V=new Promise((t,r)=>{var a=document.createElement("script");if(null!=(i=globalThis.URL)&&i.createObjectURL){var i=new Blob([n.FINGERPRINT_SCRIPT],{type:"text/javascript"});let e=URL.createObjectURL(i);a.src=e,a.onload=()=>{URL.revokeObjectURL(e),t()},a.onerror=()=>{URL.revokeObjectURL(e),r(new Error("object url script tag error"))}}else a.src="data:text/javascript;base64,"+btoa(n.FINGERPRINT_SCRIPT),a.onload=()=>t(),a.onerror=()=>r(new Error("code in script.src tag error"));document.head.appendChild(a)}).then(()=>it.ui()).then(e=>new e.Thumbmark).catch(e=>{y.Qt(e,"fp",{serviceWhereErrorOriginated:"FINGERPRINT",errorType:"LOAD_FAILED"}),g.config.trackDeviceFingerprint=!1}):(y.Qt("Fingerprinting is enabled but no fingerprint script is available","fp",{serviceWhereErrorOriginated:"FINGERPRINT",errorType:"LOAD_FAILED"}),g.config.trackDeviceFingerprint=!1))}static ui(i=50){return new Promise((e,t)=>{let r=3,a=()=>{"undefined"!=typeof HyrosFP?e(HyrosFP):r<1?t(new Error('Max Retries exceeded waiting for "HyrosFP" global')):(r--,setTimeout(a,i))};a()})}static async hi(){try{var e,t,r;return g.config.trackDeviceFingerprint?0<f.config.dvfp.length?f.config.dvfp:(e=await f.processedData.V)?(r=(t=await e.get()).thumbmark,f.config.dvfp=r,f.config.i=btoa(JSON.stringify(t)),t.error&&y.Qt(t.error,"fp",{serviceWhereErrorOriginated:"FINGERPRINT",errorType:"COMPUTATION"}),o.info("[fp]: "+r),r):null:null}catch(e){return y.Qt(e,"fp",{serviceWhereErrorOriginated:"FINGERPRINT",errorType:"COMPUTATION_UNEXPECTED"}),null}}static async mi(){try{var e,t,r;g.config.trackDeviceFingerprint&&(e=f.config.dvfp,f.config.deviceFingerprint="",null!=(t=await it.hi()))&&t!==e&&(f.config.dvfp=t,r={id:f.config.l.clickId,productId:g.product.id,creationDate:f.config.l.creationDate,dvfp:t},E.ar(r))}catch(e){o.error("[fp2] "+(e instanceof Error?e.stack:e))}}},Re=new class{pi(){(g.config.timeSpentTrackingEnabled||g.config.thirdPartyTracking||g.config.unifiedClickEvent)&&(this.fi(),he.oa())}async processClick(e,t){var r=await this.gi();this.vi(r,"GET",{},e=>{this.rr(e,"pc")||(o.info("[pc]"),f.config.l=e,S.ei(),S.ni(),S.ii(),S.ci(),S.si(),this.Ii(!0),this.Ci(),t())},e=>{y.Qt(e,"pc",{serviceWhereErrorOriginated:"CLICK_B_SERVICE",errorType:"ENDPOINT_DID_NOT_RETURN_200"}),this.Ii(!1),t()},!0),g.config.useFetchKeepAlive&&this.Ii(void 0)}Ci(){var e,t;null!=f.processedData.J&&({Jr:e,value:t}=f.processedData.J,ue.Er(e,t),f.processedData.J=null,o.info("[CAP] Cached event sent"))}rr(e,t){if(!g.config.useFetchKeepAlive){if(e&&ce().includes(e.body))return o.warn("[pc]"+e.body),!0;if(e&&"error"===e.status)return y.Qt(e.body,t,{serviceWhereErrorOriginated:"CLICK_B_SERVICE",errorType:"BACKEND_REJECTED_REQUEST"}),!0}return!1}vi(e,t,r,a,i,s){let n;var o,c,l;if(g.config.useFetchKeepAlive)n={"Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*","Content-type":"application/json; charset=utf-8","Session-ID":f.config.sessionId,"Product-ID":g.product.id,"L-Gen-ID":f.config.leadGenSessionId},m=e,d=r,o=a,c=i,p=n,p={method:t,headers:p=null==p||"undefined"==p?{"Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*","Content-type":"application/json; charset=utf-8"}:p,credentials:s?"include":"omit",keepalive:!0},"GET"!==t&&(p.body=d),fetch(m,p).then(function(e){return e.text()}).then(function(e){e=e?JSON.parse(e):{};e&&"error"===e.status?c(e.body,l):o(e,l)}).catch(function(e){c(e,l)});else if(n=[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"},{key:"Session-ID",value:f.config.sessionId},{key:"Product-ID",value:g.product.id},{key:"L-Gen-ID",value:f.config.leadGenSessionId}],"POST"!==t){var d=e;var u=a;var h=i;var m=n;var p=s;let t=fe("GET",d,!0,m,p=!!p);t.onload=function(){if(200===t.status)try{var e;null!=t.responseText&&"undefined"!=t.responseText&&""!=t.responseText?(e=JSON.parse(t.responseText),u(e)):u()}catch(e){h("ERROR Procesing Response: "+(e instanceof Error?e.message:e))}else h("http status: "+t.status+" - "+t.responseText)},t.onerror=function(){h("Error XMLHttp: "+(t.responseText||"Network request failed"))},t.send()}else pe(e,r,a,i,n,s)}Ii(e){e=new CustomEvent("hClickDoneEvent",{success:e});document.dispatchEvent(e)}async gi(){var e=_e.da(),t=new URLSearchParams,r=g.endpoints.processClick,e=(e.fbAdSetId&&t.append("fbc_id",e.fbAdSetId),e.bingAdGroupId&&t.append("bng_id",e.bingAdGroupId),e.bingSpecialCampaign&&t.append("bng_special_campaign",""+e.bingSpecialCampaign),e.hyrosCampaignId&&t.append("h_campaign_id",e.hyrosCampaignId),e.googleCampaignId&&t.append("gc_id",e.googleCampaignId),e.pa&&t.append("h_ga_id",e.pa),e.gSpecialCampaign&&t.append("g_special_campaign",""+e.gSpecialCampaign),e.hyrosAdId&&(e.fbAdSetId||e.googleCampaignId||e.pa||e.tiktokAdGroupId||e.pinterestAdgroupId||e.snapchatAdSetId||e.bingAdGroupId||e.hyrosCampaignId||e.rdtAdGroupId||e.linkedinCampaignId||e.fa)&&t.append("h_ad_id",e.hyrosAdId),e.fbClickId&&t.append("fb_cl_id",e.fbClickId),e.googleClickId&&t.append("g_cl_id",e.googleClickId),e.wBraId&&t.append("w_bra_id",e.wBraId),e.gBraId&&t.append("g_bra_id",e.gBraId),e.sourceLinkTag&&t.append("sl",""+e.sourceLinkTag),e.v&&t.append("is_el",""+e.v),e.previousUrl&&t.append("prev_url",e.previousUrl),e.refUrl&&t.append("ref_url",e.refUrl),e.userAgent&&t.append("u_agent",e.userAgent),e.tiktokAdGroupId&&t.append("ttc_id",e.tiktokAdGroupId),e.uniqueCheckoutId&&t.append("u_ch_id",""+e.uniqueCheckoutId),e.snapchatAdSetId&&t.append("snc_id",e.snapchatAdSetId),e.twitterAdgroupId&&t.append("twt_id",e.twitterAdgroupId),e.pinterestAdgroupId&&t.append("pnt_id",e.pinterestAdgroupId),e.ua&&t.append("embed",""+e.ua),e.linkedinCampaignId&&t.append("lnk_id",e.linkedinCampaignId),e.tiktokClickId&&t.append("ttclid",e.tiktokClickId),e.rdtAdGroupId&&t.append("rdt_id",e.rdtAdGroupId),e.rdtClickId&&t.append("rdt_clid",e.rdtClickId),e.ga&&t.append("wr_source",e.ga),e.Ia&&t.append("wr_ad_id",e.Ia),e.ya&&t.append("tw_ad_id",e.ya),e._a&&t.append("tw_source",e._a),e.paypalUniqueCheckoutId&&t.append("u_ch_id",e.paypalUniqueCheckoutId),e.Oa&&t.append("h_traffic_source",e.Oa),e.Na&&t.append("h_category",e.Na),e.Da&&t.append("h_goal",e.Da),e.ba&&t.append("h_keyword",e.ba),e.ka&&t.append("h_keyword_id",e.ka),e.Ra&&t.append("h_placement",e.Ra),e.Pa&&t.append("h_ad_name",e.Pa),e.fa&&t.append("apl_id",e.fa),e.Sa&&t.append("h_campaign_name",e.Sa),f.processedData.B&&t.append("dni_number",f.processedData.B),await be.hi());return null!=e&&t.append("fp",e),f.config.cartId?t.append("h_cart_id",f.config.cartId):(e=we.Ga())&&t.append("h_cart_id",e),l.ae("he","he",!1)&&l.ae("el","el",!1)&&t.append("is_he","true"),r+"?"+t.toString()}fi(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(g.config.timeSpentTrackingEnabled?me():w.xt())})}},c=new class{Ti(){var e;g.config.shopifyPostPurchasePageScript&&(window.Shopify&&window.Shopify.on&&(window.fbq||window.gtag)?(window.Shopify.on("CheckoutAmended",(e,t)=>{t=t.order||t;let r=new Set(t.lineItems.map(e=>e.id));t=e.lineItems.filter(e=>r.has(e.id));0!==t.length&&this._i(t[0].finalLinePrice,e.currency)}),window.Shopify.wasPostPurchasePageSeen||(e=window.Shopify.order,this._i(e.totalPrice,e.currency))):o.warn("[NTPF]"))}_i(e,t){window.fbq&&(fbq("track","Purchase",{value:e,currency:t},{wi:Math.random().toString(36).substr(2,15)}),o.info("[fbq]")),window.gtag&&(gtag("event","Purchase",{value:e,currency:t}),o.info("[gtag]"))}},t=new class{yi(){for(var e of[{name:"kartraReferenceIdLoaded",data:null}])document.addEventListener(e.name,this.Ei(e.data),!0)}bi(t){if(g.config.spaEnabled){let e=encodeURI(l.Y());window.addEventListener("locationchange",async()=>{f.config.o=e,g.config.timeSpentTrackingEnabled&&(me(),he.Qr()),await Re.processClick(f.config.sessionId,t),e=p.Ke()}),history.pushState=(t=>function(){var e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushState")),window.dispatchEvent(new Event("locationchange")),e})(history.pushState),window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))})}}Ei(t){return async e=>{var e=t?e.detail[t]:e.detail;o.info("[uCheckId] "+e),f.checkout.uniqueCheckoutId=e,f.config.l&&(f.config.u?await Re.processClick(f.config.sessionId,()=>{}):(e={id:f.config.l.clickId,productId:g.product.id,uniqueCheckoutId:f.checkout.uniqueCheckoutId,creationDate:f.config.l.creationDate},f.config.u=!0,E.ar(e)))}}},k=class{constructor(){}static Ri(e,t){return e.some(e=>t.includes(e))}static Pi(e,t){return null==(e=null==e?void 0:e.classList)?void 0:e.contains(t)}static Si(e,t,r=[]){if(e.className){var a=[...Array.from(e.classList)].map(e=>e.toLowerCase());if(r.length&&this.Ri(r,a.join("_")))return!0;if(a.some(e=>t.includes(e)))return!0}return t.includes(null!=(a=null==(r=e.id)?void 0:r.toLowerCase())?a:"")||t.includes(null!=(a=null==(r=e.placeholder)?void 0:r.toLowerCase())?a:"")}},A=class{constructor(){}static ki(e){return k.Si(e,u.ke(0),["f_name","first_name"])}static Ai(e){return k.Si(e,u.ke(1),["l_name","last_name"])}static Oi(e){return k.Si(e,u.ke(2),["complete_name","full_name"])}static Ni(e){return k.Si(e,h.Oe)}static Di(e){return k.Si(e,h.Ne)}static Li(e){return k.Si(e,h.Le)}static Fi(e){return k.Si(e,h.Fe)}static Ui(e){return k.Si(e,h.De)}static Gi(e){return k.Si(e,h.Ue)}},Pe=new class{constructor(){s(this,"submitListenerAttached",!1),s(this,"handleFormSubmit",e=>{var e=e.target;"FORM"===(null==e?void 0:e.tagName)&&(e=this.Hi(e))&&b.Sr(e.value,{Mt:!0})})}Mi(){var e;this.Vi();for(e of Z._e())k.Pi(e,"hyros-ignore")||this.Bi(e)}Bi(e){A.Oi(e)?this.xi(e,5):A.Ai(e)?this.xi(e,4):A.ki(e)?this.xi(e,3):A.Ni(e)?this.xi(e,6):A.Di(e)?this.xi(e,7):A.Li(e)?this.xi(e,8):A.Fi(e)?this.xi(e,9):A.Ui(e)?this.xi(e,10):(A.Gi(e)&&this.xi(e,11),C._t(e)?this.xi(e,1):k.Pi(e,"hyros-coupon")?this.xi(e,2):"text"!==e.type&&"email"!==e.type||this.xi(e,0))}xi(t,r){f.processedData.C.includes(t)||(b.Rr(t.value,r),t.addEventListener("change",function(e){b.Rr(t.value,r)}),f.processedData.C.push(t))}Vi(){this.ji||(document.addEventListener("submit",this.handleFormSubmit,!0),this.ji=!0)}Hi(e){var t=document.activeElement;if(this.Wi(t,e))return t;var r,t=e.querySelectorAll("input");for(r of Array.from(t))if(this.Wi(r,e))return r;return null}Wi(e,t){return e instanceof HTMLInputElement&&e.form===t&&!(k.Pi(e,"hyros-ignore")||e.disabled||"hidden"===e.type||!e.value||!C._t(e)||!C.dt(e.value))&&this.qi(e)}qi(e){var t;return!e.hidden&&!e.closest('[hidden], [aria-hidden="true"]')&&"none"!==(null==(t=null==(t=globalThis.getComputedStyle)?void 0:t.call(globalThis,e))?void 0:t.display)&&"hidden"!==(null==t?void 0:t.visibility)}Ki(e){let r=null;o.info("Ninja Forms detected. Adding dedicated listener...");e.addEventListener("keyup",e=>{let t=e.target;t&&"INPUT"===t.tagName&&"keyup"===e.type&&C._t(t)&&(e.stopImmediatePropagation(),e.preventDefault(),r&&clearTimeout(r),r=setTimeout(()=>{b.Rr(t.value,1)},3e3))},!0)}},O=class F{constructor(){}static Ji(e){return C.vt(f.processedData.W,e)||F.zi(f.processedData.W,e)}static zi(e,t){return e.includes(C.ut(t.startsWith("+1")?t:"+1"+t))}static Xi(e){return C.vt(f.processedData.q,e)||F.zi(f.processedData.q,e)}static $i(e){e=e.getAttribute("href");return e&&e.includes("tel:")&&!F.Ji(e.split(":")[1])&&!F.Xi(e.split(":")[1])}static Zi(e){var t=Array.from(e),r=/[0-9()\s]/;for(let e=0;e<t.length;e++){var a=0===e?e:e-1,i=e===t.length-1?e:e+1;t[e].match(/[^a-zA-Z0-9]/)&&t[a].match(r)&&t[i].match(r)&&(t.splice(e,1),e-=1)}return t.join("")}static Yi(e){try{var r=F.Zi(e.data);let t=!1;var a,i=r.split(" ");for(let e=0;e<i.length;e++)C.ft(i[e])&&(!(a=C.It(f.processedData.B,i[e]))||F.Ji(i[e])||F.Xi(i[e])||(i[e]=a,t=!0));t&&(e.data=i.join(" "))}catch(e){o.error("[cte] error processing node. continuing...")}}static Qi(t){var e;if(t.getAttribute("href")&&t.getAttribute("href").includes("tel:")&&t.setAttribute("href","tel:"+f.processedData.B),0===t.childElementCount)t.innerHTML&&C.gt(t.innerHTML)&&(e=C.It(f.processedData.B,t.innerHTML))&&(t.innerHTML=e);else for(let e=0;e<t.children.length;e++)F.Qi(t.children[e])}static es(){var t=document.getElementsByClassName("external-dni");for(let e=0;e<t.length;e++){var r=d.Ie(t[e]);for(let e=0;e<r.length;e++){var a=r[e];if(a.data&&C.gt(a.data)&&!F.Xi(a.data))return C.ut(a.data)}}return null}static ts(){var e=C.ut(d.de("hyros-noswap-dni")),t=C.ut(d.de("hyros-dni"));return!C.dt(e)||!C.dt(t)||e===t||F.Xi(t)?null:t}},Se=new class{constructor(){s(this,"processDniNumber",function(e){f.config.l&&E.yr(e)})}async rs(t){var e=!!document.getElementsByClassName("hyros-dni").length;if(!g.config.callTrackingEnabled&&!g.config.noSwapNumbersEnabled||g.config.refOverride)t();else try{var r=await w.jt(JSON.stringify({previousUrl:p.getPreviousUrl(),referrerUrl:p.Ke(),callTrackingPoolHash:g.config.callTrackingPoolHash,replacementEnabled:e}));de.rr(r,"cte",{serviceWhereErrorOriginated:"CALL_TRACKING_SERVICE",errorType:"COULD_NOT_RETRIEVE_DNI_NUMBER"})||r.error?(o.warn("[cte] "+r.error),t()):(this.ss(r),t())}catch(e){y.Qt(e,"cte",{serviceWhereErrorOriginated:"CALL_TRACKING_SERVICE",errorType:"COULD_NOT_RETRIEVE_DNI_NUMBER"}),t()}}ss(e){var t=e.dnum;if(t&&(o.info("[cte] "+t),f.processedData.B=t),f.processedData.j=!!e.fullNumberReplacement,null!=(t=e.W)&&t.length)for(var r of e.W)f.processedData.W.push(r);if(null!=(t=e.q)&&t.length)for(var a of e.q)f.processedData.q.push(a);g.config.callTrackingEnabled&&this.ns()}os(){var t=document.getElementsByTagName("a");for(let e=0;e<t.length;e++){var r,a=t[e];a.classList.contains("external-dni")||(O.$i(a)&&a.setAttribute("href","tel:"+f.processedData.B),(r=a.getAttribute("phone"))&&!O.Ji(r)&&null!==(r=C.It(f.processedData.B,r))&&a.setAttribute("phone",r))}this.cs()}ns(){if(f.processedData.B)if(f.processedData.j)this.os();else{var t=document.getElementsByClassName("hyros-dni");for(let e=0;e<t.length;e++)O.Qi(t[e])}}cs(){var t=d.Ie(document.body);for(let e=0;e<t.length;e++){var r=t[e],a=r.parentElement;a&&a.closest(".external-dni")||r.data&&O.Yi(r)}}ls(){let e=O.ts();(e=e||O.es())&&this.Xr(e)}},ke=globalThis,Ae=new class{constructor(){s(this,"retryCount",0)}ds(e,t){var r,a,i,s=e.getAttribute("href");s&&(a=/([?&]ref=)([^&]+)/.exec(s))&&(r=a[1],i=(a=a[2]).split("--")[0],s=s.replace(r+a,r+i+"--"+t),e.setAttribute("href",s))}us(r){try{var e=document.querySelectorAll('a[href*="m.me/"]');if(0===e.length)return 5<=this.hs?void 0:(this.hs++,void setTimeout(()=>this.us(this.ps()),300));if(this.hs=0,r&&f.config.sessionId){let t=encodeURIComponent(r.replace(new RegExp(ae+"$"),""));Array.from(e).forEach(e=>{this.ds(e,t)})}}catch(e){r=e instanceof Error?e.message:JSON.stringify(e);o.error("Couldn't propagate params to ManyChat: "+r)}}propagateParametersToManyChat(){let r=this.ps();if(this.us(r),ke.MC){let t=ke.MC;Array.from(document.getElementsByClassName("mcwidget-embed")).forEach(e=>t.getWidget(e).setPayload(r)),Array.from(document.getElementsByClassName("mcwidget-overlay")).forEach(e=>t.getWidget(e).setPayload(r))}else ke.mcAsyncInit=()=>this.propagateParametersToManyChat()}ps(){var e=_e.da(),t=f.config.sessionId,r=ae;let a="";return e.fbAdSetId&&(a+="fbc_id="+e.fbAdSetId+r),e.bingAdGroupId&&(a+="bng_id="+e.bingAdGroupId+r),e.hyrosCampaignId&&(a+="h_campaign_id="+e.hyrosCampaignId+r),e.googleCampaignId&&(a+="gc_id="+e.googleCampaignId+r),e.hyrosAdId&&(e.fbAdSetId||e.googleCampaignId)&&(a+="h_ad_id="+e.hyrosAdId+r),e.fbClickId&&(a+="fb_cl_id="+e.fbClickId+r),e.googleClickId&&(a+="g_cl_id="+e.googleClickId+r),e.wBraId&&(a+="w_bra_id="+e.wBraId+r),e.gBraId&&(a+="g_bra_id="+e.gBraId+r),e.sourceLinkTag&&(a+="sl="+e.sourceLinkTag+r),e.v&&(a+="is_el="+e.v+r),t&&(a+="usid="+t+r),e.tiktokClickId&&(a+="ttclid="+e.tiktokClickId+r),e.rdtAdGroupId&&(a+="rdt_id="+e.rdtAdGroupId+r),e.fa&&(a+="apl_id="+e.fa+r),e.rdtClickId&&(a+="rdt_clid="+e.rdtClickId+r),e.Sa&&(a+="h_ad_id="+e.Sa+r),g.config.customTag&&(1===g.config.customTag.split("!").length?a+="tag="+g.config.customTag+r:a+="tag="+g.config.customTag.split("!")[1]+r),a}},I=new class{constructor(){s(this,"setupEmailTrackingAndLeadCreation",()=>{setInterval(()=>Pe.Mi(),3e3),setInterval(()=>Se.ns,3e3),setInterval(()=>{var e=i.Pe();this.processEmailDom(e)},3e3),this.processEmailTrackingAndLeadCreation()}),s(this,"processEmailTrackingAndLeadCreation",()=>{var e=decodeURIComponent(i.Se()),t=ne(),r=l.ne(ee()),a=f.processedData.K&&f.processedData.email;e&&i.Re(e)||a?(e=i.Re(e)?e:f.processedData.email,b.qr(e,l.le()),f.processedData.email=e,f.processedData.K=!1):0<t.length&&g.config.phoneOptInEnabled?b.qr(t[0],l.le()):r?b.qr(r,l.le()):this.checkDocumentAndParseDom(),Ae.propagateParametersToManyChat(),setTimeout(be.mi,2e3)}),s(this,"checkDocumentAndParseDom",()=>{var e;"complete"===document.readyState||"interactive"===document.readyState?(e=i.Pe(),b.Sr(C.ht()),b.Ar(d.pe()),b.Or(d.ge()),b.Nr(d.ve()),setTimeout(Se.ls,1e3),this.processEmailDom(e)):(o.warn("[WARN][US] Document not ready: "+document.readyState),setTimeout(this.checkDocumentAndParseDom,1e3))}),s(this,"processEmailDom",e=>{i.Re(e)&&(f.processedData.g=e,f.config.sessionId?b.qr(e,l.le()):(f.processedData.K=!0,f.processedData.email=e))})}fs(){window.addEventListener("hyros_email",function(e){e=e.detail.email;e&&i.Re(e)&&(f.processedData.email=e,f.config.sessionId?b.qr(e,l.le()):f.processedData.K=!0)})}},R=new class{gs(){let e=1;window.setupCallbacks=setInterval(function(){var t=window.setupCallbacks;try{"undefined"==typeof BoltCheckout?15<e++&&clearInterval(t):(clearInterval(t),window.BoltCheckout.setClientCustomCallbacks?window.BoltCheckout.setClientCustomCallbacks({onEmailEnter:function(e){window.dispatchEvent(new CustomEvent("hyros_email",{detail:{email:e}}))},success:function(e,t){t()}}):"undefined"!=typeof bolt_callbacks&&window.bolt_callbacks.onEmailEnter&&(window.bolt_callback_on_email_enter=window.bolt_callbacks.onEmailEnter,window.bolt_callbacks.onEmailEnter=function(e){window.dispatchEvent(new CustomEvent("hyros_email",{detail:{email:e}})),window.bolt_callback_on_email_enter(e)}))}catch(e){o.error("[blt] "+(e instanceof Error?e.message:e)),clearInterval(t)}},200)}},Oe=new class{vs(){let r=1;window.globalECallback=setInterval(function(){var e,t=window.globalECallback;try{void 0===window.glegem?15<r++&&clearInterval(t):(e=window.glegem||function(...e){window.glegem.Is=window.glegem.Is||[],window.glegem.Is.push(e)},clearInterval(t),e("OnCheckoutStepLoaded",function(e){o.info("[globalE] Received globalE event: "+JSON.stringify(e)),"undefined"!==e.StepId&&e.StepId===e.Steps.CONFIRMATION&&!0===e.IsSuccess&&!0!==e.IsPageReload&&null!==(e=e.details.CustomerDetails.BillingAddress.BillingEmail)&&b.qr(e,l.le())}))}catch(e){o.error("[gle] "+(e instanceof Error?e.stack:e)),clearInterval(t)}},200)}},Ne=new class{ua(){g.config.ua&&setInterval(this.Cs,2e3)}Cs(){var e,t,r=this.Ts();for(e of this._s())try{null===e.contentDocument?f.processedData.H.push(e):((t=document.createElement("script")).type="text/javascript",t.src=r,e.contentDocument.querySelector("head").append(t),f.processedData.H.push(e),o.info("[e_ifr]"))}catch(e){o.warn("[WARN][e_ifr] Script couldn't be embedded: "+(e instanceof Error?e.message:e))}}Ts(){var e=g.config.customTag?"&tag="+g.config.customTag:"",t=g.config.spaEnabled?"&spa=true":"",r=g.config.ignorePrevUrl?"&ignorePrevUrl=true":"",a="SHOPIFY"===g.config.origin?"&origin=SHOPIFY":"",i=g.config.ua?"&embed=true":"";return g.endpoints.trackingBase+"/universal-script?ph="+g.product.hash+e+a+t+r+i}_s(){var e,t=[];for(e of document.getElementsByTagName("iframe"))f.processedData.H.includes(e)||t.push(e);return t}},De=(e=>(e.EUIP="EUIP",e.BLCK="BLCK",e))({});var Le=class extends class{ws(e){try{var t=document.createElement("script"),r=(t.src=this.PIXEL_SCRIPT_URL,t.onerror=()=>{o.error("[tps] load failure")},this.ys(t,e),document.getElementsByTagName("script")[0]);r.parentNode.insertBefore(t,r)}catch{o.error("[tps] S failed")}}}{constructor(){super(...arguments),s(this,"PIXEL_SCRIPT_URL","https://static.icexyz.com/whm/assets/pixel.js")}Es(){return null}ys(e,t){window.pixel_kwargs=window.pixel_kwargs||{client_id:null,site_id:null,h_s_id:null,h_p_id:null},window.pixel_kwargs.client_id="2d3ae57f-04f6-4a66-b0ec-75a9bb09a1a7",window.pixel_kwargs.site_id="9788657e-ddd6-4c28-8e5c-38ee01897742",window.pixel_kwargs.h_s_id=f.config.sessionId,window.pixel_kwargs.h_p_id=""+g.product.id,e.onload=()=>{t(window.pixel_kwargs.h_s_id)}}},Fe=new class{constructor(){s(this,"httpClient"),this.Ft=new le(a.trackingBase)}async bs(e){e=new URLSearchParams({href:e}),e=g.endpoints.matchingTrigger+"?"+e;return this.Ft.get(e,T.Rt(),!1)}},Ue=new class{constructor(){s(this,"SESSION_ID_FIELD","thirdPartySessionId")}async Rs(e){if(g.config.thirdPartyTracking){var t={"bdex-pixel":()=>new Le};let a=t[e]?t[e]():null;if(a)try{let t=setInterval(()=>{var e;null!=(e=f.config.l)&&e.clickId&&(clearTimeout(r),clearInterval(t),this.Ps(a))},1500),r=setTimeout(()=>{clearInterval(t),this.Ps(a)},9e3)}catch{o.error("[tps] Error initializing")}else o.error("[tps] invalid id")}}async Ps(t){if(f.config.h)o.info("[tps] Skip Bc."),E._r("true"),E.sr(f.config.h,this.SESSION_ID_FIELD);else{var e=t.Es();if(e)E.sr(e,this.SESSION_ID_FIELD);else{let e=!0;try{e=await Fe.bs(g.href)}catch(e){y.Qt(e,"[tps]")}e&&(o.info("[TPS] No Bc, Inject TPS"),E._r("false"),t.ws(e=>{E.sr(e,this.SESSION_ID_FIELD),o.info("[tps] Built")}))}}}},Ge=new class{async Ss(r){var e=new URLSearchParams,t=l.getUrlParam("hyros"),t=(t&&e.append("hyros",t),await be.hi());let a=g.endpoints.generateUUID;e.toString()&&(a=a+"?"+e.toString()),this.requestSessionId(a,(e,t)=>{this.Kt(e,t,r)},e=>{this.ks(e)},[{key:"Product-ID",value:g.product.id},{key:"Ref-Url",value:g.config.refOverride||p.Ke()},{key:"fp",value:t},{key:"fp-data",value:f.config.i}],!0)}requestSessionId(e,a,i,t,r){let s=fe("GET",e,!0,t,r=!!r);s.onload=function(){if(200===s.status||304===s.status)try{var e,t=s.getResponseHeader("Session-ID"),r=s.getResponseHeader("Third-Party-Tracking-Hash");r&&(f.config.h=r),null!=t&&"undefined"!==t&&""!==t&&"null"!==t?a(t,!1):null!=(e=JSON.parse(s.responseText).body)&&"undefined"!==e&&""!==e&&"null"!==e&&"disabled"===e?a(e,!0):i(s.responseText)}catch(e){i("ERROR Procesing Response: "+(e instanceof Error?e.message:e))}else i("http status: "+s.status+" - "+s.responseText)},s.onerror=function(){i("Error XMLHttp: "+(s.responseText||"Network request failed"))},s.send()}Kt(e,t,r){t?o.info("Hyros Script Disabled"):(f.config.sessionId=e,o.info("[gusid]: "+e),this.As(e),Ue.Rs(n.THIRD_PARTY_TRACKING_PROVIDER),this.Os(function(){Se.rs(function(){Re.processClick(e,r)})}))}ks(e){try{var t=JSON.parse(e);if(t.body){if(Object.values(De).includes(t.body))return void o.error("["+t.body+"]");if(ce().includes(t.body))return void o.warn(t.body)}y.Qt(e,"gusid",{serviceWhereErrorOriginated:"SESSION_B_SERVICE"})}catch{y.Qt(e,"gusid",{serviceWhereErrorOriginated:"SESSION_B_SERVICE",errorType:"ERROR_COULD_NOT_BE_PARSED_INTO_JSON"})}}As(e){var t=d.me("button"),r=d.me("a");this.Ns(e,t,"button"),this.Ns(e,r,"tag"),setInterval(()=>this.Ds(e),900)}Ns(e,t,r){for(var a in t){a=t[a];try{var i,s,n=a.href;null!=n&&n.includes("https://www.digistore24.com/product/")&&(n.includes("custom=")?(i=this.Ls(n,e),a.href=i.toString()):(s=n.includes("?")?"&":"?",a.href=n+s+"custom=sessionId="+e),o.info("[hyros-url] A "+r+", new href: "+a.href))}catch(e){o.warn("[hyros-url] A "+r+", error: "+e)}}}Ds(e){var t=d.me("my-order-form");if(null!==t&&0!==t.length)for(var r in t)try{var a,i,s=t[r]._iframe.src;null!=s&&s.includes("https://www.digistore24.com/product/")&&(s.includes("custom=")?(a=this.Ls(s,e),t[r]._iframe.src=a.toString()):(i=s.includes("?")?"&":"?",t[r].href=s+i+"custom=sessionId="+e),o.info("[hyros-url] A iframe, new href: "+t[r]._iframe.src))}catch(e){o.warn("[hyros-url] A iframe error, "+e)}}Ls(e,t){var r,a,e=new URL(e),i="custom=".replace("=",""),s=new URLSearchParams(e.search);let n="";for([r,a]of s.entries())if(r===i){n=a;break}t=n+":sessionId="+t;return s.set(i,t),e.search=s.toString(),e}Os(t){var e=g.endpoints.generateLeadGenSessionId;this.zt(e,function(e){f.config.leadGenSessionId=e,t()},e=>{y.Qt(e,"session",{serviceWhereErrorOriginated:"SESSION_B_SERVICE",errorType:"FAILED_TO_GET_LEAD_GEN_SESSION_ID"}),t()})}zt(e,t,r){let a=fe("GET",e,!0,void 0,!0);a.onload=function(){if(200===a.status||304===a.status)try{var e=a.getResponseHeader("L-Gen-ID");null!=e&&"undefined"!==e&&""!==e&&"null"!==e?t(e):r(a.responseText)}catch(e){r("ERROR Procesing Response: "+(e instanceof Error?e.message:e))}else r("http status: "+a.status+" - "+a.responseText)},a.onerror=function(){r("Error XMLHttp: "+(a.responseText||"Network request failed"))},a.send()}},He=new class{Fs(){window.dataLayer=window.dataLayer||[];let t=window.dataLayer.push.bind(window.dataLayer);window.dataLayer.push=(...e)=>{e=Array.prototype.slice.apply(e,[0]);return this.Us(e),t(...e)}}Us(e){e.forEach(e=>{"consent"!==e[0]||"update"!==e[1]&&"default"!==e[1]||g.config.$r||(e="granted"===e[2].ad_user_data&&"granted"===e[2].ad_personalization?"GRANTED":"DENIED",Me.updateConsentValue(e))})}},Me=new class{constructor(){s(this,"cookieManagers",[{name:"Cookiebot",Gs:()=>"undefined"!=typeof Cookiebot&&Cookiebot.consent.marketing},{name:"CookiePro",Gs:()=>"undefined"!=typeof CookiePro&&CookiePro.GetConsent()}])}checkAllConsents(){let t=!1;this.cookieManagers.forEach(e=>{e.Gs()&&(t=!0,o.info("Cookie consent given through "+e.name),this.updateConsentValue("GRANTED"))}),t||He.Us(window.dataLayer||[])}updateConsentValue(e){e!==f.lead.adOptimizationConsent&&(f.lead.adOptimizationConsent=e,b.Wr())}},Ve=new class{pingPongRequest(){var e,t=Number.parseInt(l.getUrlParam("hpp-pid")),r=l.getUrlParam("hpp-ver-code");r&&t&&(e=g.product.id,r={domain:p.Je(window.location.href),verificationCode:r,productId:t,scriptProductId:e},w.$t(JSON.stringify(r)).then(()=>o.info("[pp].")).catch(e=>y.Qt(e,"pp",{serviceWhereErrorOriginated:"H_TRACKING_B_SERVICE",errorType:"UNABLE_TO_VERIFY_SCRIPT"})))}},Be=new class{Hs(){let i=0;new Promise((t,r)=>{let a=()=>{i++;var e=document.querySelectorAll(".nf-form-cont form");0<e.length?t(e):15<=i?r(new Error("No NF on page")):setTimeout(a,1e3)};a()}).then(e=>e.forEach(e=>Pe.Ki(e))).catch(e=>o.info(e.message))}Ms(){this.Hs()}},xe=new class{constructor(){s(this,"framework","Angular"),s(this,"globalVariableTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return t.Bs=e.ng&&"function"==typeof(null==(e=e.ng)?void 0:e.probe),t}),s(this,"constantDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},e=e.querySelector("[ng-version]");return e&&(t.Bs=!0,t.version=e.getAttribute("ng-version")),t})}},je=new class{constructor(){s(this,"framework","Ember.js"),s(this,"globalVariableTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},e=e.Ember||e.Em;return null!=e&&e.GUID_KEY&&(t.version=e.VERSION,t.Bs=!0),t})}},We=new class{constructor(){s(this,"framework","Gatsby"),s(this,"constantDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return t.Bs=!!e.querySelector("#___gatsby"),t})}},qe=new class{constructor(){s(this,"framework","jQuery"),s(this,"globalVariableTest",e=>{var t,r={type:0,Vs:this.Vs,version:void 0,Bs:!1},e=e.jQuery||e.$;return null!=(t=null==e?void 0:e.fn)&&t.jquery&&(r.version=e.fn.jquery.replaceAll(/[^\d+.]/g,""),r.Bs=!0),r})}},Ke=new class{constructor(){s(this,"framework","Next.js"),s(this,"globalVariableTest",e=>{var t,r={type:0,Vs:this.Vs,version:void 0,Bs:!1};return null!=(t=e.__NEXT_DATA__)&&t.buildId&&(r.version=null==(t=e.next)?void 0:t.version,r.Bs=!0),r}),s(this,"dynamicDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return("__next"===(null==e?void 0:e.id)||"SCRIPT"===(null==e?void 0:e.tagName)&&"__NEXT_DATA__"===e.id)&&(t.Bs=!0),t})}},N=new class{constructor(){s(this,"framework","Nuxt"),s(this,"globalVariableTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},r=!(!e.__NUXT__&&!e.$nuxt);return t.version=(null==(e=null==(e=e.$nuxt)?void 0:e.constructor)?void 0:e.version)||void 0,t.Bs=r,t}),s(this,"constantDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},e=!!e.querySelector("#__nuxt");return t.Bs=e,t}),s(this,"dynamicDOMTest",e=>{var t,r={type:0,Vs:this.Vs,version:void 0,Bs:!1};return r.Bs=!(null==(t=e.__vue__)||!t.$nuxt)||!(null==(t=e.__vue__)||!t.nuxt),r})}},D=new class{constructor(){s(this,"framework","React"),s(this,"isReactContainer",e=>{if(e){if(e._reactRootContainer)return!0;for(var t in e)if(t.startsWith("__reactContainer"))return!0}return!1}),s(this,"globalVariableTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},r=!(null==(r=e.React)||!r.Component);return t.version=null==(e=e.React)?void 0:e.version,t.Bs=r,t}),s(this,"constantDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1},r=!!e.querySelector("#react-root, [data-reactroot]"),e=this.isReactContainer(e.body)||this.isReactContainer(e.body.firstElementChild);return t.Bs=r||e,t}),s(this,"dynamicDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return t.Bs=this.isReactContainer(e),t})}},Je=new class{constructor(){s(this,"framework","Remix"),s(this,"globalVariableTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return e.__remixContext&&(t.version=null,t.Bs=!0),t}),s(this,"dynamicDOMTest",e=>{var t={type:0,Vs:this.Vs,version:void 0,Bs:!1};return"META"===(null==e?void 0:e.tagName)&&"string"==typeof e.name&&e.name.startsWith("remix-")&&(t.Bs=!0),t})}},ze=new class{constructor(){s(this,"platform","Drupal"),s(this,"globalVariableTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return null!=(e=e.Drupal)&&e.behaviors&&(t.Bs=!0),t}),s(this,"constantDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1},r=e.querySelector('meta[name="generator"][content^="Drupal"]');let a=/\/sites\/(?:default|all)\/(?:themes|modules|files)/;e=Array.from(e.querySelectorAll("link, style, script")||[]).some(e=>a.test(e.src)||a.test(e.href));return(r||e)&&(t.Bs=!0),t})}},Xe=new class{constructor(){s(this,"platform","Shopify"),s(this,"globalVariableTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return null!=(e=e.Shopify)&&e.shop&&(t.Bs=!0),t})}},$e=new class{constructor(){s(this,"platform","Wix"),s(this,"globalVariableTest",e=>{var t,r={type:1,platform:this.platform,Bs:!1};return(null!=(t=e.wixPerformanceMeasurements)&&t.info||null!=(t=e.wixBiSession)&&t.info)&&(r.Bs=!0),r}),s(this,"constantDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1},r=!!e.querySelector("[data-wix-site-id], [data-wix-rendered]"),e=!!e.querySelector('script[src*="wix.com"], script[src*="wixstatic.com"]');return(r||e)&&(t.Bs=!0),t}),s(this,"dynamicDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return e instanceof HTMLElement&&(e.dataset.wixSiteId||e.dataset.wixRendered)&&(t.Bs=!0),t})}},Ze=new class{constructor(){s(this,"platform","Wiz"),s(this,"globalVariableTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return null!=(e=e.document)&&e.__wizdispatcher&&(t.Bs=!0),t})}},Ye=new class{constructor(){s(this,"platform","WooCommerce"),s(this,"globalVariableTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return(e.wc_add_to_cart_params||e.wc_cart_fragments_params||e.woocommerce_params)&&(t.Bs=!0),t}),s(this,"constantDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1},r=!(null==(r=e.body)||!r.classList.contains("woocommerce"))||!(null==(r=e.body)||!r.classList.contains("woocommerce-page")),a=!!e.querySelector('link[href*="woocommerce"], script[src*="woocommerce"]'),e=!!e.querySelector(".woocommerce, .woocommerce-cart, .woocommerce-checkout");return(r||a||e)&&(t.Bs=!0),t}),s(this,"dynamicDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1};return null!=e&&e.classList&&(e.classList.contains("woocommerce")||e.classList.contains("woocommerce-cart")||e.classList.contains("woocommerce-checkout"))&&(t.Bs=!0),t})}},Qe=new class{constructor(){s(this,"platform","WordPress"),s(this,"constantDOMTest",e=>{var t={type:1,platform:this.platform,Bs:!1},r=!!e.querySelector('link[rel="https://api.w.org/"]'),e=0<e.querySelectorAll('link[href*="wp-includes"], script[src*="wp-includes"]').length;return(r||e)&&(t.Bs=!0),t})}},L=new class{constructor(e){s(this,"channels",{[0]:[],1:[],2:[]}),s(this,"getCheckerResultsForData",(e,t)=>this.xs[e].map(e=>({groupId:e.groupId,...e.js(t)}))),s(this,"unsubscribeFromAll",r=>{Object.values(this.xs).forEach((e,t)=>{this.xs[t]=e.filter(e=>e.groupId!==r)})}),s(this,"unsubscribeAll",()=>{Object.values(this.xs).forEach((e,t)=>{this.xs[t]=[]})}),s(this,"getCheckersCountForChannel",e=>this.xs[e].length),this.xs=e}}({[0]:[{groupId:D.Vs,js:D.globalVariableTest},{groupId:xe.Vs,js:xe.globalVariableTest},{groupId:je.Vs,js:je.globalVariableTest},{groupId:qe.Vs,js:qe.globalVariableTest},{groupId:Ke.Vs,js:Ke.globalVariableTest},{groupId:N.Vs,js:N.globalVariableTest},{groupId:Je.Vs,js:Je.globalVariableTest},{groupId:1..toString(),js:Xe.globalVariableTest},{groupId:1..toString(),js:ze.globalVariableTest},{groupId:1..toString(),js:$e.globalVariableTest},{groupId:1..toString(),js:Ze.globalVariableTest},{groupId:1..toString(),js:Ye.globalVariableTest}],1:[{groupId:D.Vs,js:D.constantDOMTest},{groupId:xe.Vs,js:xe.constantDOMTest},{groupId:We.Vs,js:We.constantDOMTest},{groupId:N.Vs,js:N.constantDOMTest},{groupId:1..toString(),js:ze.constantDOMTest},{groupId:1..toString(),js:$e.constantDOMTest},{groupId:1..toString(),js:Ye.constantDOMTest},{groupId:1..toString(),js:Qe.constantDOMTest}],2:[{groupId:D.Vs,js:D.dynamicDOMTest},{groupId:Ke.Vs,js:Ke.dynamicDOMTest},{groupId:N.Vs,js:N.dynamicDOMTest},{groupId:Je.Vs,js:Je.dynamicDOMTest},{groupId:1..toString(),js:$e.dynamicDOMTest},{groupId:1..toString(),js:Ye.dynamicDOMTest}]}),et=new class{constructor(e){s(this,"nextHandler"),s(this,"foundPlatform",""),s(this,"handle",e=>{var t;1!==e.type?null!=(t=this.Ws)&&t.handle(e):e.Bs&&""===this.qs&&(this.qs=e.platform,L.unsubscribeFromAll(e.groupId),f.config.platform=encodeURIComponent(this.qs))}),s(this,"didFindPlatform",()=>""!=this.qs),this.Ws=e}},tt=new class{constructor(e){s(this,"nextHandler"),s(this,"foundTechnologies",new Set),s(this,"handle",e=>{var t;0!==e.type?null!=(t=this.Ws)&&t.handle(e):e.Bs&&(this.foundTechnologies.add(e.Vs),L.unsubscribeFromAll(e.groupId))}),s(this,"getNumberOfFoundTechnologies",()=>this.foundTechnologies.size),s(this,"updateHeaders",()=>{f.config.m=Array.from(this.foundTechnologies).map(e=>encodeURIComponent(e)).join(",")}),this.Ws=e}}(et),je=new class{async Ks(){let t=tt;0<L.getCheckersCountForChannel(0)&&L.getCheckerResultsForData(0,globalThis).forEach(e=>t.handle(e)),0<L.getCheckersCountForChannel(1)&&L.getCheckerResultsForData(1,document).forEach(e=>t.handle(e)),tt.updateHeaders(),"requestIdleCallback"in globalThis&&0<L.getCheckersCountForChannel(2)&&0===tt.getNumberOfFoundTechnologies()&&await this.Js(e=>{L.getCheckerResultsForData(2,e).forEach(e=>t.handle(e))},()=>{var e=0===L.getCheckersCountForChannel(2),t=0<tt.getNumberOfFoundTechnologies()&&et.didFindPlatform();return e||t}),tt.updateHeaders(),L.unsubscribeAll()}async Js(r,a){let i=0,s=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT),n;var e=new Promise(e=>{n=e});let o=e=>{for(;i<3e3&&0<e.timeRemaining();){var t=s.nextNode();if(!t)return n();if(r(t),i++,a())return n()}i<3e3?globalThis.requestIdleCallback(o):n()};return globalThis.requestIdleCallback(o),e}};if(window.mh_uts_available)try{y.Qt("Duplicate script load","[init] [UTC]",{serviceWhereErrorOriginated:"UNIFIED_TRACKING_SCRIPT",errorType:"DUPLICATE_SCRIPT_LOAD"})}catch{}else{window.mh_uts_available=!0;try{S.Qa(),Pe.Vi(),r.init(),Re.pi(),_e.ca(),be.di(),c.Ti(),t.yi(),t.bi(I.processEmailTrackingAndLeadCreation),I.fs(),R.gs(),Oe.vs(),e.Zr(),Ne.ua(),we.Ua(),Ge.Ss(I.setupEmailTrackingAndLeadCreation),Me.checkAllConsents(),He.Fs(),Ve.pingPongRequest(),Be.Ms(),je.Ks()}catch(e){y.Qt(e,"[init] [UTC]",{serviceWhereErrorOriginated:"UNIFIED_TRACKING_SCRIPT",errorType:"COULD_NOT_INIT_SERVICES"})}}})();