System.register(["./p-7a5d5d62.system.js"],(function(n){"use strict";var i,r,t,e,u;return{setters:[function(n){i=n.a;r=n.r;t=n.h;e=n.H;u=n.g}],execute:function(){var f;var s=function(){if(typeof window==="undefined"){return new Map}else{if(!f){var n=window;n.PdsIcons=n.PdsIcons||{};f=n.PdsIcons.map=n.PdsIcons.map||new Map}return f}};var a=function(n,i){if(!n&&i&&!v(i)){n=i}if(d(n)){n=h(n)}if(!d(n)||n.trim()===""){return null}var r=n.replace(/[a-z]|-|\d/gi,"");if(r!=""){return null}return n};var o=function(n){var r=s().get(n);if(r){return r}return i("svg/".concat(n,".svg"))};var c=function(n){if(d(n)){n=n.trim();if(v(n)){return n}}return null};var l=function(n){var i=c(n.src);if(i){return i}i=a(n.name,n.icon);if(i){return o(i)}if(n.icon){i=c(n.icon);if(i){return i}}return null};var v=function(n){return n.length>0&&/(\/|\.)/.test(n)};var d=function(n){return typeof n==="string"};var h=function(n){return n.toLowerCase()};var g=function(n,i){if(i===void 0){i=[]}var r={};i.forEach((function(i){if(n.hasAttribute(i)){var t=n.getAttribute(i);if(t!==null){r[i]=n.getAttribute(i)}n.removeAttribute(i)}}));return r};var p=function(n){var i=document.createElement("div");i.innerHTML=n;for(var r=i.childNodes.length-1;r>=0;r--){if(i.childNodes[r].nodeName.toLowerCase()!=="svg"){i.removeChild(i.childNodes[r])}}var t=i.firstElementChild;if(t&&t.nodeName.toLowerCase()==="svg"){var e=t.getAttribute("class")||"";t.setAttribute("class",(e+" s-pds-icon").trim());if(w(t)){return i.innerHTML}}return""};var w=function(n){if(n.nodeType===1){if(n.nodeName.toLowerCase()==="script"){return false}for(var i=0;i<n.attributes.length;i++){var r=n.attributes[i].name;if(d(r)&&r.toLowerCase().indexOf("on")===0){return false}}for(var i=0;i<n.childNodes.length;i++){if(!w(n.childNodes[i])){return false}}}return true};var m=function(n){return n.startsWith("data:image/svg+xml")};var b=function(n){return n.indexOf(";utf8,")!==-1};var y=new Map;var x=new Map;var M;var j=function(n,i){if(i===void 0){i=false}var r=x.get(n);if(!r){if(typeof fetch!="undefined"&&typeof document!=="undefined"){if(m(n)&&b(n)){if(!M){M=new DOMParser}var t=M.parseFromString(n,"text/html");var e=t.querySelector("svg");if(e){y.set(n,e.outerHTML)}return Promise.resolve()}else{r=fetch(n).then((function(r){if(r.ok){return r.text().then((function(r){if(r&&i!==false){r=p(r)}y.set(n,r||"")}))}y.set(n,"")}));x.set(n,r)}}else{y.set(n,"");return Promise.resolve()}}return r};var O=":host{contain:strict;display:inline-block;fill:currentColor;height:1em;width:1em}:host .pdsicon{fill:currentColor}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}";var I=O;var P=n("pds_icon",function(){function n(n){var i=this;r(this,n);this.inheritedAttributes={};this.hasAriaHidden=function(){var n=i.el;return n.hasAttribute("aria-hidden")&&n.getAttribute("aria-hidden")==="true"};this.ariaLabel=undefined;this.isVisible=false;this.svgContent=undefined;this.color=undefined;this.icon=undefined;this.name=undefined;this.size="regular";this.src=undefined}n.prototype.iconSize=function(){var n={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(n[this.size]){return n[this.size]}else{return this.size}};n.prototype.componentWillLoad=function(){this.inheritedAttributes=g(this.el,["aria-label"])};n.prototype.connectedCallback=function(){var n=this;this.waitUntilVisible(this.el,"50px",(function(){n.isVisible=true;n.loadIcon()}))};n.prototype.disconnectedCallback=function(){if(this.io){this.io.disconnect();this.io=undefined}};n.prototype.loadIcon=function(){var n=this;if(this.isVisible){var i=l(this);if(i){if(y.has(i)){this.svgContent=y.get(i)}else{j(i).then((function(){return n.svgContent=y.get(i)}))}}}var r=a(this.name,this.icon);if(r){this.ariaLabel=r.replace(/\-/g," ")}};n.prototype.render=function(){var n=this,i=n.ariaLabel,r=n.inheritedAttributes;var u={height:this.iconSize(),width:this.iconSize(),color:this.color};return t(e,Object.assign({"aria-label":i!==undefined&&!this.hasAriaHidden()?i:null,role:"img",style:u,class:Object.assign({},k(this.color))},r),this.svgContent?t("div",{class:"icon-inner",innerHTML:this.svgContent}):t("div",{class:"icon-inner"}))};n.prototype.waitUntilVisible=function(n,i,r){var t=this;if(typeof window!=="undefined"&&window.IntersectionObserver){var e=this.io=new window.IntersectionObserver((function(n){if(n[0].isIntersecting){e.disconnect();t.io=undefined;r()}}),{rootMargin:i});e.observe(n)}else{r()}};Object.defineProperty(n,"assetsDirs",{get:function(){return["svg"]},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}},enumerable:false,configurable:true});return n}());var k=function(n){var i;return n?(i={"pds-color":true},i["pds-color-".concat(n)]=true,i):null};P.style=I}}}));
//# sourceMappingURL=p-269121f3.system.entry.js.map