feffery_utils_components 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/DESCRIPTION +1 -1
  2. package/Project.toml +1 -1
  3. package/README-en_US.md +1 -1
  4. package/README.md +1 -1
  5. package/feffery_utils_components/FefferyDPlayer.py +11 -7
  6. package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
  7. package/feffery_utils_components/async-feffery_animated_3d_background_three.js +1 -1
  8. package/feffery_utils_components/async-feffery_animated_image.js +1 -1
  9. package/feffery_utils_components/async-feffery_animated_image.js.LICENSE.txt +1 -1
  10. package/feffery_utils_components/async-feffery_aplayer.js +1 -1
  11. package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
  12. package/feffery_utils_components/async-feffery_auto_fit.js +1 -1
  13. package/feffery_utils_components/async-feffery_auto_fit.js.LICENSE.txt +1 -1
  14. package/feffery_utils_components/async-feffery_barcode.js +1 -1
  15. package/feffery_utils_components/async-feffery_burger.js +1 -1
  16. package/feffery_utils_components/async-feffery_captcha.js +1 -1
  17. package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
  18. package/feffery_utils_components/async-feffery_dom2image.js +1 -1
  19. package/feffery_utils_components/async-feffery_dom2image.js.LICENSE.txt +1 -1
  20. package/feffery_utils_components/async-feffery_dplayer.js +1 -1
  21. package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
  22. package/feffery_utils_components/async-feffery_emoji_picker.js.LICENSE.txt +1 -1
  23. package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
  24. package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
  25. package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
  26. package/feffery_utils_components/async-feffery_grid.js +1 -1
  27. package/feffery_utils_components/async-feffery_http_requests.js +1 -1
  28. package/feffery_utils_components/async-feffery_http_requests.js.LICENSE.txt +1 -1
  29. package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
  30. package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
  31. package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
  32. package/feffery_utils_components/async-feffery_local_large_storage.js.LICENSE.txt +1 -1
  33. package/feffery_utils_components/async-feffery_markdown_editor.js +1 -1
  34. package/feffery_utils_components/async-feffery_motion.js +1 -1
  35. package/feffery_utils_components/async-feffery_music_player.js +1 -1
  36. package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
  37. package/feffery_utils_components/async-feffery_photo_sphere_viewer.js.LICENSE.txt +4 -2
  38. package/feffery_utils_components/async-feffery_resizable.js +1 -1
  39. package/feffery_utils_components/async-feffery_rich_text_editor.js +1 -1
  40. package/feffery_utils_components/async-feffery_rnd.js +1 -1
  41. package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
  42. package/feffery_utils_components/async-feffery_shortcut_panel.js +2 -2
  43. package/feffery_utils_components/async-feffery_slider_captcha.js +1 -1
  44. package/feffery_utils_components/async-feffery_slider_captcha.js.LICENSE.txt +1 -1
  45. package/feffery_utils_components/async-feffery_sortable.js +1 -1
  46. package/feffery_utils_components/async-feffery_vditor.js +1 -1
  47. package/feffery_utils_components/async-feffery_vditor.js.LICENSE.txt +1 -1
  48. package/feffery_utils_components/async-feffery_word_preview.js +1 -1
  49. package/feffery_utils_components/async-fuc-shared.js +1 -1
  50. package/feffery_utils_components/feffery_utils_components.min.js +8 -8
  51. package/feffery_utils_components/feffery_utils_components.min.js.LICENSE.txt +1 -1
  52. package/feffery_utils_components/metadata.json +1 -1
  53. package/feffery_utils_components/package-info.json +2 -2
  54. package/package.json +2 -2
  55. package/webpack.config.js +1 -0
  56. package/.vscode/settings.json +0 -5
@@ -1,4 +1,4 @@
1
1
  /*! For license information please see async-feffery_dom2image.js.LICENSE.txt */
2
- (window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[11],{571:function(e,t,n){"use strict";n.r(t);var r=n(948),o=n(2),i=n(1),l=n(9);var a=function(e,t){Object(i.useEffect)((function(){var t=e(),n=!1;return function(){Object(o.b)(this,void 0,void 0,(function(){return Object(o.e)(this,(function(e){switch(e.label){case 0:if(r=t,!Object(l.b)(r[Symbol.asyncIterator]))return[3,4];e.label=1;case 1:return[4,t.next()];case 2:return e.sent().done||n?[3,3]:[3,1];case 3:return[3,6];case 4:return[4,t];case 5:e.sent(),e.label=6;case 6:return[2]}var r}))}))}(),function(){n=!0}}),t)},c=n(258);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(){u=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof w?t:w,l=Object.create(i.prototype),a=new L(r||[]);return o(l,"_invoke",{value:T(e,n,a)}),l}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var g="suspendedStart",m="executing",p="completed",y={};function w(){}function v(){}function b(){}var S={};d(S,l,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(F([])));x&&x!==n&&r.call(x,l)&&(S=x);var A=b.prototype=w.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function n(o,i,l,a){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==s(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,a)}),(function(e){n("throw",e,l,a)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return n("throw",e,l,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function T(t,n,r){var o=g;return function(i,l){if(o===m)throw Error("Generator is already running");if(o===p){if("throw"===i)throw l;return{value:e,done:!0}}for(r.method=i,r.arg=l;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===g)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var s=h(t,n,r);if("normal"===s.type){if(o=r.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=p,r.method="throw",r.arg=s.arg)}}}function k(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=h(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var l=i.arg;return l?l.done?(n[t.resultName]=l.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):l:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(s(t)+" is not iterable")}return v.prototype=b,o(A,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=d(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,d(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},C(N.prototype),d(N.prototype,a,(function(){return this})),t.AsyncIterator=N,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var l=new N(f(e,n,r,o),i);return t.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},C(A),d(A,c,"Generator"),d(A,l,(function(){return this})),d(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=F,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var l=this.tryEntries[i],a=l.completion;if("root"===l.tryLoc)return o("end");if(l.tryLoc<=this.prev){var c=r.call(l,"catchLoc"),s=r.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return o(l.catchLoc,!0);if(this.prev<l.finallyLoc)return o(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return o(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return o(l.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var l=i?i.completion:{};return l.type=e,l.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function d(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){d(i,r,o,l,a,"next",e)}function a(e){d(i,r,o,l,a,"throw",e)}l(void 0)}))}}var h=function(e){var t=e.targetSelector,n=e.scale,o=e.setProps;return a(f(u().mark((function e(){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&((i=document.querySelector(t))?Object(r.domToPng)(i,{scale:n}).then((function(e){o({screenshotResult:{selector:t,status:"success",dataUrl:e,timestamp:(new Date).getTime()}})})):o({screenshotResult:{selector:t,status:"failed",dataUrl:null,timestamp:(new Date).getTime()}}),o({targetSelector:null}));case 1:case"end":return e.stop()}}),e)}))),[t]),React.createElement(React.Fragment,null)};t.default=h;h.defaultProps=c.b,h.propTypes=c.c},948:function(e,t,n){!function(e){"use strict";var t,n=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,c=Math.pow,s=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&s(e,n,t[n]);if(i)for(var n of i(t))a.call(t,n)&&s(e,n,t[n]);return e},d=(e,t)=>r(e,o(t)),f=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{a(n.next(e))}catch(e){o(e)}},l=e=>{try{a(n.throw(e))}catch(e){o(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,l);a((n=n.apply(e,t)).next())});function h(e,t){return e[13]=1,e[14]=t>>8,e[15]=255&t,e[16]=t>>8,e[17]=255&t,e}let g;function m(e){let t=-1;g||(g=function(){const e=new Int32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}());for(let n=0;n<e.length;n++)t=g[255&(t^e[n])]^t>>>8;return-1^t}function p(e,t,n=!1){const r=new Uint8Array(13);t*=39.3701,r[0]=112,r[1]=72,r[2]=89,r[3]=115,r[4]=t>>>24,r[5]=t>>>16,r[6]=t>>>8,r[7]=255&t,r[8]=r[4],r[9]=r[5],r[10]=r[6],r[11]=r[7],r[12]=1;const o=m(r),i=new Uint8Array(4);if(i[0]=o>>>24,i[1]=o>>>16,i[2]=o>>>8,i[3]=255&o,n){const t=function(e){for(let t=e.length-1;t>=4;t--)if(9===e[t-4]&&112===e[t-3]&&72===e[t-2]&&89===e[t-1]&&115===e[t])return t-3;return 0}(e);return e.set(r,t),e.set(i,t+13),e}{const t=new Uint8Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=9;const n=new Uint8Array(54);return n.set(e,0),n.set(t,33),n.set(r,37),n.set(i,50),n}}const y="[modern-screenshot]",w="undefined"!=typeof window,v=w&&"Worker"in window,b=w&&"atob"in window,S=w&&"btoa"in window,E=w?null==(t=window.navigator)?void 0:t.userAgent:"",x=E.includes("Chrome"),A=E.includes("AppleWebKit")&&!x,C=E.includes("Firefox"),N=e=>1===e.nodeType,T=e=>"object"==typeof e.className,k=e=>"image"===e.tagName,D=e=>N(e)&&void 0!==e.style&&!T(e),P=e=>8===e.nodeType,L=e=>"IMG"===e.tagName,F=e=>"VIDEO"===e.tagName,O=e=>"SLOT"===e.tagName;function _(e){var t;const n=null==(t=null==e?void 0:e.createElement)?void 0:t.call(e,"canvas");return n&&(n.height=n.width=1),!!n&&"toDataURL"in n&&!!n.toDataURL("image/webp").includes("image/webp")}const j=e=>e.startsWith("data:");function I(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(w&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!w)return e;const n=R().implementation.createHTMLDocument(),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}function R(e){var t;return null!=(t=e&&N(e)?null==e?void 0:e.ownerDocument:e)?t:window.document}const U="http://www.w3.org/2000/svg";function M(e,t,n){const r=R(n).createElementNS(U,"svg");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),r}function $(e,t){let n=(new XMLSerializer).serializeToString(e);return t&&(n=n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)}function B(e,t="image/png",n=1){return f(this,null,(function*(){try{return yield new Promise((r,o)=>{e.toBlob(e=>{e?r(e):o(new Error("Blob is null"))},t,n)})}catch(r){if(b)return function(e){var t,n;const[r,o]=e.split(","),i=null!=(n=null==(t=r.match(/data:(.+);/))?void 0:t[1])?n:void 0,l=window.atob(o),a=l.length,c=new Uint8Array(a);for(let e=0;e<a;e+=1)c[e]=l.charCodeAt(e);return new Blob([c],{type:i})}(e.toDataURL(t,n));throw r}}))}function W(e,t){return new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(o.error),o.onabort=()=>r(new Error("Failed read blob to "+t)),"dataUrl"===t?o.readAsDataURL(e):"arrayBuffer"===t&&o.readAsArrayBuffer(e)})}const q=e=>W(e,"dataUrl");function z(e,t){const n=R(t).createElement("img");return n.decoding="sync",n.loading="eager",n.src=e,n}function V(e,t){return new Promise(n=>{const{timeout:r,ownerDocument:o,onError:i,onWarn:l}=null!=t?t:{},a="string"==typeof e?z(e,R(o)):e;let c=null,s=null;function u(){n(a),c&&clearTimeout(c),null==s||s()}if(r&&(c=setTimeout(u,r)),F(a)){const e=a.currentSrc||a.src;if(!e)return a.poster?V(a.poster,t).then(n):u();if(a.readyState>=2)return u();const r=u,o=t=>{null==l||l("Failed video load",e,t),null==i||i(t),u()};s=()=>{a.removeEventListener("loadeddata",r),a.removeEventListener("error",o)},a.addEventListener("loadeddata",r,{once:!0}),a.addEventListener("error",o,{once:!0})}else{const e=k(a)?a.href.baseVal:a.currentSrc||a.src;if(!e)return u();const t=()=>f(this,null,(function*(){if(L(a)&&"decode"in a)try{yield a.decode()}catch(t){null==l||l("Failed to decode image, trying to render anyway",a.dataset.originalSrc||e,t)}u()})),n=t=>{null==l||l("Failed image load",a.dataset.originalSrc||e,t),u()};if(L(a)&&a.complete)return t();s=()=>{a.removeEventListener("load",t),a.removeEventListener("error",n)},a.addEventListener("load",t,{once:!0}),a.addEventListener("error",n,{once:!0})}})}function G(e,t){return f(this,null,(function*(){D(e)&&(L(e)||F(e)?yield V(e,t):yield Promise.all(["img","video"].flatMap(n=>Array.from(e.querySelectorAll(n)).map(e=>V(e,t)))))}))}const X=function(){let e=0;return()=>(e+=1,`u${("0000"+(Math.random()*c(36,4)<<0).toString(36)).slice(-4)}${e}`)}();function H(e){return null==e?void 0:e.split(",").map(e=>e.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}let J=0;function Y(e){const t=`${y}[#${J}]`;return J++,{time:n=>e&&console.time(`${t} ${n}`),timeEnd:n=>e&&console.timeEnd(`${t} ${n}`),warn:(...t)=>e&&((...e)=>console.warn(y,...e))(...t)}}function K(e){return{cache:e?"no-cache":"force-cache"}}function Q(e,t){return f(this,null,(function*(){return(e=>e&&"__CONTEXT__"in e)(e)?e:Z(e,d(u({},t),{autoDestruct:!0}))}))}function Z(e,t){return f(this,null,(function*(){var n,r,o,i,l;const{scale:a=1,workerUrl:c,workerNumber:s=1}=t||{},h=!(null==t||!t.debug),g=null==(n=null==t?void 0:t.features)||n,m=null!=(r=e.ownerDocument)?r:w?window.document:void 0,p=null!=(i=null==(o=e.ownerDocument)?void 0:o.defaultView)?i:w?window:void 0,y=new Map,b=d(u({width:0,height:0,quality:1,type:"image/png",scale:a,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:h,fetch:u({requestInit:K(null==(l=null==t?void 0:t.fetch)?void 0:l.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1},null==t?void 0:t.fetch),fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:s,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1},t),{__CONTEXT__:!0,log:Y(h),node:e,ownerDocument:m,ownerWindow:p,dpi:1===a?null:96*a,svgStyleElement:ee(m),svgDefsElement:null==m?void 0:m.createElementNS(U,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:v&&c&&s?s:0})].map(()=>{try{const e=new Worker(c);return e.onmessage=e=>f(this,null,(function*(){var t,n,r,o;const{url:i,result:l}=e.data;l?null==(n=null==(t=y.get(i))?void 0:t.resolve)||n.call(t,l):null==(o=null==(r=y.get(i))?void 0:r.reject)||o.call(r,new Error("Error receiving message from worker: "+i))})),e.onmessageerror=e=>{var t,n;const{url:r}=e.data;null==(n=null==(t=y.get(r))?void 0:t.reject)||n.call(t,new Error("Error receiving message from worker: "+r))},e}catch(e){return b.log.warn("Failed to new Worker",e),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:[_(m)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")+";q=0.8",requests:y,drawImageCount:0,tasks:[],features:g,isEnable:e=>{var t,n;return"restoreScrollPosition"===e?"boolean"!=typeof g&&null!=(t=g[e])&&t:"boolean"==typeof g?g:null==(n=g[e])||n}});b.log.time("wait until load"),yield G(e,{timeout:b.timeout,onWarn:b.log.warn}),b.log.timeEnd("wait until load");const{width:S,height:E}=function(e,t){let{width:n,height:r}=t;if(N(e)&&(!n||!r)){const t=e.getBoundingClientRect();n=n||t.width||Number(e.getAttribute("width"))||0,r=r||t.height||Number(e.getAttribute("height"))||0}return{width:n,height:r}}(e,b);return b.width=S,b.height=E,b}))}function ee(e){if(!e)return;const t=e.createElement("style"),n=t.ownerDocument.createTextNode("\n.______background-clip--text {\n background-clip: text;\n -webkit-background-clip: text;\n}\n");return t.appendChild(n),t}function te(e,t){return f(this,null,(function*(){const{log:n,timeout:r,drawImageCount:o,drawImageInterval:i}=t;n.time("image to canvas");const l=yield V(e,{timeout:r,onWarn:t.log.warn}),{canvas:a,context2d:c}=function(e,t){const{width:n,height:r,scale:o,backgroundColor:i,maximumCanvasSize:l}=t,a=e.createElement("canvas");a.width=Math.floor(n*o),a.height=Math.floor(r*o),a.style.width=n+"px",a.style.height=r+"px",l&&(a.width>l||a.height>l)&&(a.width>l&&a.height>l?a.width>a.height?(a.height*=l/a.width,a.width=l):(a.width*=l/a.height,a.height=l):a.width>l?(a.height*=l/a.width,a.width=l):(a.width*=l/a.height,a.height=l));const c=a.getContext("2d");return c&&i&&(c.fillStyle=i,c.fillRect(0,0,a.width,a.height)),{canvas:a,context2d:c}}(e.ownerDocument,t),s=()=>{try{null==c||c.drawImage(l,0,0,a.width,a.height)}catch(e){t.log.warn("Failed to drawImage",e)}};if(s(),t.isEnable("fixSvgXmlDecode"))for(let e=0;e<o;e++)yield new Promise(t=>{setTimeout(()=>{s(),t()},e+i)});return t.drawImageCount=0,n.timeEnd("image to canvas"),a}))}function ne(e,t){if(e.ownerDocument)try{const t=e.toDataURL();if("data:,"!==t)return z(t,e.ownerDocument)}catch(e){t.log.warn("Failed to clone canvas",e)}const n=e.cloneNode(!1),r=e.getContext("2d"),o=n.getContext("2d");try{return r&&o&&o.putImageData(r.getImageData(0,0,e.width,e.height),0,0),n}catch(e){t.log.warn("Failed to clone canvas",e)}return n}function re(e,t){return(e=>"CANVAS"===e.tagName)(e)?ne(e,t):(e=>"IFRAME"===e.tagName)(e)?function(e,t){var n;try{if(null!=(n=null==e?void 0:e.contentDocument)&&n.body)return ge(e.contentDocument.body,t)}catch(e){t.log.warn("Failed to clone iframe",e)}return e.cloneNode(!1)}(e,t):L(e)?function(e){const t=e.cloneNode(!1);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager"),t}(e):F(e)?function(e,t){return f(this,null,(function*(){if(e.ownerDocument&&!e.currentSrc&&e.poster)return z(e.poster,e.ownerDocument);const n=e.cloneNode(!1);n.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(n.src=e.currentSrc);const r=n.ownerDocument;if(r){let o=!0;if(yield V(n,{onError:()=>o=!1,onWarn:t.log.warn}),!o)return e.poster?z(e.poster,e.ownerDocument):n;n.currentTime=e.currentTime,yield new Promise(e=>{n.addEventListener("seeked",e,{once:!0})});const i=r.createElement("canvas");i.width=e.offsetWidth,i.height=e.offsetHeight;try{const e=i.getContext("2d");e&&e.drawImage(n,0,0,i.width,i.height)}catch(r){return t.log.warn("Failed to clone video",r),e.poster?z(e.poster,e.ownerDocument):n}return ne(i,t)}return n}))}(e,t):e.cloneNode(!1)}const oe=["width","height","-webkit-text-fill-color"],ie=["stroke","fill"];function le(e,t,n){const{defaultComputedStyles:r}=n,o=e.nodeName.toLowerCase(),i=T(e)&&"svg"!==o,l=i?ie.map(t=>[t,e.getAttribute(t)]).filter(([,e])=>null!==e):[],a=[i&&"svg",o,l.map((e,t)=>`${e}=${t}`).join(","),t].filter(Boolean).join(":");if(r.has(a))return r.get(a);const c=function(e){var t;let n=e.sandbox;if(!n){const{ownerDocument:r}=e;try{r&&(n=r.createElement("iframe"),n.id="__SANDBOX__-"+X(),n.width="0",n.height="0",n.style.visibility="hidden",n.style.position="fixed",r.body.appendChild(n),null==(t=n.contentWindow)||t.document.write('<!DOCTYPE html><meta charset="UTF-8"><title></title><body>'),e.sandbox=n)}catch(t){e.log.warn("Failed to getSandBox",t)}}return n}(n),s=null==c?void 0:c.contentWindow;if(!s)return new Map;const u=null==s?void 0:s.document;let d,f;i?(d=u.createElementNS(U,"svg"),f=d.ownerDocument.createElementNS(d.namespaceURI,o),l.forEach(([e,t])=>{f.setAttributeNS(null,e,t)}),d.appendChild(f)):d=f=u.createElement(o),f.textContent=" ",u.body.appendChild(d);const h=s.getComputedStyle(f,t),g=new Map;for(let e=h.length,t=0;t<e;t++){const e=h.item(t);oe.includes(e)||g.set(e,h.getPropertyValue(e))}return u.body.removeChild(d),r.set(a,g),g}function ae(e,t,n){var r;const o=new Map,i=[],l=new Map;if(n)for(const e of n)a(e);else for(let t=e.length,n=0;n<t;n++)a(e.item(n));for(let e=i.length,t=0;t<e;t++)null==(r=l.get(i[t]))||r.forEach((e,t)=>o.set(t,e));function a(n){const r=e.getPropertyValue(n),a=e.getPropertyPriority(n),c=n.lastIndexOf("-"),s=c>-1?n.substring(0,c):void 0;if(s){let e=l.get(s);e||(e=new Map,l.set(s,e)),e.set(n,[r,a])}t.get(n)===r&&!a||(s?i.push(s):o.set(n,[r,a]))}return o}const ce=[":before",":after"],se=[":-webkit-scrollbar",":-webkit-scrollbar-button",":-webkit-scrollbar-thumb",":-webkit-scrollbar-track",":-webkit-scrollbar-track-piece",":-webkit-scrollbar-corner",":-webkit-resizer"],ue=new Set(["symbol"]);function de(e,t,n,r,o){return f(this,null,(function*(){if(N(n)&&((e=>"STYLE"===e.tagName)(n)||(e=>"SCRIPT"===e.tagName)(n))||r.filter&&!r.filter(n))return;ue.has(t.nodeName)||ue.has(n.nodeName)?r.currentParentNodeStyle=void 0:r.currentParentNodeStyle=r.currentNodeStyle;const i=yield ge(n,r,!1,o);r.isEnable("restoreScrollPosition")&&function(e,t){if(!D(e)||!D(t))return;const{scrollTop:n,scrollLeft:r}=e;if(!n&&!r)return;const{transform:o}=t.style,i=new DOMMatrix(o),{a:l,b:a,c:c,d:s}=i;i.a=1,i.b=0,i.c=0,i.d=1,i.translateSelf(-r,-n),i.a=l,i.b=a,i.c=c,i.d=s,t.style.transform=i.toString()}(e,i),t.appendChild(i)}))}function fe(e,t,n,r){return f(this,null,(function*(){var o,i;for(let l=null!=(i=N(e)?null==(o=e.shadowRoot)?void 0:o.firstChild:void 0)?i:e.firstChild;l;l=l.nextSibling)if(!P(l))if(N(l)&&O(l)&&"function"==typeof l.assignedNodes){const o=l.assignedNodes();for(let i=0;i<o.length;i++)yield de(e,t,o[i],n,r)}else yield de(e,t,l,n,r)}))}const he=/^[\w-:]+$/;function ge(e,t,n=!1,r){return f(this,null,(function*(){var o,i,l,a;const{ownerDocument:c,ownerWindow:s,fontFamilies:u}=t;if(c&&(e=>3===e.nodeType)(e))return r&&/\S/.test(e.data)&&r(e.data),c.createTextNode(e.data);if(c&&s&&N(e)&&(D(e)||T(e))){const r=yield re(e,t);if(t.isEnable("removeAbnormalAttributes")){const e=r.getAttributeNames();for(let t=e.length,n=0;n<t;n++){const t=e[n];he.test(t)||r.removeAttribute(t)}}const c=t.currentNodeStyle=function(e,t,n,r){var o,i,l,a;const{ownerWindow:c,includeStyleProperties:s,currentParentNodeStyle:u}=r,d=t.style,f=c.getComputedStyle(e),h=le(e,null,r);null==u||u.forEach((e,t)=>{h.delete(t)});const g=ae(f,h,s);g.delete("transition-property"),g.delete("all"),g.delete("d"),g.delete("content"),n&&(g.delete("margin-top"),g.delete("margin-right"),g.delete("margin-bottom"),g.delete("margin-left"),g.delete("margin-block-start"),g.delete("margin-block-end"),g.delete("margin-inline-start"),g.delete("margin-inline-end"),g.set("box-sizing",["border-box",""])),"text"===(null==(o=g.get("background-clip"))?void 0:o[0])&&t.classList.add("______background-clip--text"),x&&(g.has("font-kerning")||g.set("font-kerning",["normal",""]),("hidden"===(null==(i=g.get("overflow-x"))?void 0:i[0])||"hidden"===(null==(l=g.get("overflow-y"))?void 0:l[0]))&&"ellipsis"===(null==(a=g.get("text-overflow"))?void 0:a[0])&&e.scrollWidth===e.clientWidth&&g.set("text-overflow",["clip",""]));for(let e=d.length,t=0;t<e;t++)d.removeProperty(d.item(t));return g.forEach(([e,t],n)=>{d.setProperty(n,e,t)}),g}(e,r,n,t);n&&function(e,t){const{backgroundColor:n,width:r,height:o,style:i}=t,l=e.style;if(n&&l.setProperty("background-color",n,"important"),r&&l.setProperty("width",r+"px","important"),o&&l.setProperty("height",o+"px","important"),i)for(const e in i)l[e]=i[e]}(r,t);let s=!1;if(t.isEnable("copyScrollbar")){const t=[null==(o=c.get("overflow-x"))?void 0:o[0],null==(i=c.get("overflow-y"))?void 0:i[0]];s=t.includes("scroll")||(t.includes("auto")||t.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}const d=null==(l=c.get("text-transform"))?void 0:l[0],f=H(null==(a=c.get("font-family"))?void 0:a[0]),h=f?e=>{"uppercase"===d?e=e.toUpperCase():"lowercase"===d?e=e.toLowerCase():"capitalize"===d&&(e=e[0].toUpperCase()+e.substring(1)),f.forEach(t=>{let n=u.get(t);n||u.set(t,n=new Set),e.split("").forEach(e=>n.add(e))})}:void 0;return function(e,t,n,r,o){const{ownerWindow:i,svgStyleElement:l,svgStyles:a,currentNodeStyle:c}=r;function s(n){var l;const s=i.getComputedStyle(e,n);let u=s.getPropertyValue("content");if(!u||"none"===u)return;null==o||o(u),u=u.replace(/(')|(")|(counter\(.+\))/g,"");const d=[X()],f=le(e,n,r);null==c||c.forEach((e,t)=>{f.delete(t)});const h=ae(s,f,r.includeStyleProperties);h.delete("content"),h.delete("-webkit-locale"),"text"===(null==(l=h.get("background-clip"))?void 0:l[0])&&t.classList.add("______background-clip--text");const g=[`content: '${u}';`];if(h.forEach(([e,t],n)=>{g.push(`${n}: ${e}${t?" !important":""};`)}),1===g.length)return;try{t.className=[t.className,...d].join(" ")}catch(e){return void r.log.warn("Failed to copyPseudoClass",e)}const m=g.join("\n ");let p=a.get(m);p||(p=[],a.set(m,p)),p.push(`.${d[0]}:${n}`)}l&&i&&(ce.forEach(s),n&&se.forEach(s))}(e,r,s,t,h),function(e,t){((e=>"TEXTAREA"===e.tagName)(e)||(e=>"INPUT"===e.tagName)(e)||(e=>"SELECT"===e.tagName)(e))&&t.setAttribute("value",e.value)}(e,r),F(e)||(yield fe(e,r,t,h)),r}const d=e.cloneNode(!1);return yield fe(e,d,t),d}))}function me(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove()}catch(t){e.log.warn("Failed to destroyContext",t)}e.sandbox=void 0}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[]}function pe(e){const t=e,{url:n,timeout:r,responseType:o}=t,c=((e,t)=>{var n={};for(var r in e)l.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&i)for(var r of i(e))t.indexOf(r)<0&&a.call(e,r)&&(n[r]=e[r]);return n})(t,["url","timeout","responseType"]),s=new AbortController,d=r?setTimeout(()=>s.abort(),r):void 0;return fetch(n,u({signal:s.signal},c)).then(e=>{if(!e.ok)throw new Error("Failed fetch, not 2xx response",{cause:e});switch(o){case"arrayBuffer":return e.arrayBuffer();case"dataUrl":return e.blob().then(q);case"text":default:return e.text()}}).finally(()=>clearTimeout(d))}function ye(e,t){const{url:n,requestType:r="text",responseType:o="text",imageDom:i}=t;let l=n;const{timeout:a,acceptOfImage:c,requests:s,fetchFn:d,fetch:{requestInit:h,bypassingCache:g,placeholderImage:m},font:p,workers:y,fontFamilies:w}=e;"image"===r&&(A||C)&&e.drawImageCount++;let v=s.get(n);if(!v){g&&g instanceof RegExp&&g.test(l)&&(l+=(/\?/.test(l)?"&":"?")+(new Date).getTime());const t=r.startsWith("font")&&p&&p.minify,b=new Set;t&&r.split(";")[1].split(",").forEach(e=>{w.has(e)&&w.get(e).forEach(e=>b.add(e))});const S=t&&b.size,E=u({url:l,timeout:a,responseType:S?"arrayBuffer":o,headers:"image"===r?{accept:c}:void 0},h);v={type:r,resolve:void 0,reject:void 0,response:null},v.response=f(this,null,(function*(){if(d&&"image"===r){const e=yield d(n);if(e)return e}return!A&&n.startsWith("http")&&y.length?new Promise((e,t)=>{y[s.size&y.length-1].postMessage(u({rawUrl:n},E)),v.resolve=e,v.reject=t}):pe(E)})).catch(t=>{if(s.delete(n),"image"===r&&m)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",l),"string"==typeof m?m:m(i);throw t}),s.set(n,v)}return v.response}function we(e,t,n,r){return f(this,null,(function*(){if(!ve(e))return e;for(const[o,i]of function(e,t){const n=[];return e.replace(be,(e,r,o)=>(n.push([o,I(o,t)]),e)),n.filter(([e])=>!j(e))}(e,t))try{const t=yield ye(n,{url:i,requestType:r?"image":"text",responseType:"dataUrl"});e=e.replace(Se(o),`$1${t}$3`)}catch(e){n.log.warn("Failed to fetch css data url",o,e)}return e}))}function ve(e){return/url\((['"]?)([^'"]+?)\1\)/.test(e)}const be=/url\((['"]?)([^'"]+?)\1\)/g;function Se(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}const Ee=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function xe(e,t){const{tasks:n}=t;N(e)&&((L(e)||k(e))&&n.push(...function(e,t){if(L(e)){const n=e.currentSrc||e.src;if(!j(n))return[ye(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(t=>{t&&(e.srcset="",e.dataset.originalSrc=n,e.src=t||"")})];(A||C)&&t.drawImageCount++}else if(T(e)&&!j(e.href.baseVal)){const n=e.href.baseVal;return[ye(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(t=>{t&&(e.dataset.originalSrc=n,e.href.baseVal=t||"")})]}return[]}(e,t)),(e=>"use"===e.tagName)(e)&&n.push(...function(e,t){var n;const{ownerDocument:r,svgDefsElement:o}=t,i=null!=(n=e.getAttribute("href"))?n:e.getAttribute("xlink:href");if(!i)return[];const[l,a]=i.split("#");if(a){const n="#"+a,i=null==r?void 0:r.querySelector("svg "+n);if(l&&e.setAttribute("href",n),null!=o&&o.querySelector(n))return[];if(i)return null==o||o.appendChild(i.cloneNode(!0)),[];if(l)return[ye(t,{url:l,responseType:"text"}).then(e=>{null==o||o.insertAdjacentHTML("beforeend",e)})]}return[]}(e,t))),D(e)&&n.push(...function(e,t){return Ee.map(n=>{const r=e.getPropertyValue(n);return r&&"none"!==r?((A||C)&&t.drawImageCount++,we(r,null,t,!0).then(t=>{!t||r===t||e.setProperty(n,t,e.getPropertyPriority(n))})):null}).filter(Boolean)}(e.style,t)),e.childNodes.forEach(e=>{xe(e,t)})}function Ae(e,t){return f(this,null,(function*(){const{ownerDocument:e,svgStyleElement:n,fontFamilies:r,fontCssTexts:o,tasks:i,font:l}=t;if(e&&n&&r.size)if(l&&l.cssText){const r=De(l.cssText,t);n.appendChild(e.createTextNode(r+"\n"))}else{const l=Array.from(e.styleSheets).filter(e=>{try{return"cssRules"in e&&!!e.cssRules.length}catch(n){return t.log.warn("Error while reading CSS rules from "+e.href,n),!1}});yield Promise.all(l.flatMap(e=>Array.from(e.cssRules).map((n,r)=>f(this,null,(function*(){if((e=>"CSSImportRule"===e.constructor.name)(n)){let o=r+1;const i=n.href;let l="";try{l=yield ye(t,{url:i,requestType:"text",responseType:"text"})}catch(e){t.log.warn("Error fetch remote css import from "+i,e)}const a=l.replace(be,(e,t,n)=>e.replace(n,I(n,i)));for(const n of function(e){if(null==e)return[];const t=[];let n=e.replace(Ce,"");for(;;){const e=Ne.exec(n);if(!e)break;t.push(e[0])}n=n.replace(Ne,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=r.exec(n);if(e)o.lastIndex=r.lastIndex;else{if(e=o.exec(n),!e)break;r.lastIndex=o.lastIndex}t.push(e[0])}return t}(a))try{e.insertRule(n,n.startsWith("@import")?o+=1:e.cssRules.length)}catch(e){t.log.warn("Error inserting rule from remote css import",{rule:n,error:e})}}}))))),l.flatMap(e=>Array.from(e.cssRules)).filter(e=>{var t;return(e=>"CSSFontFaceRule"===e.constructor.name)(e)&&ve(e.style.getPropertyValue("src"))&&(null==(t=H(e.style.getPropertyValue("font-family")))?void 0:t.some(e=>r.has(e)))}).forEach(r=>{const l=r,a=o.get(l.cssText);a?n.appendChild(e.createTextNode(a+"\n")):i.push(we(l.cssText,l.parentStyleSheet?l.parentStyleSheet.href:null,t).then(r=>{r=De(r,t),o.set(l.cssText,r),n.appendChild(e.createTextNode(r+"\n"))}))})}}))}const Ce=/(\/\*[\s\S]*?\*\/)/g,Ne=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi,Te=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ke=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function De(e,t){const{font:n}=t,r=n?null==n?void 0:n.preferredFormat:void 0;return r?e.replace(ke,e=>{for(;;){const[t,,n]=Te.exec(e)||[];if(!n)return"";if(n===r)return`src: ${t};`}}):e}function Pe(e,t){return f(this,null,(function*(){const n=yield Q(e,t);if(N(n.node)&&T(n.node))return n.node;const{ownerDocument:r,log:o,tasks:i,svgStyleElement:l,svgDefsElement:a,svgStyles:c,font:s,progress:u,autoDestruct:d,onCloneNode:h,onEmbedNode:g,onCreateForeignObjectSvg:m}=n;o.time("clone node");const p=yield ge(n.node,n,!0);if(l&&r){let e="";c.forEach((t,n)=>{e+=`${t.join(",\n")} {\n ${n}\n}\n`}),l.appendChild(r.createTextNode(e))}o.timeEnd("clone node"),yield null==h?void 0:h(p),!1!==s&&N(p)&&(o.time("embed web font"),yield Ae(0,n),o.timeEnd("embed web font")),o.time("embed node"),xe(p,n);const y=i.length;let w=0;null==u||u(w,y),yield Promise.all([...Array.from({length:4})].map(()=>f(this,null,(function*(){for(;;){const e=i.pop();if(!e)break;try{yield e}catch(e){n.log.warn("Failed to run task",e)}null==u||u(++w,y)}})))),o.timeEnd("embed node"),yield null==g?void 0:g(p);const v=function(e,t){const{width:n,height:r}=t,o=M(n,r,e.ownerDocument),i=o.ownerDocument.createElementNS(o.namespaceURI,"foreignObject");return i.setAttributeNS(null,"x","0%"),i.setAttributeNS(null,"y","0%"),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.append(e),o.appendChild(i),o}(p,n);return a&&v.insertBefore(a,v.children[0]),l&&v.insertBefore(l,v.children[0]),d&&me(n),yield null==m?void 0:m(v),v}))}function Le(e,t){return f(this,null,(function*(){var n;const r=yield Q(e,t),o=yield Pe(r),i=$(o,r.isEnable("removeControlCharacter"));r.autoDestruct||(r.svgStyleElement=ee(r.ownerDocument),r.svgDefsElement=null==(n=r.ownerDocument)?void 0:n.createElementNS(U,"defs"),r.svgStyles.clear());const l=z(i,o.ownerDocument);return yield te(l,r)}))}function Fe(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{log:r,quality:o,type:i,dpi:l}=n,a=yield Le(n);r.time("canvas to data url");let c=a.toDataURL(i,o);if(["image/png","image/jpeg"].includes(i)&&l&&b&&S){const[e,t]=c.split(",");let n=0,r=!1;if("image/png"===i){const e=function(e){let t=e.indexOf("AAlwSFlz");return-1===t&&(t=e.indexOf("AAAJcEhZ")),-1===t&&(t=e.indexOf("AAAACXBI")),t}(t);e>=0?(n=4*Math.ceil((e+28)/3),r=!0):n=44}else"image/jpeg"===i&&(n=24);const o=t.substring(0,n),a=t.substring(n),s=window.atob(o),u=new Uint8Array(s.length);for(let e=0;e<u.length;e++)u[e]=s.charCodeAt(e);const d="image/png"===i?p(u,l,r):h(u,l);c=[e,",",window.btoa(String.fromCharCode(...d)),a].join("")}return r.timeEnd("canvas to data url"),c}))}function Oe(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{width:r,height:o,ownerDocument:i}=n,l=yield Fe(n),a=M(r,o,i),c=a.ownerDocument.createElementNS(a.namespaceURI,"image");return c.setAttributeNS(null,"href",l),c.setAttributeNS(null,"height","100%"),c.setAttributeNS(null,"width","100%"),a.appendChild(c),$(a,n.isEnable("removeControlCharacter"))}))}e.createContext=Z,e.destroyContext=me,e.domToBlob=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{log:r,type:o,quality:i,dpi:l}=n,a=yield Le(n);r.time("canvas to blob");const c=yield B(a,o,i);if(["image/png","image/jpeg"].includes(o)&&l){const e=yield(e=>W(e,"arrayBuffer"))(c.slice(0,33));let t=new Uint8Array(e);return"image/png"===o?t=p(t,l):"image/jpeg"===o&&(t=h(t,l)),r.timeEnd("canvas to blob"),new Blob([t,c.slice(33)],{type:o})}return r.timeEnd("canvas to blob"),c}))},e.domToCanvas=Le,e.domToDataUrl=Fe,e.domToForeignObjectSvg=Pe,e.domToImage=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{ownerDocument:r,width:o,height:i,scale:l,type:a}=n,c=z("image/svg+xml"===a?yield Oe(n):yield Fe(n),r);return c.width=Math.floor(o*l),c.height=Math.floor(i*l),c.style.width=o+"px",c.style.height=i+"px",c}))},e.domToJpeg=function(e,t){return f(this,null,(function*(){return Fe(yield Q(e,d(u({},t),{type:"image/jpeg"})))}))},e.domToPixel=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),r=yield Le(n);return r.getContext("2d").getImageData(0,0,r.width,r.height).data}))},e.domToPng=function(e,t){return f(this,null,(function*(){return Fe(yield Q(e,d(u({},t),{type:"image/png"})))}))},e.domToSvg=Oe,e.domToWebp=function(e,t){return f(this,null,(function*(){return Fe(yield Q(e,d(u({},t),{type:"image/webp"})))}))},e.loadMedia=V,e.waitUntilLoad=G,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)}}]);
2
+ (window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[11],{573:function(e,t,n){"use strict";n.r(t);var r=n(960),o=n(2),l=n(1),i=n(9);var a=function(e,t){Object(l.useEffect)((function(){var t=e(),n=!1;return function(){Object(o.b)(this,void 0,void 0,(function(){return Object(o.e)(this,(function(e){switch(e.label){case 0:if(r=t,!Object(i.b)(r[Symbol.asyncIterator]))return[3,4];e.label=1;case 1:return[4,t.next()];case 2:return e.sent().done||n?[3,3]:[3,1];case 3:return[3,6];case 4:return[4,t];case 5:e.sent(),e.label=6;case 6:return[2]}var r}))}))}(),function(){n=!0}}),t)},s=n(261);function c(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,r,o,l){var s=r&&r.prototype instanceof a?r:a,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,o){var l,a,s,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:g,f:g.bind(e,4),d:function(t,n){return l=t,a=0,s=e,f.n=n,i}};function g(n,r){for(a=n,s=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,l=u[t],g=f.p,m=l[2];n>3?(o=m===r)&&(s=l[(a=l[4])?5:(a=3,3)],l[4]=l[5]=e):l[0]<=g&&((o=n<2&&g<l[1])?(a=0,f.v=r,f.n=l[1]):g<m&&(o=n<3||l[0]>r||r>m)&&(l[4]=n,l[5]=r,f.n=m,a=0))}if(o||n>1)return i;throw d=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&g(u,m),a=u,s=m;(t=a<2?e:s)||!d;){l||(a?a<3?(a>1&&(f.n=-1),g(a,s)):f.n=s:f.v=s);try{if(c=2,l){if(a||(o="next"),t=l[o]){if(!(t=t.call(l,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=l.return)&&t.call(l),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);l=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==i)break}catch(t){l=e,a=1,s=t}finally{c=1}}return{value:t,done:d}}}(n,o,l),!0),c}var i={};function a(){}function s(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,(function(){return this})),t),g=d.prototype=a.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(g),e}return s.prototype=d,u(g,"constructor",d),u(d,"constructor",s),s.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(g),u(g,o,"Generator"),u(g,r,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:l,m:m}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(u=function(e,t,n,r){function l(t,n){u(e,t,(function(e){return this._invoke(t,n,e)}))}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(l("next",0),l("throw",1),l("return",2))})(e,t,n,r)}function d(e,t,n,r,o,l,i){try{var a=e[l](i),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var l=e.apply(t,n);function i(e){d(l,r,o,i,a,"next",e)}function a(e){d(l,r,o,i,a,"throw",e)}i(void 0)}))}}var g=function(e){var t=e.targetSelector,n=e.scale,o=e.setProps;return a(f(c().m((function e(){var l;return c().w((function(e){for(;;)switch(e.n){case 0:t&&((l=document.querySelector(t))?Object(r.domToPng)(l,{scale:n}).then((function(e){o({screenshotResult:{selector:t,status:"success",dataUrl:e,timestamp:(new Date).getTime()}})})):o({screenshotResult:{selector:t,status:"failed",dataUrl:null,timestamp:(new Date).getTime()}}),o({targetSelector:null}));case 1:return e.a(2)}}),e)}))),[t]),React.createElement(React.Fragment,null)};t.default=g;g.defaultProps=s.b,g.propTypes=s.c},960:function(e,t,n){!function(e){"use strict";var t,n=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=Math.pow,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var n in t||(t={}))i.call(t,n)&&c(e,n,t[n]);if(l)for(var n of l(t))a.call(t,n)&&c(e,n,t[n]);return e},d=(e,t)=>r(e,o(t)),f=(e,t,n)=>new Promise((r,o)=>{var l=e=>{try{a(n.next(e))}catch(e){o(e)}},i=e=>{try{a(n.throw(e))}catch(e){o(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(l,i);a((n=n.apply(e,t)).next())});function g(e,t){return e[13]=1,e[14]=t>>8,e[15]=255&t,e[16]=t>>8,e[17]=255&t,e}let m;function h(e){let t=-1;m||(m=function(){const e=new Int32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}());for(let n=0;n<e.length;n++)t=m[255&(t^e[n])]^t>>>8;return-1^t}function p(e,t,n=!1){const r=new Uint8Array(13);t*=39.3701,r[0]=112,r[1]=72,r[2]=89,r[3]=115,r[4]=t>>>24,r[5]=t>>>16,r[6]=t>>>8,r[7]=255&t,r[8]=r[4],r[9]=r[5],r[10]=r[6],r[11]=r[7],r[12]=1;const o=h(r),l=new Uint8Array(4);if(l[0]=o>>>24,l[1]=o>>>16,l[2]=o>>>8,l[3]=255&o,n){const t=function(e){for(let t=e.length-1;t>=4;t--)if(9===e[t-4]&&112===e[t-3]&&72===e[t-2]&&89===e[t-1]&&115===e[t])return t-3;return 0}(e);return e.set(r,t),e.set(l,t+13),e}{const t=new Uint8Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=9;const n=new Uint8Array(54);return n.set(e,0),n.set(t,33),n.set(r,37),n.set(l,50),n}}const y="[modern-screenshot]",w="undefined"!=typeof window,v=w&&"Worker"in window,b=w&&"atob"in window,S=w&&"btoa"in window,E=w?null==(t=window.navigator)?void 0:t.userAgent:"",x=E.includes("Chrome"),A=E.includes("AppleWebKit")&&!x,C=E.includes("Firefox"),T=e=>1===e.nodeType,N=e=>"object"==typeof e.className,D=e=>"image"===e.tagName,k=e=>T(e)&&void 0!==e.style&&!N(e),P=e=>8===e.nodeType,F=e=>"IMG"===e.tagName,O=e=>"VIDEO"===e.tagName,I=e=>"SLOT"===e.tagName;function j(e){var t;const n=null==(t=null==e?void 0:e.createElement)?void 0:t.call(e,"canvas");return n&&(n.height=n.width=1),!!n&&"toDataURL"in n&&!!n.toDataURL("image/webp").includes("image/webp")}const R=e=>e.startsWith("data:");function _(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(w&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!w)return e;const n=U().implementation.createHTMLDocument(),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}function U(e){var t;return null!=(t=e&&T(e)?null==e?void 0:e.ownerDocument:e)?t:window.document}const M="http://www.w3.org/2000/svg";function L(e,t,n){const r=U(n).createElementNS(M,"svg");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),r}function $(e,t){let n=(new XMLSerializer).serializeToString(e);return t&&(n=n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)}function B(e,t="image/png",n=1){return f(this,null,(function*(){try{return yield new Promise((r,o)=>{e.toBlob(e=>{e?r(e):o(new Error("Blob is null"))},t,n)})}catch(r){if(b)return function(e){var t,n;const[r,o]=e.split(","),l=null!=(n=null==(t=r.match(/data:(.+);/))?void 0:t[1])?n:void 0,i=window.atob(o),a=i.length,s=new Uint8Array(a);for(let e=0;e<a;e+=1)s[e]=i.charCodeAt(e);return new Blob([s],{type:l})}(e.toDataURL(t,n));throw r}}))}function W(e,t){return new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(o.error),o.onabort=()=>r(new Error("Failed read blob to "+t)),"dataUrl"===t?o.readAsDataURL(e):"arrayBuffer"===t&&o.readAsArrayBuffer(e)})}const q=e=>W(e,"dataUrl");function z(e,t){const n=U(t).createElement("img");return n.decoding="sync",n.loading="eager",n.src=e,n}function V(e,t){return new Promise(n=>{const{timeout:r,ownerDocument:o,onError:l,onWarn:i}=null!=t?t:{},a="string"==typeof e?z(e,U(o)):e;let s=null,c=null;function u(){n(a),s&&clearTimeout(s),null==c||c()}if(r&&(s=setTimeout(u,r)),O(a)){const e=a.currentSrc||a.src;if(!e)return a.poster?V(a.poster,t).then(n):u();if(a.readyState>=2)return u();const r=u,o=t=>{null==i||i("Failed video load",e,t),null==l||l(t),u()};c=()=>{a.removeEventListener("loadeddata",r),a.removeEventListener("error",o)},a.addEventListener("loadeddata",r,{once:!0}),a.addEventListener("error",o,{once:!0})}else{const e=D(a)?a.href.baseVal:a.currentSrc||a.src;if(!e)return u();const t=()=>f(this,null,(function*(){if(F(a)&&"decode"in a)try{yield a.decode()}catch(t){null==i||i("Failed to decode image, trying to render anyway",a.dataset.originalSrc||e,t)}u()})),n=t=>{null==i||i("Failed image load",a.dataset.originalSrc||e,t),u()};if(F(a)&&a.complete)return t();c=()=>{a.removeEventListener("load",t),a.removeEventListener("error",n)},a.addEventListener("load",t,{once:!0}),a.addEventListener("error",n,{once:!0})}})}function G(e,t){return f(this,null,(function*(){k(e)&&(F(e)||O(e)?yield V(e,t):yield Promise.all(["img","video"].flatMap(n=>Array.from(e.querySelectorAll(n)).map(e=>V(e,t)))))}))}const X=function(){let e=0;return()=>(e+=1,`u${("0000"+(Math.random()*s(36,4)<<0).toString(36)).slice(-4)}${e}`)}();function H(e){return null==e?void 0:e.split(",").map(e=>e.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}let J=0;function Y(e){const t=`${y}[#${J}]`;return J++,{time:n=>e&&console.time(`${t} ${n}`),timeEnd:n=>e&&console.timeEnd(`${t} ${n}`),warn:(...t)=>e&&((...e)=>console.warn(y,...e))(...t)}}function K(e){return{cache:e?"no-cache":"force-cache"}}function Q(e,t){return f(this,null,(function*(){return(e=>e&&"__CONTEXT__"in e)(e)?e:Z(e,d(u({},t),{autoDestruct:!0}))}))}function Z(e,t){return f(this,null,(function*(){var n,r,o,l,i;const{scale:a=1,workerUrl:s,workerNumber:c=1}=t||{},g=!(null==t||!t.debug),m=null==(n=null==t?void 0:t.features)||n,h=null!=(r=e.ownerDocument)?r:w?window.document:void 0,p=null!=(l=null==(o=e.ownerDocument)?void 0:o.defaultView)?l:w?window:void 0,y=new Map,b=d(u({width:0,height:0,quality:1,type:"image/png",scale:a,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:g,fetch:u({requestInit:K(null==(i=null==t?void 0:t.fetch)?void 0:i.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1},null==t?void 0:t.fetch),fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:c,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1},t),{__CONTEXT__:!0,log:Y(g),node:e,ownerDocument:h,ownerWindow:p,dpi:1===a?null:96*a,svgStyleElement:ee(h),svgDefsElement:null==h?void 0:h.createElementNS(M,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:v&&s&&c?c:0})].map(()=>{try{const e=new Worker(s);return e.onmessage=e=>f(this,null,(function*(){var t,n,r,o;const{url:l,result:i}=e.data;i?null==(n=null==(t=y.get(l))?void 0:t.resolve)||n.call(t,i):null==(o=null==(r=y.get(l))?void 0:r.reject)||o.call(r,new Error("Error receiving message from worker: "+l))})),e.onmessageerror=e=>{var t,n;const{url:r}=e.data;null==(n=null==(t=y.get(r))?void 0:t.reject)||n.call(t,new Error("Error receiving message from worker: "+r))},e}catch(e){return b.log.warn("Failed to new Worker",e),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:[j(h)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")+";q=0.8",requests:y,drawImageCount:0,tasks:[],features:m,isEnable:e=>{var t,n;return"restoreScrollPosition"===e?"boolean"!=typeof m&&null!=(t=m[e])&&t:"boolean"==typeof m?m:null==(n=m[e])||n},shadowRoots:[]});b.log.time("wait until load"),yield G(e,{timeout:b.timeout,onWarn:b.log.warn}),b.log.timeEnd("wait until load");const{width:S,height:E}=function(e,t){let{width:n,height:r}=t;if(T(e)&&(!n||!r)){const t=e.getBoundingClientRect();n=n||t.width||Number(e.getAttribute("width"))||0,r=r||t.height||Number(e.getAttribute("height"))||0}return{width:n,height:r}}(e,b);return b.width=S,b.height=E,b}))}function ee(e){if(!e)return;const t=e.createElement("style"),n=t.ownerDocument.createTextNode("\n.______background-clip--text {\n background-clip: text;\n -webkit-background-clip: text;\n}\n");return t.appendChild(n),t}function te(e,t){return f(this,null,(function*(){const{log:n,timeout:r,drawImageCount:o,drawImageInterval:l}=t;n.time("image to canvas");const i=yield V(e,{timeout:r,onWarn:t.log.warn}),{canvas:a,context2d:s}=function(e,t){const{width:n,height:r,scale:o,backgroundColor:l,maximumCanvasSize:i}=t,a=e.createElement("canvas");a.width=Math.floor(n*o),a.height=Math.floor(r*o),a.style.width=n+"px",a.style.height=r+"px",i&&(a.width>i||a.height>i)&&(a.width>i&&a.height>i?a.width>a.height?(a.height*=i/a.width,a.width=i):(a.width*=i/a.height,a.height=i):a.width>i?(a.height*=i/a.width,a.width=i):(a.width*=i/a.height,a.height=i));const s=a.getContext("2d");return s&&l&&(s.fillStyle=l,s.fillRect(0,0,a.width,a.height)),{canvas:a,context2d:s}}(e.ownerDocument,t),c=()=>{try{null==s||s.drawImage(i,0,0,a.width,a.height)}catch(e){t.log.warn("Failed to drawImage",e)}};if(c(),t.isEnable("fixSvgXmlDecode"))for(let e=0;e<o;e++)yield new Promise(t=>{setTimeout(()=>{c(),t()},e+l)});return t.drawImageCount=0,n.timeEnd("image to canvas"),a}))}function ne(e,t){if(e.ownerDocument)try{const t=e.toDataURL();if("data:,"!==t)return z(t,e.ownerDocument)}catch(e){t.log.warn("Failed to clone canvas",e)}const n=e.cloneNode(!1),r=e.getContext("2d"),o=n.getContext("2d");try{return r&&o&&o.putImageData(r.getImageData(0,0,e.width,e.height),0,0),n}catch(e){t.log.warn("Failed to clone canvas",e)}return n}function re(e,t){return(e=>"CANVAS"===e.tagName)(e)?ne(e,t):(e=>"IFRAME"===e.tagName)(e)?function(e,t){var n;try{if(null!=(n=null==e?void 0:e.contentDocument)&&n.body)return me(e.contentDocument.body,t)}catch(e){t.log.warn("Failed to clone iframe",e)}return e.cloneNode(!1)}(e,t):F(e)?function(e){const t=e.cloneNode(!1);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager"),t}(e):O(e)?function(e,t){return f(this,null,(function*(){if(e.ownerDocument&&!e.currentSrc&&e.poster)return z(e.poster,e.ownerDocument);const n=e.cloneNode(!1);n.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(n.src=e.currentSrc);const r=n.ownerDocument;if(r){let o=!0;if(yield V(n,{onError:()=>o=!1,onWarn:t.log.warn}),!o)return e.poster?z(e.poster,e.ownerDocument):n;n.currentTime=e.currentTime,yield new Promise(e=>{n.addEventListener("seeked",e,{once:!0})});const l=r.createElement("canvas");l.width=e.offsetWidth,l.height=e.offsetHeight;try{const e=l.getContext("2d");e&&e.drawImage(n,0,0,l.width,l.height)}catch(r){return t.log.warn("Failed to clone video",r),e.poster?z(e.poster,e.ownerDocument):n}return ne(l,t)}return n}))}(e,t):e.cloneNode(!1)}const oe=["width","height","-webkit-text-fill-color"],le=["stroke","fill"];function ie(e,t,n){const{defaultComputedStyles:r}=n,o=e.nodeName.toLowerCase(),l=N(e)&&"svg"!==o,i=l?le.map(t=>[t,e.getAttribute(t)]).filter(([,e])=>null!==e):[],a=[l&&"svg",o,i.map((e,t)=>`${e}=${t}`).join(","),t].filter(Boolean).join(":");if(r.has(a))return r.get(a);const s=function(e){let t=e.sandbox;if(!t){const{ownerDocument:n}=e;try{n&&(t=n.createElement("iframe"),t.id="__SANDBOX__"+X(),t.width="0",t.height="0",t.style.visibility="hidden",t.style.position="fixed",n.body.appendChild(t),t.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',e.sandbox=t)}catch(t){e.log.warn("Failed to getSandBox",t)}}return t}(n),c=null==s?void 0:s.contentWindow;if(!c)return new Map;const u=null==c?void 0:c.document;let d,f;l?(d=u.createElementNS(M,"svg"),f=d.ownerDocument.createElementNS(d.namespaceURI,o),i.forEach(([e,t])=>{f.setAttributeNS(null,e,t)}),d.appendChild(f)):d=f=u.createElement(o),f.textContent=" ",u.body.appendChild(d);const g=c.getComputedStyle(f,t),m=new Map;for(let e=g.length,t=0;t<e;t++){const e=g.item(t);oe.includes(e)||m.set(e,g.getPropertyValue(e))}return u.body.removeChild(d),r.set(a,m),m}function ae(e,t,n){var r;const o=new Map,l=[],i=new Map;if(n)for(const e of n)a(e);else for(let t=e.length,n=0;n<t;n++)a(e.item(n));for(let e=l.length,t=0;t<e;t++)null==(r=i.get(l[t]))||r.forEach((e,t)=>o.set(t,e));function a(n){const r=e.getPropertyValue(n),a=e.getPropertyPriority(n),s=n.lastIndexOf("-"),c=s>-1?n.substring(0,s):void 0;if(c){let e=i.get(c);e||(e=new Map,i.set(c,e)),e.set(n,[r,a])}t.get(n)===r&&!a||(c?l.push(c):o.set(n,[r,a]))}return o}const se=[":before",":after"],ce=[":-webkit-scrollbar",":-webkit-scrollbar-button",":-webkit-scrollbar-thumb",":-webkit-scrollbar-track",":-webkit-scrollbar-track-piece",":-webkit-scrollbar-corner",":-webkit-resizer"],ue=new Set(["symbol"]);function de(e,t,n,r,o){return f(this,null,(function*(){if(T(n)&&((e=>"STYLE"===e.tagName)(n)||(e=>"SCRIPT"===e.tagName)(n))||r.filter&&!r.filter(n))return;ue.has(t.nodeName)||ue.has(n.nodeName)?r.currentParentNodeStyle=void 0:r.currentParentNodeStyle=r.currentNodeStyle;const l=yield me(n,r,!1,o);r.isEnable("restoreScrollPosition")&&function(e,t){if(!k(e)||!k(t))return;const{scrollTop:n,scrollLeft:r}=e;if(!n&&!r)return;const{transform:o}=t.style,l=new DOMMatrix(o),{a:i,b:a,c:s,d:c}=l;l.a=1,l.b=0,l.c=0,l.d=1,l.translateSelf(-r,-n),l.a=i,l.b=a,l.c=s,l.d=c,t.style.transform=l.toString()}(e,l),t.appendChild(l)}))}function fe(e,t,n,r){return f(this,null,(function*(){var o;let l=e.firstChild;T(e)&&e.shadowRoot&&(l=null==(o=e.shadowRoot)?void 0:o.firstChild,n.shadowRoots.push(e.shadowRoot));for(let o=l;o;o=o.nextSibling)if(!P(o))if(T(o)&&I(o)&&"function"==typeof o.assignedNodes){const l=o.assignedNodes();for(let o=0;o<l.length;o++)yield de(e,t,l[o],n,r)}else yield de(e,t,o,n,r)}))}const ge=/^[\w-:]+$/;function me(e,t,n=!1,r){return f(this,null,(function*(){var o,l,i,a;const{ownerDocument:s,ownerWindow:c,fontFamilies:u,onCloneEachNode:d}=t;if(s&&(e=>3===e.nodeType)(e))return r&&/\S/.test(e.data)&&r(e.data),s.createTextNode(e.data);if(s&&c&&T(e)&&(k(e)||N(e))){const r=yield re(e,t);if(t.isEnable("removeAbnormalAttributes")){const e=r.getAttributeNames();for(let t=e.length,n=0;n<t;n++){const t=e[n];ge.test(t)||r.removeAttribute(t)}}const s=t.currentNodeStyle=function(e,t,n,r){var o,l,i,a;const{ownerWindow:s,includeStyleProperties:c,currentParentNodeStyle:u}=r,d=t.style,f=s.getComputedStyle(e),g=ie(e,null,r);null==u||u.forEach((e,t)=>{g.delete(t)});const m=ae(f,g,c);m.delete("transition-property"),m.delete("all"),m.delete("d"),m.delete("content"),n&&(m.delete("margin-top"),m.delete("margin-right"),m.delete("margin-bottom"),m.delete("margin-left"),m.delete("margin-block-start"),m.delete("margin-block-end"),m.delete("margin-inline-start"),m.delete("margin-inline-end"),m.set("box-sizing",["border-box",""])),"text"===(null==(o=m.get("background-clip"))?void 0:o[0])&&t.classList.add("______background-clip--text"),x&&(m.has("font-kerning")||m.set("font-kerning",["normal",""]),("hidden"===(null==(l=m.get("overflow-x"))?void 0:l[0])||"hidden"===(null==(i=m.get("overflow-y"))?void 0:i[0]))&&"ellipsis"===(null==(a=m.get("text-overflow"))?void 0:a[0])&&e.scrollWidth===e.clientWidth&&m.set("text-overflow",["clip",""]));for(let e=d.length,t=0;t<e;t++)d.removeProperty(d.item(t));return m.forEach(([e,t],n)=>{d.setProperty(n,e,t)}),m}(e,r,n,t);n&&function(e,t){const{backgroundColor:n,width:r,height:o,style:l}=t,i=e.style;if(n&&i.setProperty("background-color",n,"important"),r&&i.setProperty("width",r+"px","important"),o&&i.setProperty("height",o+"px","important"),l)for(const e in l)i[e]=l[e]}(r,t);let c=!1;if(t.isEnable("copyScrollbar")){const t=[null==(o=s.get("overflow-x"))?void 0:o[0],null==(l=s.get("overflow-y"))?void 0:l[0]];c=t.includes("scroll")||(t.includes("auto")||t.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}const f=null==(i=s.get("text-transform"))?void 0:i[0],g=H(null==(a=s.get("font-family"))?void 0:a[0]),m=g?e=>{"uppercase"===f?e=e.toUpperCase():"lowercase"===f?e=e.toLowerCase():"capitalize"===f&&(e=e[0].toUpperCase()+e.substring(1)),g.forEach(t=>{let n=u.get(t);n||u.set(t,n=new Set),e.split("").forEach(e=>n.add(e))})}:void 0;return function(e,t,n,r,o){const{ownerWindow:l,svgStyleElement:i,svgStyles:a,currentNodeStyle:s}=r;function c(n){var i;const c=l.getComputedStyle(e,n);let u=c.getPropertyValue("content");if(!u||"none"===u)return;null==o||o(u),u=u.replace(/(')|(")|(counter\(.+\))/g,"");const d=[X()],f=ie(e,n,r);null==s||s.forEach((e,t)=>{f.delete(t)});const g=ae(c,f,r.includeStyleProperties);g.delete("content"),g.delete("-webkit-locale"),"text"===(null==(i=g.get("background-clip"))?void 0:i[0])&&t.classList.add("______background-clip--text");const m=[`content: '${u}';`];if(g.forEach(([e,t],n)=>{m.push(`${n}: ${e}${t?" !important":""};`)}),1===m.length)return;try{t.className=[t.className,...d].join(" ")}catch(e){return void r.log.warn("Failed to copyPseudoClass",e)}const h=m.join("\n ");let p=a.get(h);p||(p=[],a.set(h,p)),p.push(`.${d[0]}:${n}`)}i&&l&&(se.forEach(c),n&&ce.forEach(c))}(e,r,c,t,m),function(e,t){((e=>"TEXTAREA"===e.tagName)(e)||(e=>"INPUT"===e.tagName)(e)||(e=>"SELECT"===e.tagName)(e))&&t.setAttribute("value",e.value)}(e,r),O(e)||(yield fe(e,r,t,m)),yield null==d?void 0:d(r),r}const f=e.cloneNode(!1);return yield fe(e,f,t),yield null==d?void 0:d(f),f}))}function he(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove()}catch(t){e.log.warn("Failed to destroyContext",t)}e.sandbox=void 0}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[],e.shadowRoots=[]}function pe(e){const t=e,{url:n,timeout:r,responseType:o}=t,s=((e,t)=>{var n={};for(var r in e)i.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&l)for(var r of l(e))t.indexOf(r)<0&&a.call(e,r)&&(n[r]=e[r]);return n})(t,["url","timeout","responseType"]),c=new AbortController,d=r?setTimeout(()=>c.abort(),r):void 0;return fetch(n,u({signal:c.signal},s)).then(e=>{if(!e.ok)throw new Error("Failed fetch, not 2xx response",{cause:e});switch(o){case"arrayBuffer":return e.arrayBuffer();case"dataUrl":return e.blob().then(q);case"text":default:return e.text()}}).finally(()=>clearTimeout(d))}function ye(e,t){const{url:n,requestType:r="text",responseType:o="text",imageDom:l}=t;let i=n;const{timeout:a,acceptOfImage:s,requests:c,fetchFn:d,fetch:{requestInit:g,bypassingCache:m,placeholderImage:h},font:p,workers:y,fontFamilies:w}=e;"image"===r&&(A||C)&&e.drawImageCount++;let v=c.get(n);if(!v){m&&m instanceof RegExp&&m.test(i)&&(i+=(/\?/.test(i)?"&":"?")+(new Date).getTime());const t=r.startsWith("font")&&p&&p.minify,b=new Set;t&&r.split(";")[1].split(",").forEach(e=>{w.has(e)&&w.get(e).forEach(e=>b.add(e))});const S=t&&b.size,E=u({url:i,timeout:a,responseType:S?"arrayBuffer":o,headers:"image"===r?{accept:s}:void 0},g);v={type:r,resolve:void 0,reject:void 0,response:null},v.response=f(this,null,(function*(){if(d&&"image"===r){const e=yield d(n);if(e)return e}return!A&&n.startsWith("http")&&y.length?new Promise((e,t)=>{y[c.size&y.length-1].postMessage(u({rawUrl:n},E)),v.resolve=e,v.reject=t}):pe(E)})).catch(t=>{if(c.delete(n),"image"===r&&h)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",i),"string"==typeof h?h:h(l);throw t}),c.set(n,v)}return v.response}function we(e,t,n,r){return f(this,null,(function*(){if(!ve(e))return e;for(const[o,l]of function(e,t){const n=[];return e.replace(be,(e,r,o)=>(n.push([o,_(o,t)]),e)),n.filter(([e])=>!R(e))}(e,t))try{const t=yield ye(n,{url:l,requestType:r?"image":"text",responseType:"dataUrl"});e=e.replace(Se(o),`$1${t}$3`)}catch(e){n.log.warn("Failed to fetch css data url",o,e)}return e}))}function ve(e){return/url\((['"]?)([^'"]+?)\1\)/.test(e)}const be=/url\((['"]?)([^'"]+?)\1\)/g;function Se(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}const Ee=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function xe(e,t){const{tasks:n}=t;T(e)&&((F(e)||D(e))&&n.push(...function(e,t){if(F(e)){const n=e.currentSrc||e.src;if(!R(n))return[ye(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(t=>{t&&(e.srcset="",e.dataset.originalSrc=n,e.src=t||"")})];(A||C)&&t.drawImageCount++}else if(N(e)&&!R(e.href.baseVal)){const n=e.href.baseVal;return[ye(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(t=>{t&&(e.dataset.originalSrc=n,e.href.baseVal=t||"")})]}return[]}(e,t)),(e=>"use"===e.tagName)(e)&&n.push(...function(e,t){var n;const{ownerDocument:r,svgDefsElement:o}=t,l=null!=(n=e.getAttribute("href"))?n:e.getAttribute("xlink:href");if(!l)return[];const[i,a]=l.split("#");if(a){const n="#"+a,l=t.shadowRoots.reduce((e,t)=>null!=e?e:t.querySelector("svg "+n),null==r?void 0:r.querySelector("svg "+n));if(i&&e.setAttribute("href",n),null!=o&&o.querySelector(n))return[];if(l)return null==o||o.appendChild(l.cloneNode(!0)),[];if(i)return[ye(t,{url:i,responseType:"text"}).then(e=>{null==o||o.insertAdjacentHTML("beforeend",e)})]}return[]}(e,t))),k(e)&&n.push(...function(e,t){return Ee.map(n=>{const r=e.getPropertyValue(n);return r&&"none"!==r?((A||C)&&t.drawImageCount++,we(r,null,t,!0).then(t=>{!t||r===t||e.setProperty(n,t,e.getPropertyPriority(n))})):null}).filter(Boolean)}(e.style,t)),e.childNodes.forEach(e=>{xe(e,t)})}function Ae(e,t){return f(this,null,(function*(){const{ownerDocument:e,svgStyleElement:n,fontFamilies:r,fontCssTexts:o,tasks:l,font:i}=t;if(e&&n&&r.size)if(i&&i.cssText){const r=ke(i.cssText,t);n.appendChild(e.createTextNode(r+"\n"))}else{const i=Array.from(e.styleSheets).filter(e=>{try{return"cssRules"in e&&!!e.cssRules.length}catch(n){return t.log.warn("Error while reading CSS rules from "+e.href,n),!1}});yield Promise.all(i.flatMap(e=>Array.from(e.cssRules).map((n,r)=>f(this,null,(function*(){if((e=>"CSSImportRule"===e.constructor.name)(n)){let o=r+1;const l=n.href;let i="";try{i=yield ye(t,{url:l,requestType:"text",responseType:"text"})}catch(e){t.log.warn("Error fetch remote css import from "+l,e)}const a=i.replace(be,(e,t,n)=>e.replace(n,_(n,l)));for(const n of function(e){if(null==e)return[];const t=[];let n=e.replace(Ce,"");for(;;){const e=Te.exec(n);if(!e)break;t.push(e[0])}n=n.replace(Te,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=r.exec(n);if(e)o.lastIndex=r.lastIndex;else{if(e=o.exec(n),!e)break;r.lastIndex=o.lastIndex}t.push(e[0])}return t}(a))try{e.insertRule(n,n.startsWith("@import")?o+=1:e.cssRules.length)}catch(e){t.log.warn("Error inserting rule from remote css import",{rule:n,error:e})}}}))))),i.flatMap(e=>Array.from(e.cssRules)).filter(e=>{var t;return(e=>"CSSFontFaceRule"===e.constructor.name)(e)&&ve(e.style.getPropertyValue("src"))&&(null==(t=H(e.style.getPropertyValue("font-family")))?void 0:t.some(e=>r.has(e)))}).forEach(r=>{const i=r,a=o.get(i.cssText);a?n.appendChild(e.createTextNode(a+"\n")):l.push(we(i.cssText,i.parentStyleSheet?i.parentStyleSheet.href:null,t).then(r=>{r=ke(r,t),o.set(i.cssText,r),n.appendChild(e.createTextNode(r+"\n"))}))})}}))}const Ce=/(\/\*[\s\S]*?\*\/)/g,Te=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi,Ne=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,De=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function ke(e,t){const{font:n}=t,r=n?null==n?void 0:n.preferredFormat:void 0;return r?e.replace(De,e=>{for(;;){const[t,,n]=Ne.exec(e)||[];if(!n)return"";if(n===r)return`src: ${t};`}}):e}function Pe(e,t){return f(this,null,(function*(){const n=yield Q(e,t);if(T(n.node)&&N(n.node))return n.node;const{ownerDocument:r,log:o,tasks:l,svgStyleElement:i,svgDefsElement:a,svgStyles:s,font:c,progress:u,autoDestruct:d,onCloneNode:g,onEmbedNode:m,onCreateForeignObjectSvg:h}=n;o.time("clone node");const p=yield me(n.node,n,!0);if(i&&r){let e="";s.forEach((t,n)=>{e+=`${t.join(",\n")} {\n ${n}\n}\n`}),i.appendChild(r.createTextNode(e))}o.timeEnd("clone node"),yield null==g?void 0:g(p),!1!==c&&T(p)&&(o.time("embed web font"),yield Ae(0,n),o.timeEnd("embed web font")),o.time("embed node"),xe(p,n);const y=l.length;let w=0;null==u||u(w,y),yield Promise.all([...Array.from({length:4})].map(()=>f(this,null,(function*(){for(;;){const e=l.pop();if(!e)break;try{yield e}catch(e){n.log.warn("Failed to run task",e)}null==u||u(++w,y)}})))),o.timeEnd("embed node"),yield null==m?void 0:m(p);const v=function(e,t){const{width:n,height:r}=t,o=L(n,r,e.ownerDocument),l=o.ownerDocument.createElementNS(o.namespaceURI,"foreignObject");return l.setAttributeNS(null,"x","0%"),l.setAttributeNS(null,"y","0%"),l.setAttributeNS(null,"width","100%"),l.setAttributeNS(null,"height","100%"),l.append(e),o.appendChild(l),o}(p,n);return a&&v.insertBefore(a,v.children[0]),i&&v.insertBefore(i,v.children[0]),d&&he(n),yield null==h?void 0:h(v),v}))}function Fe(e,t){return f(this,null,(function*(){var n;const r=yield Q(e,t),o=yield Pe(r),l=$(o,r.isEnable("removeControlCharacter"));r.autoDestruct||(r.svgStyleElement=ee(r.ownerDocument),r.svgDefsElement=null==(n=r.ownerDocument)?void 0:n.createElementNS(M,"defs"),r.svgStyles.clear());const i=z(l,o.ownerDocument);return yield te(i,r)}))}function Oe(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{log:r,quality:o,type:l,dpi:i}=n,a=yield Fe(n);r.time("canvas to data url");let s=a.toDataURL(l,o);if(["image/png","image/jpeg"].includes(l)&&i&&b&&S){const[e,t]=s.split(",");let n=0,r=!1;if("image/png"===l){const e=function(e){let t=e.indexOf("AAlwSFlz");return-1===t&&(t=e.indexOf("AAAJcEhZ")),-1===t&&(t=e.indexOf("AAAACXBI")),t}(t);e>=0?(n=4*Math.ceil((e+28)/3),r=!0):n=44}else"image/jpeg"===l&&(n=24);const o=t.substring(0,n),a=t.substring(n),c=window.atob(o),u=new Uint8Array(c.length);for(let e=0;e<u.length;e++)u[e]=c.charCodeAt(e);const d="image/png"===l?p(u,i,r):g(u,i);s=[e,",",window.btoa(String.fromCharCode(...d)),a].join("")}return r.timeEnd("canvas to data url"),s}))}function Ie(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{width:r,height:o,ownerDocument:l}=n,i=yield Oe(n),a=L(r,o,l),s=a.ownerDocument.createElementNS(a.namespaceURI,"image");return s.setAttributeNS(null,"href",i),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"width","100%"),a.appendChild(s),$(a,n.isEnable("removeControlCharacter"))}))}e.createContext=Z,e.destroyContext=he,e.domToBlob=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{log:r,type:o,quality:l,dpi:i}=n,a=yield Fe(n);r.time("canvas to blob");const s=yield B(a,o,l);if(["image/png","image/jpeg"].includes(o)&&i){const e=yield(e=>W(e,"arrayBuffer"))(s.slice(0,33));let t=new Uint8Array(e);return"image/png"===o?t=p(t,i):"image/jpeg"===o&&(t=g(t,i)),r.timeEnd("canvas to blob"),new Blob([t,s.slice(33)],{type:o})}return r.timeEnd("canvas to blob"),s}))},e.domToCanvas=Fe,e.domToDataUrl=Oe,e.domToForeignObjectSvg=Pe,e.domToImage=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),{ownerDocument:r,width:o,height:l,scale:i,type:a}=n,s=z("image/svg+xml"===a?yield Ie(n):yield Oe(n),r);return s.width=Math.floor(o*i),s.height=Math.floor(l*i),s.style.width=o+"px",s.style.height=l+"px",s}))},e.domToJpeg=function(e,t){return f(this,null,(function*(){return Oe(yield Q(e,d(u({},t),{type:"image/jpeg"})))}))},e.domToPixel=function(e,t){return f(this,null,(function*(){const n=yield Q(e,t),r=yield Fe(n);return r.getContext("2d").getImageData(0,0,r.width,r.height).data}))},e.domToPng=function(e,t){return f(this,null,(function*(){return Oe(yield Q(e,d(u({},t),{type:"image/png"})))}))},e.domToSvg=Ie,e.domToWebp=function(e,t){return f(this,null,(function*(){return Oe(yield Q(e,d(u({},t),{type:"image/webp"})))}))},e.loadMedia=V,e.waitUntilLoad=G,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)}}]);
3
3
  //# sourceMappingURL=async-feffery_dom2image.js.map
4
4
  //# sourceMappingURL=async-feffery_dom2image.js.map
@@ -1 +1 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */