/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
const t="theme-style";function e(t,e){return a(r(n(o(t),e)),e.size)}function n(e,{accentColor:n,contrastColor:o}){const r=n.toHex(),a=n.a,s=o.toHex(),i=o.a,c=e.getElementsByTagNameNS("http://www.w3.org/2000/svg","style").namedItem(t);return c&&(c.innerHTML=`\n      .contrast-fill { fill: ${s}; fill-opacity: ${i}; }\n      .contrast-stroke { stroke: ${s}; stroke-opacity: ${i};  }\n      .accent-fill { fill: ${r}; fill-opacity: ${a}; }\n      .accent-stroke { stroke: ${r}; stroke-opacity:  ${a}; }`),e}function o(t){const e=t.split(",")[1],n=atob(e);return(new DOMParser).parseFromString(n,"image/svg+xml")}function r(t){const e=(new XMLSerializer).serializeToString(t);return`data:image/svg+xml;base64,${btoa(e)}`}function a(t,e){const n=new Image(e,e);return n.src=t,n}export{e as generateStyledTexture};
