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OAAO,SAAS,UACf,OAAO,SAAS,KAAO,IAAM,OAAO,SAAS,KAAO,KAI3D,MAAME,GAAaF,EAAU,IAAMrH,GAAK,QAAQ,eAAgB,IAAI,EAC9DsH,EAAA,KAAK,MAAOC,EAAW,EAAI,EAEjCD,EAAM,WAAa,UAAY,GAC/BA,EAAM,OAAS,UAAY,CACzB,GAAIA,EAAM,OAAS,KAAOA,EAAM,QAAU,IACxC,OAGE,IAACA,EAAM,cAAgBA,EAAM,aAAa,OAAO,EAAG,CAAC,IAAM,QAC7D,MAAM,MAAM,sBAAsB,EAG9B,MAAAE,EAAM,SAAS,cAAc,KAAK,EAClCC,EAAYlB,EAAU,SAASe,EAAM,YAAY,EACvDE,EAAI,UAAYC,EAChBD,EAAI,MAAM,aAAe,IACzBA,EAAI,MAAM,SAAW,IACrBA,EAAI,MAAM,SAAW,SACrBA,EAAI,GAAK,aAETE,GAAS,IAAM,SACR9O,EAAA,SAAS,KAAK,WAAW,CAAC,IAA1B,YAAAA,EAA6C,MAAO,cACvD,SAAS,KAAK,aAAa4O,EAAK,SAAS,KAAK,WAAW,CAAC,CAAC,CAC7D,CACD,GAEHF,EAAM,KAAK,CACb,EAEMI,GAAYxP,GAAyB,CAEvC,SAAS,aAAe,YACxB,SAAS,aAAe,cAEfA,IAEA,0BAAiB,mBAAoBA,CAAQ,CAE1D,ECpEayP,GAAc,aCG3BC,GAAO,CAAE,SAAU,GAAGD,uBAAgC,CAAE","names":["modulesScaffold","__vitePreload","scaffoldedModules","reactModule","Component","nodeList","node","createRoot","modulesReact","modulesReact$1","modules","modules$1","debounce","callback","wait","timerId","args","useDebounce","waitTime","ref","useRef","useEffect","useMemo","_a","Rtf","el","__publicField","table","container","element","focusableElements","createDataLayerString","data","emailClick","event","target","href","phoneClick","detectScrollThresholds","thresholds","thresholdReached","windowHeight","documentHeight","scrollPercentage","threshold","width","detectSectionIsVisible","onVisible","selector","onNotVisible","detectVisibleSections","entries","entry","observer","section","oneTimeVisibleLayerPush","handleIntersection","makeSuperScript","text","superScript","code","index","sup","superScriptRegex","match","getDocumentPriority","documents","priorityDocument","document","getExtensionPriority","decodeHtmlEntities","encodedString","elem","isInDialog","modal","rect","secureStorage","SecureLS","USER_PROFILE_KEYS","USER_PERSONALIZATION_KEY","USER_PROFILE_OBJECT_KEY","USER_PROFILE_EXPIRATION_KEY","USER_PROFILE_EXPIRATION_TIME","USER_PROFILE_FIELDS","getUserProfile","userProfile","updateUserProfile","properties","newUserProfile","time","COOKIE_NAMES","GEOLOCATION_EXPIRATION_KEY","GEOLOCATION_EXPIRATION_TIME","MAPS_API_KEY","_b","getStoredGeolocationData","locationData","fromLocalStorage","getStoredGeolocationCountryAndZip","getAddressFromGeolocation","address","geolocationObj","getLocationDataFromLatLong","latitude","longitude","dataLatLong","zipFromData","component","countryFromData","getLocationDataFromAddress","dataLocation","city","street","secondStreet","state","getBrowserGeolocationData","resolve","reject","timeoutId","successCallback","position","errorCallback","error","getGeolocationDataFromBrowserAndGoogle","browserData","geolocationData","updateGeolocationDataProperties","getLatLongFromZip","zip","country","countryCode","lat","lng","formattedAddress","INVALID_GOOGLE_ZIP_EVENT","getLocationByIpAddress","result","global","getZipAndCountryFromUrl","url","getGeolocationDataFromUrlAndGoogle","COUNTRY_VALUES","newGeolocationData","QUIZ_ANSWER_NAMES","QUIZ_RESULT_NAMES","CONCTRACTOR_FIELD_NAMES","COST_ESTIMATE_FIELD_NAMES","SHINGLE_FIELD_NAMES","getSummaryAnswers","contractorAnswers","costEstimateAnswers","shingleAnswers","getSummaryResults","contractorResults","costEstimateResults","shingleResults","getContractorAnswers","getCostEstimateAnswers","getShingleAnswers","getContractorResults","results","getCostEstimateResults","getShingleResults","calculateCostEstimateResults","homeSquareFootage","numberOfStories","garageValue","roofSlopeValue","roofComplexityValue","territoryPricePerSquareInUSD","edgesPercentage","average","fixedAverage","fixedLowestCost","fixedHighestCost","initRtf","rtfs","rtf","expireStorage","now","userProfileExpiration","geolocationExpiration","userProfileExpirationDate","geolocationExpirationDate","quizzesResults","contractorResultsExpirationDate","costEstimateResultsExpirationDate","shingleResultsExpirationDate","isStorybook","body","_window","pushSection","info","infoObj","obj","setIphoneViewport","create","pushDataLayer","checkForPersona","dataset","_c","datasetLayers","layer","interval","checkForEngage","personalizeReadyEvent","runFullStackExperience","personalizeMap","setPersonaLanguageMap","personalizeLanguage","handleStormCodeRules","redirect","existingCookie","Cookies","persona","homePersona","checkContractorCommercialRedirect","checkTerritoryManagerCommercial","checkDocumentLandingCommercial","productDetailContent","linksToHome","_d","lang","languageLinks","personalizationData","_f","_e","response","_g","personalizeMapElement","handleChangePersona","isHome","contractorRedirect","territoryRedirect","documentRedirect","savedZip","shingleDetailContent","_persona","savedPersona","replaceContentShingle","languageSelector","divToInsert","DOMPurify","replaceContentPdp","stormRules","codeRuleRedirect","google","maxmind","storm","langMapping","language","codeRule","personalizeAddressData","_body","svgXHR","options","baseUrl","_ajax","_fullPath","div","cleanHtml","domready","PUBLIC_PATH","svgxhr"],"sources":["../../../../src/scripts/modules-scaffold.tsx","../../../../src/scripts/modules-react.tsx","../../../../src/scripts/modules.tsx","../../../../src/scripts/helpers/debounce.ts","../../../../src/scripts/modules/rtf.ts","../../../../src/scripts/helpers/helpers.ts","../../../../src/scripts/helpers/global-storage.ts","../../../../src/scripts/helpers/geolocation.ts","../../../../src/scripts/react-components/quiz-results/helpers.tsx","../../../../src/scripts/index.ts","../../../../src/scripts/helpers/svgxhr.ts","../../../../config.ts","../../../../main.js"],"sourcesContent":["import type { Organism } from '@verndale/core';\n// ==> THIS FILE IS AUTO GENERATED, DO NOT EDIT DIRECTLY <== //\n\nconst modulesScaffold: Organism[] = [\n \n {\n name: 'accordion',\n loader: () => import('./modules/accordion.js'),\n styles: () => import('../scss/modules/accordion.scss'),\n },\n\n {\n name: 'header',\n loader: () => import('./modules/header'),\n \n },\n\n {\n name: 'footer',\n loader: () => import('./modules/footer'),\n styles: () => import('../../src/scss/modules/footer.scss'),\n },\n\n {\n name: 'alert-banner',\n loader: () => import('./modules/alert-banner'),\n \n },\n\n {\n name: 'cookie-banner',\n \n styles: () => import('../../src/scss/modules/cookie-banner.scss'),\n },\n\n {\n name: 'content-section-row',\n \n styles: () => import('../../src/scss/modules/content-section-row.scss'),\n },\n\n {\n name: 'tabbed-featured-content',\n loader: () => import('./modules/tabbed-featured-content'),\n styles: () => import('../../src/scss/modules/tabbed-featured-content.scss'),\n },\n\n {\n name: 'navigation-jumplinks',\n loader: () => import('./modules/navigation-jumplinks'),\n styles: () => import('../../src/scss/modules/navigation-jumplinks.scss'),\n },\n\n {\n name: 'logo-carousel-row',\n loader: () => import('./modules/logo-carousel-row'),\n styles: () => import('../../src/scss/modules/logo-carousel-row.scss'),\n },\n\n {\n name: 'card-row',\n \n styles: () => import('../../src/scss/modules/card-row.scss'),\n },\n\n {\n name: 'masonry-gallery',\n loader: () => import('./modules/masonry-gallery'),\n styles: () => import('../../src/scss/modules/masonry-gallery.scss'),\n },\n\n {\n name: 'link-grid',\n \n styles: () => import('../../src/scss/modules/link-grid.scss'),\n },\n\n {\n name: 'breadcrumbs',\n \n styles: () => import('../../src/scss/modules/breadcrumbs.scss'),\n },\n\n {\n name: 'press-release-company-information',\n \n styles: () => import('../../src/scss/modules/press-release-company-information.scss'),\n },\n\n {\n name: 'image-masthead-carousel',\n loader: () => import('./modules/image-masthead-carousel'),\n \n },\n\n {\n name: 'homepage-masthead',\n loader: () => import('./modules/homepage-masthead'),\n \n },\n\n {\n name: 'content-grid',\n loader: () => import('./modules/content-grid'),\n styles: () => import('../../src/scss/modules/content-grid.scss'),\n },\n\n {\n name: 'tabbed-container',\n loader: () => import('./modules/tabbed-container'),\n \n },\n\n {\n name: 'testimonial-carousel',\n loader: () => import('./modules/testimonial-carousel'),\n styles: () => import('../../src/scss/modules/testimonial-carousel.scss'),\n },\n\n {\n name: 'masked-image-with-content',\n \n styles: () => import('../../src/scss/modules/masked-image-with-content.scss'),\n },\n\n {\n name: 'call-to-action-row-with-image',\n \n styles: () => import('../../src/scss/modules/call-to-action-row-with-image.scss'),\n },\n\n {\n name: 'call-to-action-row-with-video',\n \n styles: () => import('../../src/scss/modules/call-to-action-row-with-video.scss'),\n },\n\n {\n name: 'call-to-action-row-with-background',\n \n styles: () => import('../../src/scss/modules/call-to-action-row-with-background.scss'),\n },\n\n {\n name: 'call-to-action-row-centered',\n \n styles: () => import('../../src/scss/modules/call-to-action-row-centered.scss'),\n },\n\n {\n name: 'payment-methods-block',\n \n styles: () => import('../../src/scss/modules/payment-methods-block.scss'),\n },\n\n {\n name: 'contractor-details',\n \n styles: () => import('../../src/scss/modules/contractor-details.scss'),\n },\n\n {\n name: 'certifications-block',\n loader: () => import('./modules/certifications-block'),\n styles: () => import('../../src/scss/modules/certifications-block.scss'),\n },\n\n {\n name: 'contractor-reviews',\n loader: () => import('./modules/contractor-reviews'),\n styles: () => import('../../src/scss/modules/contractor-reviews.scss'),\n },\n\n {\n name: 'image-row-with-fact-icons',\n \n styles: () => import('../../src/scss/modules/image-row-with-fact-icons.scss'),\n },\n\n {\n name: 'promo-cards',\n \n styles: () => import('../../src/scss/modules/promo-cards.scss'),\n },\n\n {\n name: 'project-content-row',\n \n styles: () => import('../../src/scss/modules/project-content-row.scss'),\n },\n\n {\n name: 'share',\n loader: () => import('./modules/share'),\n \n },\n\n {\n name: 'project-link-list',\n \n styles: () => import('../../src/scss/modules/project-link-list.scss'),\n },\n\n {\n name: 'project-masthead-carousel',\n loader: () => import('./modules/project-masthead-carousel'),\n \n },\n\n {\n name: 'about-us-block',\n loader: () => import('./modules/about-us-block'),\n styles: () => import('../../src/scss/modules/about-us-block.scss'),\n },\n\n {\n name: 'statistic-carousel-row',\n loader: () => import('./modules/statistic-carousel-row'),\n styles: () => import('../../src/scss/modules/statistic-carousel-row.scss'),\n },\n\n {\n name: 'city-listing-masthead',\n loader: () => import('./modules/city-listing-masthead'),\n \n },\n\n {\n name: 'certifications-modal',\n loader: () => import('./modules/certifications-modal'),\n styles: () => import('../../src/scss/modules/certifications-modal.scss'),\n },\n\n {\n name: 'video-modal',\n loader: () => import('./modules/video-modal'),\n styles: () => import('../../src/scss/modules/video-modal.scss'),\n },\n\n {\n name: 'video-card',\n \n styles: () => import('../../src/scss/modules/video-card.scss'),\n },\n\n {\n name: 'video-carousel',\n loader: () => import('./modules/video-carousel'),\n styles: () => import('../../src/scss/modules/video-carousel.scss'),\n },\n\n {\n name: 'testimonial-card',\n \n styles: () => import('../../src/scss/modules/testimonial-card.scss'),\n },\n\n {\n name: 'testimonial-card',\n \n styles: () => import('../../src/scss/modules/testimonial-card.scss'),\n },\n\n {\n name: 'media-gallery',\n loader: () => import('./modules/media-gallery'),\n \n },\n\n {\n name: 'video-carousel-list-row',\n loader: () => import('./modules/video-carousel-list-row'),\n styles: () => import('../../src/scss/modules/video-carousel-list-row.scss'),\n },\n\n {\n name: 'video-carousel-list-card',\n \n styles: () => import('../../src/scss/modules/video-carousel-list-card.scss'),\n },\n\n {\n name: 'quiz-row',\n loader: () => import('./modules/quiz-row'),\n styles: () => import('../../src/scss/modules/quiz-row.scss'),\n },\n\n {\n name: 'ventilation-calculator',\n loader: () => import('./modules/ventilation-calculator'),\n styles: () => import('../../src/scss/modules/ventilation-calculator.scss'),\n },\n\n {\n name: 'parts-of-roof',\n \n styles: () => import('../../src/scss/modules/parts-of-roof.scss'),\n },\n\n {\n name: 'product-benefits-row',\n \n styles: () => import('../../src/scss/modules/product-benefits-row.scss'),\n },\n\n {\n name: 'magento-promo-row-one',\n \n styles: () => import('../../src/scss/modules/magento-promo-row-one.scss'),\n },\n\n {\n name: 'virtual-home-remodeler-row',\n \n styles: () => import('../../src/scss/modules/virtual-home-remodeler-row.scss'),\n },\n\n {\n name: 'magento-promo-row-two',\n \n styles: () => import('../../src/scss/modules/magento-promo-row-two.scss'),\n },\n\n {\n name: 'shingle-specifications-table',\n \n styles: () => import('../../src/scss/modules/shingle-specifications-table.scss'),\n },\n\n {\n name: 'review-embed',\n \n styles: () => import('../../src/scss/modules/review-embed.scss'),\n },\n\n {\n name: 'product-feature-warranty-row',\n \n styles: () => import('../../src/scss/modules/product-feature-warranty-row.scss'),\n },\n\n {\n name: 'blog-content-container',\n \n styles: () => import('../../src/scss/modules/blog-content-container.scss'),\n },\n\n {\n name: 'tag-row',\n \n styles: () => import('../../src/scss/modules/tag-row.scss'),\n },\n\n {\n name: 'author-feature-row',\n \n styles: () => import('../../src/scss/modules/author-feature-row.scss'),\n },\n\n {\n name: 'related-article-row',\n \n styles: () => import('../../src/scss/modules/related-article-row.scss'),\n },\n\n {\n name: 'document-product-row',\n \n styles: () => import('../../src/scss/modules/document-product-row.scss'),\n },\n\n {\n name: 'installation-steps-row',\n loader: () => import('./modules/installation-steps-row'),\n styles: () => import('../../src/scss/modules/installation-steps-row.scss'),\n },\n\n {\n name: 'faq-component-row',\n \n styles: () => import('../../src/scss/modules/faq-component-row.scss'),\n },\n\n {\n name: 'related-components-and-accessories-row',\n \n styles: () => import('../../src/scss/modules/related-components-and-accessories-row.scss'),\n },\n\n {\n name: 'related-product-row',\n \n styles: () => import('../../src/scss/modules/related-product-row.scss'),\n },\n\n {\n name: 'category-selection-bar',\n loader: () => import('./modules/category-selection-bar'),\n \n },\n\n {\n name: 'chairmans-circle-row',\n \n styles: () => import('../../src/scss/modules/chairmans-circle-row.scss'),\n },\n\n {\n name: 'related-profiles-row',\n \n styles: () => import('../../src/scss/modules/related-profiles-row.scss'),\n },\n\n {\n name: 'blog-category-masthead',\n loader: () => import('./modules/blog-category-masthead'),\n \n },\n\n {\n name: 'featured-blog-listing',\n loader: () => import('./modules/featured-blog-listing'),\n styles: () => import('../../src/scss/modules/featured-blog-listing.scss'),\n },\n\n {\n name: 'product-iframe-row',\n loader: () => import('./modules/product-iframe-row'),\n styles: () => import('../../src/scss/modules/product-iframe-row.scss'),\n },\n\n {\n name: 'shingle-comparison-table',\n loader: () => import('./modules/shingle-comparison-table'),\n styles: () => import('../../src/scss/modules/shingle-comparison-table.scss'),\n },\n\n {\n name: 'campaign-form-container',\n \n styles: () => import('../../src/scss/modules/campaign-form-container.scss'),\n },\n\n {\n name: 'section-navigation',\n loader: () => import('./modules/section-navigation'),\n \n },\n\n {\n name: 'image-carousel-card',\n \n styles: () => import('../../src/scss/modules/image-carousel-card.scss'),\n },\n\n {\n name: 'image-carousel-row',\n loader: () => import('./modules/image-carousel-row'),\n styles: () => import('../../src/scss/modules/image-carousel-row.scss'),\n },\n\n {\n name: 'skip-to-main-content',\n loader: () => import('./modules/skip-to-main-content')\n }\n];\n\nexport default [...modulesScaffold];\n","import type { Organism } from '@verndale/core';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst reactModule = (Component: any, nodeList: NodeListOf) => {\n return nodeList.forEach(node =>\n createRoot(node).render()\n );\n};\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/*\n\nSAMPLE MODULE ENTRY USING REACT\n\n{\n name: 'accordion',\n loader: () => import('./modules/accordion.js'),\n styles: () => import('../scss/modules/accordion.scss'),\n render: reactModule\n}\n\n*/\n\nconst modulesReact: Organism[] = [\n {\n name: 'contractor-request-a-quote-form',\n loader: () =>\n import('./coveo/modules/contractor-request-a-quote-form/index'),\n render: reactModule\n },\n {\n name: 'press-release-listing',\n loader: () => import('./react-components/press-release-listing/index.js'),\n styles: () => import('../scss/modules/press-release-listing.scss'),\n render: reactModule\n },\n {\n name: 'error-message',\n loader: () => import('./react-components/listing-states/error'),\n styles: () => import('../scss/components/_error-message.scss'),\n render: reactModule\n },\n {\n name: 'loader',\n loader: () => import('./react-components/listing-states/loader'),\n styles: () => import('../scss/components/_loader.scss'),\n render: reactModule\n },\n {\n name: 'city-directory-listing',\n loader: () => import('./react-components/city-directory-listing/index'),\n styles: () => import('../scss/modules/city-directory-listing.scss'),\n render: reactModule\n },\n {\n name: 'project-listing',\n loader: () => import('./coveo/modules/project-listing'),\n styles: () => import('../scss/modules/project-listing.scss'),\n render: reactModule\n },\n {\n name: 'contractor-listing',\n loader: () => import('./coveo/modules/contractor-listing'),\n styles: () => import('../scss/modules/contractor-listing.scss'),\n render: reactModule\n },\n {\n name: 'city-listing',\n loader: () => import('./coveo/modules/city-listing'),\n styles: () => import('../scss/modules/contractor-listing.scss'),\n render: reactModule\n },\n {\n name: 'territory-manager-lookup',\n loader: () => import('./react-components/territory-manager-lookup'),\n styles: () => import('../scss/modules/territory-manager-lookup.scss'),\n render: reactModule\n },\n {\n name: 'predictive-search',\n loader: () => import('./coveo/components/predictive-search'),\n render: reactModule\n },\n {\n name: 'mockApi',\n loader: () => import('./react-components/mockApi'),\n render: reactModule\n },\n {\n name: 'document-listing',\n loader: () => import('./react-components/document-listing'),\n styles: () => import('../scss/modules/document-listing.scss'),\n render: reactModule\n },\n {\n name: 'document-cart',\n loader: () => import('./react-components/document-cart'),\n styles: () => import('../scss/modules/document-cart.scss'),\n render: reactModule\n },\n {\n name: 'distributor-locator',\n loader: () => import('../scripts/react-components/distributor-locator'),\n styles: () => import('../scss/modules/distributor-locator.scss'),\n render: reactModule\n },\n {\n name: 'masthead-zip-form',\n loader: () =>\n import('./react-components/contractor-locator-listing/masthead-zip-form'),\n render: reactModule\n },\n {\n name: 'territory-manager-listing',\n loader: () => import('./react-components/territory-manager-listing'),\n styles: () => import('../scss/modules/territory-manager-listing.scss'),\n render: reactModule\n },\n {\n name: 'request-a-quote-modal',\n loader: () => import('./coveo/components/request-a-quote-modal/index'),\n styles: () => import('../scss/components/_request-a-quote-modal.scss'),\n render: reactModule\n },\n {\n name: 'search-results-listing',\n loader: () => import('./coveo/modules/search-results-listing'),\n styles: () => import('../scss/modules/search-results-listing.scss'),\n render: reactModule\n },\n\n {\n name: 'documents-listing',\n loader: () => import('./coveo/modules/documents-listing'),\n styles: () => import('../../src/scss/modules/documents-listing.scss'),\n render: reactModule\n },\n {\n name: 'user-review-landing-thank-you',\n loader: () =>\n import('./react-components/user-review-landing/step-5-thank-you'),\n styles: () =>\n import('../../src/scss/modules/user-review-landing-thank-you.scss'),\n render: reactModule\n },\n\n {\n name: 'user-review-landing-redirect-to-google-review',\n loader: () =>\n import(\n './react-components/user-review-landing/step-4-redirect-to-google-review'\n ),\n styles: () =>\n import(\n '../../src/scss/modules/user-review-landing-redirect-to-google-review.scss'\n ),\n render: reactModule\n },\n\n {\n name: 'standalone-searchbox',\n loader: () => import('./coveo/modules/standalone-searchbox'),\n render: reactModule\n },\n\n {\n name: 'quiz-results',\n loader: () => import('./react-components/quiz-results'),\n styles: () => import('../scss/modules/quiz-results.scss'),\n render: reactModule\n },\n {\n name: 'user-review-landing',\n loader: () => import('./react-components/user-review-landing'),\n styles: () => import('../scss/modules/user-review-landing.scss'),\n render: reactModule\n },\n {\n name: 'quiz-form',\n loader: () => import('./react-components/quiz-form'),\n styles: () => import('../scss/modules/quiz-form.scss'),\n render: reactModule\n },\n {\n name: 'blog-listing',\n loader: () => import('./react-components/blog-listing'),\n styles: () => import('../scss/modules/blog-listing.scss'),\n render: reactModule\n },\n {\n name: 'product-masthead',\n loader: () => import('./react-components/product-masthead'),\n render: reactModule\n },\n {\n name: 'shingle-detail-masthead',\n loader: () => import('./react-components/shingle-detail-masthead'),\n render: reactModule\n },\n {\n name: 'product-listing',\n loader: () => import('./coveo/modules/product-listing'),\n styles: () => import('../scss/modules/product-listing.scss'),\n render: reactModule\n },\n {\n name: 'shingle-result-listing',\n loader: () => import('./coveo/modules/shingle-result-listing'),\n styles: () => import('../scss/modules/shingle-result-listing.scss'),\n render: reactModule\n },\n {\n name: 'shingle-comparison-app',\n loader: () => import('./react-components/shingle-comparison-app'),\n styles: () => import('../scss/modules/shingle-comparison-table.scss'),\n render: reactModule\n }\n];\n\nexport default [...modulesReact];\n","import type { Organism } from '@verndale/core';\nimport scaffoldedModules from './modules-scaffold';\nimport modulesReact from './modules-react';\n\nconst modules: Organism[] = [\n {\n name: 'figure',\n loader: () => import('./modules/figure.js')\n },\n {\n name: 'rating-stars',\n loader: () => import('./modules/rating-stars.js'),\n styles: () => import('../../src/scss/components/_rating-stars.scss')\n },\n {\n name: 'disclaimer',\n styles: () => import('../../src/scss/modules/disclaimer.scss')\n },\n {\n name: 'comparison-card',\n styles: () => import('../../src/scss/modules/comparison-card.scss')\n },\n {\n name: 'comparison-table-row',\n loader: () => import('./modules/comparison-table-row'),\n styles: () => import('../../src/scss/modules/comparison-table-row.scss')\n },\n {\n name: 'product-feature-warranty-row',\n styles: () =>\n import('../../src/scss/modules/product-feature-warranty-row.scss')\n },\n {\n name: 'document-product-card',\n loader: () => import('./modules/document-product-card'),\n styles: () =>\n import('../../src/scss/components/_document-product-card.scss')\n },\n {\n name: 'warranty-modal',\n loader: () => import('./modules/warranty-modal'),\n styles: () => import('../../src/scss/components/_warranty-modal.scss')\n }\n];\n\nexport default [...modules, ...scaffoldedModules, ...modulesReact];\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useEffect, useMemo, useRef } from 'react';\nexport type Args = any[];\n\nexport const debounce = (callback: any, wait: number) => {\n let timerId: any;\n return (...args: Args) => {\n clearTimeout(timerId);\n timerId = setTimeout(() => {\n callback(...args);\n }, wait);\n };\n};\n\nexport const useDebounce = (callback: () => void, waitTime: number) => {\n const ref = useRef<() => void>();\n\n useEffect(() => {\n ref.current = callback;\n }, [callback]);\n\n const debouncedCallback = useMemo(() => {\n const func = () => {\n ref.current?.();\n };\n\n return debounce(func, waitTime);\n }, []);\n\n return debouncedCallback;\n};\n\n/* eslint-enable @typescript-eslint/no-explicit-any */\n","import { Component } from '@verndale/core';\nimport { debounce } from '../helpers/debounce';\n\nclass Rtf extends Component {\n private containers: NodeListOf;\n\n constructor(el: HTMLElement) {\n super(el);\n this.containers = this.el.querySelectorAll('.table');\n\n this.addContainer();\n }\n\n setupDefaults() {\n this.dom = {\n tables: this.el.querySelectorAll('table')\n };\n }\n\n addContainer() {\n (this.dom.tables as NodeListOf).forEach(table => {\n if (table.closest('.table')) return;\n\n const container = document.createElement('div');\n container.classList.add('table');\n table.parentNode?.insertBefore(container, table);\n container.appendChild(table);\n\n this.isOverflowing(container);\n });\n\n this.containers = this.el.querySelectorAll('.table');\n\n window.addEventListener(\n 'resize',\n debounce(this.handleResize.bind(this), 250)\n );\n }\n\n isOverflowing(element: HTMLElement) {\n if (element.scrollWidth > element.clientWidth) {\n element.classList.add('table--overflowing');\n } else {\n element.classList.remove('table--overflowing');\n }\n }\n\n handleResize() {\n (this.containers as NodeListOf).forEach(container => {\n this.isOverflowing(container);\n });\n }\n}\n\nexport default Rtf;\n","// /**\n// * FOCUSABLE ELEMENTS\n\nimport { DataLayerObject } from '..';\nimport { ExtendedWindowType } from '../coveo/engine';\nimport { Document } from '../react-components/document-listing/response';\n\n// */\nexport const focusableElements = [\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])',\n 'a[href]',\n 'area[href]',\n 'button:not([disabled]):not([aria-hidden])',\n 'embed',\n 'iframe',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'object',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])'\n];\n\nexport const createDataLayerString = (\n data: DataLayerObject | DataLayerObject[]\n) => {\n return JSON.stringify(data);\n};\n\n/* email click */\n\nexport const emailClick = (event: Event) => {\n const target = event.target as HTMLAnchorElement;\n const href = target?.href;\n\n if (href && href.includes('mailto:')) {\n const global = window as ExtendedWindowType;\n\n global.dataLayer?.push({\n event: 'email_contact_click',\n event_category: 'contact'\n });\n }\n};\n\n/* phone click */\n\nexport const phoneClick = (event: Event) => {\n const target = event.target as HTMLAnchorElement;\n const href = target?.href;\n\n if (href && href.includes('tel:')) {\n const global = window as ExtendedWindowType;\n\n global.dataLayer?.push({\n event: 'phone_contact_click',\n event_category: 'contact'\n });\n }\n};\n\n/* detect scroll thresholds */\n\nexport const detectScrollThresholds = () => {\n const thresholds = [10, 25, 50, 75, 90]; // Threshold percentages\n const thresholdReached: {\n [key: number]: boolean;\n } = {}; // To keep track of threshold crossing\n\n window.addEventListener('scroll', () => {\n const windowHeight = window.innerHeight;\n const documentHeight = document.documentElement.scrollHeight;\n const scrollPercentage =\n (window.scrollY / (documentHeight - windowHeight)) * 100;\n\n thresholds.forEach(threshold => {\n if (scrollPercentage >= threshold && !thresholdReached[threshold]) {\n thresholdReached[threshold] = true;\n\n const width = window.innerWidth;\n const global = window as ExtendedWindowType;\n\n global.dataLayer?.push({\n event: 'page_scroll',\n event_attributes: {\n percent_scrolled: threshold,\n browser_width: width\n }\n });\n }\n });\n });\n};\n\n/* detect section is visible */\n\nexport const detectSectionIsVisible = (\n onVisible: (e: IntersectionObserverEntry) => void,\n selector: string,\n onNotVisible?: () => void\n) => {\n const detectVisibleSections = (entries: IntersectionObserverEntry[]) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n onVisible(entry);\n } else if (onNotVisible) {\n onNotVisible();\n }\n });\n };\n\n const observer = new IntersectionObserver(detectVisibleSections);\n const sections = document.querySelectorAll(selector);\n sections.forEach(section => {\n observer.observe(section);\n });\n};\n\n// one time section visible observer\n\nexport const oneTimeVisibleLayerPush = (\n element: HTMLElement,\n data: DataLayerObject\n) => {\n const handleIntersection = (\n entries: IntersectionObserverEntry[],\n observer: IntersectionObserver\n ) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n // Element is now visible\n const global = window as ExtendedWindowType;\n global.dataLayer?.push(data);\n\n // Unobserve the element to stop further tracking\n observer.unobserve(entry.target);\n }\n });\n };\n\n // Create an Intersection Observer\n const observer = new IntersectionObserver(handleIntersection);\n\n // Start observing the element\n observer.observe(element);\n\n return observer;\n};\n\n//remove special characters from string but keep spaces\n\nexport const removeSpecialCharacters = (str: string) => {\n return str.replace(/[^a-zA-Z0-9 ]/g, '');\n};\n\n//make super script html tags\n\nexport const makeSuperScript = (text: string) => {\n if (text) {\n const superScript = ['®', '™', '©', '℠', '¹', '²', '³'];\n const codeTrademark = [\n '®',\n '™',\n '©',\n '℠',\n '¹',\n '²',\n '³'\n ];\n\n codeTrademark.forEach((code, index) => {\n text = text.replace(new RegExp(code, 'g'), superScript[index]);\n });\n if (superScript.some(sup => text.includes(sup))) {\n const superScriptRegex = /®|™|©|℠|¹|²|³<\\/sup>/g;\n text = text.replace(superScriptRegex, match =>\n match.replace(/<\\/?sup>/g, '')\n );\n return text.replace(/®|™|©|℠|¹|²|³/g, match => `${match}`);\n }\n return text;\n }\n return '';\n};\n\n// get a document following GAF priority\nexport const getDocumentPriority = (documents: Document[]) => {\n const priorityDocument =\n documents.find(document => document.extension === 'PDF') ||\n documents.find(document => document.extension === 'DOC') ||\n documents.find(document => document.extension === 'DWG') ||\n documents.find(document => document.extension === 'RVT');\n return priorityDocument ? priorityDocument.url : '';\n};\n\nexport const getExtensionPriority = (documents: Document[]) => {\n const priorityDocument =\n documents.find(document => document.extension === 'PDF') ||\n documents.find(document => document.extension === 'DOC') ||\n documents.find(document => document.extension === 'DWG') ||\n documents.find(document => document.extension === 'RVT');\n return priorityDocument ? priorityDocument.extension : '';\n};\n//decode HTML entities\nexport const decodeHtmlEntities = (encodedString: string) => {\n const elem = document.createElement('div');\n elem.innerHTML = encodedString;\n return elem.textContent;\n};\n\nexport const isInDialog = (modal: HTMLDialogElement, event: MouseEvent) => {\n const rect = modal?.getBoundingClientRect();\n if (rect) {\n return (\n rect.top <= event.clientY &&\n event.clientY <= rect.top + rect.height &&\n rect.left <= event.clientX &&\n event.clientX <= rect.left + rect.width\n );\n }\n\n return false;\n};\n","import SecureLS from 'secure-ls';\nexport const secureStorage = new SecureLS({ encodingType: 'aes' });\n\nexport const USER_PROFILE_KEYS = Object.freeze({\n userName: 'userName',\n userLastName: 'userLastName',\n userEmail: 'userEmail',\n userPhone: 'userPhone',\n userMessage: 'userMessage'\n});\n\nexport type UserProfileType = {\n userName?: string;\n userLastName?: string;\n userEmail?: string;\n userPhone?: string;\n userMessage?: string;\n};\n\nexport const USER_PERSONALIZATION_KEY = 'gaf_persona';\nexport const USER_PROFILE_OBJECT_KEY = 'userProfile';\nexport const COMPARE_TRAY_KEY = 'gaf_compare_tray';\nexport const USER_PROFILE_EXPIRATION_KEY = 'userProfileExpiration';\nexport const USER_PROFILE_EXPIRATION_TIME = 1000 * 60 * 60 * 24 * 30; // 30 days\n\nexport const USER_PROFILE_FIELDS = Array.from(Object.values(USER_PROFILE_KEYS));\n\nexport const getUserProfile = () => {\n const userProfile = secureStorage.get(USER_PROFILE_OBJECT_KEY);\n return userProfile ? JSON.parse(userProfile) : {};\n};\n\nexport const updateUserProfile = (properties: Partial) => {\n let newUserProfile: UserProfileType | null = null;\n const userProfile = getUserProfile();\n\n if (userProfile) {\n newUserProfile = {\n ...userProfile,\n ...properties\n };\n } else {\n newUserProfile = {\n ...properties\n };\n }\n\n const now = new Date();\n const time = now.getTime() + USER_PROFILE_EXPIRATION_TIME;\n\n secureStorage.set(USER_PROFILE_EXPIRATION_KEY, time.toString());\n\n secureStorage.set(USER_PROFILE_OBJECT_KEY, JSON.stringify(newUserProfile));\n};\n\nexport const COOKIE_NAMES = Object.freeze({\n geolocation: 'geolocation',\n persona: 'gaf_persona'\n});\n\nexport type GeolocationType = {\n country: string;\n zip: string;\n latitude?: number;\n longitude?: number;\n address?: string;\n city?: string;\n state?: string;\n street?: string;\n secondStreet?: string;\n};\n\nexport const GEOLOCATION_EXPIRATION_KEY = 'geolocationExpiration';\nexport const GEOLOCATION_EXPIRATION_TIME = 1000 * 60 * 60 * 24 * 30; // 30 days\n","import SecureLS from 'secure-ls';\n\nimport {\n COOKIE_NAMES,\n GEOLOCATION_EXPIRATION_KEY,\n GEOLOCATION_EXPIRATION_TIME,\n GeolocationType\n} from './global-storage';\nimport { ExtendedWindowType } from '..';\nimport { MaxmindErrorResponse, MaxmindResponse } from './maxmindResponseTypes';\n\nexport const secureStorage = new SecureLS({ encodingType: 'aes' });\n\nconst MAPS_API_KEY =\n (document.querySelector('[data-api]') as HTMLElement)?.dataset?.api ||\n 'AIzaSyBiAlQV0Vq0CdAR6on522xLjaMF8iroYPU';\n\n//Check if there is a location in local storage or cookies\nexport const getStoredGeolocationData = () => {\n let locationData: GeolocationType | null = null;\n\n const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n if (fromLocalStorage) {\n locationData = JSON.parse(fromLocalStorage);\n }\n\n return locationData;\n};\n\n//same as getStoredGeolocationData but returns country and zip only\nexport const getStoredGeolocationCountryAndZip = () => {\n let locationData: GeolocationType | null = null;\n\n const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n if (fromLocalStorage) {\n locationData = JSON.parse(fromLocalStorage);\n }\n return locationData;\n};\n\n//Get address from geolocation stored in local storage or cookies\n\nexport const getAddressFromGeolocation = () => {\n let address: string | null = null;\n const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n if (fromLocalStorage) {\n const geolocationObj = JSON.parse(fromLocalStorage) as GeolocationType;\n if (geolocationObj.address) address = geolocationObj.address;\n }\n\n return address;\n};\n\n//Get the location data from the lat long using google maps api\n\nexport const getLocationDataFromLatLong = async (\n latitude: number,\n longitude: number\n) => {\n const response = await window.fetch(\n `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${MAPS_API_KEY}`\n );\n\n const dataLatLong = await response.json();\n\n const zipFromData = dataLatLong.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('postal_code')\n );\n const countryFromData = dataLatLong.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('country')\n );\n\n if (!zipFromData) {\n return {\n zip: undefined,\n country: undefined\n };\n }\n\n if (zipFromData.short_name && countryFromData.short_name) {\n return {\n zip: zipFromData.short_name,\n country: countryFromData.short_name\n };\n } else {\n return {\n zip: undefined,\n country: undefined\n };\n }\n};\n\n//Get the location data from the address using google maps api\n\nexport const getLocationDataFromAddress = async (address: string) => {\n const response = await window.fetch(\n `https://maps.googleapis.com/maps/api/geocode/json?address=${address}&key=${MAPS_API_KEY}`\n );\n\n const dataLocation = await response.json();\n\n const zipFromData = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('postal_code')\n );\n const countryFromData = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('country')\n );\n const latitude = dataLocation.results[0].geometry.location.lat;\n const longitude = dataLocation.results[0].geometry.location.lng;\n\n const city = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('locality')\n );\n const street = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('route')\n );\n\n const secondStreet = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('subpremise')\n );\n const state = dataLocation.results[0].address_components.find(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (component: any) => component.types.includes('administrative_area_level_1')\n );\n\n if (zipFromData.short_name && countryFromData.short_name) {\n return {\n zip: zipFromData?.short_name,\n country: countryFromData?.short_name,\n latitude,\n longitude,\n city: city?.long_name,\n street: street?.long_name,\n secondStreet: secondStreet?.long_name,\n state: state?.long_name\n };\n } else {\n return {\n zip: undefined,\n country: undefined,\n latitude: undefined,\n longitude: undefined,\n city: undefined,\n street: undefined,\n state: undefined,\n secondStreet: undefined\n };\n }\n};\n\n//Get lat long from the browser\nexport const getBrowserGeolocationData = async () => {\n try {\n const data = await new Promise((resolve, reject) => {\n let timeoutId: NodeJS.Timeout | null = null;\n\n const successCallback = (position: GeolocationPosition) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n const { latitude, longitude } = position.coords;\n resolve({ latitude, longitude });\n };\n\n const errorCallback = (error: GeolocationPositionError) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n reject(error);\n };\n\n navigator.geolocation.getCurrentPosition(successCallback, errorCallback);\n timeoutId = setTimeout(() => {\n reject(new Error('Geolocation permission timeout'));\n }, 5000);\n });\n\n if (data) {\n return data as {\n latitude: number;\n longitude: number;\n };\n } else {\n return null;\n }\n } catch (error) {\n console.error('Error:', error);\n return null;\n }\n\n return null;\n};\n\n//get location data from the browser and google maps api\n\nexport const getGeolocationDataFromBrowserAndGoogle = async () => {\n try {\n const browserData = await getBrowserGeolocationData();\n\n if (browserData) {\n const { latitude, longitude } = browserData as {\n latitude: number;\n longitude: number;\n };\n\n const locationData = await getLocationDataFromLatLong(\n latitude,\n longitude\n );\n\n if (locationData.zip && locationData.country) {\n const geolocationData: GeolocationType = {\n address: '',\n latitude,\n longitude,\n zip: locationData.zip,\n country: locationData.country\n };\n\n updateGeolocationDataProperties(geolocationData);\n\n return geolocationData;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n return null;\n};\n\n//Get the latitude and longitude from the zip code using google maps api\n\nexport const getLatLongFromZip = async (zip: string, country: string) => {\n let countryCode = country;\n\n if (country.length === 3) {\n countryCode = country.slice(0, -1);\n }\n\n const response = await window.fetch(\n `https://maps.googleapis.com/maps/api/geocode/json?key=${MAPS_API_KEY}&components=postal_code:${zip}|country:${countryCode}`\n );\n\n const data = await response.json();\n\n if (data.status === 'OK') {\n const { lat, lng } = data.results[0].geometry.location;\n const formattedAddress = data.results[0].formatted_address;\n\n return {\n latitude: lat,\n longitude: lng,\n address: formattedAddress\n };\n }\n\n window.dispatchEvent(new Event(INVALID_GOOGLE_ZIP_EVENT));\n return {\n latitude: undefined,\n longitude: undefined,\n address: undefined\n };\n};\n\n//Get the location from the ip address using maxmind geoip2\n\nexport const getLocationByIpAddress = async () => {\n let result = null;\n\n try {\n const newData = await new Promise((resolve, reject) => {\n const global = window as ExtendedWindowType;\n\n if (global.geoip2 && global.geoip2.city) {\n global.geoip2.city(\n (data: MaxmindResponse) => {\n const { latitude, longitude } = data.location;\n const zip = data.postal.code;\n const country = data.country.iso_code;\n\n if (zip && country && latitude && longitude) {\n const locationData: GeolocationType = {\n address: '',\n latitude,\n longitude,\n zip,\n country: country.toLowerCase()\n };\n\n updateGeolocationDataProperties(locationData);\n\n resolve(locationData);\n } else {\n reject(`Missing parameters`);\n }\n },\n (error: MaxmindErrorResponse) => {\n reject(`Error Code: ${error.code}, ${error.error}`);\n }\n );\n } else {\n reject(`geoip2.city is not available`);\n }\n });\n\n result = newData as GeolocationType;\n } catch (error) {\n console.error(error);\n }\n\n return result;\n};\n\n//get postal code and country code from url\n\nexport const getZipAndCountryFromUrl = () => {\n const url = new URL(window.location.href);\n const zip =\n url.searchParams.get('postalCode') || url.searchParams.get('PostalCode');\n const country =\n url.searchParams.get('countryCode') || url.searchParams.get('CountryCode');\n\n if (zip && country) {\n return {\n zip,\n country: country.toLowerCase()\n };\n }\n\n return null;\n};\n\n//get postal code and country code from url and get lat long from google\n\nexport const INVALID_GOOGLE_ZIP_EVENT = 'invalid-google-zip';\n\nexport const getGeolocationDataFromUrlAndGoogle = async () => {\n const data = getZipAndCountryFromUrl();\n\n if (data && data.zip && data.country) {\n const { latitude, longitude } = await getLatLongFromZip(\n data.zip,\n data.country\n );\n\n if (latitude && longitude) {\n const locationData: GeolocationType = {\n latitude,\n longitude,\n zip: data.zip,\n country: data.country\n };\n\n return locationData;\n } else {\n setTimeout(() => {\n window.dispatchEvent(new Event(INVALID_GOOGLE_ZIP_EVENT));\n }, 500);\n\n return {\n latitude: undefined,\n longitude: undefined,\n zip: data.zip,\n country: data.country\n };\n }\n }\n\n return null;\n};\n\nexport const COUNTRY_VALUES = ['us', 'ca', 'usa', 'can'];\n\n//update a property in the geolocation object\n\nexport const updateGeolocationDataProperty = (key: string, value: string) => {\n let newGeolocationData: GeolocationType | null = null;\n const geolocationData = getStoredGeolocationData();\n\n if (geolocationData) {\n newGeolocationData = {\n ...geolocationData,\n [key]: value\n };\n } else {\n newGeolocationData = {\n country: '',\n zip: '',\n [key]: value\n } as GeolocationType;\n }\n\n secureStorage.set(\n COOKIE_NAMES.geolocation,\n JSON.stringify(newGeolocationData)\n );\n};\n\n//update multiple properties in the geolocation object\n\nexport const updateGeolocationDataProperties = (\n properties: Partial\n) => {\n let newGeolocationData: GeolocationType | null = null;\n\n newGeolocationData = {\n ...properties\n } as GeolocationType;\n\n const now = new Date();\n const time = now.getTime() + GEOLOCATION_EXPIRATION_TIME;\n\n secureStorage.set(GEOLOCATION_EXPIRATION_KEY, time.toString());\n\n secureStorage.set(\n COOKIE_NAMES.geolocation,\n JSON.stringify(newGeolocationData)\n );\n};\n","import { Result } from '@coveo/headless';\nimport { secureStorage } from '../../helpers/global-storage';\n\nexport const QUIZ_ANSWER_NAMES = {\n contractor: 'contractorAnswers',\n costEstimates: 'costEstimateAnswers',\n shingle: 'shingleAnswers'\n};\n\nexport const QUIZ_RESULT_NAMES = {\n contractor: 'contractorResults',\n costEstimates: 'costEstimateResults',\n shingle: 'shingleResults'\n};\n\nexport type contractorAnswersType = {\n zipCode: string;\n countryCode: string;\n};\n\nexport const CONCTRACTOR_FIELD_NAMES = Object.freeze({\n zipCode: 'userZipCode',\n countryCode: 'userCountryCode'\n});\n\nexport type costEstimateAnswersType = {\n zip: string;\n homeSquareFootage: number;\n numberOfStories: number;\n garageValue: number;\n roofSlopeValue: number;\n roofComplexityValue: number;\n};\n\nexport const COST_ESTIMATE_FIELD_NAMES = Object.freeze({\n zip: 'userZipCode',\n country: 'userCountryCode',\n homeSquareFootage: 'homeSquareFootage',\n numberOfStories: 'numberOfStories',\n garageValue: 'garageValue',\n roofSlopeValue: 'roofSlopeValue',\n roofComplexityValue: 'roofComplexityValue',\n chosenContractor: 'chosenContractor',\n estimateUpper: 'estimateupper',\n estimateAverage: 'estimateavg',\n estimateLower: 'estimatelower',\n city: 'userCity',\n state: 'userState',\n street: 'userStreet',\n secondStreet: 'userStreet2'\n});\n\nexport type shingleAnswersType = {\n userZipCode: string;\n shingleFeatures: string[];\n shingleFeatureValues: string[];\n};\n\nexport const SHINGLE_FIELD_NAMES = Object.freeze({\n zipCode: 'userZipCode',\n shingleFeatures: 'shingleFeatures'\n});\n\nexport type contractorResultsType = {\n zipCode: string;\n latitude: number;\n longitude: number;\n results: Result[];\n expirationDate: number;\n};\n\nexport type costEstimateResultsType = {\n lowestCost: number;\n averageCost: number;\n highestCost: number;\n expirationDate: number;\n};\n\ntype resultWithChildrenType = Result & { childResults?: Result[] };\n\nexport type shingleResultsType = {\n results: resultWithChildrenType[];\n expirationDate: number;\n};\n\nexport const getSummaryAnswers = () => {\n const contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n const costEstimateAnswers = secureStorage.get(\n QUIZ_ANSWER_NAMES.costEstimates\n );\n const shingleAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.shingle);\n\n return {\n contractorAnswers: contractorAnswers\n ? (JSON.parse(contractorAnswers) as contractorAnswersType)\n : undefined,\n costEstimateAnswers: costEstimateAnswers\n ? (JSON.parse(costEstimateAnswers) as costEstimateAnswersType)\n : undefined,\n shingleAnswers: shingleAnswers\n ? (JSON.parse(shingleAnswers) as shingleAnswersType)\n : undefined\n };\n};\n\nexport const getSummaryResults = () => {\n const contractorResults = secureStorage.get(QUIZ_RESULT_NAMES.contractor);\n const costEstimateResults = secureStorage.get(\n QUIZ_RESULT_NAMES.costEstimates\n );\n const shingleResults = secureStorage.get(QUIZ_RESULT_NAMES.shingle);\n\n return {\n contractorResults: contractorResults\n ? (JSON.parse(contractorResults) as contractorResultsType)\n : undefined,\n costEstimateResults: costEstimateResults\n ? (JSON.parse(costEstimateResults) as costEstimateResultsType)\n : undefined,\n shingleResults: shingleResults\n ? (JSON.parse(shingleResults) as shingleResultsType)\n : undefined\n };\n};\n\nexport const getContractorAnswers = () => {\n let contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n if (!contractorAnswers) {\n contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n }\n\n return contractorAnswers\n ? (JSON.parse(contractorAnswers) as contractorAnswersType)\n : undefined;\n};\n\nexport const getCostEstimateAnswers = () => {\n const costEstimateAnswers = secureStorage.get(\n QUIZ_ANSWER_NAMES.costEstimates\n );\n\n return costEstimateAnswers\n ? (JSON.parse(costEstimateAnswers) as costEstimateAnswersType)\n : undefined;\n};\n\nexport const getShingleAnswers = () => {\n const shingleAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.shingle);\n\n return shingleAnswers\n ? (JSON.parse(shingleAnswers) as shingleAnswersType)\n : undefined;\n};\n\nexport const getContractorResults = () => {\n const results = secureStorage.get(QUIZ_RESULT_NAMES.contractor);\n return results ? (JSON.parse(results) as contractorResultsType) : undefined;\n};\n\nexport const getCostEstimateResults = () => {\n const results = secureStorage.get(QUIZ_RESULT_NAMES.costEstimates);\n return results ? (JSON.parse(results) as costEstimateResultsType) : undefined;\n};\n\nexport const getShingleResults = () => {\n const results = secureStorage.get(QUIZ_RESULT_NAMES.shingle);\n return results ? (JSON.parse(results) as shingleResultsType) : undefined;\n};\n\nexport const calculateCostEstimateResults = (\n homeSquareFootage: number,\n numberOfStories: number,\n garageValue: number,\n roofSlopeValue: number,\n roofComplexityValue: number,\n territoryPricePerSquareInUSD: number,\n edgesPercentage: number\n) => {\n const average = (\n (homeSquareFootage / numberOfStories / 100) *\n (garageValue * roofSlopeValue * roofComplexityValue) *\n territoryPricePerSquareInUSD\n ).toFixed(0);\n\n const fixedAverage = Number(average);\n const fixedLowestCost = Number(\n (fixedAverage - (fixedAverage * edgesPercentage) / 100).toFixed(0)\n );\n const fixedHighestCost = Number(\n (fixedAverage + (fixedAverage * edgesPercentage) / 100).toFixed(0)\n );\n\n const results = {\n averageCost: fixedAverage,\n lowestCost: fixedLowestCost,\n highestCost: fixedHighestCost,\n expirationDate: new Date().getTime() + 1000 * 60 * 60 * 24 * 30 // 30 days\n };\n\n secureStorage.set(QUIZ_RESULT_NAMES.costEstimates, JSON.stringify(results));\n\n return results;\n};\n","import 'focus-visible';\nimport DOMPurify from 'dompurify';\nimport create from '@verndale/core';\nimport modules from './modules';\nimport Rtf from './modules/rtf';\nimport {\n emailClick,\n phoneClick,\n detectScrollThresholds,\n detectSectionIsVisible\n} from './helpers/helpers';\nimport {\n getStoredGeolocationData,\n getLocationByIpAddress,\n getGeolocationDataFromBrowserAndGoogle\n} from './helpers/geolocation';\nimport { MaxmindResponse } from './helpers/maxmindResponseTypes';\nimport Cookies from 'cookies-ts';\nimport {\n QUIZ_RESULT_NAMES,\n getSummaryResults\n} from './react-components/quiz-results/helpers';\nimport {\n secureStorage,\n USER_PERSONALIZATION_KEY\n} from './helpers/global-storage';\n\nexport type DataLayerObject = {\n event?: string;\n event_action?: string;\n event_category?: string;\n event_label?: string;\n event_attributes?: { [key: string]: string | null | undefined | number };\n event_group?: string;\n distributor_type?: string;\n distance_filter?: string;\n event_failure?: string;\n};\nexport type ExtendedWindowType = Window &\n typeof globalThis & {\n dataLayer: Array;\n geoip2: {\n city: (\n onSuccess: CallableFunction,\n onError: CallableFunction\n ) => MaxmindResponse;\n };\n linksToHome: HTMLAnchorElement[];\n Engage: { settings: { pointOfSale: string }; personalize: () => void };\n engage: engageType;\n };\n\ntype personalizeDataType = {\n channel: string;\n currency: string;\n pointOfSale: string;\n friendlyId: string;\n params: {\n person_type?: string;\n zipCode?: string;\n body?: object;\n };\n};\n\ntype navigationLinkType = { url: string; label: string; target: string };\n\ntype engageType = {\n personalize: (object: personalizeDataType) => {\n url?: string;\n cta?: { label: string; target: string; url: string };\n navigationLinks?: {\n url: string;\n label: string;\n target: string;\n navigationLinks?: navigationLinkType[];\n }[];\n codeRuleButton?: { label: string; target: string; url: string };\n html?: string;\n stormRuleButton?: { label: string; target: string; url: string };\n };\n};\n\nexport const initRtf = () => {\n const rtfs = document.querySelectorAll('.rtf');\n\n rtfs?.forEach(rtf => {\n new Rtf(rtf);\n });\n};\n\nexport const expireStorage = () => {\n const now = new Date();\n const userProfileExpiration = secureStorage.get('userProfileExpiration');\n const geolocationExpiration = secureStorage.get('geolocationExpiration');\n\n if (userProfileExpiration) {\n const userProfileExpirationDate = new Date(+userProfileExpiration);\n if (now > userProfileExpirationDate) {\n window.localStorage.removeItem('userProfile');\n window.localStorage.removeItem('userProfileExpiration');\n }\n }\n\n if (geolocationExpiration) {\n const geolocationExpirationDate = new Date(+geolocationExpiration);\n if (now > geolocationExpirationDate) {\n window.localStorage.removeItem('geolocation');\n window.localStorage.removeItem('geolocationExpiration');\n }\n }\n\n const quizzesResults = getSummaryResults();\n if (quizzesResults) {\n const { contractorResults, costEstimateResults, shingleResults } =\n quizzesResults;\n\n if (contractorResults?.expirationDate) {\n const contractorResultsExpirationDate = new Date(\n contractorResults.expirationDate\n );\n if (now > contractorResultsExpirationDate) {\n window.localStorage.removeItem(QUIZ_RESULT_NAMES.contractor);\n }\n }\n\n if (costEstimateResults?.expirationDate) {\n const costEstimateResultsExpirationDate = new Date(\n costEstimateResults.expirationDate\n );\n if (now > costEstimateResultsExpirationDate) {\n window.localStorage.removeItem(QUIZ_RESULT_NAMES.costEstimates);\n }\n }\n\n if (shingleResults?.expirationDate) {\n const shingleResultsExpirationDate = new Date(\n shingleResults.expirationDate\n );\n if (now > shingleResultsExpirationDate) {\n window.localStorage.removeItem(QUIZ_RESULT_NAMES.shingle);\n }\n }\n }\n};\n\nconst isStorybook = !!document.getElementById('storybook-root');\nconst body = document.querySelector('body') as HTMLBodyElement;\nconst _window = window as ExtendedWindowType;\n\nconst pushSection = (e: IntersectionObserverEntry) => {\n const info = (e.target as HTMLElement).dataset.layerVisible;\n if (info) {\n const infoObj = JSON.parse(info);\n const prevData = _window?.dataLayer?.find(\n obj =>\n (obj as { event_category: string; event_action: string })\n .event_category === infoObj.event_category &&\n (obj as { event_category: string; event_action: string })\n .event_action === infoObj.event_action\n );\n if (!prevData) {\n _window.dataLayer.push(infoObj);\n }\n }\n};\n\nconst setIphoneViewport = () => {\n if (navigator.userAgent.indexOf('iPhone') > -1) {\n document\n .querySelector('[name=viewport]')\n ?.setAttribute(\n 'content',\n 'width=device-width, initial-scale=1, maximum-scale=1'\n );\n }\n};\n\ndocument.addEventListener(\n 'DOMContentLoaded',\n async () => {\n if (!body.dataset.modulesLoaded || isStorybook) {\n expireStorage();\n create(modules).then(() => {\n body.dataset.modulesLoaded = 'true';\n setIphoneViewport();\n initRtf();\n window.addEventListener('click', e => pushDataLayer(e));\n detectScrollThresholds();\n detectSectionIsVisible(pushSection, '[data-layer-visible]');\n checkForPersona();\n });\n }\n },\n false\n);\n\nconst pushDataLayer = (e: Event) => {\n const dataset =\n ((e.target as HTMLElement)?.closest('[data-layer]') as HTMLElement)\n ?.dataset || (e.target as HTMLElement)?.dataset;\n if (dataset.layer) {\n const datasetLayers = JSON.parse(dataset.layer as string);\n datasetLayers?.forEach((layer: { event: string }) => {\n if (dataset.oneTime) {\n const prevData = _window?.dataLayer?.find(\n obj => (obj as { event: string }).event === layer.event\n );\n if (!prevData) {\n _window.dataLayer.push(layer);\n }\n } else {\n _window.dataLayer.push(layer);\n }\n });\n }\n\n phoneClick(e);\n emailClick(e);\n};\n\nexport const checkForPersona = () => {\n const interval = setInterval(checkForEngage, 1000);\n\n function checkForEngage() {\n if (_window.Engage) {\n const personalizeReadyEvent = new CustomEvent('personalizeReady', {});\n window.dispatchEvent(personalizeReadyEvent);\n clearInterval(interval);\n runFullStackExperience();\n }\n }\n};\n\nconst runFullStackExperience = async () => {\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n\n handleStormCodeRules();\n let redirect = false;\n let existingCookie = new Cookies().get(USER_PERSONALIZATION_KEY);\n\n const persona = document.querySelector('#persona') as HTMLDivElement;\n\n if (persona?.dataset?.personalize && !existingCookie) {\n existingCookie = persona?.dataset?.personalize;\n new Cookies().set(USER_PERSONALIZATION_KEY, existingCookie, {\n expires: 60 * 60 * 24 * 30\n });\n }\n\n const homePersona =\n (document.querySelector('#personalize-home') as HTMLDivElement)?.dataset\n .personalize || '';\n\n if (existingCookie) {\n if (homePersona === 'default') {\n redirect = true;\n } else {\n checkContractorCommercialRedirect(existingCookie);\n checkTerritoryManagerCommercial(existingCookie);\n checkDocumentLandingCommercial(existingCookie);\n productDetailContent(existingCookie);\n }\n }\n\n const linksToHome = Array.from(\n document.querySelectorAll('a[href=\"/\"]')\n );\n\n (personalizeLanguage?.languages as [])?.forEach((lang: string) => {\n const languageLinks = Array.from(\n document.querySelectorAll(`a[href=\"/${lang}/\"]`)\n );\n linksToHome.push(...languageLinks);\n });\n\n _window.linksToHome = linksToHome;\n\n if (personalizeMap?.homeUrl) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.homeUrl as string,\n // optional attributes:\n params: {\n person_type: existingCookie ? existingCookie : ''\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n if (response?.url) {\n if (!window.location.href.includes(response.url) && redirect) {\n window.location.href = response.url;\n } else {\n _window.linksToHome?.forEach(element =>\n element.setAttribute('href', response.url as string)\n );\n }\n }\n }\n};\n\nconst setPersonaLanguageMap = (persona = true) => {\n const personalizeMapElement = document.querySelector(\n '[data-persona-mapping]'\n ) as HTMLElement;\n\n let personalizeMap: { [key: string]: string } = {};\n\n let personalizeLanguage: { [key: string]: [] | '' } = {};\n\n if (personalizeMapElement) {\n if (personalizeMapElement.dataset.personaMapping) {\n personalizeMap = JSON.parse(\n personalizeMapElement.dataset.personaMapping as string\n );\n }\n if (personalizeMapElement.dataset.languageMapping) {\n personalizeLanguage = JSON.parse(\n personalizeMapElement.dataset.languageMapping as string\n );\n }\n }\n if (persona) {\n return personalizeMap;\n }\n\n return personalizeLanguage;\n};\n\nexport const handleChangePersona = async (persona: string) => {\n new Cookies().set(USER_PERSONALIZATION_KEY, persona, {\n expires: 60 * 60 * 24 * 30\n });\n\n const isHome =\n (document.querySelector('#personalize-home') as HTMLDivElement)?.dataset\n .personalize || '';\n\n const personalizeMap = setPersonaLanguageMap();\n\n if (personalizeMap?.homeUrl) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.homeUrl as string,\n // optional attributes:\n params: {\n person_type: persona\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n if (response?.url) {\n if (isHome !== '' && !window.location.href.includes(response.url)) {\n window.location.href = response.url;\n } else {\n _window.linksToHome?.forEach(element =>\n element.setAttribute('href', response.url as string)\n );\n }\n }\n }\n\n checkContractorCommercialRedirect(persona);\n checkTerritoryManagerCommercial(persona);\n checkDocumentLandingCommercial(persona);\n productDetailContent(persona);\n};\n\nconst checkContractorCommercialRedirect = (persona: string) => {\n const contractorRedirect = (\n document.querySelector('#personalize-contractor') as HTMLDivElement\n )?.dataset.personalize;\n\n if (contractorRedirect) {\n const event = new CustomEvent('commercialChange', {\n detail: contractorRedirect.split(',').includes(persona)\n });\n window.dispatchEvent(event);\n }\n};\n\nconst checkTerritoryManagerCommercial = (persona: string) => {\n const territoryRedirect = (\n document.querySelector('#personalize-territory') as HTMLDivElement\n )?.dataset.personalize;\n\n if (territoryRedirect) {\n const event = new CustomEvent('territoryChange', {\n detail: territoryRedirect.split(',').includes(persona)\n });\n\n window.dispatchEvent(event);\n }\n};\n\nconst checkDocumentLandingCommercial = (persona: string) => {\n const documentRedirect = (\n document.querySelector('#personalize-document-landing') as HTMLDivElement\n )?.dataset.personalize;\n\n if (documentRedirect) {\n const event = new CustomEvent('documentLandingChange', {\n detail: documentRedirect.split(',').includes(persona)\n });\n window.dispatchEvent(event);\n }\n};\n\nlet savedZip = '';\n\nexport const shingleDetailContent = async (zip: string, persona?: string) => {\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n let _persona = '';\n\n if (zip) {\n savedZip = zip;\n }\n\n const savedPersona = new Cookies().get(USER_PERSONALIZATION_KEY);\n if (!persona && savedPersona) {\n _persona = savedPersona;\n } else if (persona) {\n _persona = persona;\n }\n const replaceContentShingle = document.querySelector(\n '#personalize-shingle-code-rule'\n ) as HTMLDivElement;\n\n if (replaceContentShingle && personalizeMap?.productShingleFull) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.productShingleFull as string,\n // optional attributes:\n params: {\n zipCode: savedZip,\n persona: _persona,\n language: languageSelector(personalizeLanguage)\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n const divToInsert = document.querySelector(\n (replaceContentShingle as HTMLElement).dataset.personalize as string\n );\n\n if (divToInsert) {\n if (response?.html) {\n divToInsert.innerHTML = DOMPurify.sanitize(response.html);\n } else {\n divToInsert.innerHTML = '';\n }\n }\n }\n};\n\nexport const productDetailContent = async (persona: string) => {\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n\n const replaceContentPdp = document.querySelector(\n '#personalize-pdp'\n ) as HTMLDivElement;\n\n if (replaceContentPdp && personalizeMap?.productDetailFull) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.productDetailFull as string,\n // optional attributes:\n params: {\n zipCode: persona,\n language: languageSelector(personalizeLanguage)\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n const divToInsert = document.querySelector(\n replaceContentPdp.dataset.personalize as string\n );\n\n if (divToInsert) {\n if (response?.html) {\n divToInsert.innerHTML = DOMPurify.sanitize(response.html);\n } else {\n divToInsert.innerHTML = '';\n }\n }\n }\n};\n\nconst handleStormCodeRules = async () => {\n const data = getStoredGeolocationData();\n if (data) {\n stormRules(data.zip);\n codeRuleRedirect(data.zip);\n } else {\n const google = await getGeolocationDataFromBrowserAndGoogle();\n if (google) {\n stormRules(google.zip);\n codeRuleRedirect(google.zip);\n } else {\n const maxmind = await getLocationByIpAddress();\n if (maxmind) {\n stormRules(maxmind.zip);\n codeRuleRedirect(maxmind.zip);\n }\n }\n }\n};\n\nexport const stormRules = async (zip: string) => {\n const storm = document.querySelector('#personalize-storm-rule');\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n\n if (personalizeMap?.stormRule && storm) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap?.stormRule as string,\n // optional attributes:\n params: {\n zipCode: zip,\n language: languageSelector(personalizeLanguage)\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n if (\n response.stormRuleButton &&\n !window.location.href.includes(response.stormRuleButton.url)\n ) {\n window.location.href = response.stormRuleButton.url as string;\n }\n }\n};\n\nexport const codeRuleRedirect = async (zip: string) => {\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n\n const codeRuleRedirect = document.querySelector(\n '#personalize-code-rule-redirect'\n );\n\n if (personalizeMap?.codeRuleRedirect && codeRuleRedirect) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.codeRuleRedirect as string,\n // optional attributes:\n params: {\n zipCode: zip,\n language: languageSelector(personalizeLanguage)\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n if (\n response?.codeRuleButton &&\n !window.location.href.includes(response.codeRuleButton.url)\n ) {\n window.location.href = response.codeRuleButton.url as string;\n }\n }\n};\n\nconst languageSelector = (langMapping: {\n [key: string]: string[] | string;\n}) => {\n const language: string = window.location.pathname.split('/')[1];\n\n if (langMapping?.languages?.includes(language)) {\n return language;\n } else {\n return langMapping.default;\n }\n};\n\nexport const codeRule = async (zip: string) => {\n const personalizeMap = setPersonaLanguageMap();\n const personalizeLanguage = setPersonaLanguageMap(false);\n\n if (personalizeMap?.codeRule) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.codeRule as string,\n // optional attributes:\n params: {\n zipCode: zip,\n language: languageSelector(personalizeLanguage)\n }\n };\n\n const response = await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n\n return response;\n }\n return;\n};\n\nexport const isAnyKeyEmpty = (obj: object) => {\n for (const key in obj) {\n if (!obj[key as keyof object]) {\n return true;\n }\n }\n return false;\n};\n\nexport const personalizeAddressData = async (_body: object) => {\n const personalizeMap = setPersonaLanguageMap();\n\n if (personalizeMap) {\n const personalizationData = {\n channel: 'WEB',\n currency: 'USD',\n pointOfSale: _window.Engage?.settings?.pointOfSale,\n friendlyId: personalizeMap.addressData as string,\n // optional attributes:\n params: {\n body: _body\n }\n };\n\n await (window as ExtendedWindowType).engage.personalize(\n personalizationData\n );\n }\n};\n","import DOMPurify from 'dompurify';\n\ntype SvgXHRProps = {\n filename: string;\n};\n\nconst svgXHR = (options: SvgXHRProps) => {\n let url: string | undefined = undefined;\n let baseUrl: string | undefined = undefined;\n\n options && options.filename ? (url = options.filename) : null;\n\n if (!url) return;\n let _ajax = new XMLHttpRequest();\n\n if (typeof XMLHttpRequest !== 'undefined') {\n _ajax = new XMLHttpRequest();\n }\n\n if (typeof baseUrl === 'undefined') {\n if (typeof baseUrl !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n baseUrl = (window as any).baseUrl;\n } else {\n baseUrl =\n window.location.protocol +\n '//' +\n window.location.hostname +\n (window.location.port ? ':' + window.location.port : '');\n }\n }\n\n const _fullPath = (baseUrl + '/' + url).replace(/([^:]\\/)\\/+/g, '$1');\n _ajax.open('GET', _fullPath, true);\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n _ajax.onprogress = function () {};\n _ajax.onload = function () {\n if (_ajax.status < 200 || _ajax.status >= 300) {\n return;\n }\n\n if (!_ajax.responseText || _ajax.responseText.substr(0, 5) !== ' {\n if ((document.body.childNodes[0] as HTMLElement)?.id !== 'svg-sprite') {\n document.body.insertBefore(div, document.body.childNodes[0]);\n }\n });\n };\n _ajax.send();\n};\n\nconst domready = (callback: () => void) => {\n if (\n document.readyState === 'complete' ||\n document.readyState === 'interactive'\n ) {\n callback();\n } else {\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\nexport default svgXHR;\n","// Public path\n// if set, make sure it ends with /\n// e.g. 'assets/'\nexport const PUBLIC_PATH = 'Areas/GAF/';\n\nexport default {\n // Directory names\n get dir() {\n return {\n source: 'src',\n\n assets: {\n html: 'html',\n scripts: 'scripts',\n scss: 'scss',\n static: 'static',\n svgSprites: 'svg-sprites',\n stories: 'stories',\n htmlTemplates: 'templates',\n htmlModules: 'modules',\n htmlComponents: 'components'\n },\n\n // Asset paths\n get paths() {\n return {\n // source\n srcStatic: `${this.source}/${this.assets.static}`,\n srcScripts: `${this.source}/${this.assets.scripts}`,\n srcStyles: `${this.source}/${this.assets.scss}`,\n srcHtml: `${this.source}/${this.assets.html}`,\n srcSvgSprites: `${this.source}/${this.assets.static}/${this.assets.svgSprites}`,\n srcStories: `${this.source}/${this.assets.stories}`,\n // scaffold\n srcTemplates: `${this.source}/${this.assets.html}/${this.assets.htmlTemplates}`,\n storyTemplates: `${this.source}/${this.assets.stories}/${this.assets.htmlTemplates}`,\n srcModules: `${this.source}/${this.assets.html}/${this.assets.htmlModules}`,\n storyModules: `${this.source}/${this.assets.stories}/${this.assets.htmlModules}`,\n srcComponents: `${this.source}/${this.assets.html}/${this.assets.htmlComponents}`,\n storyComponents: `${this.source}/${this.assets.stories}/${this.assets.htmlComponents}`\n };\n }\n };\n }\n};\n","import 'vite/modulepreload-polyfill';\nimport './src/scripts/index';\nimport svgxhr from './src/scripts/helpers/svgxhr';\nimport.meta.glob('./src/static/images/**/*');\nimport { PUBLIC_PATH } from './config';\n\nsvgxhr({ filename: `${PUBLIC_PATH}images/svgsheet.svg` });\n"],"file":"Areas/GAF/scripts/main.bundle.js"}