function Cc(){this.Init()}m("AdfSvgCacheManager",Cc);r.v(Cc);Cc.prototype.Init=function(){Cc.h.Init.call(this);this.ipa=Yf.$()};r.a("AdfSvgCacheManager.prototype.Init",{Init:Cc.prototype.Init});Cc.prototype.Mqa=function(a,b,d){u.assert(null!=a);u.u(b);u.J(d);d=Zf(d);var e=this.ipa.J9(d);e?(a=b.parentNode,Cc.yIa(b,e),a.replaceChild(e,b)):this.AX(a,b,d)};r.a("AdfSvgCacheManager.prototype.embedSVG",{Mqa:Cc.prototype.Mqa});Cc.prototype.qRa=function(a){this.ipa.f$(a)};
r.a("AdfSvgCacheManager.prototype.clearSvgIcon",{qRa:Cc.prototype.qRa});Cc.prototype.AX=function(a,b,d){var e=d.split("#"),f=e[0],g=e[1],h=new If,l=this;h.kQ(function(h){if(0==$f(l,a,b,d,g,h)){var t=a.getAltSource&&null!=a.getAltSource()?A.c.ml(a.getAltSource()):null;null!=t&&(u.J(t),t=Zf(t),e=t.split("#"),t=e[0],f!=t&&(f=t,h.send(f,null,!0)))}});a.$Qa=!0;A.c.lv(a);h.send(f,null,!0)};
function $f(a,b,d,e,f,g){if(g.KO()==If.LQ){b.$Qa=!1;if(200!=g.se()&&304!=g.se())return v.l.fine("AdfRichUIPeer#_inlineSVGCallback - xhr status not OK ("+g.se()+") in response of this url: "+e),!1;var h=g.qo();if(!h){var l;try{l=(new DOMParser).parseFromString(g.po(),"text/xml")}catch(B){return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - failed to parse svg to xml in response of this url : "+e),!1}if(!l)return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - failed to get svg as xml in response of this url : "+
e),!1;h=l}var n;try{if(f){var t=h.getElementById(f);if(!t.childNodes.length)return v.l.fine("AdfRichUIPeer#_inlineSVGCallback - child for svg symbol not found in response of this url : "+e),!1;n=document.createElementNS("http://www.w3.org/2000/svg","svg");C.wRa(t,n);for(var y=document.createDocumentFragment();t.childNodes.length;)y.appendChild(t.childNodes[0]);n.appendChild(y)}else{var z=h.getElementsByTagName("svg")[0];if(!z)return v.l.warning("AdfRichUIPeer#_inlineSVGCallback - svg node not found in response of this url: "+
e),!1;n=document.importNode(z,!0)}}catch(B){return v.l.error("AdfRichUIPeer#_inlineSVGCallback - invalid svg url: "+e),!1}f=n.cloneNode(!0);a.ipa.taa(e,f);Cc.yIa(d,n);a=q.b;a.yc(d);d.parentNode.replaceChild(n,d);a.Ia(n);A.c.uq(b);return!0}}
function Zf(a){try{var b=q.b,d=b.fP();-1===a.indexOf("://")&&-1===a.indexOf("//")&&("/"!=a.charAt(0)&&(a=A.c.ml("/"+a)),d&&(a=d+a));var e;b.S()==q.ia?(e=document.createElement("a"),e.href=a,d=(d?d.toLowerCase():"")+"/"):(e=new URL(a),d=d?d.toLowerCase():"");return d+e.pathname+e.hash+e.search}catch(f){v.l.warning("Invalid url could not normalize the url: "+f+"url: "+a)}return a}
Cc.yIa=function(a,b){for(var d=0;d<a.attributes.length;d++){var e=a.attributes[d];if("src"!=e.name){var f=b.getAttribute(e.name);if(f&&"class"==e.name)f=f+" "+e.value;else if(f&&"style"==e.name)f=f+";"+e.value;else if("title"==e.name&&""!=e.value){b.setAttribute("role","img");f=e.value;b.setAttribute("aria-label",f);e=document.createElementNS("http://www.w3.org/2000/svg","title");e.textContent=f;b.insertBefore(e,b.firstChild);continue}else f=e.value;b.setAttribute(e.name,f)}}};