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