{"version":3,"sources":["jsdelivr-header.js","/npm/genesys-spark-components@4.215.1/dist/stencil-wrapper.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCCS,yBAA4B,wBAE9B,MAAM,sBAAwB,oEACrC,MAAM,YAAc,CAChB,eACA,kBACA,eACA,mBACA,mBACA,sBACA,kBACA,kBACA,kBACA,cACA,8BAGG,SAAS,mBACR,sBACA,qBAAqB,OAAQ,CACzB,aAAc,WAAW,kBAAoB,0BAIjD,sBAER,CAKA,SAAS,kBACL,MAAM,EAAW,OAAO,SAAS,SAEjC,OADsB,YAAY,MAAK,GAAgB,EAAS,SAAS,KAEjE,EAAS,WAAW,SAAW,EAAS,WAAW,iBAC5C,EAGA,EAAS,QAAQ,WAAY,OAIjC,qBAEf","file":"/npm/genesys-spark-components@4.215.1/dist/stencil-wrapper.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/genesys-spark-components@4.215.1/dist/stencil-wrapper.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* eslint @typescript-eslint/no-unsafe-call: 0 */\n/**\n * This module defines a wrapper around stencil's custom element setup that incorporates\n * a CDN url for resource loading at build time. Because it depends on code generated\n * by stencil, it's built in a second pass after the stencil components.  It's normal\n * to see some errors here before building anything\n */\nimport { defineCustomElements } from '../dist/loader';\n// Value templated out during build process (see scripts/wrap-stencil.js)\nexport const COMPONENT_ASSETS_PATH = '/spark-components/build-assets/4.215.1-974/genesys-webcomponents/';\nconst DOMAIN_LIST = [\n    '.inindca.com',\n    '.dev-pure.cloud',\n    '.inintca.com',\n    '.test-pure.cloud',\n    '.mypurecloud.com',\n    '.mypurecloud.com.au',\n    '.mypurecloud.de',\n    '.mypurecloud.ie',\n    '.mypurecloud.jp',\n    '.pure.cloud',\n    '.maximus-pure.cloud'\n    // '.use2.us-gov-pure.cloud', Assets are not currently deployed to FedRAMP and should fallback to the default domain\n];\nexport function registerElements() {\n    if (COMPONENT_ASSETS_PATH) {\n        defineCustomElements(window, {\n            resourcesUrl: `https://${getRegionDomain() + COMPONENT_ASSETS_PATH}`\n        });\n    }\n    else {\n        defineCustomElements();\n    }\n}\n/**\n * Returns the domain that web component assets should be loaded from.\n * Will use the domain of the current window if it matches a Genesys domain.\n */\nfunction getRegionDomain() {\n    const hostname = window.location.hostname;\n    const matchedDomain = DOMAIN_LIST.some(regionDomain => hostname.endsWith(regionDomain));\n    if (matchedDomain) {\n        if (hostname.startsWith('app.') || hostname.startsWith('app-regional.')) {\n            return hostname;\n        }\n        else {\n            return hostname.replace(/^([^.]+)/, 'app');\n        }\n    }\n    else {\n        return 'app.mypurecloud.com';\n    }\n}\n"]}