/*! dom-to-image-more 23-03-2023 */ !function(n){"use strict";const s=function(){let t=0;return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(e){if(e.toBlob)return new Promise(function(t){e.toBlob(t)});return function(o){return new Promise(function(t){var e=a(o.toDataURL().split(",")[1]),n=e.length,r=new Uint8Array(n);for(let t=0;te.style.removeProperty(t)),["left","right","top","bottom"].forEach(t=>{e.style.getPropertyValue(t)&&e.style.setProperty(t,"0px")})))}t(a,l)}function e(){const c=s.uid();function e(o){const i=f(a,o),u=i.getPropertyValue("content");if(""!==u&&"none"!==u){const e=l.getAttribute("class")||"",n=(l.setAttribute("class",e+" "+c),document.createElement("style"));function t(){const t=`.${c}:`+o,e=(i.cssText?n:r)();return document.createTextNode(t+`{${e}}`);function n(){return`${i.cssText} content: ${u};`}function r(){const t=s.asArray(i).map(e).join("; ");return t+";";function e(t){const e=i.getPropertyValue(t),n=i.getPropertyPriority(t)?" !important":"";return t+": "+e+n}}}n.appendChild(t()),l.appendChild(n)}}[":before",":after"].forEach(function(t){e(t)})}function n(){s.isHTMLTextAreaElement(a)&&(l.innerHTML=a.value),s.isHTMLInputElement(a)&&l.setAttribute("value",a.value)}function r(){s.isSVGElement(l)&&(l.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.isSVGRectElement(l))&&["width","height"].forEach(function(t){const e=l.getAttribute(t);e&&l.style.setProperty(t,e)})}}}(t,o.filter,!0,null,e)}).then(m).then(d).then(function(e){o.bgcolor&&(e.style.backgroundColor=o.bgcolor);o.width&&(e.style.width=o.width+"px");o.height&&(e.style.height=o.height+"px");o.style&&Object.keys(o.style).forEach(function(t){e.style[t]=o.style[t]});let t=null;"function"==typeof o.onclone&&(t=o.onclone(e));return Promise.resolve(t).then(function(){return e})}).then(function(t){return t=t,e=o.width||s.width(r),n=o.height||s.height(r),Promise.resolve(t).then(function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)}).then(s.escapeXhtml).then(function(t){return`${t}`}).then(function(t){return`${t}`}).then(function(t){return"data:image/svg+xml;charset=utf-8,"+t});var e,n}).then(function(t){return c.impl.urlCache=[],function(){y&&(document.body.removeChild(y),y=null);g&&clearTimeout(g);g=setTimeout(()=>{g=null,w={}},2e4)}(),t})}function h(o,i){return l(o,i=i||{}).then(s.makeImage).then(s.delay(0)).then(function(t){var e="number"!=typeof i.scale?1:i.scale,n=function(t,e){var n=document.createElement("canvas");n.width=(i.width||s.width(t))*e,n.height=(i.height||s.height(t))*e,i.bgcolor&&((t=n.getContext("2d")).fillStyle=i.bgcolor,t.fillRect(0,0,n.width,n.height));return n}(o,e),r=n.getContext("2d");return r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1,t&&(r.scale(e,e),r.drawImage(t,0,0)),n})}function m(n){return t.resolveAll().then(function(t){var e;return""!==t&&(e=document.createElement("style"),n.appendChild(e),e.appendChild(document.createTextNode(t))),n})}function d(t){return r.inlineAll(t).then(function(){return t})}function p(i,u,t){const c=function(t){if(w[t])return w[t];var e=function(){if(y)return y.contentWindow;var t=document.characterSet||"UTF-8",e=document.doctype,e=e?(`":"";return(y=document.createElement("iframe")).id="domtoimage-sandbox-"+s.uid(),y.style.visibility="hidden",y.style.position="fixed",document.body.appendChild(y),function(t,e,n,r){try{return t.contentWindow.document.write(e+`${r}`),t.contentWindow}catch(t){}var o=document.createElement("meta");o.setAttribute("charset",n);try{var i=document.implementation.createHTMLDocument(r),u=(i.head.appendChild(o),e+i.documentElement.outerHTML);return t.setAttribute("srcdoc",u),t.contentWindow}catch(t){}return t.contentDocument.head.appendChild(o),t.contentDocument.title=r,t.contentWindow}(y,e,t,"domtoimage-sandbox");function n(t){var e;return t?((e=document.createElement("div")).innerText=t,e.innerHTML):""}}(),n=e.document,r=function(t,e){e=t.createElement(e);return t.body.appendChild(e),e.textContent="​",e}(n,t),e=function(t,e){const n={},r=t.getComputedStyle(e);return s.asArray(r).forEach(function(t){n[t]="width"===t||"height"===t?"auto":r.getPropertyValue(t)}),n}(e,r);return function(t,e){t.body.removeChild(e)}(n,r),w[t]=e}(t.tagName),a=t.style;s.asArray(i).forEach(function(t){var e,n=i.getPropertyValue(t),r=c[t],o=u?u.getPropertyValue(t):void 0;(n!==r||u&&n!==o)&&(r=i.getPropertyPriority(t),o=a,n=n,r=r,e=0<=["background-clip"].indexOf(t=t),r?(o.setProperty(t,n,r),e&&o.setProperty("-webkit-"+t,n,r)):(o.setProperty(t,n),e&&o.setProperty("-webkit-"+t,n)))})}let g=null,y=null,w={}}(this); //# sourceMappingURL=dom-to-image-more.min.js.map