{"version":3,"file":"tds-global-footer.entry-C5lGH28l.js","sources":["../../../node_modules/@trv-tds/react/node_modules/@trv-tds/webcomponents/dist/esm/tds-global-footer.entry.js"],"sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-e1ee5b28.js';\nimport { a as trvLogo2colorBlackSmall, s as socialFb118, d as socialYt118, e as socialTwitter118, g as socialLinkedin118, h as socialInstagram118 } from './index-1074b75b.js';\nimport { s as sRootFont } from './tokens-8f54bd51.js';\n\nconst globalFooterCss = \".wrapper{margin-left:auto;margin-right:auto;max-width:var(--tds-container-max-width, 103rem);padding-left:var(--tds-container-margin, 1.125rem);padding-right:var(--tds-container-margin, 1.125rem)}.social-item{cursor:pointer;outline:0;transition-duration:0.25s;transition-property:background-color, color;transition-timing-function:ease-in-out;background-color:var(--tds-link-bg-color, rgba(0, 0, 0, 0));border:0;border-radius:0.1875rem;color:var(--tds-link-color, rgb(0, 115, 149));outline:0;-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}.social-item:disabled,.social-item .disabled,[aria-disabled=true].social-item{cursor:not-allowed}[aria-busy=true].social-item{cursor:wait}.social-item:hover,.hover.social-item{background-color:var(--tds-interactive-hover-bg-color, rgba(0, 145, 235, 0.2));color:var(--tds-link-hover-color, rgb(0, 99, 128))}.social-item:focus-visible,.focus.social-item{outline:solid 0.25rem var(--tds-focus-ring-color, rgb(0, 104, 169));outline-offset:var(--tds-focus-ring-offset, 0.125rem)}.social-item:active,.active.social-item{background-color:var(--tds-interactive-active-bg-color, rgba(0, 145, 235, 0.4));color:var(--tds-link-active-color, rgb(0, 33, 45))}.social-item:visited,.visited.social-item{color:var(--tds-link-visited-color, rgb(51, 93, 121))}*,*::before,*::after{box-sizing:border-box}:host{display:block;--tds-link-color:var(--tds-gfooter-link-color, rgb(0, 115, 149));--tds-link-hover-color:var(--tds-gfooter-link-hover-color, rgb(0, 99, 128));--tds-interactive-hover-bg-color:var(--tds-gfooter-link-hover-bg-color, rgba(0, 0, 0, 0));--tds-link-active-color:var(--tds-gfooter-link-active-color, rgb(0, 33, 45));--tds-interactive-active-bg-color:var(--tds-gfooter-link-active-bg-color, rgba(0, 0, 0, 0));--tds-link-visited-color:var(--tds-gfooter-link-visited-color, rgb(51, 93, 121));--tds-focus-ring-color:var(--tds-gfooter-link-focus-ring-color, rgb(0, 104, 169))}.footer{margin-top:4.5rem;min-height:4.5rem;position:relative;overflow:hidden}.footer::before{content:\\\"\\\";display:block;background-color:var(--tds-gfooter-bg-color, rgb(246, 246, 246));position:absolute;top:0;bottom:0;border-top-right-radius:50% 32vw;border-top-left-radius:50% 32vw;min-height:64vw;width:256vw;left:-78vw}@media (min-width: 36em){.footer::before{border-top-right-radius:50% 48vw;border-top-left-radius:50% 48vw;min-height:96vw;width:384vw;left:-142vw}}@media (min-width: 50em){.footer::before{border-top-right-radius:50% 64vw;border-top-left-radius:50% 64vw;min-height:128vw;width:512vw;left:-206vw}}.wrapper{background-color:var(--tds-gfooter-bg-color, rgb(246, 246, 246));margin-top:4.5rem;margin-bottom:3.375rem;position:relative}.logo{color:black;height:1.5rem;width:7.375rem;display:block;margin:0 auto}@media (min-width: 50em){.logo{margin-left:0}}.copy{padding-top:1.125rem;margin:0 0 1.6875rem;font-size:0.75rem;text-align:center;color:var(--tds-gfooter-copy-color, rgb(39, 42, 45))}@media (min-width: 50em){.copy{text-align:left}}.disclaimer{font-size:0.75rem;margin-top:4.5rem;color:var(--tds-gfooter-disclaimer-color, rgb(39, 42, 45))}.disclaimer p{margin-bottom:1.5em}.disclaimer p:last-child{margin-bottom:0}.disclaimer small{font-size:inherit}.disclaimer ::slotted(p){margin-bottom:1.5em !important}.disclaimer ::slotted(p:last-child){margin-bottom:0 !important}.social{list-style:none;margin:0;padding:0;display:flex;justify-content:center;--tds-interactive-hover-bg-color:var(--tds-gfooter-social-hover-bg-color);--tds-interactive-active-bg-color:var(--tds-gfooter-social-active-bg-color)}@media (min-width: 50em){.social{position:absolute;top:-0.125rem;right:1.5rem}}.social-item{display:block;margin:0;padding:0.5rem}.social-item svg{display:block;height:1.125rem;width:1.125rem}.social-item:hover{--tds-interactive-hover-bg-color:var(--tds-gfooter-social-hover-bg-color, rgba(0, 145, 235, 0.2))}.social-item:active{--tds-interactive-active-bg-color:var(--tds-gfooter-social-active-bg-color, rgba(0, 145, 235, 0.4))}.footer-links{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto;max-width:36rem}.footer-links ul,.footer-links li{display:flex;flex-direction:column;list-style:none;margin:0;padding:0}.footer-links ul{align-items:center}@media (min-width: 50em){.footer-links{border-top:solid 0.0625rem var(--tds-gfooter-border-color, rgb(218, 219, 219));justify-content:flex-start;flex-wrap:nowrap;margin:2.25rem 0;max-width:none}}.footer-links>ul:only-child{padding:1.125rem 0 0}@media (min-width: 50em){.footer-links>ul:only-child{flex-wrap:wrap;flex-direction:row}.footer-links>ul:only-child li:not(:last-child){margin-right:1.5rem}}.footer-links ::slotted(*){flex:1 0 100%;padding:1.125rem 1.125rem 0;margin:0 0.5625rem 0.75rem;display:flex;flex-direction:column;align-items:center}@media (min-width: 25em){.footer-links ::slotted(*){flex:1 0 50%;max-width:50%}}@media (min-width: 50em){.footer-links ::slotted(*){flex:1 1 auto;max-width:none;padding-left:0;padding-right:0;align-items:flex-start;margin-left:0;margin-right:1.125rem}}@media (min-width: 50em){.footer-links.two-or-three ::slotted(*){flex:0 0 auto;margin-left:0;margin-right:12vw}}@media (min-width: 50em){.footer-links ::slotted(.last){margin-right:0}}\";\nconst TdsGlobalFooterStyle0 = globalFooterCss;\n\n/**\n * The TDS Global Footer\n *\n * @slot copyright - Overrides the default copyright statement\n * @slot logo - Overrides the default Travelers logo\n * @slot disclaimer - Inserts a disclaimer statement beneath the footer links\n * @slot social - Inserts a custom social media link with the other social links\n * @slot links - Inserts headings and links into the footer\n *\n */\nconst defaultCopyright = `© ${new Date().getFullYear()} The Travelers Indemnity Company. All rights reserved.`;\nconst GlobalFooter = class {\n    constructor(hostRef) {\n        registerInstance(this, hostRef);\n        this.copyright = defaultCopyright;\n        this.disclaimer = undefined;\n        this.sociallinks = undefined;\n        this.maxWidth = undefined;\n    }\n    render() {\n        const { el, maxWidth } = this;\n        const LOGO_SLOT_NAME = 'logo';\n        const hasLogoSlot = !!el.querySelector(`[slot=\"${LOGO_SLOT_NAME}\"]`);\n        const logoAttr = {\n            class: \"logo\",\n            role: \"img\",\n            focusable: false,\n            \"aria-label\": \"Travelers logo\",\n        };\n        const hLogo = hasLogoSlot ? h(\"slot\", { name: LOGO_SLOT_NAME }) :\n            h(\"span\", { class: 'logo', innerHTML: trvLogo2colorBlackSmall.svg(logoAttr) });\n        const COPYRIGHT_SLOT_NAME = 'copyright';\n        const hasCopySlot = !!el.querySelector(`[slot=\"${COPYRIGHT_SLOT_NAME}\"]`);\n        const hCopy = hasCopySlot ? h(\"div\", { class: \"copy\" }, h(\"slot\", { name: COPYRIGHT_SLOT_NAME })) :\n            h(\"p\", { class: 'copy' }, \" \", this.copyright, \" \");\n        const SOCIAL_SLOT_NAME = 'social';\n        const hasSocSlot = !!el.querySelector(`[slot=\"${SOCIAL_SLOT_NAME}\"]`);\n        const hSoc = hasSocSlot ? h(\"div\", { class: 'social' }, h(\"slot\", { name: SOCIAL_SLOT_NAME })) :\n            '';\n        const LINKS_SLOT_NAME = 'links';\n        const linkGroups = el.querySelectorAll(`[slot=\"${LINKS_SLOT_NAME}\"]`);\n        Array.from(linkGroups).forEach((group, index) => {\n            group.classList[linkGroups.length === 1 ? 'add' : 'remove']('inline');\n            group.classList[linkGroups.length === 1 ? 'add' : 'remove']('inline');\n            group.classList[index === linkGroups.length - 1 ? 'add' : 'remove']('last');\n        });\n        const hLinks = linkGroups.length ? (h(\"div\", { class: {\n                \"footer-links\": true,\n                \"two-or-three\": linkGroups.length > 1 && linkGroups.length < 4\n            } }, h(\"slot\", { name: LINKS_SLOT_NAME }))) : '';\n        const DISCLAIMER_SLOT_NAME = 'disclaimer';\n        const hasDisclaimerSlot = !!el.querySelector(`[slot=\"${DISCLAIMER_SLOT_NAME}\"]`);\n        const hDisclaimer = hasDisclaimerSlot ? h(\"div\", { class: 'disclaimer' }, h(\"slot\", { name: DISCLAIMER_SLOT_NAME })) : '';\n        let style;\n        if (maxWidth) {\n            const pxReg = /^\\d\\.?\\d*?(px)?$/;\n            style = { maxWidth: pxReg.test(maxWidth) ? (parseFloat(maxWidth) / parseInt(sRootFont)) + 'rem' : maxWidth };\n        }\n        return (h(Host, { key: '6963ce7ba3407d68016c86cc35ca8785592ae4fb' }, h(\"footer\", { key: 'aed9f12041d334236d593dcea4d2296b20a8fe29', class: \"footer\", role: \"contentinfo\" }, h(\"div\", { key: '7b78201710d40281dee95f510c7dc8b30e53722f', class: \"wrapper\", style: style }, hLogo, hCopy, this.renderSocialLinks(), hSoc, hLinks, hDisclaimer))));\n    }\n    renderSocialLinks() {\n        const socialLinksMap = {\n            fb: {\n                title: \"Facebook\",\n                icon: socialFb118,\n                url: \"https://www.facebook.com/travelers\",\n                lb: \"social-fb-1-18-title\"\n            },\n            yt: {\n                title: \"YouTube\",\n                icon: socialYt118,\n                url: \"https://www.youtube.com/user/travelersinsurance\",\n                lb: \"social-yt-1-18-title\"\n            },\n            tw: {\n                title: \"Twitter\",\n                icon: socialTwitter118,\n                url: \"https://www.twitter.com/travelers\",\n                lb: \"social-twitter-1-18-title\"\n            },\n            li: {\n                title: \"LinkedIn\",\n                icon: socialLinkedin118,\n                url: \"https://www.linkedin.com/company/travelers\",\n                lb: \"social-linkedin-1-18-title\"\n            },\n            in: {\n                title: \"Instagram\",\n                icon: socialInstagram118,\n                url: \"https://www.instagram.com/travelersinsurance/\",\n                lb: \"social-instagram-1-18-title\"\n            }\n        };\n        let links = [];\n        const socialLinks = 'undefined' === typeof this.sociallinks || this.sociallinks === 'false' ? '' :\n            this.sociallinks === 'true' ? 'fb yt tw li in' : this.sociallinks;\n        if (socialLinks) {\n            Object.keys(socialLinksMap).forEach(key => {\n                if (socialLinks === 'true' || socialLinks.indexOf(key) > -1) {\n                    links.push(socialLinksMap[key]);\n                }\n            });\n        }\n        if (links.length > 0) {\n            return (h(\"ul\", { class: 'social' }, links.map(link => (h(\"li\", { key: link.url }, h(\"a\", { class: `social-item`, id: link.lb, href: link.url, target: '_blank', rel: \"noopener noreferrer\", title: link.title, innerHTML: link.icon.svg(), \"aria-label\": `Travelers on ${link.title}` }))))));\n        }\n        else {\n            return (h(\"div\", null));\n        }\n    }\n    get el() { return getElement(this); }\n};\nGlobalFooter.style = TdsGlobalFooterStyle0;\n\nexport { GlobalFooter as tds_global_footer };\n\n//# sourceMappingURL=tds-global-footer.entry.js.map"],"names":["globalFooterCss","TdsGlobalFooterStyle0","defaultCopyright","GlobalFooter","hostRef","registerInstance","el","maxWidth","LOGO_SLOT_NAME","hasLogoSlot","logoAttr","hLogo","h","trvLogo2colorBlackSmall","COPYRIGHT_SLOT_NAME","hCopy","SOCIAL_SLOT_NAME","hSoc","LINKS_SLOT_NAME","linkGroups","group","index","hLinks","DISCLAIMER_SLOT_NAME","hDisclaimer","style","sRootFont","Host","socialLinksMap","socialFb118","socialYt118","socialTwitter118","socialLinkedin118","socialInstagram118","links","socialLinks","key","link","getElement"],"mappings":"mMAIA,MAAMA,EAAkB,woKAClBC,EAAwBD,EAYxBE,EAAmB,KAAK,IAAI,KAAI,EAAG,YAAa,CAAA,yDAChDC,EAAe,KAAM,CACvB,YAAYC,EAAS,CACjBC,EAAiB,KAAMD,CAAO,EAC9B,KAAK,UAAYF,EACjB,KAAK,WAAa,OAClB,KAAK,YAAc,OACnB,KAAK,SAAW,MACxB,CACI,QAAS,CACL,KAAM,CAAE,GAAAI,EAAI,SAAAC,CAAQ,EAAK,KACnBC,EAAiB,OACjBC,EAAc,CAAC,CAACH,EAAG,cAAc,UAAUE,CAAc,IAAI,EAC7DE,EAAW,CACb,MAAO,OACP,KAAM,MACN,UAAW,GACX,aAAc,gBACjB,EACKC,EAAQF,EAAcG,EAAE,OAAQ,CAAE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