html2canvas-pro 2.5.1 → 2.5.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 (51) hide show
  1. package/README.md +13 -3
  2. package/dist/html2canvas-pro.cjs +1903 -1478
  3. package/dist/html2canvas-pro.cjs.map +1 -1
  4. package/dist/html2canvas-pro.esm.js +1903 -1478
  5. package/dist/html2canvas-pro.esm.js.map +1 -1
  6. package/dist/html2canvas-pro.js +1907 -1479
  7. package/dist/html2canvas-pro.js.map +1 -1
  8. package/dist/html2canvas-pro.min.js +6 -5
  9. package/dist/types/core/cache-storage.d.ts +6 -2
  10. package/dist/types/core/constants.d.ts +11 -0
  11. package/dist/types/core/context.d.ts +9 -1
  12. package/dist/types/core/features.d.ts +9 -5
  13. package/dist/types/core/origin-checker.d.ts +7 -4
  14. package/dist/types/core/validator.d.ts +0 -2
  15. package/dist/types/css/grouped/background-styles.d.ts +4 -0
  16. package/dist/types/css/grouped/border-styles.d.ts +4 -0
  17. package/dist/types/css/grouped/font-styles.d.ts +4 -0
  18. package/dist/types/css/grouped/layout-styles.d.ts +4 -0
  19. package/dist/types/css/index.d.ts +4 -0
  20. package/dist/types/css/property-descriptor.d.ts +11 -3
  21. package/dist/types/css/property-descriptors/scale.d.ts +9 -0
  22. package/dist/types/css/property-descriptors/translate.d.ts +10 -0
  23. package/dist/types/css/syntax/tokenizer.d.ts +8 -0
  24. package/dist/types/css/types/color-utilities.d.ts +21 -0
  25. package/dist/types/css/types/functions/color-mix.d.ts +17 -0
  26. package/dist/types/dom/adopted-styles.d.ts +23 -0
  27. package/dist/types/dom/document-cloner.d.ts +12 -0
  28. package/dist/types/dom/dom-normalizer.d.ts +2 -0
  29. package/dist/types/dom/elements/li-element-container.d.ts +2 -2
  30. package/dist/types/dom/elements/ol-element-container.d.ts +2 -2
  31. package/dist/types/dom/elements/select-element-container.d.ts +2 -2
  32. package/dist/types/dom/elements/textarea-element-container.d.ts +2 -2
  33. package/dist/types/dom/iframe-mount.d.ts +36 -0
  34. package/dist/types/dom/node-parser.d.ts +2 -2
  35. package/dist/types/dom/replaced-elements/canvas-element-container.d.ts +2 -2
  36. package/dist/types/dom/replaced-elements/iframe-element-container.d.ts +2 -2
  37. package/dist/types/dom/replaced-elements/image-element-container.d.ts +2 -2
  38. package/dist/types/dom/replaced-elements/input-element-container.d.ts +2 -2
  39. package/dist/types/dom/replaced-elements/svg-element-container.d.ts +2 -2
  40. package/dist/types/dom/slot-cloner.d.ts +10 -0
  41. package/dist/types/options.d.ts +24 -0
  42. package/dist/types/render/canvas/border-image-renderer.d.ts +7 -0
  43. package/dist/types/render/canvas/canvas-renderer.d.ts +2 -3
  44. package/dist/types/render/canvas/filter-surface.d.ts +37 -11
  45. package/dist/types/render/canvas/gradient-rasterizer.d.ts +53 -0
  46. package/dist/types/render/canvas/mask-renderer.d.ts +5 -2
  47. package/dist/types/render/canvas/text-clip-renderer.d.ts +0 -1
  48. package/dist/types/render/canvas/text-renderer.d.ts +1 -0
  49. package/package.json +25 -48
  50. package/dist/types/render/font-metrics.d.ts +0 -11
  51. package/dist/types/render/renderer-interface.d.ts +0 -28
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * html2canvas-pro 2.5.1 <https://yorickshan.github.io/html2canvas-pro/>
2
+ * html2canvas-pro 2.5.3 <https://yorickshan.github.io/html2canvas-pro/>
3
3
  * Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
4
4
  * Released under MIT License
5
5
  */
6
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.html2canvas={}))})(this,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class e{constructor(e={}){let t=e.window||(typeof window<`u`?window:void 0);if(!t)throw Error(`Window object is required but not available`);this.window=t,this.cspNonce=e.cspNonce,this.cache=e.cache}static fromElement(t,n={}){let r=t.ownerDocument;if(!r)throw Error(`Element is not attached to a document`);let i=r.defaultView;if(!i)throw Error(`Document is not attached to a window`);return new e({window:i,...n})}clone(t={}){return new e({window:t.window||this.window,cspNonce:t.cspNonce??this.cspNonce,cache:t.cache??this.cache})}},n=class{constructor(e={}){this.config={maxImageTimeout:3e5,allowDataUrls:!0,...e}}validateUrl(e,t=`general`){if(!e||typeof e!=`string`)return{valid:!1,error:`URL must be a non-empty string`};if(e.startsWith(`data:`))return this.config.allowDataUrls?{valid:!0,sanitized:e}:{valid:!1,error:`Data URLs are not allowed`};if(e.startsWith(`blob:`))return{valid:!0,sanitized:e};try{let n=new URL(e);if(![`http:`,`https:`].includes(n.protocol))return{valid:!1,error:`Protocol ${n.protocol} is not allowed. Only http and https are permitted.`};if(t===`proxy`&&this.config.allowedProxyDomains&&this.config.allowedProxyDomains.length>0){let e=n.hostname.toLowerCase();if(!this.config.allowedProxyDomains.some(t=>{let n=t.toLowerCase();return e===n||e.endsWith(`.`+n)}))return{valid:!1,error:`Proxy domain ${n.hostname} is not in the allowed list`}}if(t===`proxy`){if(!this.config.allowLocalhostProxy){let e=n.hostname.toLowerCase();if(e===`localhost`||e===`127.0.0.1`||e===`::1`)return{valid:!1,error:`Localhost is not allowed for proxy URLs`};if(this.isPrivateIP(e))return{valid:!1,error:`Private IP addresses are not allowed for proxy URLs`};if(e.startsWith(`169.254.`)||e.startsWith(`fe80:`))return{valid:!1,error:`Link-local addresses are not allowed for proxy URLs`}}return{valid:!0,sanitized:e,requiresRuntimeCheck:!0}}return{valid:!0,sanitized:e}}catch(e){return{valid:!1,error:`Invalid URL format: ${e instanceof Error?e.message:`Unknown error`}`}}}isPrivateIP(e){return[/^0\./,/^10\./,/^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\./,/^127\./,/^169\.254\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.0\.0\./,/^192\.0\.2\./,/^192\.168\./,/^198\.(1[8-9])\./,/^198\.51\.100\./,/^203\.0\.113\./,/^2(2[4-9]|3[0-9])\./,/^24[0-9]\./,/^255\.255\.255\.255$/].some(t=>t.test(e))?!0:e.includes(`:`)?this.isPrivateIPv6(e):!1}isPrivateIPv6(e){let t=e.toLowerCase().trim().replace(/^\[|\]$/g,``),n=t.split(`%`)[0]??t;if(/^(0:){7}1$/.test(n)||n===`::1`||/^(0:){7}0$/.test(n)||n===`::`)return!0;let r=this.expandIPv6(n);if(!r)return this.isPrivateIPv6Prefix(n);let i=parseInt(r.substring(0,2),16);if(i>=252&&i<=253)return!0;if(i===254){let e=parseInt(r.substring(2,4),16);if(e>=128&&e<=191)return!0}return i===255}expandIPv6(e){try{if(e.includes(`::`)){let t=e.split(`::`);if(t.length>2)return null;let n=t[0]?t[0].split(`:`):[],r=t[1]?t[1].split(`:`):[],i=8-n.length-r.length;if(i<0)return null;let a=Array(i).fill(`0000`);return[...n,...a,...r].map(e=>e.padStart(4,`0`)).join(`:`)}{let t=e.split(`:`);return t.length===8?t.map(e=>e.padStart(4,`0`)).join(`:`):null}}catch{return null}}isPrivateIPv6Prefix(e){return!!(/^fc[0-9a-f]{0,2}:?/i.test(e)||/^fd[0-9a-f]{0,2}:?/i.test(e)||/^fe[89ab][0-9a-f]:?/i.test(e)||/^ff[0-9a-f]{0,2}:?/i.test(e))}validateCspNonce(e){return!e||typeof e!=`string`?{valid:!1,error:`CSP nonce must be a non-empty string`}:e.length<16?{valid:!1,error:`CSP nonce is too short (minimum 16 characters recommended)`}:/^[A-Za-z0-9+/=_-]+$/.test(e)?{valid:!0,sanitized:e}:{valid:!1,error:`CSP nonce contains invalid characters`}}validateImageTimeout(e){return typeof e!=`number`||isNaN(e)?{valid:!1,error:`Image timeout must be a number`}:e<0?{valid:!1,error:`Image timeout cannot be negative`}:this.config.maxImageTimeout&&e>this.config.maxImageTimeout?{valid:!1,error:`Image timeout ${e}ms exceeds maximum allowed ${this.config.maxImageTimeout}ms`}:{valid:!0,sanitized:e}}validateDimensions(e,t){if(typeof e!=`number`||typeof t!=`number`)return{valid:!1,error:`Dimensions must be numbers`};if(isNaN(e)||isNaN(t))return{valid:!1,error:`Dimensions cannot be NaN`};if(e<=0||t<=0)return{valid:!1,error:`Dimensions must be positive`};let n=32767;return e>n||t>n?{valid:!1,error:`Dimensions exceed maximum allowed (${n}px)`}:{valid:!0,sanitized:{width:e,height:t}}}validateScale(e){return typeof e!=`number`||isNaN(e)?{valid:!1,error:`Scale must be a number`}:e<=0?{valid:!1,error:`Scale must be positive`}:e>10?{valid:!1,error:`Scale factor too large (maximum 10x)`}:{valid:!0,sanitized:e}}validateElement(e){if(!e)return{valid:!1,error:`Element is required`};if(typeof e!=`object`)return{valid:!1,error:`Element must be an object`};let t=e;return typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument?{valid:!0}:{valid:!1,error:`Element must be attached to a document`}:t.ownerDocument?t.ownerDocument.defaultView?{valid:!0}:{valid:!1,error:`Document must be attached to a window (ownerDocument.defaultView required)`}:{valid:!1,error:`Element must be attached to a document (ownerDocument required)`}}validateOptions(e){let t=[],n=e.proxy;if(n!=null&&typeof n==`string`&&n.length>0){let e=this.validateUrl(n,`proxy`);e.valid||t.push(`Proxy: ${e.error}`)}if(e.imageTimeout!==void 0){let n=this.validateImageTimeout(e.imageTimeout);n.valid||t.push(`Image timeout: ${n.error}`)}if(e.width!==void 0||e.height!==void 0){let n=e.width??800,r=e.height??600,i=this.validateDimensions(n,r);i.valid||t.push(`Dimensions: ${i.error}`)}if(e.scale!==void 0){let n=this.validateScale(e.scale);n.valid||t.push(`Scale: ${n.error}`)}if(e.cspNonce!==void 0){let n=this.validateCspNonce(e.cspNonce);n.valid||t.push(`CSP nonce: ${n.error}`)}if(this.config.customValidator){let n=this.config.customValidator(e,`options`);n.valid||t.push(`Custom validation: ${n.error}`)}return t.length>0?{valid:!1,error:t.join(`; `)}:{valid:!0}}};function r(e={}){return new n({allowDataUrls:!0,maxImageTimeout:3e5,...e})}var i=class{constructor(e,t=!0){this.context=e,this.activeMetrics=/* @__PURE__ */ new Map,this.completedMetrics=[],this.enabled=t,this.getTime=typeof performance<`u`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now()}start(e,t){this.enabled&&(this.activeMetrics.has(e)&&this.context?.logger.warn(`Performance metric '${e}' already started. Overwriting.`),this.activeMetrics.set(e,{name:e,startTime:this.getTime(),metadata:t}))}end(e){if(!this.enabled)return;let t=this.activeMetrics.get(e);if(!t){this.context?.logger.warn(`Performance metric '${e}' not found. Was start() called?`);return}return t.endTime=this.getTime(),t.duration=t.endTime-t.startTime,this.completedMetrics.push(t),this.activeMetrics.delete(e),this.context?.logger.debug(`⏱️ ${e}: ${t.duration.toFixed(2)}ms`,t.metadata),t}measure(e,t,n){this.start(e,n);try{let n=t();return this.end(e),n}catch(t){throw this.end(e),t}}async measureAsync(e,t,n){this.start(e,n);try{let n=await t();return this.end(e),n}catch(t){throw this.end(e),t}}getMetrics(){return[...this.completedMetrics]}getMetric(e){return this.completedMetrics.find(t=>t.name===e)}getSummary(){let e=this.completedMetrics.reduce((e,t)=>e+(t.duration||0),0),t=this.completedMetrics.map(t=>({name:t.name,duration:t.duration||0,percentage:e>0?((t.duration||0)/e*100).toFixed(1)+`%`:`0%`}));return{totalDuration:e,metrics:this.getMetrics(),breakdown:t}}logSummary(){if(!this.enabled||this.completedMetrics.length===0||!this.context)return;let e=this.getSummary();this.context.logger.info(`\n📊 Performance Summary (Total: ${e.totalDuration.toFixed(2)}ms):`),e.breakdown.sort((e,t)=>t.duration-e.duration).forEach(e=>{this.context.logger.info(` ${e.name.padEnd(20)} ${e.duration.toFixed(2).padStart(8)}ms ${e.percentage.padStart(6)}`)})}clear(){this.activeMetrics.clear(),this.completedMetrics.splice(0)}isEnabled(){return this.enabled}getActiveMetrics(){return Array.from(this.activeMetrics.keys())}},a=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}add(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)}static fromClientRect(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)}static fromDOMRectList(t,n){let r=Array.from(n),i=r.find(e=>e.width!==0);return i||=r.find(e=>e.height!==0),!i&&r.length>0&&(i=r[0]),i?new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height):e.EMPTY}static{this.EMPTY=new e(0,0,0,0)}};let o=(e,t)=>a.fromClientRect(e,t.getBoundingClientRect()),s=e=>{let t=e.body,n=e.documentElement;if(!t||!n)throw Error(`Unable to get document size`);return new a(0,0,Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight)))};for(var c=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return``;for(var r=[],i=-1,a=``;++i<n;){var o=e[i];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},u=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,d=typeof Uint8Array>`u`?[]:/* @__PURE__ */ new Uint8Array(256),f=0;f<u.length;f++)d[u.charCodeAt(f)]=f;for(var p=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,m=typeof Uint8Array>`u`?[]:/* @__PURE__ */ new Uint8Array(256),h=0;h<p.length;h++)m[p.charCodeAt(h)]=h;for(var g=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=m[e.charCodeAt(r)],o=m[e.charCodeAt(r+1)],s=m[e.charCodeAt(r+2)],c=m[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},_=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},y=5,b=11,x=2,S=b-y,ee=65536>>y,C=(1<<y)-1,te=ee+(1024>>y)+32,ne=65536>>b,re=(1<<S)-1,ie=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},ae=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},oe=function(e,t){var n=g(e),r=Array.isArray(n)?v(n):new Uint32Array(n),i=Array.isArray(n)?_(n):new Uint16Array(n),a=24,o=ie(i,a/2,r[4]/2),s=r[5]===2?ie(i,(a+r[4])/2):ae(r,Math.ceil((a+r[4])/4));return new se(r[0],r[1],r[2],r[3],o,s)},se=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>y],t=(t<<x)+(e&C),this.data[t];if(e<=65535)return t=this.index[ee+(e-55296>>y)],t=(t<<x)+(e&C),this.data[t];if(e<this.highStart)return t=te-ne+(e>>b),t=this.index[t],t+=e>>y&re,t=this.index[t],t=(t<<x)+(e&C),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ce=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,le=typeof Uint8Array>`u`?[]:/* @__PURE__ */ new Uint8Array(256),ue=0;ue<ce.length;ue++)le[ce.charCodeAt(ue)]=ue;var de=`KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsByw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AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwA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AAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeA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HgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFA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AUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAF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EsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAA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UABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgA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AQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgA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AJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==`,fe=50,pe=1,me=2,he=3,ge=4,_e=5,ve=7,ye=8,be=9,xe=10,Se=11,Ce=12,we=13,Te=14,Ee=15,De=16,Oe=17,ke=18,Ae=19,je=20,Me=21,Ne=22,Pe=23,Fe=24,w=25,Ie=26,Le=27,Re=28,ze=29,Be=30,Ve=31,He=32,Ue=33,We=34,Ge=35,Ke=36,qe=37,Je=38,Ye=39,Xe=40,Ze=41,Qe=42,$e=43,et=[9001,65288],tt=`!`,T=`×`,nt=`÷`,rt=oe(de),it=[Be,Ke],at=[pe,me,he,_e],ot=[xe,ye],st=[Le,Ie],ct=at.concat(ot),lt=[Je,Ye,Xe,We,Ge],ut=[Ee,we],dt=function(e,t){t===void 0&&(t=`strict`);var n=[],r=[],i=[];return e.forEach(function(e,a){var o=rt.get(e);if(o>fe?(i.push(!0),o-=fe):i.push(!1),[`normal`,`auto`,`loose`].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(e)!==-1)return r.push(a),n.push(De);if(o===ge||o===Se){if(a===0)return r.push(a),n.push(Be);var s=n[a-1];return ct.indexOf(s)===-1?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(Be))}if(r.push(a),o===Ve)return n.push(t===`strict`?Me:qe);if(o===Qe||o===ze)return n.push(Be);if(o===$e)return e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(qe):n.push(Be);n.push(o)}),[r,n,i]},ft=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=n;a<=r.length;){a++;var o=r[a];if(o===t)return!0;if(o!==xe)break}if(i===xe)for(var a=n;a>0;){a--;var s=r[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var c=n;c<=r.length;){c++;var o=r[c];if(o===t)return!0;if(o!==xe)break}if(s!==xe)break}return!1},pt=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r===xe)n--;else return r}return 0},mt=function(e,t,n,r,i){if(n[r]===0)return T;var a=r-1;if(Array.isArray(i)&&i[a]===!0)return T;var o=a-1,s=a+1,c=t[a],l=o>=0?t[o]:0,u=t[s];if(c===me&&u===he)return T;if(at.indexOf(c)!==-1)return tt;if(at.indexOf(u)!==-1||ot.indexOf(u)!==-1)return T;if(pt(a,t)===ye)return nt;if(rt.get(e[a])===Se||(c===He||c===Ue)&&rt.get(e[s])===Se||c===ve||u===ve||c===be||[xe,we,Ee].indexOf(c)===-1&&u===be||[Oe,ke,Ae,Fe,Re].indexOf(u)!==-1||pt(a,t)===Ne||ft(Pe,Ne,a,t)||ft([Oe,ke],Me,a,t)||ft(Ce,Ce,a,t))return T;if(c===xe)return nt;if(c===Pe||u===Pe)return T;if(u===De||c===De)return nt;if([we,Ee,Me].indexOf(u)!==-1||c===Te||l===Ke&&ut.indexOf(c)!==-1||c===Re&&u===Ke||u===je||it.indexOf(u)!==-1&&c===w||it.indexOf(c)!==-1&&u===w||c===Le&&[qe,He,Ue].indexOf(u)!==-1||[qe,He,Ue].indexOf(c)!==-1&&u===Ie||it.indexOf(c)!==-1&&st.indexOf(u)!==-1||st.indexOf(c)!==-1&&it.indexOf(u)!==-1||[Le,Ie].indexOf(c)!==-1&&(u===w||[Ne,Ee].indexOf(u)!==-1&&t[s+1]===w)||[Ne,Ee].indexOf(c)!==-1&&u===w||c===w&&[w,Re,Fe].indexOf(u)!==-1)return T;if([w,Re,Fe,Oe,ke].indexOf(u)!==-1)for(var d=a;d>=0;){var f=t[d];if(f===w)return T;if([Re,Fe].indexOf(f)!==-1)d--;else break}if([Le,Ie].indexOf(u)!==-1)for(var d=[Oe,ke].indexOf(c)===-1?a:o;d>=0;){var f=t[d];if(f===w)return T;if([Re,Fe].indexOf(f)!==-1)d--;else break}if(Je===c&&[Je,Ye,We,Ge].indexOf(u)!==-1||[Ye,We].indexOf(c)!==-1&&[Ye,Xe].indexOf(u)!==-1||[Xe,Ge].indexOf(c)!==-1&&u===Xe||lt.indexOf(c)!==-1&&[je,Ie].indexOf(u)!==-1||lt.indexOf(u)!==-1&&c===Le||it.indexOf(c)!==-1&&it.indexOf(u)!==-1||c===Fe&&it.indexOf(u)!==-1||it.concat(w).indexOf(c)!==-1&&u===Ne&&et.indexOf(e[s])===-1||it.concat(w).indexOf(u)!==-1&&c===ke)return T;if(c===Ze&&u===Ze){for(var p=n[a],m=1;p>0&&(p--,t[p]===Ze);)m++;if(m%2!=0)return T}return c===He&&u===Ue?T:nt},ht=function(e,t){t||={lineBreak:`normal`,wordBreak:`normal`};var n=dt(e,t.lineBreak),r=n[0],i=n[1],a=n[2];(t.wordBreak===`break-all`||t.wordBreak===`break-word`)&&(i=i.map(function(e){return[w,Be,Qe].indexOf(e)===-1?e:qe}));var o=t.wordBreak===`keep-all`?a.map(function(t,n){return t&&e[n]>=19968&&e[n]<=40959}):void 0;return[r,i,o]},gt=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===tt,this.start=n,this.end=r}return e.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),_t=function(e,t){var n=c(e),r=ht(n,t),i=r[0],a=r[1],o=r[2],s=n.length,l=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var e=T;u<s&&(e=mt(n,a,i,++u,o))===T;);if(e!==T||u===s){var t=new gt(n,e,l,u);return l=u,{value:t,done:!1}}return{done:!0,value:null}}}};let E=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`Missing element at index ${t}`);return n},vt=65533,D=e=>e>=48&&e<=57,yt=e=>e>=55296&&e<=57343,bt=e=>D(e)||e>=65&&e<=70||e>=97&&e<=102,xt=e=>e>=97&&e<=122,St=e=>e>=65&&e<=90,Ct=e=>xt(e)||St(e),wt=e=>e>=128,Tt=e=>e===10||e===9||e===32,Et=e=>Ct(e)||wt(e)||e===95,Dt=e=>Et(e)||D(e)||e===45,Ot=e=>e>=0&&e<=8||e===11||e>=14&&e<=31||e===127,kt=(e,t)=>e===92&&t!==10,At=(e,t,n)=>e===45?Et(t)||kt(t,n):!!(Et(e)||e===92&&kt(e,t)),jt=(e,t,n)=>e===43||e===45?D(t)?!0:t===46&&D(n):D(e===46?t:e),Mt=e=>{let t=0,n=1;(e[t]===43||e[t]===45)&&(e[t]===45&&(n=-1),t++);let r=[];for(;D(e[t]??NaN);)r.push(E(e,t)),t++;let i=r.length?parseInt(l(...r),10):0;e[t]===46&&t++;let a=[];for(;D(e[t]??NaN);)a.push(E(e,t)),t++;let o=a.length,s=o?parseInt(l(...a),10):0;(e[t]===69||e[t]===101)&&t++;let c=1;(e[t]===43||e[t]===45)&&(e[t]===45&&(c=-1),t++);let u=[];for(;D(e[t]??NaN);)u.push(E(e,t)),t++;let d=u.length?parseInt(l(...u),10):0;return n*(i+s*10**-o)*10**(c*d)},Nt={type:2},Pt={type:3},Ft={type:4},It={type:13},Lt={type:8},Rt={type:21},zt={type:9},Bt={type:10},Vt={type:11},Ht={type:12},Ut={type:14},Wt={type:23},Gt={type:1},Kt={type:25},qt={type:24},Jt={type:26},Yt={type:27},Xt={type:28},Zt={type:29},Qt={type:31},$t={type:32};var en=class e{static{this._pool=[]}static{this.MAX_POOL_SIZE=40}static get(){return e._pool.pop()||new e}static release(t){e._pool.length<e.MAX_POOL_SIZE&&(t._reset(),e._pool.push(t))}constructor(){this._value=[]}_reset(){this._value=[]}write(e){this._value=this._value.concat(c(e))}read(){let e=[],t=this.consumeToken();for(;t!==$t;)e.push(t),t=this.consumeToken();return e}consumeToken(){let e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Dt(e)||kt(t,n)){let r=At(e,t,n)?2:1;return{type:5,value:this.consumeName(),flags:r}}break}case 36:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),It;break;case 39:return this.consumeStringToken(39);case 40:return Nt;case 41:return Pt;case 42:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),Ut;break;case 43:if(jt(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Ft;case 45:{let t=e,n=this.peekCodePoint(0),r=this.peekCodePoint(1);if(jt(t,n,r))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(At(t,n,r))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===45&&r===62)return this.consumeCodePoint(),this.consumeCodePoint(),qt;break}case 46:if(jt(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(this.peekCodePoint(0)===42)for(this.consumeCodePoint();;){let e=this.consumeCodePoint();if(e===42&&(e=this.consumeCodePoint(),e===47)||e===-1)return this.consumeToken()}break;case 58:return Jt;case 59:return Yt;case 60:if(this.peekCodePoint(0)===33&&this.peekCodePoint(1)===45&&this.peekCodePoint(2)===45)return this.consumeCodePoint(),this.consumeCodePoint(),this.consumeCodePoint(),Kt;break;case 64:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(At(e,t,n))return{type:7,value:this.consumeName()};break}case 91:return Xt;case 92:if(kt(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Zt;case 94:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),Lt;break;case 123:return Vt;case 125:return Ht;case 117:case 85:{let t=this.peekCodePoint(0),n=this.peekCodePoint(1);return t===43&&(bt(n)||n===63)?(this.consumeCodePoint(),this.consumeUnicodeRangeToken()):(this.reconsumeCodePoint(e),this.consumeIdentLikeToken())}case 124:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),zt;if(this.peekCodePoint(0)===124)return this.consumeCodePoint(),Rt;break;case 126:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),Bt;break;case-1:return $t}return Tt(e)?(this.consumeWhiteSpace(),Qt):D(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Et(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:l(e)}}consumeCodePoint(){let e=this._value.shift();return e===void 0?-1:e}reconsumeCodePoint(e){this._value.unshift(e)}peekCodePoint(e){if(e>=this._value.length)return-1;let t=this._value[e];return t===void 0?-1:t}consumeUnicodeRangeToken(){let e=[],t=this.consumeCodePoint();for(;bt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();let n=!1;for(;t===63&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(l(...e.map(e=>e===63?48:e)),16),end:parseInt(l(...e.map(e=>e===63?70:e)),16)};let r=parseInt(l(...e),16);if(t===45&&bt(this.peekCodePoint(0))){t=this.consumeCodePoint();let e=[];for(;bt(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(l(...e),16)}}return{type:30,start:r,end:r}}consumeIdentLikeToken(){let e=this.consumeName();return e.toLowerCase()===`url`&&this.peekCodePoint(0)===40?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===40?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}}consumeUrlToken(){let e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1)return{type:22,value:``};let t=this.peekCodePoint(0);if(t===39||t===34){let e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Wt)}for(;;){let t=this.consumeCodePoint();if(t===-1||t===41)return{type:22,value:l(...e)};if(Tt(t))return this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41?(this.consumeCodePoint(),{type:22,value:l(...e)}):(this.consumeBadUrlRemnants(),Wt);if(t===34||t===39||t===40||Ot(t))return this.consumeBadUrlRemnants(),Wt;if(t===92){if(kt(t,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Wt}else e.push(t)}}consumeWhiteSpace(){for(;Tt(this.peekCodePoint(0));)this.consumeCodePoint()}consumeBadUrlRemnants(){for(;;){let e=this.consumeCodePoint();if(e===41||e===-1)return;kt(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}}consumeStringSlice(e){let t=``;for(;e>0;){let n=Math.min(5e4,e);t+=l(...this._value.splice(0,n)),e-=n}return this._value.shift(),t}consumeStringToken(e){let t=``,n=0;do{let r=this._value[n];if(r===-1||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===10)return this._value.splice(0,n),Gt;if(r===92){let e=this._value[n+1];e!==-1&&e!==void 0&&(e===10?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):kt(r,e)&&(t+=this.consumeStringSlice(n),t+=l(this.consumeEscapedCodePoint()),n=-1))}n++}while(1)}consumeNumber(){let e=[],t=4,n=this.peekCodePoint(0);for((n===43||n===45)&&e.push(this.consumeCodePoint());D(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);let r=this.peekCodePoint(1);if(n===46&&D(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;D(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);let i=this.peekCodePoint(2);if((n===69||n===101)&&((r===43||r===45)&&D(i)||D(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;D(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Mt(e),t]}consumeNumericToken(){let[e,t]=this.consumeNumber(),n=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);return At(n,r,i)?{type:15,number:e,flags:t,unit:this.consumeName()}:n===37?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}}consumeEscapedCodePoint(){let e=this.consumeCodePoint();if(bt(e)){let t=l(e);for(;bt(this.peekCodePoint(0))&&t.length<6;)t+=l(this.consumeCodePoint());Tt(this.peekCodePoint(0))&&this.consumeCodePoint();let n=parseInt(t,16);return n===0||yt(n)||n>1114111?vt:n}return e===-1?vt:e}consumeName(){let e=``;for(;;){let t=this.consumeCodePoint();if(Dt(t))e+=l(t);else if(kt(t,this.peekCodePoint(0)))e+=l(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}}},tn=class e{constructor(e){this._tokens=e}static create(t){let n=new en;return n.write(t),new e(n.read())}static parseValue(t){return e.create(t).parseComponentValue()}static parseValues(t){return e.create(t).parseComponentValues()}parseComponentValue(){let e=this.consumeToken();for(;e.type===31;)e=this.consumeToken();if(e.type===32)throw SyntaxError(`Error parsing CSS component value, unexpected EOF`);this.reconsumeToken(e);let t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`)}parseComponentValues(){let e=[];for(;;){let t=this.consumeComponentValue();if(t.type===32)return e;e.push(t)}}consumeComponentValue(){let e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e}consumeSimpleBlock(e){let t={type:e,values:[]},n=this.consumeToken();for(;;){if(n.type===32||on(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}}consumeFunction(e){let t={name:e.value,values:[],type:18};for(;;){let e=this.consumeToken();if(e.type===32||e.type===3)return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue())}}consumeToken(){let e=this._tokens.shift();return e===void 0?$t:e}reconsumeToken(e){this._tokens.unshift(e)}};let O=e=>e.type===15,k=e=>e.type===17,A=e=>e.type===20,nn=e=>e.type===0,rn=(e,t)=>A(e)&&e.value===t,an=e=>e.type!==31,j=e=>e.type!==31&&e.type!==4,M=e=>{let t=[],n=[];return e.forEach(e=>{if(e.type===4){n.length&&(t.push(n),n=[]);return}e.type!==31&&n.push(e)}),n.length&&t.push(n),t},on=(e,t)=>t===11&&e.type===12||t===28&&e.type===29||t===2&&e.type===3,sn=/(\d+(?:\.\d+)?|[+\-*/()])/g,cn=e=>{let t=e.match(sn);if(!t)return NaN;let n=[],r=[],i={"+":1,"-":1,"*":2,"/":2};for(let e of t)if(/^\d+(?:\.\d+)?$/.test(e))n.push(parseFloat(e));else if(e===`(`)r.push(e);else if(e===`)`){for(;r.length&&r[r.length-1]!==`(`;)n.push(r.pop());if(!r.length)return NaN;r.pop()}else{for(;r.length&&(i[E(r,r.length-1)]??0)>=(i[e]??0);)n.push(r.pop());r.push(e)}for(;r.length;){let e=r.pop();if(e===`(`)return NaN;n.push(e)}let a=[];for(let e of n)if(typeof e==`number`)a.push(e);else{let t=a.pop(),n=a.pop();if(n===void 0||t===void 0)return NaN;switch(e){case`+`:a.push(n+t);break;case`-`:a.push(n-t);break;case`*`:a.push(n*t);break;case`/`:a.push(t===0?NaN:n/t);break;default:return NaN}}return a.length===1?a[0]??NaN:NaN},N=(e,t,n)=>Math.min(Math.max(e,t),n),P=(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]],ln=e=>P([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],e),un=e=>P([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],e),dn=e=>{let[t,n,r]=e,i=e=>{let t=e<0?-1:1,n=Math.abs(e);return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e};return[i(t),i(n),i(r)]},fn=e=>{let[t,n,r]=e,i=e=>{let t=e<0?-1:1,n=Math.abs(e);return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4};return[i(t),i(n),i(r)]},pn=e=>{let[t,n,r]=dn(ln([e[0],e[1],e[2]]));return[t,n,r,e[3]]},mn=e=>{let[t,n,r]=ln([e[0],e[1],e[2]]);return[N(Math.round(t*255),0,255),N(Math.round(n*255),0,255),N(Math.round(r*255),0,255),e[3]]},hn=e=>e.type===17||e.type===15,F=e=>e.type===16||hn(e)||gn(e),gn=e=>e.type===17&&e._calcPercentage!==void 0,_n=e=>e.type===18&&e.name===`calc`,vn=e=>{let t=bn(e,0);if(!t)return null;let n=bn(e,100);if(!n)return null;let r=t.number,i=n.number-r;return i===0?t:{type:17,number:r,flags:4,_calcPercentage:i,_calcPixelOffset:r}},yn=e=>_n(e)?vn(e):F(e)?e:null,bn=(e,t=0)=>{let n=e=>{let r=``;for(let i of e)if(i.type!==31){if(i.type===18){if(i.name===`calc`){let e=n(i.values);if(e===null)return null;r+=`(${e})`}else return null}else if(i.type===17)r+=i.number.toString();else if(i.type===15)i.unit===`px`?r+=i.number.toString():i.unit===`rem`||i.unit===`em`?r+=(i.number*16).toString():r+=i.number.toString();else if(i.type===16)r+=(i.number/100*t).toString();else if(i.type===6){let e=i.value;e===`+`||e===`-`||e===`*`||e===`/`?r+=` ${e} `:e===`(`?r+=`(`:e===`)`&&(r+=`)`)}}return r};try{let t=n(e.values);if(t===null||t.trim()===``)return null;let r=cn(t);if(typeof r==`number`&&!isNaN(r))return{type:17,number:r,flags:4}}catch{return null}return null},xn=e=>e.length>1?[E(e,0),E(e,1)]:[E(e,0)],I={type:17,number:0,flags:4},L={type:16,number:50,flags:4},R={type:16,number:100,flags:4},Sn=(e,t,n)=>{let[r,i]=e;return[z(r,t),z(i===void 0?r:i,n)]},z=(e,t)=>{if(gn(e))return e._calcPercentage/100*t+e._calcPixelOffset;if(e.type===16)return e.number/100*t;if(O(e))switch(e.unit){case`rem`:case`em`:return 16*e.number;default:return e.number}return e.number},Cn=`grad`,wn=`turn`,Tn={name:`angle`,parse:(e,t)=>{if(t.type===15)switch(t.unit){case`deg`:return Math.PI*t.number/180;case Cn:return Math.PI/200*t.number;case`rad`:return t.number;case wn:return Math.PI*2*t.number}throw Error(`Unsupported angle type`)}},En=e=>!(e.type!==15||e.unit!==`deg`&&e.unit!==Cn&&e.unit!==`rad`&&e.unit!==wn),Dn=e=>{switch(e.filter(A).map(e=>e.value).join(` `)){case`to bottom right`:case`to right bottom`:case`left top`:case`top left`:return[I,I];case`to top`:case`bottom`:return B(0);case`to bottom left`:case`to left bottom`:case`right top`:case`top right`:return[I,R];case`to right`:case`left`:return B(90);case`to top left`:case`to left top`:case`right bottom`:case`bottom right`:return[R,R];case`to bottom`:case`top`:return B(180);case`to top right`:case`to right top`:case`left bottom`:case`bottom left`:return[R,I];case`to left`:case`right`:return B(270)}return 0},B=e=>Math.PI*e/180,On=e=>!(255&e),V=e=>{let t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?`rgba(${i},${r},${n},${t/255})`:`rgb(${i},${r},${n})`},kn=(e,t,n,r)=>(e<<24|t<<16|n<<8|Math.round(r*255)<<0)>>>0,An=(e,t)=>{if(e.type===17)return e.number;if(e.type===16){let n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},jn=e=>{let t=e[0];return(t&&t.type===20?t.value:`unknown`)===`from`},Mn=e=>kn(N(Math.round(e[0]*255),0,255),N(Math.round(e[1]*255),0,255),N(Math.round(e[2]*255),0,255),N(e[3],0,1)),Nn=e=>{let[t,n,r,i]=e,a=dn([t,n,r]);return kn(N(Math.round(a[0]*255),0,255),N(Math.round(a[1]*255),0,255),N(Math.round(a[2]*255),0,255),i)},Pn=e=>{let t=ln([e[0],e[1],e[2]]);return Nn([t[0],t[1],t[2],e[3]])},Fn=(e,t)=>{if(jn(t.filter(j)))throw Error(`Relative color not supported for lab()`);let[n,r,i,a]=Hn(t),o=dn(ln(Xn([n,r,i])));return kn(N(Math.round(o[0]*255),0,255),N(Math.round(o[1]*255),0,255),N(Math.round(o[2]*255),0,255),a)},In=(e,t)=>{if(jn(t.filter(j)))throw Error(`Relative color not supported for oklab()`);let[n,r,i,a]=Hn(t),o=dn(ln(Yn([n,r,i])));return kn(N(Math.round(o[0]*255),0,255),N(Math.round(o[1]*255),0,255),N(Math.round(o[2]*255),0,255),a)},Ln=(e,t)=>{if(jn(t.filter(j)))throw Error(`Relative color not supported for oklch()`);let[n,r,i,a]=Un(t),o=dn(ln(Yn(Jn([n,r,i]))));return kn(N(Math.round(o[0]*255),0,255),N(Math.round(o[1]*255),0,255),N(Math.round(o[2]*255),0,255),a)},Rn=(e,t)=>{if(jn(t.filter(j)))throw Error(`Relative color not supported for lch()`);let[n,r,i,a]=Vn(t),o=dn(ln(Xn(Jn([n,r,i]))));return kn(N(Math.round(o[0]*255),0,255),N(Math.round(o[1]*255),0,255),N(Math.round(o[2]*255),0,255),a)},zn=(e,t)=>{let n=t.filter(j),r=n[0],i=n[1],a=n[2],o=n[3];return[r?(r.type===17?B(r.number):Tn.parse(e,r))/(Math.PI*2):0,i!==void 0&&F(i)?i.number/100:0,a!==void 0&&F(a)?a.number/100:0,o!==void 0&&F(o)?z(o,1):1]},Bn=(e,t)=>{if(jn(t))throw Error(`Relative color not supported for hsl()`);let[n,r,i,a]=zn(e,t),o=qn([n,r,i]);return kn(o[0]*255,o[1]*255,o[2]*255,r===0?1:a)},Vn=e=>{let t=e.filter(j),n=t[0],r=t[1],i=t[2],a=t[4];return[n!==void 0&&F(n)?n.number:0,r!==void 0&&F(r)?r.number:0,i!==void 0&&(k(i)||O(i))?i.number:0,a!==void 0&&F(a)?z(a,1):1]},Hn=e=>{let t=e.filter(j),n=t[0],r=t[1],i=t[2],a=t[4];return[n===void 0?0:n.type===16?n.number/100:k(n)?n.number:0,r===void 0?0:r.type===16?r.number/100:k(r)?r.number:0,i!==void 0&&(k(i)||O(i))?i.number:0,a!==void 0&&F(a)?z(a,1):1]},Un=e=>{let t=e.filter(j),n=t[0],r=t[1],i=t[2],a=t[4];return[n===void 0?0:n.type===16?n.number/100:k(n)?n.number:0,r===void 0?0:r.type===16?r.number/100:k(r)?r.number:0,i!==void 0&&(k(i)||O(i))?i.number:0,a!==void 0&&F(a)?z(a,1):1]},Wn=e=>P([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],e),Gn=e=>P([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],e),Kn=(e,t,n)=>(n<0&&(n+=1),n>=1&&--n,n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e),qn=([e,t,n])=>{if(t===0)return[n*255,n*255,n*255];let r=n<=.5?n*(t+1):n+t-n*t,i=n*2-r;return[Kn(i,r,e+1/3),Kn(i,r,e),Kn(i,r,e-1/3)]},Jn=([e,t,n])=>(t<0&&(t=0),isNaN(n)&&(n=0),[e,t*Math.cos(n*Math.PI/180),t*Math.sin(n*Math.PI/180)]),Yn=e=>{let t=P([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],e),n=[t[0]**3,t[1]**3,t[2]**3];return P([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],n)},Xn=e=>{let t=(e[0]+16)/116,n=e[1]/500+t,r=t-e[2]/200,i=24389/27,a=24/116,o=[(n>a?n**3:(116*n-16)/i)*.3457/.3585,e[0]>8?t**3:e[0]/i,(r>a?r**3:(116*r-16)/i)*.2958/.3585];return Gn([o[0],o[1],o[2]])},Zn=(e,t)=>{let n=t.filter(j);if(n.length===3||n.length===4){let e=An(E(n,0),0),t=An(E(n,1),1),r=An(E(n,2),2),i=n.length===4?An(E(n,3),3):1,a=fn([e/255,t/255,r/255]),[o,s,c]=un([a[0],a[1],a[2]]);return[o,s,c,i]}return[0,0,0,1]},Qn=(e,t)=>{let[n,r,i,a]=zn(e,t),o=fn(qn([n,r,i])),[s,c,l]=un([o[0],o[1],o[2]]);return[s,c,l,a]},$n=(e,t)=>{let[n,r,i,a]=Hn(t),[o,s,c]=Xn([n,r,i]);return[o,s,c,a]},er=(e,t)=>{let[n,r,i,a]=Vn(t),[o,s,c]=Xn(Jn([n,r,i]));return[o,s,c,a]},tr=(e,t)=>{let[n,r,i,a]=Un(t),[o,s,c]=Yn(Jn([n,r,i]));return[o,s,c,a]},nr=(e,t)=>{let[n,r,i,a]=Hn(t),[o,s,c]=Yn([n,r,i]);return[o,s,c,a]},rr=e=>Gn([e[0],e[1],e[2]]),ir=e=>e,ar=e=>{let[t,n,r]=Wn([e[0],e[2],e[3]]);return[t,n,r,e[3]]},or=e=>Pn([e[0],e[1],e[2],e[3]]),sr=e=>{let t=rr([e[0],e[1],e[2]]);return Pn([t[0],t[1],t[2],e[3]])},cr=e=>P([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],e),lr=e=>P([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],e),ur=e=>{let t=e=>{let t=e<0?-1:1;return e*t<=.04045?e/12.92:t*((e+.055)/1.055)**2.4||0};return[t(e[0]),t(e[1]),t(e[2])]},dr=e=>dn(e),fr=e=>{let t=ur([e[0],e[1],e[2]]);return cr([t[0],t[1],t[2]])},pr=e=>{let[t,n,r]=dr(lr([e[0],e[1],e[2]]));return[t,n,r,e[3]]},mr=e=>{let t=fr([e[0],e[1],e[2]]);return Pn([t[0],t[1],t[2],e[3]])},hr=e=>P([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],e),gr=e=>P([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],e),_r=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**(563/256));return[t[0]??0,t[1]??0,t[2]??0]},vr=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**(256/563));return[t[0]??0,t[1]??0,t[2]??0]},yr=e=>{let[t,n,r]=vr(hr([e[0],e[1],e[2]]));return[t,n,r,e[3]]},br=e=>{let t=ln(gr(_r([e[0],e[1],e[2]])));return Nn([t[0],t[1],t[2],e[3]])},xr=e=>P([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],e),Sr=e=>P([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],e),Cr=e=>{let[t,n,r]=e,i=e=>e<16/512?e/16:e**1.8;return[i(t),i(n),i(r)]},wr=e=>{let[t,n,r]=e,i=e=>e>1/512?e**(1/1.8):e*16;return[i(t),i(n),i(r)]},Tr=e=>{let t=Cr([e[0],e[1],e[2]]);return Gn(xr([t[0],t[1],t[2]]))},Er=e=>{let[t,n,r]=wr(Sr(Wn([e[0],e[1],e[2]])));return[t,n,r,e[3]]},Dr=e=>{let t=Tr([e[0],e[1],e[2]]);return Pn([t[0],t[1],t[2],e[3]])},Or=1.09929682680944,kr=.018053968510807,Ar=e=>{let t=e=>e<kr*4.5?e/4.5:((e+Or-1)/Or)**(1/.45);return[t(e[0]),t(e[1]),t(e[2])]},jr=e=>{let t=e=>e>=kr?Or*e**.45-.09929682680944008:4.5*e;return[t(e[0]),t(e[1]),t(e[2])]},Mr=e=>P([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],e),Nr=e=>P([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],e),Pr=e=>{let t=Ar([e[0],e[1],e[2]]);return Mr([t[0],t[1],t[2]])},Fr=e=>{let[t,n,r]=jr(Nr([e[0],e[1],e[2]]));return[t,n,r,e[3]]},Ir=e=>{let t=Pr([e[0],e[1],e[2]]);return Pn([t[0],t[1],t[2],e[3]])},H={name:`color`,parse:(e,t)=>{if(t.type===18){let n=Ur[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported color function "${t.name}"`);return n(e,t.values)}if(t.type===5){let[e,n,r,i]=Lr(t);return kn(e,n,r,i)}if(t.type===20){let e=Gr[t.value.toUpperCase()];if(e!==void 0)return e}return 0}},Lr=e=>{if(e.value.length===3){let t=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3);return[parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16),1]}if(e.value.length===4){let t=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3),i=e.value.substring(3,4);return[parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16)/255]}if(e.value.length===6){let t=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6);return[parseInt(t,16),parseInt(n,16),parseInt(r,16),1]}if(e.value.length===8){let t=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6),i=e.value.substring(6,8);return[parseInt(t,16),parseInt(n,16),parseInt(r,16),parseInt(i,16)/255]}return[0,0,0,1]},Rr=(e,t)=>{let n=t.filter(j);if(jn(n))throw Error(`Relative color not supported for rgb()`);if(n.length===3||n.length===4){let e=An(E(n,0),0),t=An(E(n,1),1),r=An(E(n,2),2),i=n.length===4?An(E(n,3),3):1;return kn(e,t,r,i)}if(n.length===5){let e=E(n,3);if(e.type===6&&e.value===`/`){let e=An(E(n,0),0),t=An(E(n,1),1),r=An(E(n,2),2),i=An(E(n,4),3);return kn(e,t,r,i)}}return 0},zr=(e,t)=>{let n=t.filter(j),r=n[0],i=r&&r.type===20?r.value:`unknown`;if(jn(n)){let t=(e,t)=>{if(k(t))return t.number;let n=e=>e===`r`||e===`x`?0:e===`g`||e===`y`?1:2;if(A(t)){let r=n(t.value);return E(e,r)}let r=e=>{let t=e.filter(j),n=`(`;for(let e of t)n+=e.type===18&&e.name===`calc`?r(e.values):k(e)?e.number:e.type===6||A(e)?e.value:``;return n+=`)`,n};if(t.type===18){let n=t.values.filter(j);if(t.name===`calc`){let t=r(n).replace(/r|x/,e[0].toString()).replace(/g|y/,e[1].toString()).replace(/b|z/,e[2].toString());return cn(t)}}return null},r=E(n,1),i=r.type===18?r.name:A(r)||r.type===5?`rgb`:`unknown`,a=E(n,2),o=A(a)?a.value:`unknown`,s=r.type===18?r.values:A(r)?[r]:[];if(A(r)){if(Gr[r.value.toUpperCase()]===void 0)throw Error(`Attempting to use unknown color in relative color 'from'`);{let t=Wr(e,r.value),n=255&t,i=255&t>>8,a=255&t>>16;s=[{type:17,number:255&t>>24,flags:1},{type:17,number:a,flags:1},{type:17,number:i,flags:1},{type:17,number:n>1?n/255:n,flags:1}]}}else if(r.type===5){let[e,t,n,i]=Lr(r);s=[{type:17,number:e,flags:1},{type:17,number:t,flags:1},{type:17,number:n,flags:1},{type:17,number:i>1?i/255:i,flags:1}]}if(s.length===0)throw Error(`Attempting to use unknown color in relative color 'from'`);if(o===`unknown`)throw Error(`Attempting to use unknown colorspace in relative color 'to'`);let c=Vr[i],l=Hr[o],u=Br[o];if(c===void 0)throw Error(`Attempting to parse an unsupported color space "${i}" for color() function`);if(l===void 0)throw Error(`Attempting to parse an unsupported color space "${o}" for color() function`);let d=l(c(e,s)),f=t(d,E(n,3)),p=t(d,E(n,4)),m=t(d,E(n,5)),h=n[6],g=n[7],_=h!==void 0&&h.type===6&&h.value===`/`&&g!==void 0&&k(g)?g.number:1;if(f===null||p===null||m===null)throw Error(`Invalid relative color in color() function`);if(u===void 0)throw Error(`Attempting to parse an unsupported color space "${o}" for color() function`);return u([f,p,m,_])}{let e=i,t=Br[e];if(t===void 0)throw Error(`Attempting to parse an unsupported color space "${e}" for color() function`);let r=E(n,1),a=E(n,2),o=E(n,3),s=n[4],c=n[5];return t([k(r)?r.number:0,k(a)?a.number:0,k(o)?o.number:0,s!==void 0&&s.type===6&&s.value===`/`&&c!==void 0&&k(c)?c.number:1])}},Br={srgb:Mn,"srgb-linear":Nn,"display-p3":mr,"a98-rgb":br,"prophoto-rgb":Dr,xyz:or,"xyz-d50":sr,"xyz-d65":or,rec2020:Ir},Vr={rgb:Zn,hsl:Qn,lab:$n,lch:er,oklab:nr,oklch:tr},Hr={srgb:pn,"srgb-linear":mn,"display-p3":pr,"a98-rgb":yr,"prophoto-rgb":Er,xyz:ir,"xyz-d50":ar,"xyz-d65":ir,rec2020:Fr},Ur={hsl:Bn,hsla:Bn,rgb:Rr,rgba:Rr,lch:Rn,oklch:Ln,oklab:In,lab:Fn,color:zr},Wr=(e,t)=>H.parse(e,tn.create(t).parseComponentValue()),Gr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Kr=e=>e.nodeType===Node.ELEMENT_NODE,qr=e=>e.nodeType===Node.TEXT_NODE,Jr=e=>typeof e.className==`object`,Yr=e=>Kr(e)&&e.style!==void 0&&!Jr(e),Xr=e=>e.tagName===`INPUT`,Zr=e=>e.tagName===`HTML`,Qr=e=>e.tagName===`svg`,$r=e=>e.tagName===`BODY`,ei=e=>e.tagName===`CANVAS`,ti=e=>e.tagName===`VIDEO`,ni=e=>e.tagName===`IMG`,ri=e=>e.tagName===`IFRAME`,ii=e=>e.tagName===`STYLE`,ai=e=>e.tagName===`SCRIPT`,oi=e=>e.tagName===`TEXTAREA`,si=e=>e.tagName===`SELECT`,ci=e=>e.tagName===`SLOT`,li=e=>e.tagName===`LI`,ui=e=>e.tagName===`OL`,di=e=>!Jr(e)&&e.tagName.indexOf(`-`)>0,fi=/* @__PURE__ */ new Set([`IMG`,`VIDEO`,`AUDIO`,`CANVAS`,`IFRAME`,`INPUT`,`TEXTAREA`,`SELECT`,`BR`,`HR`,`META`,`LINK`,`BASE`,`COL`,`SOURCE`,`TRACK`,`WBR`,`AREA`,`PARAM`,`EMBED`,`OBJECT`]),pi=e=>!Jr(e)&&!fi.has(e.tagName),mi={name:`list-style-type`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`disc`:return 0;case`circle`:return 1;case`square`:return 2;case`decimal`:return 3;case`cjk-decimal`:return 4;case`decimal-leading-zero`:return 5;case`lower-roman`:return 6;case`upper-roman`:return 7;case`lower-greek`:return 8;case`lower-alpha`:return 9;case`upper-alpha`:return 10;case`arabic-indic`:return 11;case`armenian`:return 12;case`bengali`:return 13;case`cambodian`:return 14;case`cjk-earthly-branch`:return 15;case`cjk-heavenly-stem`:return 16;case`cjk-ideographic`:return 17;case`devanagari`:return 18;case`ethiopic-numeric`:return 19;case`georgian`:return 20;case`gujarati`:return 21;case`gurmukhi`:return 22;case`hebrew`:return 52;case`hiragana`:return 23;case`hiragana-iroha`:return 24;case`japanese-formal`:return 25;case`japanese-informal`:return 26;case`kannada`:return 27;case`katakana`:return 28;case`katakana-iroha`:return 29;case`khmer`:return 30;case`korean-hangul-formal`:return 31;case`korean-hanja-formal`:return 32;case`korean-hanja-informal`:return 33;case`lao`:return 34;case`lower-armenian`:return 35;case`malayalam`:return 36;case`mongolian`:return 37;case`myanmar`:return 38;case`oriya`:return 39;case`persian`:return 40;case`simp-chinese-formal`:return 41;case`simp-chinese-informal`:return 42;case`tamil`:return 43;case`telugu`:return 44;case`thai`:return 45;case`tibetan`:return 46;case`trad-chinese-formal`:return 47;case`trad-chinese-informal`:return 48;case`upper-armenian`:return 49;case`disclosure-open`:return 50;case`disclosure-closed`:return 51;default:return-1}}},U=(e,t)=>(e&t)!==0;var hi=class{constructor(){this.counters={}}getCounterValue(e){let t=this.counters[e];return t&&t.length?E(t,t.length-1):1}getCounterValues(e){return this.counters[e]||[]}pop(e){e.forEach(e=>this.counters[e]?.pop())}parse(e){let t=e.counterIncrement,n=e.counterReset,r=!0;t!==null&&t.forEach(e=>{let t=this.counters[e.counter];if(t&&e.increment!==0){r=!1,t.length||t.push(1);let n=Math.max(0,t.length-1);t[n]=(t[n]??0)+e.increment}});let i=[];return r&&n.forEach(e=>{let t=this.counters[e.counter];i.push(e.counter),t||=this.counters[e.counter]=[],t.push(e.reset)}),i}};let gi={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:[`M`,`CM`,`D`,`CD`,`C`,`XC`,`L`,`XL`,`X`,`IX`,`V`,`IV`,`I`]},_i={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `Ք.Փ.Ւ.Ց.Ր.Տ.Վ.Ս.Ռ.Ջ.Պ.Չ.Ո.Շ.Ն.Յ.Մ.Ճ.Ղ.Ձ.Հ.Կ.Ծ.Խ.Լ.Ի.Ժ.Թ.Ը.Է.Զ.Ե.Դ.Գ.Բ.Ա`.split(`.`)},vi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `י׳.ט׳.ח׳.ז׳.ו׳.ה׳.ד׳.ג׳.ב׳.א׳.ת.ש.ר.ק.צ.פ.ע.ס.נ.מ.ל.כ.יט.יח.יז.טז.טו.י.ט.ח.ז.ו.ה.ד.ג.ב.א`.split(`.`)},yi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `ჵ.ჰ.ჯ.ჴ.ხ.ჭ.წ.ძ.ც.ჩ.შ.ყ.ღ.ქ.ფ.ჳ.ტ.ს.რ.ჟ.პ.ო.ჲ.ნ.მ.ლ.კ.ი.თ.ჱ.ზ.ვ.ე.დ.გ.ბ.ა`.split(`.`)},bi=(e,t,n,r,i,a)=>e<t||e>n?Oi(e,i,a.length>0):r.integers.reduce((t,n,i)=>{for(;e>=n;)e-=n,t+=r.values[i];return t},``)+a,xi=(e,t,n,r)=>{let i=``;do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},W=(e,t,n,r,i)=>{let a=n-t+1;return(e<0?`-`:``)+(xi(Math.abs(e),a,r,e=>l(Math.floor(e%a)+t))+i)},Si=(e,t,n=`. `)=>{let r=t.length;return xi(Math.abs(e),r,!1,e=>String(t[Math.floor(e%r)]))+n},Ci=(e,t,n,r,i,a)=>{if(e<-9999||e>9999)return Oi(e,4,i.length>0);let o=Math.abs(e),s=i;if(o===0)return t[0]+s;for(let r=0;o>0&&r<=4;r++){let i=o%10;i===0&&U(a,1)&&s!==``?s=t[i]+s:i>1||i===1&&r===0||i===1&&r===1&&U(a,2)||i===1&&r===1&&U(a,4)&&e>100||i===1&&r>1&&U(a,8)?s=(t[i]??``)+(r>0?n[r-1]??``:``)+s:i===1&&r>0&&(s=(n[r-1]??``)+s),o=Math.floor(o/10)}return(e<0?r:``)+s},wi=`十百千萬`,Ti=`拾佰仟萬`,Ei=`マイナス`,Di=`마이너스`,Oi=(e,t,n)=>{let r=n?`. `:``,i=n?`、`:``,a=n?`, `:``,o=n?` `:``;switch(t){case 0:return`•`+o;case 1:return`◦`+o;case 2:return`◾`+o;case 5:let t=W(e,48,57,!0,r);return t.length<4?`0${t}`:t;case 4:return Si(e,`〇一二三四五六七八九`,i);case 6:return bi(e,1,3999,gi,3,r).toLowerCase();case 7:return bi(e,1,3999,gi,3,r);case 8:return W(e,945,969,!1,r);case 9:return W(e,97,122,!1,r);case 10:return W(e,65,90,!1,r);case 11:return W(e,1632,1641,!0,r);case 12:case 49:return bi(e,1,9999,_i,3,r);case 35:return bi(e,1,9999,_i,3,r).toLowerCase();case 13:return W(e,2534,2543,!0,r);case 14:case 30:return W(e,6112,6121,!0,r);case 15:return Si(e,`子丑寅卯辰巳午未申酉戌亥`,i);case 16:return Si(e,`甲乙丙丁戊己庚辛壬癸`,i);case 17:case 48:return Ci(e,`零一二三四五六七八九`,wi,`負`,i,14);case 47:return Ci(e,`零壹貳參肆伍陸柒捌玖`,Ti,`負`,i,15);case 42:return Ci(e,`零一二三四五六七八九`,wi,`负`,i,14);case 41:return Ci(e,`零壹贰叁肆伍陆柒捌玖`,Ti,`负`,i,15);case 26:return Ci(e,`〇一二三四五六七八九`,`十百千万`,Ei,i,0);case 25:return Ci(e,`零壱弐参四伍六七八九`,`拾百千万`,Ei,i,7);case 31:return Ci(e,`영일이삼사오육칠팔구`,`십백천만`,Di,a,7);case 33:return Ci(e,`零一二三四五六七八九`,`十百千萬`,Di,a,0);case 32:return Ci(e,`零壹貳參四五六七八九`,`拾百千`,Di,a,7);case 18:return W(e,2406,2415,!0,r);case 20:return bi(e,1,19999,yi,3,r);case 21:return W(e,2790,2799,!0,r);case 22:return W(e,2662,2671,!0,r);case 52:return bi(e,1,10999,vi,3,r);case 23:return Si(e,`あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん`);case 24:return Si(e,`いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす`);case 27:return W(e,3302,3311,!0,r);case 28:return Si(e,`アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン`,i);case 29:return Si(e,`イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス`,i);case 34:return W(e,3792,3801,!0,r);case 37:return W(e,6160,6169,!0,r);case 38:return W(e,4160,4169,!0,r);case 39:return W(e,2918,2927,!0,r);case 40:return W(e,1776,1785,!0,r);case 43:return W(e,3046,3055,!0,r);case 44:return W(e,3174,3183,!0,r);case 45:return W(e,3664,3673,!0,r);case 46:return W(e,3872,3881,!0,r);default:return W(e,48,57,!0,r)}},ki={name:`display`,initialValue:`inline-block`,prefix:!1,type:1,parse:(e,t)=>t.filter(A).reduce((e,t)=>e|Ai(t.value),0)},Ai=e=>{switch(e){case`block`:case`-webkit-box`:return 2;case`inline`:return 4;case`run-in`:return 8;case`flow`:return 16;case`flow-root`:return 32;case`table`:return 64;case`flex`:case`-webkit-flex`:return 128;case`grid`:case`-ms-grid`:return 256;case`ruby`:return 512;case`subgrid`:return 1024;case`list-item`:return 2048;case`table-row-group`:return 4096;case`table-header-group`:return 8192;case`table-footer-group`:return 16384;case`table-row`:return 32768;case`table-cell`:return 65536;case`table-column-group`:return 131072;case`table-column`:return 262144;case`table-caption`:return 524288;case`ruby-base`:return 1048576;case`ruby-text`:return 2097152;case`ruby-base-container`:return 4194304;case`ruby-text-container`:return 8388608;case`contents`:return 16777216;case`inline-block`:return 33554432;case`inline-list-item`:return 67108864;case`inline-table`:return 134217728;case`inline-flex`:return 268435456;case`inline-grid`:return 536870912}return 0},ji={name:`float`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`left`:return 1;case`right`:return 2;case`inline-start`:return 3;case`inline-end`:return 4}return 0}},Mi={name:`overflow`,initialValue:`visible`,prefix:!1,type:1,parse:(e,t)=>t.filter(A).map(e=>{switch(e.value){case`hidden`:return 1;case`scroll`:return 2;case`clip`:return 3;case`auto`:return 4;default:return 0}})},Ni={name:`text-decoration-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Pi={name:`text-decoration-line`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>t.filter(A).map(e=>{switch(e.value){case`underline`:return 1;case`overline`:return 2;case`line-through`:return 3;case`none`:return 4}return 0}).filter(e=>e!==0)},Fi={name:`content`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>{if(t.length===0)return[];let n=t[0];return n&&n.type===20&&n.value===`none`?[]:t}},Ii={name:`quotes`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>{if(t.length===0)return null;let n=t[0];if(n&&n.type===20&&n.value===`none`)return null;let r=[],i=t.filter(nn);if(i.length%2!=0)return null;for(let e=0;e<i.length;e+=2){let t=E(i,e).value,n=E(i,e+1).value;r.push({open:t,close:n})}return r}},Li=(e,t,n)=>{if(!e)return``;let r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:``},Ri=(e,t)=>{let n=[],r=e.filter(an);for(let e=0;e<r.length;e++){let i=r[e],a=r[e+1];if(i&&i.type===20){let e=a&&k(a)?a.number:t;n.push([i.value,e])}}return n},zi={name:`counter-increment`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>{if(t.length===0)return null;let n=t[0];return n&&n.type===20&&n.value===`none`?null:Ri(t,1).map(([e,t])=>({counter:e,increment:t}))}},Bi={name:`counter-reset`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>t.length===0?[]:Ri(t,0).filter(([e])=>e!==`none`).map(([e,t])=>({counter:e,reset:t}))},Vi={name:`background-clip`,initialValue:`border-box`,prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(A(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2;case`text`:return 3}return 0})},Hi={name:`background-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Ui=(e,t)=>{let n=H.parse(e,E(t,0)),r=t[1];return r&&F(r)?{color:n,stop:r}:{color:n,stop:null}},G=(e,t)=>{let n=e.map(e=>({color:e.color,stop:e.stop})),r=E(n,0),i=E(n,n.length-1);r.stop===null&&(r.stop=I),i.stop===null&&(i.stop=R);let a=[],o=0;for(let e=0;e<n.length;e++){let r=E(n,e).stop;if(r!==null){let e=z(r,t);e>o?a.push(e):a.push(o),o=e}else a.push(null)}let s=null;for(let e=0;e<a.length;e++){let t=E(a,e);if(t===null)s===null&&(s=e);else if(s!==null){let n=e-s,r=(t-a[s-1])/(n+1);for(let e=1;e<=n;e++)a[s+e-1]=r*e;s=null}}return n.map(({color:e},n)=>({color:e,stop:Math.max(Math.min(1,a[n]/t),0)}))},Wi=(e,t,n)=>{let r=t/2,i=n/2,a=z(e[0],t)-r,o=i-z(e[1],n);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},Gi=(e,t,n)=>{let r=typeof e==`number`?e:Wi(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,o=n/2,s=i/2,c=Math.sin(r-Math.PI/2)*s,l=Math.cos(r-Math.PI/2)*s;return[i,a-l,a+l,o-c,o+c]},Ki=(e,t)=>Math.sqrt(e*e+t*t),qi=(e,t,n,r,i)=>[[0,0],[0,t],[e,0],[e,t]].reduce((e,t)=>{let[a,o]=t,s=Ki(n-a,r-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner,Ji=(e,t,n,r,i)=>{let a=0,o=0;switch(e.size){case 0:e.shape===0?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)a=o=Math.min(Ki(t,n),Ki(t,n-i),Ki(t-r,n),Ki(t-r,n-i));else if(e.shape===1){let e=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),[s,c]=qi(r,i,t,n,!0);a=Ki(s-t,(c-n)/e),o=e*a}break;case 1:e.shape===0?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)a=o=Math.max(Ki(t,n),Ki(t,n-i),Ki(t-r,n),Ki(t-r,n-i));else if(e.shape===1){let e=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),[s,c]=qi(r,i,t,n,!1);a=Ki(s-t,(c-n)/e),o=e*a}}if(Array.isArray(e.size)){let t=e.size;a=z(E(t,0),r),o=t.length===2?z(E(t,1),i):a}return[a,o]},Yi=(e,t)=>{let n=B(180),r=[];return M(t).forEach((t,i)=>{if(i===0){let r=t[0];if(r&&r.type===20&&r.value===`to`){n=Dn(t);return}if(r&&En(r)){n=Tn.parse(e,r);return}}let a=Ui(e,t);r.push(a)}),{angle:n,stops:r,type:1}},Xi=(e,t)=>{let n=B(180),r=[];return M(t).forEach((t,i)=>{if(i===0){let r=t[0];if(r&&r.type===20&&[`top`,`left`,`right`,`bottom`].indexOf(r.value)!==-1){n=Dn(t);return}if(r&&En(r)){n=(Tn.parse(e,r)+B(270))%B(360);return}}let a=Ui(e,t);r.push(a)}),{angle:n,stops:r,type:1}},Zi=(e,t)=>{let n=B(180),r=[],i=1;return M(t).forEach((t,n)=>{let a=t[0];if(a){if(n===0){if(A(a)&&a.value===`linear`){i=1;return}if(A(a)&&a.value===`radial`){i=2;return}}if(a.type===18){if(a.name===`from`){let t=H.parse(e,E(a.values,0));r.push({stop:I,color:t})}else if(a.name===`to`){let t=H.parse(e,E(a.values,0));r.push({stop:R,color:t})}else if(a.name===`color-stop`){let t=a.values.filter(j);if(t.length===2){let n=H.parse(e,E(t,1)),i=E(t,0);k(i)&&r.push({stop:{type:16,number:i.number*100,flags:i.flags},color:n})}}}}}),i===1?{angle:(n+B(180))%B(360),stops:r,type:i}:{size:3,shape:0,stops:r,position:[],type:i}},Qi=`closest-side`,$i=`farthest-side`,ea=`closest-corner`,ta=`farthest-corner`,na=`circle`,ra=`ellipse`,ia=`cover`,aa=`contain`,oa=(e,t)=>{let n=0,r=3,i=[],a=[];return M(t).forEach((t,o)=>{let s=!0;if(o===0){let e=!1;s=t.reduce((t,i)=>{if(e){if(A(i))switch(i.value){case`center`:return a.push(L),t;case`top`:case`left`:return a.push(I),t;case`right`:case`bottom`:return a.push(R),t}else(F(i)||hn(i))&&a.push(i)}else if(A(i))switch(i.value){case na:return n=0,!1;case ra:return n=1,!1;case`at`:return e=!0,!1;case Qi:return r=0,!1;case ia:case $i:return r=1,!1;case aa:case ea:return r=2,!1;case ta:return r=3,!1}else if(hn(i)||F(i))return Array.isArray(r)||(r=[]),r.push(i),!1;return t},s)}if(s){let n=Ui(e,t);i.push(n)}}),{size:r,shape:n,stops:i,position:a,type:2}},sa=(e,t)=>{let n=0,r=3,i=[],a=[];return M(t).forEach((t,o)=>{let s=!0;if(o===0?s=t.reduce((e,t)=>{if(A(t))switch(t.value){case`center`:return a.push(L),!1;case`top`:case`left`:return a.push(I),!1;case`right`:case`bottom`:return a.push(R),!1}else if(F(t)||hn(t))return a.push(t),!1;return e},s):o===1&&(s=t.reduce((e,t)=>{if(A(t))switch(t.value){case na:return n=0,!1;case ra:return n=1,!1;case aa:case Qi:return r=0,!1;case $i:return r=1,!1;case ea:return r=2,!1;case ia:case ta:return r=3,!1}else if(hn(t)||F(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){let n=Ui(e,t);i.push(n)}}),{size:r,shape:n,stops:i,position:a,type:2}},ca=(e,t)=>({...Yi(e,t),type:3}),la=(e,t)=>({...oa(e,t),type:4}),ua=(e,t)=>{let n=0,r=[],i=[];return M(t).forEach((t,a)=>{let o=!0;if(a===0){let i=!1,a=!1;o=t.reduce((t,o)=>{if(A(o))switch(o.value){case`from`:return i=!0,a=!1,!1;case`at`:return i=!1,a=!0,!1;case`center`:return r.push(L),t;case`top`:case`left`:return r.push(I),t;case`right`:case`bottom`:return r.push(R),t}return i?(n=Tn.parse(e,o),!1):(a&&F(o)&&r.push(o),t)},!0)}o&&t.length>0&&i.push(Ui(e,t))}),{type:5,angle:n,position:r,stops:i}},da=(e,t)=>({...ua(e,t),type:6}),fa=e=>e&&(O(e)&&(e.unit===`dppx`||e.unit===`x`)||k(e))?e.number:1,pa=(e,t)=>{let n=M(t),r=e.config.window.devicePixelRatio||1,i=[];for(let e of n){let t=e.find(e=>e.type===22||e.type===18);if(!t)continue;let n=e.find(e=>O(e)||k(e));i.push({imageToken:t,resolution:fa(n)})}if(i.length===0)throw Error(`image-set() requires at least one image candidate`);let a=i.filter(e=>e.resolution>=r).sort((e,t)=>e.resolution-t.resolution),o=E(a.length>0?a:i.slice().sort((e,t)=>t.resolution-e.resolution),0);return ba.parse(e,o.imageToken)},ma=e=>e.type===1,ha=e=>e.type===2,ga=e=>e.type===3,_a=e=>e.type===4,va=e=>e.type===5,ya=e=>e.type===6,ba={name:`image`,parse:(e,t)=>{if(t.type===22){let n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){let n=Sa[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported image function "${t.name}"`);return n(e,t.values)}throw Error(`Unsupported image type ${t.type}`)}};function xa(e){return(e.type!==20||e.value!==`none`)&&(e.type!==18||!!Sa[e.name])}let Sa={"linear-gradient":Yi,"-moz-linear-gradient":Xi,"-ms-linear-gradient":Xi,"-o-linear-gradient":Xi,"-webkit-linear-gradient":Xi,"radial-gradient":oa,"-moz-radial-gradient":sa,"-ms-radial-gradient":sa,"-o-radial-gradient":sa,"-webkit-radial-gradient":sa,"-webkit-gradient":Zi,"repeating-linear-gradient":ca,"-webkit-repeating-linear-gradient":ca,"-moz-repeating-linear-gradient":ca,"-ms-repeating-linear-gradient":ca,"-o-repeating-linear-gradient":ca,"repeating-radial-gradient":la,"-webkit-repeating-radial-gradient":la,"-moz-repeating-radial-gradient":la,"conic-gradient":ua,"-webkit-conic-gradient":ua,"-moz-conic-gradient":ua,"repeating-conic-gradient":da,"-webkit-repeating-conic-gradient":da,"-moz-repeating-conic-gradient":da,"image-set":pa,"-webkit-image-set":pa},Ca={name:`background-image`,initialValue:`none`,type:1,prefix:!1,skipCache:!0,parse:(e,t)=>{if(t.length===0)return[];let n=t[0];return n&&n.type===20&&n.value===`none`?[]:t.filter(e=>j(e)&&xa(e)).map(t=>ba.parse(e,t))}},wa={name:`background-origin`,initialValue:`border-box`,prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(A(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})},Ta={name:`background-position`,initialValue:`0% 0%`,type:1,prefix:!1,parse:(e,t)=>M(t).map(e=>e.map(yn).filter(e=>e!==null)).map(xn)},Ea={name:`background-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:(e,t)=>M(t).map(e=>e.filter(A).map(e=>e.value).join(` `)).map(Da)},Da=e=>{switch(e){case`no-repeat`:return 1;case`repeat-x`:case`repeat no-repeat`:return 2;case`repeat-y`:case`no-repeat repeat`:return 3;default:return 0}},Oa={name:`background-size`,initialValue:`0`,prefix:!1,type:1,parse:(e,t)=>M(t).map(e=>e.map(e=>ka(e)?e:yn(e)).filter(e=>e!==null))},ka=e=>A(e)||F(e),Aa=e=>({name:`border-${e}-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`}),ja=Aa(`top`),Ma=Aa(`right`),Na=Aa(`bottom`),Pa=Aa(`left`),Fa=e=>({name:`border-${e}-radius`,initialValue:`0 0`,prefix:!1,type:1,parse:(e,t)=>xn(t.filter(F))}),Ia=Fa(`top-left`),La=Fa(`top-right`),Ra=Fa(`bottom-right`),za=Fa(`bottom-left`),Ba=e=>({name:`border-${e}-style`,initialValue:`solid`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`none`:return 0;case`dashed`:return 2;case`dotted`:return 3;case`double`:return 4}return 1}}),Va=Ba(`top`),Ha=Ba(`right`),Ua=Ba(`bottom`),Wa=Ba(`left`),Ga=e=>({name:`border-${e}-width`,initialValue:`0`,type:0,prefix:!1,parse:(e,t)=>O(t)?t.number:0}),Ka=Ga(`top`),qa=Ga(`right`),Ja=Ga(`bottom`),Ya=Ga(`left`),Xa={type:0},Za=e=>{let[t]=e;return t?A(t)?t.value===`farthest-side`?`farthest-side`:`closest-side`:F(t)?t:`closest-side`:`closest-side`},Qa=e=>{let t=null,n=null;for(let r of e)if(A(r))switch(r.value){case`left`:t=I;break;case`right`:t=R;break;case`top`:n=I;break;case`bottom`:n=R;break;case`center`:t===null?t=L:n===null&&(n=L)}else F(r)&&(t===null?t=r:n===null&&(n=r));return{cx:t??L,cy:n??L}},$a=e=>{let t=[];for(let n of e)if(n.type!==31){if(A(n)&&n.value===`round`)break;F(n)&&t.push(n)}let n=t[0]??I,r=t[1]??n;return{type:1,top:n,right:r,bottom:t[2]??n,left:t[3]??r}},eo=e=>{let t=e.filter(an),n=t.findIndex(e=>rn(e,`at`)),r=n===-1?t:t.slice(0,n),i=n===-1?[]:t.slice(n+1);return{type:2,radius:Za(r),...Qa(i)}},to=e=>{let t=e.filter(an),n=t.findIndex(e=>rn(e,`at`)),r=n===-1?t:t.slice(0,n),i=n===-1?[]:t.slice(n+1);return{type:3,rx:Za(r.slice(0,1)),ry:Za(r.slice(1,2)),...Qa(i)}},no=e=>{let t=M(e),n=[];for(let e of t){if(e.length===1&&e[0]&&A(e[0]))continue;let t=e.filter(F);t.length>=2&&n.push([E(t,0),E(t,1)])}return{type:4,points:n}},ro=e=>{let t=e.find(e=>e.type===0);return t?{type:5,d:t.value}:Xa},io=e=>{let t=[];for(let n of e)if(n.type!==31){if(A(n)&&n.value===`round`)break;F(n)&&t.push(n)}return t.length<4?Xa:{type:6,x:E(t,0),y:E(t,1),width:E(t,2),height:E(t,3)}},ao=e=>{let t=[];for(let n of e)if(n.type!==31){if(A(n)){if(n.value===`round`)break;if(n.value===`auto`){t.push(`auto`);continue}return Xa}F(n)&&t.push(n)}if(t.length!==4)return Xa;let n=(e,t)=>e===`auto`?t===`top`||t===`left`?I:R:e;return{type:1,top:n(E(t,0),`top`),right:n(E(t,1),`right`),bottom:n(E(t,2),`bottom`),left:n(E(t,3),`left`)}},oo={name:`clip-path`,initialValue:`none`,prefix:!1,type:0,parse:(e,t)=>{if(A(t)&&t.value===`none`)return Xa;if(t.type===18)switch(t.name){case`inset`:return $a(t.values);case`circle`:return eo(t.values);case`ellipse`:return to(t.values);case`polygon`:return no(t.values);case`path`:return ro(t.values);case`xywh`:return io(t.values);case`rect`:return ao(t.values)}return Xa}},so={name:`color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},co={name:`direction`,initialValue:`ltr`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`rtl`:return 1;default:return 0}}},lo={name:`font-family`,initialValue:``,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=[],i=[],a=!1;return t.forEach(e=>{switch(e.type){case 20:n.push(e.value);break;case 0:a=!0,n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(` `)),i.push(a),a=!1,n.length=0}}),n.length&&(r.push(n.join(` `)),i.push(a)),r.map((e,t)=>i[t]||e.indexOf(` `)!==-1?`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\a `).replace(/\r/g,`\\d `).replace(/\f/g,`\\c `)}'`:e)}},uo={name:`font-size`,initialValue:`0`,prefix:!1,type:3,format:`length`},fo={name:`letter-spacing`,initialValue:`0`,prefix:!1,type:0,parse:(e,t)=>t.type===20&&t.value===`normal`?0:t.type===17||t.type===15?t.number:0},po={name:`line-break`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`strict`:return`strict`;default:return`normal`}}},mo={name:`line-height`,initialValue:`normal`,prefix:!1,type:4},ho=(e,t)=>A(e)&&e.value===`normal`?1.2*t:e.type===17?t*e.number:F(e)?z(e,t):t,go={name:`list-style-image`,initialValue:`none`,type:0,prefix:!1,skipCache:!0,parse:(e,t)=>t.type===20&&t.value===`none`||!xa(t)?null:ba.parse(e,t)},_o={name:`list-style-position`,initialValue:`outside`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`inside`:return 0;default:return 1}}},vo=e=>({name:`margin-${e}`,initialValue:`0`,prefix:!1,type:4}),yo=vo(`top`),bo=vo(`right`),xo=vo(`bottom`),So=vo(`left`),Co={name:`overflow-wrap`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`break-word`:return`break-word`;default:return`normal`}}},wo=e=>({name:`padding-${e}`,initialValue:`0`,prefix:!1,type:3,format:`length-percentage`}),To=wo(`top`),Eo=wo(`right`),Do=wo(`bottom`),Oo=wo(`left`),ko={name:`text-align`,initialValue:`left`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`right`:return 2;case`center`:case`justify`:return 1;default:return 0}}},Ao={name:`position`,initialValue:`static`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`relative`:return 1;case`absolute`:return 2;case`fixed`:return 3;case`sticky`:return 4}return 0}},jo={name:`text-shadow`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.length===1&&rn(E(t,0),`none`)?[]:M(t).map(t=>{let n={color:0,offsetX:I,offsetY:I,blur:I},r=0;for(let i=0;i<t.length;i++){let a=t[i];a&&(hn(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:n.blur=a,r++):n.color=H.parse(e,a))}return n})},Mo={name:`text-transform`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`uppercase`:return 2;case`lowercase`:return 1;case`capitalize`:return 3}return 0}},No={name:`transform`,initialValue:`none`,prefix:!0,type:0,parse:(e,t)=>{if(t.type===20&&t.value===`none`)return null;if(t.type===18){let n=Po[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported transform function "${t.name}"`);return n(e,t.values)}return null}},Po={matrix:(e,t)=>{let n=t.filter(e=>e.type===17).map(e=>e.number);return n.length===6?n:null},matrix3d:(e,t)=>{let n=t.filter(e=>e.type===17).map(e=>e.number);return n.length===16?[E(n,0),E(n,1),E(n,4),E(n,5),E(n,12),E(n,13)]:null},rotate:(e,t)=>{if(t.length!==1)return null;let n=E(t,0),r=0;if(n.type===17&&n.number===0)r=0;else if(n.type===15)r=Tn.parse(e,n);else return null;let i=Math.cos(r),a=Math.sin(r);return[i,a,-a,i,0,0]}},Fo={type:16,number:50,flags:4},Io=[Fo,Fo],Lo={name:`transform-origin`,initialValue:`50% 50%`,prefix:!0,type:1,parse:(e,t)=>{let n=t.filter(F);return n.length===2?[E(n,0),E(n,1)]:Io}},Ro={name:`rotate`,initialValue:`none`,prefix:!1,type:0,parse:(e,t)=>t.type===20&&t.value===`none`?null:t.type===17&&t.number===0?0:t.type===15?Tn.parse(e,t)*180/Math.PI:null},zo={name:`visibility`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`hidden`:return 1;case`collapse`:return 2;default:return 0}}},Bo={name:`word-break`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`break-all`:return`break-all`;case`keep-all`:return`keep-all`;default:return`normal`}}},Vo={name:`white-space`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`pre`:return`pre`;case`nowrap`:return`nowrap`;case`pre-wrap`:return`pre-wrap`;case`pre-line`:return`pre-line`;default:return`normal`}}},Ho=e=>e!==0,Uo=e=>e===3||e===4,Wo={name:`writing-mode`,initialValue:`horizontal-tb`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`vertical-rl`:return 1;case`vertical-lr`:return 2;case`sideways-rl`:return 3;case`sideways-lr`:return 4;default:return 0}}},Go={name:`z-index`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>{if(t.type===20)return{auto:!0,order:0};if(k(t))return{auto:!1,order:t.number};throw Error(`Invalid z-index number parsed`)}},Ko={name:`time`,parse:(e,t)=>{if(t.type===15)switch(t.unit.toLowerCase()){case`s`:return 1e3*t.number;case`ms`:return t.number}throw Error(`Unsupported time type`)}},qo={name:`opacity`,initialValue:`1`,type:0,prefix:!1,parse:(e,t)=>k(t)?t.number:1},Jo={name:`text-decoration-style`,initialValue:`solid`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`double`:return 1;case`dotted`:return 2;case`dashed`:return 3;case`wavy`:return 4;default:return 0}}},Yo={name:`text-decoration-thickness`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>{if(A(t))switch(t.value){case`auto`:return`auto`;case`from-font`:return`from-font`}return O(t)?t.number:`auto`}},Xo={name:`text-underline-offset`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>A(t)&&t.value===`auto`?`auto`:O(t)?t.number:`auto`},Zo={name:`font-weight`,initialValue:`normal`,type:0,prefix:!1,parse:(e,t)=>{if(k(t))return t.number;if(A(t))switch(t.value){case`bold`:return 700;default:return 400}return 400}},Qo={name:`font-variant`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.filter(A).map(e=>e.value)},$o={name:`font-style`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`oblique`:return`oblique`;case`italic`:return`italic`;default:return`normal`}}},es={name:`duration`,initialValue:`0s`,prefix:!1,type:1,parse:(e,t)=>t.filter(O).map(t=>Ko.parse(e,t))},ts={name:`box-shadow`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.length===1&&rn(E(t,0),`none`)?[]:M(t).map(t=>{let n={color:255,offsetX:I,offsetY:I,blur:I,spread:I,inset:!1},r=0;for(let i=0;i<t.length;i++){let a=t[i];a&&(rn(a,`inset`)?n.inset=!0:hn(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:r===2?n.blur=a:n.spread=a,r++):n.color=H.parse(e,a))}return n})},ns={name:`paint-order`,initialValue:`normal`,prefix:!1,type:1,parse:(e,t)=>{let n=[0,1,2],r=[];return t.filter(A).forEach(e=>{switch(e.value){case`stroke`:r.push(1);break;case`fill`:r.push(0);break;case`markers`:r.push(2)}}),n.forEach(e=>{r.indexOf(e)===-1&&r.push(e)}),r}},rs={name:`-webkit-text-stroke-color`,initialValue:`currentcolor`,prefix:!1,type:3,format:`color`},is={name:`-webkit-text-stroke-width`,initialValue:`0`,type:0,prefix:!1,parse:(e,t)=>O(t)?t.number:0},as={name:`-webkit-line-clamp`,initialValue:`none`,prefix:!0,type:0,parse:(e,t)=>t.type===20&&t.value===`none`?0:t.type===17?Math.max(0,Math.floor(t.number)):0},os={name:`object-fit`,initialValue:`fill`,prefix:!1,type:1,parse:(e,t)=>t.filter(A).reduce((e,t)=>e|ss(t.value),0)},ss=e=>{switch(e){case`contain`:return 2;case`cover`:return 4;case`none`:return 8;case`scale-down`:return 16}return 0},cs={name:`text-overflow`,initialValue:`clip`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`ellipsis`:return 1;default:return 0}}},ls={name:`image-rendering`,initialValue:`auto`,prefix:!1,type:2,parse:(e,t)=>{switch(t.toLowerCase()){case`crisp-edges`:case`-webkit-crisp-edges`:case`-moz-crisp-edges`:return 1;case`pixelated`:case`-webkit-optimize-contrast`:return 2;case`smooth`:case`high-quality`:return 3;default:return 0}}},K={NORMAL:`normal`,MULTIPLY:`multiply`,SCREEN:`screen`,OVERLAY:`overlay`,DARKEN:`darken`,LIGHTEN:`lighten`,COLOR_DODGE:`color-dodge`,COLOR_BURN:`color-burn`,HARD_LIGHT:`hard-light`,SOFT_LIGHT:`soft-light`,DIFFERENCE:`difference`,EXCLUSION:`exclusion`,HUE:`hue`,SATURATION:`saturation`,COLOR:`color`,LUMINOSITY:`luminosity`},us=new Set(Object.values(K)),ds={name:`mix-blend-mode`,initialValue:`normal`,type:2,prefix:!1,parse:(e,t)=>us.has(t)?t:K.NORMAL},fs={name:`filter`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{if(t.length===1){let e=E(t,0);if(e.type===20&&e.value===`none`)return null}let n=[];for(let e of t)if(e.type===18){let t=e,r=ps(t.values);switch(t.name){case`blur`:n.push(`blur(${r})`);break;case`brightness`:case`contrast`:case`invert`:case`opacity`:case`saturate`:case`sepia`:n.push(`${t.name}(${r})`);break;case`grayscale`:n.push(`grayscale(${r})`);break;case`hue-rotate`:n.push(`hue-rotate(${r})`);break;case`drop-shadow`:n.push(`drop-shadow(${r})`)}}return n.length>0?n.join(` `):null}},ps=e=>{let t=[];for(let n of e){if(n.type===31){t.push(` `);continue}n.type===18?t.push(`${n.name}(${ps(n.values)})`):n.type===4?t.push(`,`):n.type===6?t.push(n.value):n.type===15?t.push(`${n.number}${n.unit}`):n.type===17?t.push(`${n.number}`):n.type===16?t.push(`${n.number}%`):n.type===20?t.push(n.value):n.type===5&&t.push(`#${n.value}`)}return t.join(``).trim()},ms={name:`font-variant-ligatures`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`none`:return 1;case`common-ligatures`:return 2;case`no-common-ligatures`:return 3;case`discretionary-ligatures`:return 4;case`no-discretionary-ligatures`:return 5;case`historical-ligatures`:return 6;case`no-historical-ligatures`:return 7;case`contextual`:return 8;case`no-contextual`:return 9;default:return 0}}},hs={name:`zoom`,initialValue:`1`,type:0,prefix:!1,parse:(e,t)=>t.type===16?Math.max(0,t.number/100):t.type===17?Math.max(0,t.number):1},gs={name:`object-position`,initialValue:`50% 50%`,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=0;for(;r<t.length&&n.length<2;){let e=t[r];if(!e)break;if(A(e))switch(e.value){case`left`:case`top`:n.push(I);break;case`center`:n.push(L);break;case`right`:case`bottom`:n.push(R)}else F(e)&&n.push(e);r++}for(;n.length<2;)n.push(L);return[E(n,0),E(n,1)]}},_s=new Set(Object.values({NORMAL:`normal`,MULTIPLY:`multiply`,SCREEN:`screen`,OVERLAY:`overlay`,DARKEN:`darken`,LIGHTEN:`lighten`,COLOR_DODGE:`color-dodge`,COLOR_BURN:`color-burn`,HARD_LIGHT:`hard-light`,SOFT_LIGHT:`soft-light`,DIFFERENCE:`difference`,EXCLUSION:`exclusion`,HUE:`hue`,SATURATION:`saturation`,COLOR:`color`,LUMINOSITY:`luminosity`})),vs={name:`background-blend-mode`,initialValue:`normal`,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=t.filter(j);for(let e of r)A(e)&&_s.has(e.value)&&n.push(e.value);return n.length>0?n:[`normal`]}},ys={name:`border-image-source`,initialValue:`none`,prefix:!1,type:1,skipCache:!0,parse:(e,t)=>{if(t.length===0)return null;let n=t.filter(e=>j(e)&&xa(e));return n.length===0?null:ba.parse(e,E(n,0))}},bs=e=>{let t=[...e];if(t.length===1){let e=E(t,0);t.push(e,e,e)}else t.length===2?t.push(E(t,0),E(t,1)):t.length===3&&t.push(E(t,1));return[E(t,0),E(t,1),E(t,2),E(t,3)]},xs={name:`border-image-slice`,initialValue:`100%`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(an),r=[],i=!1,a=`percent`;for(let e of n){if(A(e)&&e.value===`fill`){i=!0;continue}e.type===17?(r.push(e.number),a=`number`):e.type===16&&(r.push(e.number),a=`percent`)}let[o,s,c,l]=bs(r.length>0?r:[100]);return{top:o,right:s,bottom:c,left:l,fill:i,unit:a}}},Ss=e=>{switch(e){case`repeat`:return 1;case`round`:return 2;case`space`:return 3;default:return 0}},Cs={name:`border-image-repeat`,initialValue:`stretch`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(an),r=[];for(let e of n)A(e)&&r.push(Ss(e.value));let i=r[0]??0;return{horizontal:i,vertical:r[1]??i}}},ws={name:`box-decoration-break`,initialValue:`slice`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`clone`:return 1;default:return 0}}},Ts={name:`accent-color`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>A(t)&&t.value===`auto`?null:H.parse(e,t)},Es={name:`-webkit-text-fill-color`,initialValue:`currentcolor`,prefix:!0,type:0,parse:(e,t)=>A(t)&&t.value===`currentcolor`?null:H.parse(e,t)},Ds={name:`isolation`,initialValue:`auto`,prefix:!1,type:2,parse:(e,t)=>+(t===`isolate`)},Os={name:`outline-style`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`solid`:return 2;case`dashed`:return 3;case`dotted`:return 4;case`double`:return 5;case`auto`:return 1;default:return 0}}},ks={name:`outline-color`,initialValue:`currentcolor`,prefix:!1,type:0,parse:(e,t)=>A(t)&&(t.value===`currentcolor`||t.value===`invert`)?null:H.parse(e,t)},As={name:`outline-width`,initialValue:`medium`,prefix:!1,type:0,parse:Ka.parse},js={name:`outline-offset`,initialValue:`0px`,prefix:!1,type:0,parse:(e,t)=>O(t)||k(t)?t.number:0},Ms={name:`backdrop-filter`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>fs.parse(e,t)},Ns={name:`mask-image`,initialValue:`none`,prefix:!1,type:1,skipCache:!0,parse:Ca.parse},Ps={name:`mask-position`,initialValue:`0%`,prefix:!1,type:1,parse:Ta.parse},Fs={name:`mask-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:Ea.parse},Is={name:`mask-size`,initialValue:`auto`,prefix:!1,type:1,parse:Oa.parse},Ls=[`dot`,`circle`,`double-circle`,`triangle`,`sesame`],Rs={name:`text-emphasis-style`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(an);if(n.length===0)return null;let r=E(n,0);if(r.type===0)return r.value;if(A(r)){if(r.value===`none`)return null;if(r.value!==`filled`&&r.value!==`open`&&Ls.indexOf(r.value)===-1)return r.value}let i=!0,a=`circle`;for(let e of n)A(e)&&(e.value===`filled`?i=!0:e.value===`open`?i=!1:Ls.indexOf(e.value)!==-1&&(a=e.value));return{fill:i,shape:a}}},zs={name:`text-emphasis-color`,initialValue:`currentcolor`,prefix:!1,type:0,parse:(e,t)=>A(t)&&t.value===`currentcolor`?null:H.parse(e,t)},Bs={name:`text-emphasis-position`,initialValue:`over right`,prefix:!1,type:1,parse:(e,t)=>{let n=!0,r=!0;for(let e of t)if(A(e))switch(e.value){case`over`:n=!0;break;case`under`:n=!1;break;case`right`:r=!0;break;case`left`:r=!1}return{over:n,right:r}}},Vs=e=>{let t=[...e];if(t.length===1){let e=E(t,0);t.push(e,e,e)}else t.length===2?t.push(E(t,0),E(t,1)):t.length===3&&t.push(E(t,1));return[E(t,0),E(t,1),E(t,2),E(t,3)]},Hs=e=>A(e)&&e.value===`auto`?{kind:`auto`}:e.type===17?{kind:`number`,value:e.number}:e.type===15&&e.unit===`px`?{kind:`length`,value:e.number}:e.type===16?{kind:`percentage`,value:e.number}:null,Us=e=>{let t=[];for(let n of e){if(n.type===31)continue;let e=Hs(n);if(!e)return null;t.push(e)}return t.length===0||t.length>4?null:Vs(t)},Ws=[[`animationDuration`,es,`animationDuration`],[`backgroundClip`,Vi,`backgroundClip`],[`backgroundColor`,Hi,`backgroundColor`],[`backgroundImage`,Ca,`backgroundImage`],[`backgroundOrigin`,wa,`backgroundOrigin`],[`backgroundPosition`,Ta,`backgroundPosition`],[`backgroundRepeat`,Ea,`backgroundRepeat`],[`backgroundSize`,Oa,`backgroundSize`],[`borderTopColor`,ja,`borderTopColor`],[`borderRightColor`,Ma,`borderRightColor`],[`borderBottomColor`,Na,`borderBottomColor`],[`borderLeftColor`,Pa,`borderLeftColor`],[`borderTopLeftRadius`,Ia,`borderTopLeftRadius`],[`borderTopRightRadius`,La,`borderTopRightRadius`],[`borderBottomRightRadius`,Ra,`borderBottomRightRadius`],[`borderBottomLeftRadius`,za,`borderBottomLeftRadius`],[`borderTopStyle`,Va,`borderTopStyle`],[`borderRightStyle`,Ha,`borderRightStyle`],[`borderBottomStyle`,Ua,`borderBottomStyle`],[`borderLeftStyle`,Wa,`borderLeftStyle`],[`borderTopWidth`,Ka,`borderTopWidth`],[`borderRightWidth`,qa,`borderRightWidth`],[`borderBottomWidth`,Ja,`borderBottomWidth`],[`borderLeftWidth`,Ya,`borderLeftWidth`],[`boxShadow`,ts,`boxShadow`],[`clipPath`,oo,`clipPath`],[`color`,so,`color`],[`direction`,co,`direction`],[`display`,ki,`display`],[`fontFamily`,lo,`fontFamily`],[`fontSize`,uo,`fontSize`],[`fontStyle`,$o,`fontStyle`],[`fontVariant`,Qo,`fontVariant`],[`fontWeight`,Zo,`fontWeight`],[`letterSpacing`,fo,`letterSpacing`],[`lineBreak`,po,`lineBreak`],[`lineHeight`,mo,`lineHeight`],[`listStyleImage`,go,`listStyleImage`],[`listStylePosition`,_o,`listStylePosition`],[`listStyleType`,mi,`listStyleType`],[`marginTop`,yo,`marginTop`],[`marginRight`,bo,`marginRight`],[`marginBottom`,xo,`marginBottom`],[`marginLeft`,So,`marginLeft`],[`opacity`,qo,`opacity`],[`overflowWrap`,Co,`overflowWrap`],[`paddingTop`,To,`paddingTop`],[`paddingRight`,Eo,`paddingRight`],[`paddingBottom`,Do,`paddingBottom`],[`paddingLeft`,Oo,`paddingLeft`],[`paintOrder`,ns,`paintOrder`],[`position`,Ao,`position`],[`textAlign`,ko,`textAlign`],[`textDecorationStyle`,Jo,`textDecorationStyle`],[`textDecorationThickness`,Yo,`textDecorationThickness`],[`textUnderlineOffset`,Xo,`textUnderlineOffset`],[`textShadow`,jo,`textShadow`],[`textTransform`,Mo,`textTransform`],[`textOverflow`,cs,`textOverflow`],[`transform`,No,`transform`],[`transformOrigin`,Lo,`transformOrigin`],[`rotate`,Ro,`rotate`],[`visibility`,zo,`visibility`],[`webkitTextStrokeColor`,rs,`webkitTextStrokeColor`],[`webkitTextStrokeWidth`,is,`webkitTextStrokeWidth`],[`webkitLineClamp`,as,`webkitLineClamp`],[`wordBreak`,Bo,`wordBreak`],[`whiteSpace`,Vo,`whiteSpace`],[`writingMode`,Wo,`writingMode`],[`zIndex`,Go,`zIndex`],[`objectFit`,os,`objectFit`],[`imageRendering`,ls,`imageRendering`],[`mixBlendMode`,ds,`mixBlendMode`],[`filter`,fs,`filter`],[`fontVariantLigatures`,ms,`fontVariantLigatures`],[`zoom`,hs,`zoom`],[`objectPosition`,gs,`objectPosition`],[`backgroundBlendMode`,vs,`backgroundBlendMode`],[`borderImageSource`,ys,`borderImageSource`],[`borderImageSlice`,xs,`borderImageSlice`],[`borderImageRepeat`,Cs,`borderImageRepeat`],[`boxDecorationBreak`,ws,`boxDecorationBreak`],[`accentColor`,Ts,`accentColor`],[`webkitTextFillColor`,Es,`webkitTextFillColor`],[`isolation`,Ds,`isolation`],[`outlineColor`,ks,`outlineColor`],[`outlineStyle`,Os,`outlineStyle`],[`outlineWidth`,As,`outlineWidth`],[`outlineOffset`,js,`outlineOffset`],[`backdropFilter`,Ms,`backdropFilter`],[`maskImage`,Ns,`maskImage`],[`maskPosition`,Ps,`maskPosition`],[`maskRepeat`,Fs,`maskRepeat`],[`maskSize`,Is,`maskSize`],[`textEmphasisStyle`,Rs,`textEmphasisStyle`],[`textEmphasisColor`,zs,`textEmphasisColor`],[`textEmphasisPosition`,Bs,`textEmphasisPosition`],[`borderImageWidth`,{name:`border-image-width`,initialValue:`auto`,prefix:!1,type:1,parse:(e,t)=>{let n=Us(t),r={kind:`auto`};return n?{top:n[0],right:n[1],bottom:n[2],left:n[3]}:{top:r,right:r,bottom:r,left:r}}},`borderImageWidth`],[`borderImageOutset`,{name:`border-image-outset`,initialValue:`0px`,prefix:!1,type:1,parse:(e,t)=>{let n=Us(t),r={kind:`length`,value:0};return n?{top:n[0],right:n[1],bottom:n[2],left:n[3]}:{top:r,right:r,bottom:r,left:r}}},`borderImageOutset`],[`webkitBoxReflect`,{name:`-webkit-box-reflect`,initialValue:`none`,prefix:!0,type:1,skipCache:!0,parse:(e,t)=>{let n=null,r=0,i=null;for(let a of t)if(a.type!==31){if(n===null&&A(a)){if(a.value===`below`||a.value===`above`||a.value===`left`||a.value===`right`){n=a.value;continue}if(a.value===`none`)return null}if(r===0&&O(a)&&a.unit===`px`){r=a.number;continue}if(i===null&&xa(a)){i=ba.parse(e,a);continue}}return n===null?null:{direction:n,offset:r,mask:i}}},`webkitBoxReflect`]],Gs=/* @__PURE__ */ new Map,Ks=(e,t,n)=>{let r=n==null?t.initialValue:n.toString();r.trim()===``&&(r=t.initialValue);let i=Gs.get(t);if(i){let e=i.get(r);if(e!==void 0)return i.delete(r),i.set(r,e),e}let a=en.get();a.write(r);let o=new tn(a.read());en.release(a);let s=(()=>{switch(t.type){case 2:{let n=o.parseComponentValue();return t.parse(e,A(n)?n.value:t.initialValue)}case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case`angle`:return Tn.parse(e,o.parseComponentValue());case`color`:return H.parse(e,o.parseComponentValue());case`image`:return ba.parse(e,o.parseComponentValue());case`length`:{let e=o.parseComponentValue();return hn(e)?e:I}case`length-percentage`:{let e=o.parseComponentValue();return F(e)?e:I}case`time`:return Ko.parse(e,o.parseComponentValue())}}})();if(i||(i=/* @__PURE__ */ new Map,Gs.set(t,i)),!(t.skipCache||t.type===3&&t.format===`image`)){if(i.size>=200){let e=i.keys().next().value;e!==void 0&&i.delete(e)}i.set(r,s)}return s};var qs=class{constructor(e){this.styles=e}get topColor(){return this.styles.borderTopColor}get rightColor(){return this.styles.borderRightColor}get bottomColor(){return this.styles.borderBottomColor}get leftColor(){return this.styles.borderLeftColor}get topStyle(){return this.styles.borderTopStyle}get rightStyle(){return this.styles.borderRightStyle}get bottomStyle(){return this.styles.borderBottomStyle}get leftStyle(){return this.styles.borderLeftStyle}get topWidth(){return this.styles.borderTopWidth}get rightWidth(){return this.styles.borderRightWidth}get bottomWidth(){return this.styles.borderBottomWidth}get leftWidth(){return this.styles.borderLeftWidth}get topLeftRadius(){return this.styles.borderTopLeftRadius}get topRightRadius(){return this.styles.borderTopRightRadius}get bottomRightRadius(){return this.styles.borderBottomRightRadius}get bottomLeftRadius(){return this.styles.borderBottomLeftRadius}get imageSource(){return this.styles.borderImageSource}get imageSlice(){return this.styles.borderImageSlice}get imageRepeat(){return this.styles.borderImageRepeat}get boxShadow(){return this.styles.boxShadow}},Js=class{constructor(e){this.styles=e}get color(){return this.styles.backgroundColor}get image(){return this.styles.backgroundImage}get clip(){return this.styles.backgroundClip}get origin(){return this.styles.backgroundOrigin}get position(){return this.styles.backgroundPosition}get repeat(){return this.styles.backgroundRepeat}get size(){return this.styles.backgroundSize}get blendMode(){return this.styles.backgroundBlendMode}},Ys=class{constructor(e){this.styles=e}get family(){return this.styles.fontFamily}get size(){return this.styles.fontSize}get style(){return this.styles.fontStyle}get variant(){return this.styles.fontVariant}get weight(){return this.styles.fontWeight}get ligatures(){return this.styles.fontVariantLigatures}get color(){return this.styles.color}get letterSpacing(){return this.styles.letterSpacing}get lineHeight(){return this.styles.lineHeight}get textAlign(){return this.styles.textAlign}get textTransform(){return this.styles.textTransform}get textOverflow(){return this.styles.textOverflow}get textShadow(){return this.styles.textShadow}get textDecorationColor(){return this.styles.textDecorationColor}get textDecorationLine(){return this.styles.textDecorationLine}get textDecorationStyle(){return this.styles.textDecorationStyle}get textDecorationThickness(){return this.styles.textDecorationThickness}get textUnderlineOffset(){return this.styles.textUnderlineOffset}get wordBreak(){return this.styles.wordBreak}get lineBreak(){return this.styles.lineBreak}get overflowWrap(){return this.styles.overflowWrap}get writingMode(){return this.styles.writingMode}get direction(){return this.styles.direction}get webkitTextStrokeColor(){return this.styles.webkitTextStrokeColor}get webkitTextStrokeWidth(){return this.styles.webkitTextStrokeWidth}get webkitLineClamp(){return this.styles.webkitLineClamp}get paintOrder(){return this.styles.paintOrder}},Xs=class{constructor(e){this.styles=e}get display(){return this.styles.display}get position(){return this.styles.position}get float(){return this.styles.float}get zIndex(){return this.styles.zIndex}get marginTop(){return this.styles.marginTop}get marginRight(){return this.styles.marginRight}get marginBottom(){return this.styles.marginBottom}get marginLeft(){return this.styles.marginLeft}get paddingTop(){return this.styles.paddingTop}get paddingRight(){return this.styles.paddingRight}get paddingBottom(){return this.styles.paddingBottom}get paddingLeft(){return this.styles.paddingLeft}get overflowX(){return this.styles.overflowX}get overflowY(){return this.styles.overflowY}get opacity(){return this.styles.opacity}get visibility(){return this.styles.visibility}get transform(){return this.styles.transform}get transformOrigin(){return this.styles.transformOrigin}get rotate(){return this.styles.rotate}get zoom(){return this.styles.zoom}get clipPath(){return this.styles.clipPath}get mixBlendMode(){return this.styles.mixBlendMode}get filter(){return this.styles.filter}get imageRendering(){return this.styles.imageRendering}get objectFit(){return this.styles.objectFit}get objectPosition(){return this.styles.objectPosition}get boxDecorationBreak(){return this.styles.boxDecorationBreak}get listStyleImage(){return this.styles.listStyleImage}get listStylePosition(){return this.styles.listStylePosition}get listStyleType(){return this.styles.listStyleType}get animationDuration(){return this.styles.animationDuration}isVisible(){return this.styles.isVisible()}isTransparent(){return this.styles.isTransparent()}isTransformed(){return this.styles.isTransformed()}isPositioned(){return this.styles.isPositioned()}isPositionedWithZIndex(){return this.styles.isPositionedWithZIndex()}isFloating(){return this.styles.isFloating()}isInlineLevel(){return this.styles.isInlineLevel()}},Zs=class{get border(){return this._border??=new qs(this)}get background(){return this._background??=new Js(this)}get font(){return this._font??=new Ys(this)}get layout(){return this._layout??=new Xs(this)}constructor(e,t){if(t.display===`none`){this.display=0;for(let[t,n]of Ws)t!==`display`&&(this[t]=Ks(e,n,void 0));Object.assign(this,Qs(e,null));return}for(let[n,r,i]of Ws)this[n]=Ks(e,r,t[i]);Object.assign(this,Qs(e,t))}isVisible(){return this.display>0&&this.opacity>0&&this.visibility===0}isTransparent(){return On(this.backgroundColor)}isTransformed(){return this.transform!==null||this.rotate!==null}isPositioned(){return this.position!==0}isPositionedWithZIndex(){return this.isPositioned()&&!this.zIndex.auto}isFloating(){return this.float!==0}isInlineLevel(){return U(this.display,4)||U(this.display,33554432)||U(this.display,268435456)||U(this.display,536870912)||U(this.display,67108864)||U(this.display,134217728)}};let Qs=(e,t)=>{let n=(e,n)=>{if(t)return t[e]??n},r=Ks(e,Mi,n(`overflow`));return{float:Ks(e,ji,n(`cssFloat`)),textDecorationColor:Ks(e,Ni,n(`textDecorationColor`,n(`color`))),textDecorationLine:Ks(e,Pi,n(`textDecorationLine`,n(`textDecoration`))),overflowX:r[0],overflowY:r[+(r.length>1)]}};var $s=class{constructor(e,t){this.content=Ks(e,Fi,t.content),this.quotes=Ks(e,Ii,t.quotes)}},ec=class{constructor(e,t){this.counterIncrement=Ks(e,zi,t.counterIncrement),this.counterReset=Ks(e,Bi,t.counterReset)}};let tc=e=>{if(typeof e.getAttribute!=`function`)return 0;switch(e.getAttribute(`data-html2canvas-debug`)){case`all`:return 1;case`clone`:return 2;case`parse`:return 3;case`render`:return 4;default:return 0}},nc=(e,t)=>{let n=tc(e);return n===1||t===n};var rc=class{constructor(e,t,n){this.cloneNodeFn=e,this.options=t,this.context=n}appendChildNode(e,t,n){this.safeAppendClonedChild(e,t,n)}cloneChildNodes(e,t,n){e.shadowRoot&&t.shadowRoot?(this.cloneShadowDOMChildren(e.shadowRoot,t.shadowRoot,n),this.cloneLightDOMChildren(e,t,n)):e.shadowRoot&&!t.shadowRoot?this.cloneShadowDOMAsLightDOM(e.shadowRoot,t,n):this.cloneLightDOMChildren(e,t,n)}shouldCloneChild(e){return!Kr(e)||!ai(e)&&!e.hasAttribute(`data-html2canvas-ignore`)&&(typeof this.options.ignoreElements!=`function`||!this.options.ignoreElements(e))}shouldCloneStyleElement(e){return!this.options.copyStyles||!Kr(e)||!ii(e)}safeAppendClonedChild(e,t,n){this.shouldCloneChild(t)&&this.shouldCloneStyleElement(t)&&e.appendChild(this.cloneNodeFn(t,n))}cloneAssignedNodes(e,t,n){e.forEach(e=>{this.safeAppendClonedChild(t,e,n)})}cloneSlotFallbackContent(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)this.safeAppendClonedChild(t,r,n)}cloneSlotElement(e,t,n){if(!ci(e))return;let r=e;if(typeof r.assignedNodes!=`function`){this.context.logger.warn(`HTMLSlotElement.assignedNodes is not available`,e),this.cloneSlotFallbackContent(e,t,n);return}let i=r.assignedNodes();if(!i||!Array.isArray(i)){this.context.logger.warn(`assignedNodes() did not return a valid array`,e),this.cloneSlotFallbackContent(e,t,n);return}i.length>0?this.cloneAssignedNodes(i,t,n):this.cloneSlotFallbackContent(e,t,n)}cloneShadowDOMChildren(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)Kr(r)&&ci(r)?this.cloneSlotElement(r,t,n):this.safeAppendClonedChild(t,r,n)}cloneLightDOMChildren(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n)}cloneSlotElementAsLightDOM(e,t,n){if(!ci(e))return;let r=e;if(typeof r.assignedNodes!=`function`){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n);return}let i=r.assignedNodes();if(i&&Array.isArray(i)&&i.length>0)i.forEach(e=>this.appendChildNode(t,e,n));else for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n)}cloneShadowDOMAsLightDOM(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)Kr(r)&&ci(r)?this.cloneSlotElementAsLightDOM(r,t,n):this.appendChildNode(t,r,n)}};let ic=[`all`,`d`,`content`],ac=(e,t)=>{let n=[];for(let t=e.length-1;t>=0;t--){let r=e.item(t);if(ic.indexOf(r)===-1&&!r.startsWith(`--`)){let t=e.getPropertyValue(r);if(t){let i=e.getPropertyPriority(r);n.push(i?`${r}:${t} !${i}`:`${r}:${t}`)}}}return n.length>0&&(t.style.cssText=n.join(`;`)+`;`),t},oc=`___html2canvas___pseudoelement_before`,sc=`___html2canvas___pseudoelement_after`,cc=`{
6
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.html2canvas={}))})(this,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class e{window;cspNonce;cache;constructor(e={}){let t=e.window||(typeof window<`u`?window:void 0);if(!t)throw Error(`Window object is required but not available`);this.window=t,this.cspNonce=e.cspNonce,this.cache=e.cache}static fromElement(t,n={}){let r=t.ownerDocument;if(!r)throw Error(`Element is not attached to a document`);let i=r.defaultView;if(!i)throw Error(`Document is not attached to a window`);return new e({window:i,...n})}clone(t={}){return new e({window:t.window||this.window,cspNonce:t.cspNonce??this.cspNonce,cache:t.cache??this.cache})}},n=class{config;constructor(e={}){this.config={maxImageTimeout:3e5,allowDataUrls:!0,...e}}validateUrl(e,t=`general`){if(!e||typeof e!=`string`)return{valid:!1,error:`URL must be a non-empty string`};if(e.startsWith(`data:`))return this.config.allowDataUrls?{valid:!0,sanitized:e}:{valid:!1,error:`Data URLs are not allowed`};if(e.startsWith(`blob:`))return{valid:!0,sanitized:e};try{let n=new URL(e);if(![`http:`,`https:`].includes(n.protocol))return{valid:!1,error:`Protocol ${n.protocol} is not allowed. Only http and https are permitted.`};if(t===`proxy`&&this.config.allowedProxyDomains&&this.config.allowedProxyDomains.length>0){let e=n.hostname.toLowerCase();if(!this.config.allowedProxyDomains.some(t=>{let n=t.toLowerCase();return e===n||e.endsWith(`.`+n)}))return{valid:!1,error:`Proxy domain ${n.hostname} is not in the allowed list`}}if(t===`proxy`){if(!this.config.allowLocalhostProxy){let e=n.hostname.toLowerCase();if(e===`localhost`||e===`127.0.0.1`||e===`::1`)return{valid:!1,error:`Localhost is not allowed for proxy URLs`};if(this.isPrivateIP(e))return{valid:!1,error:`Private IP addresses are not allowed for proxy URLs`};if(e.startsWith(`169.254.`)||e.startsWith(`fe80:`))return{valid:!1,error:`Link-local addresses are not allowed for proxy URLs`}}return{valid:!0,sanitized:e}}return{valid:!0,sanitized:e}}catch(e){return{valid:!1,error:`Invalid URL format: ${e instanceof Error?e.message:`Unknown error`}`}}}isPrivateIP(e){return[/^0\./,/^10\./,/^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\./,/^127\./,/^169\.254\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.0\.0\./,/^192\.0\.2\./,/^192\.168\./,/^198\.(1[8-9])\./,/^198\.51\.100\./,/^203\.0\.113\./,/^2(2[4-9]|3[0-9])\./,/^24[0-9]\./,/^255\.255\.255\.255$/].some(t=>t.test(e))?!0:e.includes(`:`)?this.isPrivateIPv6(e):!1}isPrivateIPv6(e){let t=e.toLowerCase().trim().replace(/^\[|\]$/g,``),n=t.split(`%`)[0]??t;if(/^(0:){7}1$/.test(n)||n===`::1`||/^(0:){7}0$/.test(n)||n===`::`)return!0;let r=this.expandIPv6(n);if(!r)return this.isPrivateIPv6Prefix(n);let i=parseInt(r.substring(0,2),16);if(i>=252&&i<=253)return!0;if(i===254){let e=parseInt(r.substring(2,4),16);if(e>=128&&e<=191)return!0}return i===255}expandIPv6(e){try{if(e.includes(`::`)){let t=e.split(`::`);if(t.length>2)return null;let n=t[0]?t[0].split(`:`):[],r=t[1]?t[1].split(`:`):[],i=8-n.length-r.length;if(i<0)return null;let a=Array(i).fill(`0000`);return[...n,...a,...r].map(e=>e.padStart(4,`0`)).join(`:`)}{let t=e.split(`:`);return t.length===8?t.map(e=>e.padStart(4,`0`)).join(`:`):null}}catch{return null}}isPrivateIPv6Prefix(e){return!!(/^fc[0-9a-f]{0,2}:?/i.test(e)||/^fd[0-9a-f]{0,2}:?/i.test(e)||/^fe[89ab][0-9a-f]:?/i.test(e)||/^ff[0-9a-f]{0,2}:?/i.test(e))}validateCspNonce(e){return!e||typeof e!=`string`?{valid:!1,error:`CSP nonce must be a non-empty string`}:e.length<16?{valid:!1,error:`CSP nonce is too short (minimum 16 characters recommended)`}:/^[A-Za-z0-9+/=_-]+$/.test(e)?{valid:!0,sanitized:e}:{valid:!1,error:`CSP nonce contains invalid characters`}}validateImageTimeout(e){return typeof e!=`number`||isNaN(e)?{valid:!1,error:`Image timeout must be a number`}:e<0?{valid:!1,error:`Image timeout cannot be negative`}:this.config.maxImageTimeout&&e>this.config.maxImageTimeout?{valid:!1,error:`Image timeout ${e}ms exceeds maximum allowed ${this.config.maxImageTimeout}ms`}:{valid:!0,sanitized:e}}validateDimensions(e,t){if(typeof e!=`number`||typeof t!=`number`)return{valid:!1,error:`Dimensions must be numbers`};if(isNaN(e)||isNaN(t))return{valid:!1,error:`Dimensions cannot be NaN`};if(e<=0||t<=0)return{valid:!1,error:`Dimensions must be positive`};let n=32767;return e>n||t>n?{valid:!1,error:`Dimensions exceed maximum allowed (${n}px)`}:{valid:!0,sanitized:{width:e,height:t}}}validateScale(e){return typeof e!=`number`||isNaN(e)?{valid:!1,error:`Scale must be a number`}:e<=0?{valid:!1,error:`Scale must be positive`}:e>10?{valid:!1,error:`Scale factor too large (maximum 10x)`}:{valid:!0,sanitized:e}}validateElement(e){if(!e)return{valid:!1,error:`Element is required`};if(typeof e!=`object`)return{valid:!1,error:`Element must be an object`};let t=e;return typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument?{valid:!0}:{valid:!1,error:`Element must be attached to a document`}:t.ownerDocument?t.ownerDocument.defaultView?{valid:!0}:{valid:!1,error:`Document must be attached to a window (ownerDocument.defaultView required)`}:{valid:!1,error:`Element must be attached to a document (ownerDocument required)`}}validateOptions(e){let t=[],n=e.proxy;if(n!=null&&typeof n==`string`&&n.length>0){let e=this.validateUrl(n,`proxy`);e.valid||t.push(`Proxy: ${e.error}`)}if(e.imageTimeout!==void 0){let n=this.validateImageTimeout(e.imageTimeout);n.valid||t.push(`Image timeout: ${n.error}`)}if(e.width!==void 0||e.height!==void 0){let n=e.width??800,r=e.height??600,i=this.validateDimensions(n,r);i.valid||t.push(`Dimensions: ${i.error}`)}if(e.scale!==void 0){let n=this.validateScale(e.scale);n.valid||t.push(`Scale: ${n.error}`)}if(e.cspNonce!==void 0){let n=this.validateCspNonce(e.cspNonce);n.valid||t.push(`CSP nonce: ${n.error}`)}if(this.config.customValidator){let n=this.config.customValidator(e,`options`);n.valid||t.push(`Custom validation: ${n.error}`)}return t.length>0?{valid:!1,error:t.join(`; `)}:{valid:!0}}};function r(e={}){return new n({allowDataUrls:!0,maxImageTimeout:3e5,...e})}var i=class{context;activeMetrics=/* @__PURE__ */ new Map;completedMetrics=[];enabled;getTime;constructor(e,t=!0){this.context=e,this.enabled=t,this.getTime=typeof performance<`u`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now()}start(e,t){this.enabled&&(this.activeMetrics.has(e)&&this.context?.logger.warn(`Performance metric '${e}' already started. Overwriting.`),this.activeMetrics.set(e,{name:e,startTime:this.getTime(),metadata:t}))}end(e){if(!this.enabled)return;let t=this.activeMetrics.get(e);if(!t)this.context?.logger.warn(`Performance metric '${e}' not found. Was start() called?`);else return t.endTime=this.getTime(),t.duration=t.endTime-t.startTime,this.completedMetrics.push(t),this.activeMetrics.delete(e),this.context?.logger.debug(`⏱️ ${e}: ${t.duration.toFixed(2)}ms`,t.metadata),t}measure(e,t,n){this.start(e,n);try{let n=t();return this.end(e),n}catch(t){throw this.end(e),t}}async measureAsync(e,t,n){this.start(e,n);try{let n=await t();return this.end(e),n}catch(t){throw this.end(e),t}}getMetrics(){return[...this.completedMetrics]}getMetric(e){return this.completedMetrics.find(t=>t.name===e)}getSummary(){let e=this.completedMetrics.reduce((e,t)=>e+(t.duration||0),0),t=this.completedMetrics.map(t=>({name:t.name,duration:t.duration||0,percentage:e>0?((t.duration||0)/e*100).toFixed(1)+`%`:`0%`}));return{totalDuration:e,metrics:this.getMetrics(),breakdown:t}}logSummary(){if(!this.enabled||this.completedMetrics.length===0||!this.context)return;let e=this.getSummary();this.context.logger.info(`\n📊 Performance Summary (Total: ${e.totalDuration.toFixed(2)}ms):`),e.breakdown.sort((e,t)=>t.duration-e.duration).forEach(e=>{this.context.logger.info(` ${e.name.padEnd(20)} ${e.duration.toFixed(2).padStart(8)}ms ${e.percentage.padStart(6)}`)})}clear(){this.activeMetrics.clear(),this.completedMetrics.splice(0)}isEnabled(){return this.enabled}getActiveMetrics(){return Array.from(this.activeMetrics.keys())}},a=class e{left;top;width;height;constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}add(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)}static fromClientRect(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)}static fromDOMRectList(t,n){let r=Array.from(n),i=r.find(e=>e.width!==0);return i||=r.find(e=>e.height!==0),!i&&r.length>0&&(i=r[0]),i?new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height):e.EMPTY}static EMPTY=new e(0,0,0,0)};let o=(e,t)=>a.fromClientRect(e,t.getBoundingClientRect()),s=e=>{let t=e.body,n=e.documentElement;if(!t||!n)throw Error(`Unable to get document size`);return new a(0,0,Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight)))},c=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`Missing element at index ${t}`);return n},l=65533,u=e=>e>=48&&e<=57,d=e=>e>=55296&&e<=57343,f=e=>u(e)||e>=65&&e<=70||e>=97&&e<=102,p=e=>e>=97&&e<=122,m=e=>e>=65&&e<=90,h=e=>p(e)||m(e),g=e=>e>=128,_=e=>e===10||e===9||e===32,v=e=>h(e)||g(e)||e===95,y=e=>v(e)||u(e)||e===45,b=e=>e>=0&&e<=8||e===11||e>=14&&e<=31||e===127,x=(e,t)=>e===92&&t!==10,S=(e,t,n)=>e===45?v(t)||x(t,n):!!(v(e)||e===92&&x(e,t)),C=(e,t,n)=>e===43||e===45?u(t)?!0:t===46&&u(n):u(e===46?t:e),w=e=>{let t=0,n=1;(e[t]===43||e[t]===45)&&(e[t]===45&&(n=-1),t++);let r=[];for(;u(e[t]??NaN);)r.push(c(e,t)),t++;let i=r.length?parseInt(String.fromCodePoint(...r),10):0;e[t]===46&&t++;let a=[];for(;u(e[t]??NaN);)a.push(c(e,t)),t++;let o=a.length,s=o?parseInt(String.fromCodePoint(...a),10):0;(e[t]===69||e[t]===101)&&t++;let l=1;(e[t]===43||e[t]===45)&&(e[t]===45&&(l=-1),t++);let d=[];for(;u(e[t]??NaN);)d.push(c(e,t)),t++;let f=d.length?parseInt(String.fromCodePoint(...d),10):0;return n*(i+s*10**-o)*10**(l*f)},ee={type:2},te={type:3},ne={type:4},re={type:13},ie={type:8},ae={type:21},oe={type:9},se={type:10},ce={type:11},le={type:12},ue={type:14},de={type:23},fe={type:1},pe={type:25},me={type:24},he={type:26},ge={type:27},_e={type:28},ve={type:29},ye={type:31},be={type:32};var xe=class e{static _pool=[];static MAX_POOL_SIZE=40;static get(){return e._pool.pop()||new e}static release(t){e._pool.length<e.MAX_POOL_SIZE&&(t._reset(),e._pool.push(t))}_value;_cursor;constructor(){this._value=[],this._cursor=0}_reset(){this._value=[],this._cursor=0}write(e){this._cursor>0&&(this._value=this._value.slice(this._cursor),this._cursor=0),this._value=this._value.concat([...e].map(e=>e.codePointAt(0)))}read(){let e=[],t=this.consumeToken();for(;t!==be;)e.push(t),t=this.consumeToken();return e}consumeToken(){let e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(y(e)||x(t,n)){let r=S(e,t,n)?2:1;return{type:5,value:this.consumeName(),flags:r}}break}case 36:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),re;break;case 39:return this.consumeStringToken(39);case 40:return ee;case 41:return te;case 42:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),ue;break;case 43:if(C(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return ne;case 45:{let t=e,n=this.peekCodePoint(0),r=this.peekCodePoint(1);if(C(t,n,r))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(S(t,n,r))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===45&&r===62)return this.consumeCodePoint(),this.consumeCodePoint(),me;break}case 46:if(C(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(this.peekCodePoint(0)===42)for(this.consumeCodePoint();;){let e=this.consumeCodePoint();if(e===42&&(e=this.consumeCodePoint(),e===47)||e===-1)return this.consumeToken()}break;case 58:return he;case 59:return ge;case 60:if(this.peekCodePoint(0)===33&&this.peekCodePoint(1)===45&&this.peekCodePoint(2)===45)return this.consumeCodePoint(),this.consumeCodePoint(),this.consumeCodePoint(),pe;break;case 64:{let e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(S(e,t,n))return{type:7,value:this.consumeName()};break}case 91:return _e;case 92:if(x(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return ve;case 94:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),ie;break;case 123:return ce;case 125:return le;case 117:case 85:{let t=this.peekCodePoint(0),n=this.peekCodePoint(1);return t===43&&(f(n)||n===63)?(this.consumeCodePoint(),this.consumeUnicodeRangeToken()):(this.reconsumeCodePoint(e),this.consumeIdentLikeToken())}case 124:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),oe;if(this.peekCodePoint(0)===124)return this.consumeCodePoint(),ae;break;case 126:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),se;break;case-1:return be}return _(e)?(this.consumeWhiteSpace(),ye):u(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):v(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:String.fromCodePoint(e)}}consumeCodePoint(){let e=this._value[this._cursor];return e===void 0?-1:(this._cursor++,e)}reconsumeCodePoint(e){this._cursor>0&&this._value[this._cursor-1]===e?this._cursor--:this._value.splice(this._cursor,0,e)}peekCodePoint(e){let t=this._value[this._cursor+e];return t===void 0?-1:t}consumeUnicodeRangeToken(){let e=[],t=this.consumeCodePoint();for(;f(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();let n=!1;for(;t===63&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(String.fromCodePoint(...e.map(e=>e===63?48:e)),16),end:parseInt(String.fromCodePoint(...e.map(e=>e===63?70:e)),16)};let r=parseInt(String.fromCodePoint(...e),16);if(t===45&&f(this.peekCodePoint(0))){t=this.consumeCodePoint();let e=[];for(;f(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(String.fromCodePoint(...e),16)}}return{type:30,start:r,end:r}}consumeIdentLikeToken(){let e=this.consumeName();return e.toLowerCase()===`url`&&this.peekCodePoint(0)===40?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===40?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}}consumeUrlToken(){let e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1)return{type:22,value:``};let t=this.peekCodePoint(0);if(t===39||t===34){let e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),de)}for(;;){let t=this.consumeCodePoint();if(t===-1||t===41)return{type:22,value:String.fromCodePoint(...e)};if(_(t))return this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41?(this.consumeCodePoint(),{type:22,value:String.fromCodePoint(...e)}):(this.consumeBadUrlRemnants(),de);if(t===34||t===39||t===40||b(t))return this.consumeBadUrlRemnants(),de;if(t===92){if(x(t,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),de}else e.push(t)}}consumeWhiteSpace(){for(;_(this.peekCodePoint(0));)this.consumeCodePoint()}consumeBadUrlRemnants(){for(;;){let e=this.consumeCodePoint();if(e===41||e===-1)return;x(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}}consumeStringSlice(e){let t=``,n=this._cursor+e,r=this._cursor;for(;r<n;){let e=Math.min(n,r+5e4);t+=String.fromCodePoint(...this._value.slice(r,e)),r=e}return this._cursor=n+1,t}consumeStringToken(e){let t=``,n=0;do{let r=this._value[this._cursor+n];if(r===-1||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===10)return this._cursor+=n,fe;if(r===92){let e=this._value[this._cursor+n+1];e!==-1&&e!==void 0&&(e===10?(t+=this.consumeStringSlice(n),n=-1,this._cursor++):x(r,e)&&(t+=this.consumeStringSlice(n),t+=String.fromCodePoint(this.consumeEscapedCodePoint()),n=-1))}n++}while(1)}consumeNumber(){let e=[],t=4,n=this.peekCodePoint(0);for((n===43||n===45)&&e.push(this.consumeCodePoint());u(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);let r=this.peekCodePoint(1);if(n===46&&u(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;u(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);let i=this.peekCodePoint(2);if((n===69||n===101)&&((r===43||r===45)&&u(i)||u(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;u(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[w(e),t]}consumeNumericToken(){let[e,t]=this.consumeNumber(),n=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);return S(n,r,i)?{type:15,number:e,flags:t,unit:this.consumeName()}:n===37?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}}consumeEscapedCodePoint(){let e=this.consumeCodePoint();if(f(e)){let t=String.fromCodePoint(e);for(;f(this.peekCodePoint(0))&&t.length<6;)t+=String.fromCodePoint(this.consumeCodePoint());_(this.peekCodePoint(0))&&this.consumeCodePoint();let n=parseInt(t,16);return n===0||d(n)||n>1114111?l:n}return e===-1?l:e}consumeName(){let e=``;for(;;){let t=this.consumeCodePoint();if(y(t))e+=String.fromCodePoint(t);else if(x(t,this.peekCodePoint(0)))e+=String.fromCodePoint(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}}},Se=class e{_tokens;constructor(e){this._tokens=e}static create(t){let n=new xe;return n.write(t),new e(n.read())}static parseValue(t){return e.create(t).parseComponentValue()}static parseValues(t){return e.create(t).parseComponentValues()}parseComponentValue(){let e=this.consumeToken();for(;e.type===31;)e=this.consumeToken();if(e.type===32)throw SyntaxError(`Error parsing CSS component value, unexpected EOF`);this.reconsumeToken(e);let t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`)}parseComponentValues(){let e=[];for(;;){let t=this.consumeComponentValue();if(t.type===32)return e;e.push(t)}}consumeComponentValue(){let e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e}consumeSimpleBlock(e){let t={type:e,values:[]},n=this.consumeToken();for(;;){if(n.type===32||Ee(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}}consumeFunction(e){let t={name:e.value,values:[],type:18};for(;;){let e=this.consumeToken();if(e.type===32||e.type===3)return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue())}}consumeToken(){let e=this._tokens.shift();return e===void 0?be:e}reconsumeToken(e){this._tokens.unshift(e)}};let T=e=>e.type===15,E=e=>e.type===17,D=e=>e.type===20,Ce=e=>e.type===0,we=(e,t)=>D(e)&&e.value===t,Te=e=>e.type!==31,O=e=>e.type!==31&&e.type!==4,k=e=>{let t=[],n=[];return e.forEach(e=>{e.type===4?n.length&&(t.push(n),n=[]):e.type!==31&&n.push(e)}),n.length&&t.push(n),t},Ee=(e,t)=>t===11&&e.type===12||t===28&&e.type===29||t===2&&e.type===3,De=/(\d+(?:\.\d+)?|[+\-*/()])/g,Oe=e=>{let t=e.match(De);if(!t)return NaN;let n=[],r=[],i={"+":1,"-":1,"*":2,"/":2};for(let e of t)if(/^\d+(?:\.\d+)?$/.test(e))n.push(parseFloat(e));else if(e===`(`)r.push(e);else if(e===`)`){for(;r.length&&r[r.length-1]!==`(`;)n.push(r.pop());if(!r.length)return NaN;r.pop()}else{for(;r.length&&(i[c(r,r.length-1)]??0)>=(i[e]??0);)n.push(r.pop());r.push(e)}for(;r.length;){let e=r.pop();if(e===`(`)return NaN;n.push(e)}let a=[];for(let e of n)if(typeof e==`number`)a.push(e);else{let t=a.pop(),n=a.pop();if(n===void 0||t===void 0)return NaN;switch(e){case`+`:a.push(n+t);break;case`-`:a.push(n-t);break;case`*`:a.push(n*t);break;case`/`:a.push(t===0?NaN:n/t);break;default:return NaN}}return a.length===1?a[0]??NaN:NaN},A=(e,t,n)=>Math.min(Math.max(e,t),n),j=(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]],ke=e=>j([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],e),Ae=e=>j([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],e),je=e=>{let[t,n,r]=e,i=e=>{let t=e<0?-1:1,n=Math.abs(e);return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e};return[i(t),i(n),i(r)]},Me=e=>{let[t,n,r]=e,i=e=>{let t=e<0?-1:1,n=Math.abs(e);return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4};return[i(t),i(n),i(r)]},Ne=e=>{let[t,n,r]=je(ke([e[0],e[1],e[2]]));return[t,n,r,e[3]]},Pe=e=>{let[t,n,r]=ke([e[0],e[1],e[2]]);return[A(Math.round(t*255),0,255),A(Math.round(n*255),0,255),A(Math.round(r*255),0,255),e[3]]},Fe=e=>e.type===17||e.type===15,M=e=>e.type===16||Fe(e)||Ie(e),Ie=e=>e.type===17&&e._calcPercentage!==void 0,Le=e=>e.type===18&&e.name===`calc`,Re=e=>{let t=Be(e,0);if(!t)return null;let n=Be(e,100);if(!n)return null;let r=t.number,i=n.number-r;return i===0?t:{type:17,number:r,flags:4,_calcPercentage:i,_calcPixelOffset:r}},ze=e=>Le(e)?Re(e):M(e)?e:null,Be=(e,t=0)=>{let n=e=>{let r=``;for(let i of e)if(i.type!==31){if(i.type===18){if(i.name===`calc`){let e=n(i.values);if(e===null)return null;r+=`(${e})`}else return null}else if(i.type===17)r+=i.number.toString();else if(i.type===15)i.unit===`px`?r+=i.number.toString():i.unit===`rem`||i.unit===`em`?r+=(i.number*16).toString():r+=i.number.toString();else if(i.type===16)r+=(i.number/100*t).toString();else if(i.type===6){let e=i.value;e===`+`||e===`-`||e===`*`||e===`/`?r+=` ${e} `:e===`(`?r+=`(`:e===`)`&&(r+=`)`)}}return r};try{let t=n(e.values);if(t===null||t.trim()===``)return null;let r=Oe(t);if(typeof r==`number`&&!isNaN(r))return{type:17,number:r,flags:4}}catch{return null}return null},Ve=e=>e.length>1?[c(e,0),c(e,1)]:[c(e,0)],N={type:17,number:0,flags:4},P={type:16,number:50,flags:4},F={type:16,number:100,flags:4},He=(e,t,n)=>{let[r,i]=e;return[I(r,t),I(i===void 0?r:i,n)]},I=(e,t)=>{if(Ie(e))return e._calcPercentage/100*t+e._calcPixelOffset;if(e.type===16)return e.number/100*t;if(T(e))switch(e.unit){case`rem`:case`em`:return 16*e.number;default:return e.number}return e.number},Ue=`grad`,We=`turn`,Ge={name:`angle`,parse:(e,t)=>{if(t.type===15)switch(t.unit){case`deg`:return Math.PI*t.number/180;case Ue:return Math.PI/200*t.number;case`rad`:return t.number;case We:return Math.PI*2*t.number}throw Error(`Unsupported angle type`)}},Ke=e=>!(e.type!==15||e.unit!==`deg`&&e.unit!==Ue&&e.unit!==`rad`&&e.unit!==We),qe=e=>{switch(e.filter(D).map(e=>e.value).join(` `)){case`to bottom right`:case`to right bottom`:case`left top`:case`top left`:return[N,N];case`to top`:case`bottom`:return L(0);case`to bottom left`:case`to left bottom`:case`right top`:case`top right`:return[N,F];case`to right`:case`left`:return L(90);case`to top left`:case`to left top`:case`right bottom`:case`bottom right`:return[F,F];case`to bottom`:case`top`:return L(180);case`to top right`:case`to right top`:case`left bottom`:case`bottom left`:return[F,N];case`to left`:case`right`:return L(270)}return 0},L=e=>Math.PI*e/180,R=e=>!(255&e),z=e=>{let t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?`rgba(${i},${r},${n},${t/255})`:`rgb(${i},${r},${n})`},Je=(e,t,n,r)=>(e<<24|t<<16|n<<8|Math.round(r*255))>>>0,B=(e,t)=>{if(e.type===17)return e.number;if(e.type===16){let n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},Ye=e=>{let t=e[0];return(t&&t.type===20?t.value:`unknown`)===`from`},Xe=e=>Je(A(Math.round(e[0]*255),0,255),A(Math.round(e[1]*255),0,255),A(Math.round(e[2]*255),0,255),A(e[3],0,1)),Ze=e=>{let[t,n,r,i]=e,a=je([t,n,r]);return Je(A(Math.round(a[0]*255),0,255),A(Math.round(a[1]*255),0,255),A(Math.round(a[2]*255),0,255),i)},Qe=e=>{let t=ke([e[0],e[1],e[2]]);return Ze([t[0],t[1],t[2],e[3]])},$e=(e,t)=>{if(Ye(t.filter(O)))throw Error(`Relative color not supported for lab()`);let[n,r,i,a]=st(t),o=et(t)?n*100:n,s=je(ke(ht([o,r,i])));return Je(A(Math.round(s[0]*255),0,255),A(Math.round(s[1]*255),0,255),A(Math.round(s[2]*255),0,255),a)},et=e=>{let t=e.filter(O)[0];return t!==void 0&&t.type===16},tt=(e,t)=>{if(Ye(t.filter(O)))throw Error(`Relative color not supported for oklab()`);let[n,r,i,a]=st(t),o=je(ke(mt([n,r,i])));return Je(A(Math.round(o[0]*255),0,255),A(Math.round(o[1]*255),0,255),A(Math.round(o[2]*255),0,255),a)},nt=(e,t)=>{if(Ye(t.filter(O)))throw Error(`Relative color not supported for oklch()`);let[n,r,i,a]=ct(t),o=je(ke(mt(pt([n,r,i]))));return Je(A(Math.round(o[0]*255),0,255),A(Math.round(o[1]*255),0,255),A(Math.round(o[2]*255),0,255),a)},rt=(e,t)=>{if(Ye(t.filter(O)))throw Error(`Relative color not supported for lch()`);let[n,r,i,a]=ot(t),o=je(ke(ht(pt([n,r,i]))));return Je(A(Math.round(o[0]*255),0,255),A(Math.round(o[1]*255),0,255),A(Math.round(o[2]*255),0,255),a)},it=(e,t)=>{let n=t.filter(O),r=n[0],i=n[1],a=n[2],o=n[3],s=o!==void 0&&o.type===6&&o.value===`/`?n[4]:n[3];return[r?(r.type===17?L(r.number):Ge.parse(e,r))/(Math.PI*2):0,i!==void 0&&M(i)?i.number/100:0,a!==void 0&&M(a)?a.number/100:0,s!==void 0&&M(s)?I(s,1):1]},at=(e,t)=>{if(Ye(t))throw Error(`Relative color not supported for hsl()`);let[n,r,i,a]=it(e,t),o=ft([n,r,i]);return Je(o[0]*255,o[1]*255,o[2]*255,a)},ot=e=>{let t=e.filter(O),n=t[0],r=t[1],i=t[2],a=t[4];return[n!==void 0&&M(n)?n.number:0,r!==void 0&&M(r)?r.number:0,i!==void 0&&(E(i)||T(i))?i.number:0,a!==void 0&&M(a)?I(a,1):1]},st=e=>{let t=e.filter(O),n=t[0],r=t[1],i=t[2],a=t[4];return[n===void 0?0:n.type===16?n.number/100:E(n)?n.number:0,r===void 0?0:r.type===16?r.number/100:E(r)?r.number:0,i!==void 0&&(E(i)||T(i))?i.number:0,a!==void 0&&M(a)?I(a,1):1]},ct=e=>{let t=e.filter(O),n=t[0],r=t[1],i=t[2],a=t[4];return[n===void 0?0:n.type===16?n.number/100:E(n)?n.number:0,r===void 0?0:r.type===16?r.number/100:E(r)?r.number:0,i!==void 0&&(E(i)||T(i))?i.number:0,a!==void 0&&M(a)?I(a,1):1]},lt=e=>j([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],e),ut=e=>j([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],e),dt=(e,t,n)=>(n<0&&(n+=1),n>=1&&--n,n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e),ft=([e,t,n])=>{if(t===0)return[n,n,n];let r=n<=.5?n*(t+1):n+t-n*t,i=n*2-r;return[dt(i,r,e+1/3),dt(i,r,e),dt(i,r,e-1/3)]},pt=([e,t,n])=>(t<0&&(t=0),isNaN(n)&&(n=0),[e,t*Math.cos(n*Math.PI/180),t*Math.sin(n*Math.PI/180)]),mt=e=>{let t=j([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],e),n=[t[0]**3,t[1]**3,t[2]**3];return j([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],n)},ht=e=>{let t=(e[0]+16)/116,n=e[1]/500+t,r=t-e[2]/200,i=24389/27,a=24/116,o=[(n>a?n**3:(116*n-16)/i)*.3457/.3585,e[0]>8?t**3:e[0]/i,(r>a?r**3:(116*r-16)/i)*.2958/.3585];return ut([o[0],o[1],o[2]])},gt=(e,t)=>{let n=t.filter(O);if(n.length===3||n.length===4){let e=B(c(n,0),0),t=B(c(n,1),1),r=B(c(n,2),2),i=n.length===4?B(c(n,3),3):1,a=Me([e/255,t/255,r/255]),[o,s,l]=Ae([a[0],a[1],a[2]]);return[o,s,l,i]}return[0,0,0,1]},_t=(e,t)=>{let[n,r,i,a]=it(e,t),o=Me(ft([n,r,i])),[s,c,l]=Ae([o[0],o[1],o[2]]);return[s,c,l,a]},vt=(e,t)=>{let[n,r,i,a]=st(t),[o,s,c]=ht([n,r,i]);return[o,s,c,a]},yt=(e,t)=>{let[n,r,i,a]=ot(t),[o,s,c]=ht(pt([n,r,i]));return[o,s,c,a]},bt=(e,t)=>{let[n,r,i,a]=ct(t),[o,s,c]=mt(pt([n,r,i]));return[o,s,c,a]},xt=(e,t)=>{let[n,r,i,a]=st(t),[o,s,c]=mt([n,r,i]);return[o,s,c,a]},St=e=>ut([e[0],e[1],e[2]]),Ct=e=>e,wt=e=>{let[t,n,r]=lt([e[0],e[2],e[3]]);return[t,n,r,e[3]]},Tt=e=>Qe([e[0],e[1],e[2],e[3]]),Et=e=>{let t=St([e[0],e[1],e[2]]);return Qe([t[0],t[1],t[2],e[3]])},Dt=e=>j([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],e),Ot=e=>j([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],e),kt=e=>{let t=e=>{let t=e<0?-1:1;return e*t<=.04045?e/12.92:t*((e+.055)/1.055)**2.4||0};return[t(e[0]),t(e[1]),t(e[2])]},At=e=>je(e),jt=e=>{let t=kt([e[0],e[1],e[2]]);return Dt([t[0],t[1],t[2]])},Mt=e=>{let[t,n,r]=At(Ot([e[0],e[1],e[2]]));return[t,n,r,e[3]]},Nt=e=>{let t=jt([e[0],e[1],e[2]]);return Qe([t[0],t[1],t[2],e[3]])},Pt=e=>j([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],e),Ft=e=>j([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],e),It=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**(563/256));return[t[0]??0,t[1]??0,t[2]??0]},Lt=e=>{let t=e.map(e=>(e<0?-1:1)*Math.abs(e)**(256/563));return[t[0]??0,t[1]??0,t[2]??0]},Rt=e=>{let[t,n,r]=Lt(Pt([e[0],e[1],e[2]]));return[t,n,r,e[3]]},zt=e=>{let t=ke(Ft(It([e[0],e[1],e[2]])));return Ze([t[0],t[1],t[2],e[3]])},Bt=e=>j([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],e),Vt=e=>j([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],e),Ht=e=>{let[t,n,r]=e,i=e=>e<16/512?e/16:e**1.8;return[i(t),i(n),i(r)]},Ut=e=>{let[t,n,r]=e,i=e=>e>1/512?e**(1/1.8):e*16;return[i(t),i(n),i(r)]},Wt=e=>{let t=Ht([e[0],e[1],e[2]]);return ut(Bt([t[0],t[1],t[2]]))},Gt=e=>{let[t,n,r]=Ut(Vt(lt([e[0],e[1],e[2]])));return[t,n,r,e[3]]},Kt=e=>{let t=Wt([e[0],e[1],e[2]]);return Qe([t[0],t[1],t[2],e[3]])},qt=1.09929682680944,Jt=.018053968510807,Yt=e=>{let t=e=>e<Jt*4.5?e/4.5:((e+qt-1)/qt)**(1/.45);return[t(e[0]),t(e[1]),t(e[2])]},Xt=e=>{let t=e=>e>=Jt?qt*e**.45-.09929682680944008:4.5*e;return[t(e[0]),t(e[1]),t(e[2])]},Zt=e=>j([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],e),Qt=e=>j([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],e),$t=e=>{let t=Yt([e[0],e[1],e[2]]);return Zt([t[0],t[1],t[2]])},en=e=>{let[t,n,r]=Xt(Qt([e[0],e[1],e[2]]));return[t,n,r,e[3]]},tn=e=>{let t=$t([e[0],e[1],e[2]]);return Qe([t[0],t[1],t[2],e[3]])},nn={lch:2,oklch:2,hsl:0},rn=[1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],an=[1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],on=e=>{let t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=t*(a*l-o*c)-n*(i*l-o*s)+r*(i*c-a*s);return[(a*l-o*c)/u,(r*c-n*l)/u,(n*o-r*a)/u,(o*s-i*l)/u,(t*l-r*s)/u,(r*i-t*o)/u,(i*c-a*s)/u,(n*s-t*c)/u,(t*a-n*i)/u]},sn=on(rn),cn=on(an),ln=24389/27,un=24/116,dn=un*un*un,fn=e=>[(255&e>>24)/255,(255&e>>16)/255,(255&e>>8)/255],pn=e=>{let[t,n,r]=lt([e[0],e[1],e[2]]),i=t/.9642956764295677,a=n,o=r/.8251046025104602,s=i>dn?Math.cbrt(i):(ln*i+16)/116,c=a>dn?Math.cbrt(a):(ln*a+16)/116,l=o>dn?Math.cbrt(o):(ln*o+16)/116;return[116*c-16,500*(s-c),200*(c-l)]},mn=e=>{let t=j(sn,e),n=[Math.cbrt(t[0]),Math.cbrt(t[1]),Math.cbrt(t[2])];return j(cn,n)},hn=e=>{let t=Math.hypot(e[1],e[2]),n=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],t,(n+360)%360]},gn=e=>{let t=e[0],n=e[1],r=e[2],i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l,c,o]},_n=(e,t)=>{let n=(255&e)/255,r=fn(e),i=Me(r),a=Ae(i),o;switch(t){case`srgb`:o=r;break;case`srgb-linear`:o=i;break;case`xyz`:case`xyz-d65`:o=a;break;case`xyz-d50`:o=lt(a);break;case`lab`:o=pn(a);break;case`oklab`:o=mn(a);break;case`lch`:o=hn(pn(a));break;case`oklch`:o=hn(mn(a));break;case`hsl`:o=[gn(r)[0]*360,gn(r)[1],gn(r)[2]]}return[o[0],o[1],o[2],n]},vn=(e,t)=>{let n=e[0],r=e[1],i=e[2],a=e[3];switch(t){case`srgb`:return Xe([n,r,i,a]);case`srgb-linear`:return Ze([n,r,i,a]);case`xyz`:case`xyz-d65`:return Qe([n,r,i,a]);case`xyz-d50`:return Qe([...ut([n,r,i]),a]);case`lab`:return yn(ht([n,r,i]),a);case`oklab`:return yn(mt([n,r,i]),a);case`lch`:return yn(ht(pt([n,r,i])),a);case`oklch`:return yn(mt(pt([n,r,i])),a);case`hsl`:{let e=ft([n/360,r,i]);return Xe([e[0],e[1],e[2],a])}}},yn=(e,t)=>{let n=je(ke(e));return Xe([n[0],n[1],n[2],t])},bn=(e,t,n,r,i=`shorter`)=>{let a=n+r;if(a===0)return e;let o=((t-e)%360+360)%360;switch(i){case`shorter`:o>180&&(o-=360);break;case`longer`:o<180&&(o-=360);break;case`increasing`:break;case`decreasing`:o>0&&(o-=360)}return e+r/a*o},xn=(e,t)=>{let n,r=null;for(let e of t)if(e.type!==31&&e.type!==4){if(e.type===16)r=e.number;else if(D(e)&&e.value===`none`)r===null&&(r=0);else if(n===void 0)n=e;else throw Error(`Unexpected token in color-mix() component`)}if(n===void 0)throw Error(`color-mix() component is missing a color`);let i=n;return{color:V.parse(e,i),percentage:r}},Sn=[`srgb`,`srgb-linear`,`lab`,`oklab`,`lch`,`oklch`,`hsl`,`xyz`,`xyz-d50`,`xyz-d65`],Cn=(e,t,n,r,i,a)=>{let o=nn[i],s=[e[0]*e[3],e[1]*e[3],e[2]*e[3],e[3]],l=[t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]],u=n*s[3]+r*l[3];if(u<=0)return[0,0,0,0];let d=[0,0,0,u];for(let e=0;e<3;e++)e!==o&&(d[e]=(n*c(s,e)+r*c(l,e))/u);if(o!==void 0){let i=c(e,o),s=c(t,o);e[1]===0&&(i=s),t[1]===0&&(s=i),d[o]=bn(i,s,n,r,a)}return d},wn=(e,t)=>{let n=[[]];for(let e of t)e.type===4?n.push([]):n[n.length-1].push(e);let r=n.map(e=>e.filter(e=>e.type!==31));if(r.length!==3)throw Error(`color-mix() requires exactly two color components`);let i=r[0],a=i?i[0]:void 0,o=a!==void 0&&D(a)&&a.value===`in`;if(!i||i.length<2||!o)throw Error("color-mix() requires an interpolation space after `in`");let s=i[1];if(!s||!D(s))throw Error(`color-mix() space must be an identifier`);let c=s.value;if(Sn.indexOf(c)===-1)throw Error(`Unsupported color-mix() interpolation space "${c}"`);let l=`shorter`,u=i.slice(2);if(u.length>0){let e=u[0],t=u[1];if(!e||!t||!D(e)||!D(t)||t.value!==`hue`)throw Error(`Unsupported color-mix() hue method syntax`);if([`shorter`,`longer`,`increasing`,`decreasing`].indexOf(e.value)===-1)throw Error(`Unsupported color-mix() hue method "${e.value}"`);l=e.value}let d=r[1],f=r[2];if(!d||!f)throw Error(`color-mix() requires exactly two color components`);let p=xn(e,d),m=xn(e,f),h=p.percentage,g=m.percentage;if(h===null&&g===null)h=50,g=50;else if(h===null)h=100-(g??0);else if(g===null)g=100-h;else{let e=h+g;e>0&&(h=h/e*100,g=g/e*100)}let _=(h??0)/100,v=(g??0)/100,y=Cn(_n(p.color,c),_n(m.color,c),_,v,c,l);return vn(y,c)},Tn=(e,t)=>{try{return wn(e,t)}catch(t){return e.logger.warn(`Unsupported color-mix() value: ${t instanceof Error?t.message:t}`),0}},V={name:`color`,parse:(e,t)=>{if(t.type===18){let n=Mn[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported color function "${t.name}"`);return n(e,t.values)}if(t.type===5){let[e,n,r,i]=En(t);return Je(e,n,r,i)}if(t.type===20){let e=Pn[t.value.toUpperCase()];if(e!==void 0)return e}return 0}},En=e=>{if(e.value.length===3){let t=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3);return[parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16),1]}if(e.value.length===4){let t=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3),i=e.value.substring(3,4);return[parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16)/255]}if(e.value.length===6){let t=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6);return[parseInt(t,16),parseInt(n,16),parseInt(r,16),1]}if(e.value.length===8){let t=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6),i=e.value.substring(6,8);return[parseInt(t,16),parseInt(n,16),parseInt(r,16),parseInt(i,16)/255]}return[0,0,0,1]},Dn=(e,t)=>{let n=t.filter(O);if(Ye(n))throw Error(`Relative color not supported for rgb()`);if(n.length===3||n.length===4){let e=B(c(n,0),0),t=B(c(n,1),1),r=B(c(n,2),2),i=n.length===4?B(c(n,3),3):1;return Je(e,t,r,i)}if(n.length===5){let e=c(n,3);if(e.type===6&&e.value===`/`){let e=B(c(n,0),0),t=B(c(n,1),1),r=B(c(n,2),2),i=B(c(n,4),3);return Je(e,t,r,i)}}return 0},On=(e,t)=>{let n=t.filter(O),r=n[0],i=r&&r.type===20?r.value:`unknown`;if(Ye(n)){let t=(e,t)=>{if(E(t))return t.number;let n=e=>e===`r`||e===`x`?0:e===`g`||e===`y`?1:2;if(D(t)){let r=n(t.value);return c(e,r)}let r=e=>{let t=e.filter(O),n=`(`;for(let e of t)n+=e.type===18&&e.name===`calc`?r(e.values):E(e)?e.number:e.type===6||D(e)?e.value:``;return n+=`)`,n};if(t.type===18){let n=t.values.filter(O);if(t.name===`calc`){let t=r(n).replace(/r|x/,e[0].toString()).replace(/g|y/,e[1].toString()).replace(/b|z/,e[2].toString());return Oe(t)}}return null},r=c(n,1),i=r.type===18?r.name:D(r)||r.type===5?`rgb`:`unknown`,a=c(n,2),o=D(a)?a.value:`unknown`,s=r.type===18?r.values:D(r)?[r]:[];if(D(r)){if(Pn[r.value.toUpperCase()]===void 0)throw Error(`Attempting to use unknown color in relative color 'from'`);{let t=Nn(e,r.value),n=255&t,i=255&t>>8,a=255&t>>16;s=[{type:17,number:255&t>>24,flags:1},{type:17,number:a,flags:1},{type:17,number:i,flags:1},{type:17,number:n>1?n/255:n,flags:1}]}}else if(r.type===5){let[e,t,n,i]=En(r);s=[{type:17,number:e,flags:1},{type:17,number:t,flags:1},{type:17,number:n,flags:1},{type:17,number:i>1?i/255:i,flags:1}]}if(s.length===0)throw Error(`Attempting to use unknown color in relative color 'from'`);if(o===`unknown`)throw Error(`Attempting to use unknown colorspace in relative color 'to'`);let l=An[i],u=jn[o],d=kn[o];if(l===void 0)throw Error(`Attempting to parse an unsupported color space "${i}" for color() function`);if(u===void 0)throw Error(`Attempting to parse an unsupported color space "${o}" for color() function`);let f=u(l(e,s)),p=t(f,c(n,3)),m=t(f,c(n,4)),h=t(f,c(n,5)),g=n[6],_=n[7],v=g!==void 0&&g.type===6&&g.value===`/`&&_!==void 0&&E(_)?_.number:1;if(p===null||m===null||h===null)throw Error(`Invalid relative color in color() function`);if(d===void 0)throw Error(`Attempting to parse an unsupported color space "${o}" for color() function`);return d([p,m,h,v])}{let e=i,t=kn[e];if(t===void 0)throw Error(`Attempting to parse an unsupported color space "${e}" for color() function`);let r=c(n,1),a=c(n,2),o=c(n,3),s=n[4],l=n[5];return t([E(r)?r.number:0,E(a)?a.number:0,E(o)?o.number:0,s!==void 0&&s.type===6&&s.value===`/`&&l!==void 0&&E(l)?l.number:1])}},kn={srgb:Xe,"srgb-linear":Ze,"display-p3":Nt,"a98-rgb":zt,"prophoto-rgb":Kt,xyz:Tt,"xyz-d50":Et,"xyz-d65":Tt,rec2020:tn},An={rgb:gt,hsl:_t,lab:vt,lch:yt,oklab:xt,oklch:bt},jn={srgb:Ne,"srgb-linear":Pe,"display-p3":Mt,"a98-rgb":Rt,"prophoto-rgb":Gt,xyz:Ct,"xyz-d50":wt,"xyz-d65":Ct,rec2020:en},Mn={hsl:at,hsla:at,rgb:Dn,rgba:Dn,lch:rt,oklch:nt,oklab:tt,lab:$e,color:On,"color-mix":Tn},Nn=(e,t)=>V.parse(e,Se.create(t).parseComponentValue()),Pn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Fn=e=>e.nodeType===Node.ELEMENT_NODE,In=e=>e.nodeType===Node.TEXT_NODE,Ln=e=>typeof e.className==`object`,Rn=e=>Fn(e)&&e.style!==void 0&&!Ln(e),zn=e=>e.tagName===`INPUT`,Bn=e=>e.tagName===`HTML`,Vn=e=>e.tagName===`svg`,Hn=e=>e.tagName===`BODY`,Un=e=>e.tagName===`CANVAS`,Wn=e=>e.tagName===`VIDEO`,Gn=e=>e.tagName===`IMG`,Kn=e=>e.tagName===`IFRAME`,qn=e=>e.tagName===`STYLE`,Jn=e=>e.tagName===`SCRIPT`,Yn=e=>e.tagName===`TEXTAREA`,Xn=e=>e.tagName===`SELECT`,Zn=e=>e.tagName===`SLOT`,Qn=e=>e.tagName===`LI`,$n=e=>e.tagName===`OL`,er=e=>!Ln(e)&&e.tagName.indexOf(`-`)>0,tr=/* @__PURE__ */ new Set([`IMG`,`VIDEO`,`AUDIO`,`CANVAS`,`IFRAME`,`INPUT`,`TEXTAREA`,`SELECT`,`BR`,`HR`,`META`,`LINK`,`BASE`,`COL`,`SOURCE`,`TRACK`,`WBR`,`AREA`,`PARAM`,`EMBED`,`OBJECT`]),nr=e=>!Ln(e)&&!tr.has(e.tagName),rr={name:`list-style-type`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`disc`:return 0;case`circle`:return 1;case`square`:return 2;case`decimal`:return 3;case`cjk-decimal`:return 4;case`decimal-leading-zero`:return 5;case`lower-roman`:return 6;case`upper-roman`:return 7;case`lower-greek`:return 8;case`lower-alpha`:return 9;case`upper-alpha`:return 10;case`arabic-indic`:return 11;case`armenian`:return 12;case`bengali`:return 13;case`cambodian`:return 14;case`cjk-earthly-branch`:return 15;case`cjk-heavenly-stem`:return 16;case`cjk-ideographic`:return 17;case`devanagari`:return 18;case`ethiopic-numeric`:return 19;case`georgian`:return 20;case`gujarati`:return 21;case`gurmukhi`:return 22;case`hebrew`:return 52;case`hiragana`:return 23;case`hiragana-iroha`:return 24;case`japanese-formal`:return 25;case`japanese-informal`:return 26;case`kannada`:return 27;case`katakana`:return 28;case`katakana-iroha`:return 29;case`khmer`:return 30;case`korean-hangul-formal`:return 31;case`korean-hanja-formal`:return 32;case`korean-hanja-informal`:return 33;case`lao`:return 34;case`lower-armenian`:return 35;case`malayalam`:return 36;case`mongolian`:return 37;case`myanmar`:return 38;case`oriya`:return 39;case`persian`:return 40;case`simp-chinese-formal`:return 41;case`simp-chinese-informal`:return 42;case`tamil`:return 43;case`telugu`:return 44;case`thai`:return 45;case`tibetan`:return 46;case`trad-chinese-formal`:return 47;case`trad-chinese-informal`:return 48;case`upper-armenian`:return 49;case`disclosure-open`:return 50;case`disclosure-closed`:return 51;default:return-1}}},H=(e,t)=>(e&t)!==0;var ir=class{counters={};getCounterValue(e){let t=this.counters[e];return t&&t.length?c(t,t.length-1):1}getCounterValues(e){return this.counters[e]||[]}pop(e){e.forEach(e=>this.counters[e]?.pop())}parse(e){let t=e.counterIncrement,n=e.counterReset,r=!0;t!==null&&t.forEach(e=>{let t=this.counters[e.counter];if(t&&e.increment!==0){r=!1,t.length||t.push(1);let n=Math.max(0,t.length-1);t[n]=(t[n]??0)+e.increment}});let i=[];return r&&n.forEach(e=>{let t=this.counters[e.counter];i.push(e.counter),t||=this.counters[e.counter]=[],t.push(e.reset)}),i}};let ar={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:[`M`,`CM`,`D`,`CD`,`C`,`XC`,`L`,`XL`,`X`,`IX`,`V`,`IV`,`I`]},or={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `Ք.Փ.Ւ.Ց.Ր.Տ.Վ.Ս.Ռ.Ջ.Պ.Չ.Ո.Շ.Ն.Յ.Մ.Ճ.Ղ.Ձ.Հ.Կ.Ծ.Խ.Լ.Ի.Ժ.Թ.Ը.Է.Զ.Ե.Դ.Գ.Բ.Ա`.split(`.`)},sr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `י׳.ט׳.ח׳.ז׳.ו׳.ה׳.ד׳.ג׳.ב׳.א׳.ת.ש.ר.ק.צ.פ.ע.ס.נ.מ.ל.כ.יט.יח.יז.טז.טו.י.ט.ח.ז.ו.ה.ד.ג.ב.א`.split(`.`)},cr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:/* @__PURE__ */ `ჵ.ჰ.ჯ.ჴ.ხ.ჭ.წ.ძ.ც.ჩ.შ.ყ.ღ.ქ.ფ.ჳ.ტ.ს.რ.ჟ.პ.ო.ჲ.ნ.მ.ლ.კ.ი.თ.ჱ.ზ.ვ.ე.დ.გ.ბ.ა`.split(`.`)},lr=(e,t,n,r,i,a)=>e<t||e>n?_r(e,i,a.length>0):r.integers.reduce((t,n,i)=>{for(;e>=n;)e-=n,t+=r.values[i];return t},``)+a,ur=(e,t,n,r)=>{let i=``;do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},U=(e,t,n,r,i)=>{let a=n-t+1;return(e<0?`-`:``)+(ur(Math.abs(e),a,r,e=>String.fromCodePoint(Math.floor(e%a)+t))+i)},dr=(e,t,n=`. `)=>{let r=t.length;return ur(Math.abs(e),r,!1,e=>String(t[Math.floor(e%r)]))+n},fr=(e,t,n,r,i,a)=>{if(e<-9999||e>9999)return _r(e,4,i.length>0);let o=Math.abs(e),s=i;if(o===0)return t[0]+s;for(let r=0;o>0&&r<=4;r++){let i=o%10;i===0&&H(a,1)&&s!==``?s=t[i]+s:i>1||i===1&&r===0||i===1&&r===1&&H(a,2)||i===1&&r===1&&H(a,4)&&e>100||i===1&&r>1&&H(a,8)?s=(t[i]??``)+(r>0?n[r-1]??``:``)+s:i===1&&r>0&&(s=(n[r-1]??``)+s),o=Math.floor(o/10)}return(e<0?r:``)+s},pr=`十百千萬`,mr=`拾佰仟萬`,hr=`マイナス`,gr=`마이너스`,_r=(e,t,n)=>{let r=n?`. `:``,i=n?`、`:``,a=n?`, `:``,o=n?` `:``;switch(t){case 0:return`•`+o;case 1:return`◦`+o;case 2:return`◾`+o;case 5:let t=U(e,48,57,!0,r);return t.length<4?`0${t}`:t;case 4:return dr(e,`〇一二三四五六七八九`,i);case 6:return lr(e,1,3999,ar,3,r).toLowerCase();case 7:return lr(e,1,3999,ar,3,r);case 8:return U(e,945,969,!1,r);case 9:return U(e,97,122,!1,r);case 10:return U(e,65,90,!1,r);case 11:return U(e,1632,1641,!0,r);case 12:case 49:return lr(e,1,9999,or,3,r);case 35:return lr(e,1,9999,or,3,r).toLowerCase();case 13:return U(e,2534,2543,!0,r);case 14:case 30:return U(e,6112,6121,!0,r);case 15:return dr(e,`子丑寅卯辰巳午未申酉戌亥`,i);case 16:return dr(e,`甲乙丙丁戊己庚辛壬癸`,i);case 17:case 48:return fr(e,`零一二三四五六七八九`,pr,`負`,i,14);case 47:return fr(e,`零壹貳參肆伍陸柒捌玖`,mr,`負`,i,15);case 42:return fr(e,`零一二三四五六七八九`,pr,`负`,i,14);case 41:return fr(e,`零壹贰叁肆伍陆柒捌玖`,mr,`负`,i,15);case 26:return fr(e,`〇一二三四五六七八九`,`十百千万`,hr,i,0);case 25:return fr(e,`零壱弐参四伍六七八九`,`拾百千万`,hr,i,7);case 31:return fr(e,`영일이삼사오육칠팔구`,`십백천만`,gr,a,7);case 33:return fr(e,`零一二三四五六七八九`,`十百千萬`,gr,a,0);case 32:return fr(e,`零壹貳參四五六七八九`,`拾百千`,gr,a,7);case 18:return U(e,2406,2415,!0,r);case 20:return lr(e,1,19999,cr,3,r);case 21:return U(e,2790,2799,!0,r);case 22:return U(e,2662,2671,!0,r);case 52:return lr(e,1,10999,sr,3,r);case 23:return dr(e,`あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん`);case 24:return dr(e,`いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす`);case 27:return U(e,3302,3311,!0,r);case 28:return dr(e,`アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン`,i);case 29:return dr(e,`イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス`,i);case 34:return U(e,3792,3801,!0,r);case 37:return U(e,6160,6169,!0,r);case 38:return U(e,4160,4169,!0,r);case 39:return U(e,2918,2927,!0,r);case 40:return U(e,1776,1785,!0,r);case 43:return U(e,3046,3055,!0,r);case 44:return U(e,3174,3183,!0,r);case 45:return U(e,3664,3673,!0,r);case 46:return U(e,3872,3881,!0,r);default:return U(e,48,57,!0,r)}},vr={name:`display`,initialValue:`inline-block`,prefix:!1,type:1,parse:(e,t)=>t.filter(D).reduce((e,t)=>e|yr(t.value),0)},yr=e=>{switch(e){case`block`:case`-webkit-box`:return 2;case`inline`:return 4;case`run-in`:return 8;case`flow`:return 16;case`flow-root`:return 32;case`table`:return 64;case`flex`:case`-webkit-flex`:return 128;case`grid`:case`-ms-grid`:return 256;case`ruby`:return 512;case`subgrid`:return 1024;case`list-item`:return 2048;case`table-row-group`:return 4096;case`table-header-group`:return 8192;case`table-footer-group`:return 16384;case`table-row`:return 32768;case`table-cell`:return 65536;case`table-column-group`:return 131072;case`table-column`:return 262144;case`table-caption`:return 524288;case`ruby-base`:return 1048576;case`ruby-text`:return 2097152;case`ruby-base-container`:return 4194304;case`ruby-text-container`:return 8388608;case`contents`:return 16777216;case`inline-block`:return 33554432;case`inline-list-item`:return 67108864;case`inline-table`:return 134217728;case`inline-flex`:return 268435456;case`inline-grid`:return 536870912}return 0},br={name:`float`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`left`:return 1;case`right`:return 2;case`inline-start`:return 3;case`inline-end`:return 4}return 0}},xr={name:`overflow`,initialValue:`visible`,prefix:!1,type:1,parse:(e,t)=>t.filter(D).map(e=>{switch(e.value){case`hidden`:return 1;case`scroll`:return 2;case`clip`:return 3;case`auto`:return 4;default:return 0}})},Sr={name:`text-decoration-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Cr={name:`text-decoration-line`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>t.filter(D).map(e=>{switch(e.value){case`underline`:return 1;case`overline`:return 2;case`line-through`:return 3;case`none`:return 4}return 0}).filter(e=>e!==0)},wr={name:`content`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>{if(t.length===0)return[];let n=t[0];return n&&n.type===20&&n.value===`none`?[]:t}},Tr={name:`quotes`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>{if(t.length===0)return null;let n=t[0];if(n&&n.type===20&&n.value===`none`)return null;let r=[],i=t.filter(Ce);if(i.length%2!=0)return null;for(let e=0;e<i.length;e+=2){let t=c(i,e).value,n=c(i,e+1).value;r.push({open:t,close:n})}return r}},Er=(e,t,n)=>{if(!e)return``;let r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:``},Dr=(e,t)=>{let n=[],r=e.filter(Te);for(let e=0;e<r.length;e++){let i=r[e],a=r[e+1];if(i&&i.type===20){let e=a&&E(a)?a.number:t;n.push([i.value,e])}}return n},Or={name:`counter-increment`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>{if(t.length===0)return null;let n=t[0];return n&&n.type===20&&n.value===`none`?null:Dr(t,1).map(([e,t])=>({counter:e,increment:t}))}},kr={name:`counter-reset`,initialValue:`none`,prefix:!0,type:1,parse:(e,t)=>t.length===0?[]:Dr(t,0).filter(([e])=>e!==`none`).map(([e,t])=>({counter:e,reset:t}))},Ar={name:`background-clip`,initialValue:`border-box`,prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(D(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2;case`text`:return 3}return 0})},jr={name:`background-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Mr=(e,t)=>{let n=V.parse(e,c(t,0)),r=t[1];return r&&M(r)?{color:n,stop:r}:{color:n,stop:null}},W=(e,t)=>{let n=e.map(e=>({color:e.color,stop:e.stop})),r=c(n,0),i=c(n,n.length-1);r.stop===null&&(r.stop=N),i.stop===null&&(i.stop=F);let a=[],o=0;for(let e=0;e<n.length;e++){let r=c(n,e).stop;if(r!==null){let e=I(r,t);e>o?a.push(e):a.push(o),o=e}else a.push(null)}let s=null;for(let e=0;e<a.length;e++){let t=c(a,e);if(t===null)s===null&&(s=e);else if(s!==null){let n=e-s,r=(t-a[s-1])/(n+1);for(let e=1;e<=n;e++)a[s+e-1]=r*e;s=null}}return n.map(({color:e},n)=>({color:e,stop:Math.max(Math.min(1,a[n]/t),0)}))},Nr=(e,t,n)=>{let r=t/2,i=n/2,a=I(e[0],t)-r,o=i-I(e[1],n);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},Pr=(e,t,n)=>{let r=typeof e==`number`?e:Nr(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,o=n/2,s=i/2,c=Math.sin(r-Math.PI/2)*s,l=Math.cos(r-Math.PI/2)*s;return[i,a-l,a+l,o-c,o+c]},G=(e,t)=>Math.sqrt(e*e+t*t),Fr=(e,t,n,r,i)=>[[0,0],[0,t],[e,0],[e,t]].reduce((e,t)=>{let[a,o]=t,s=G(n-a,r-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner,Ir=(e,t,n,r,i)=>{let a=0,o=0;switch(e.size){case 0:e.shape===0?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)a=o=Math.min(G(t,n),G(t,n-i),G(t-r,n),G(t-r,n-i));else if(e.shape===1){let e=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),[s,c]=Fr(r,i,t,n,!0);a=G(s-t,(c-n)/e),o=e*a}break;case 1:e.shape===0?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)a=o=Math.max(G(t,n),G(t,n-i),G(t-r,n),G(t-r,n-i));else if(e.shape===1){let e=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),[s,c]=Fr(r,i,t,n,!1);a=G(s-t,(c-n)/e),o=e*a}}if(Array.isArray(e.size)){let t=e.size;a=I(c(t,0),r),o=t.length===2?I(c(t,1),i):a}return[a,o]},Lr=(e,t)=>{let n=L(180),r=[];return k(t).forEach((t,i)=>{if(i===0){let r=t[0];if(r&&r.type===20&&r.value===`to`){n=qe(t);return}if(r&&Ke(r)){n=Ge.parse(e,r);return}}let a=Mr(e,t);r.push(a)}),{angle:n,stops:r,type:1}},Rr=(e,t)=>{let n=L(180),r=[];return k(t).forEach((t,i)=>{if(i===0){let r=t[0];if(r&&r.type===20&&[`top`,`left`,`right`,`bottom`].indexOf(r.value)!==-1){n=qe(t);return}if(r&&Ke(r)){n=(Ge.parse(e,r)+L(270))%L(360);return}}let a=Mr(e,t);r.push(a)}),{angle:n,stops:r,type:1}},zr=(e,t)=>{let n=L(180),r=[],i=1;return k(t).forEach((t,n)=>{let a=t[0];if(a){if(n===0){if(D(a)&&a.value===`linear`){i=1;return}if(D(a)&&a.value===`radial`){i=2;return}}if(a.type===18){if(a.name===`from`){let t=V.parse(e,c(a.values,0));r.push({stop:N,color:t})}else if(a.name===`to`){let t=V.parse(e,c(a.values,0));r.push({stop:F,color:t})}else if(a.name===`color-stop`){let t=a.values.filter(O);if(t.length===2){let n=V.parse(e,c(t,1)),i=c(t,0);E(i)&&r.push({stop:{type:16,number:i.number*100,flags:i.flags},color:n})}}}}}),i===1?{angle:(n+L(180))%L(360),stops:r,type:i}:{size:3,shape:0,stops:r,position:[],type:i}},Br=`closest-side`,Vr=`farthest-side`,Hr=`closest-corner`,Ur=`farthest-corner`,Wr=`circle`,Gr=`ellipse`,Kr=`cover`,qr=`contain`,Jr=(e,t)=>{let n=1,r=3,i=[],a=[];return k(t).forEach((t,o)=>{let s=!0;if(o===0){let e=!1;s=t.reduce((t,i)=>{if(e){if(D(i))switch(i.value){case`center`:return a.push(P),t;case`top`:case`left`:return a.push(N),t;case`right`:case`bottom`:return a.push(F),t}else(M(i)||Fe(i))&&a.push(i)}else if(D(i))switch(i.value){case Wr:return n=0,!1;case Gr:return n=1,!1;case`at`:return e=!0,!1;case Br:return r=0,!1;case Kr:case Vr:return r=1,!1;case qr:case Hr:return r=2,!1;case Ur:return r=3,!1}else if(Fe(i)||M(i))return Array.isArray(r)||(r=[]),r.push(i),!1;return t},s)}if(s){let n=Mr(e,t);i.push(n)}}),{size:r,shape:n,stops:i,position:a,type:2}},Yr=(e,t)=>{let n=1,r=3,i=[],a=[];return k(t).forEach((t,o)=>{let s=!0;if(o===0?s=t.reduce((e,t)=>{if(D(t))switch(t.value){case`center`:return a.push(P),!1;case`top`:case`left`:return a.push(N),!1;case`right`:case`bottom`:return a.push(F),!1}else if(M(t)||Fe(t))return a.push(t),!1;return e},s):o===1&&(s=t.reduce((e,t)=>{if(D(t))switch(t.value){case Wr:return n=0,!1;case Gr:return n=1,!1;case qr:case Br:return r=0,!1;case Vr:return r=1,!1;case Hr:return r=2,!1;case Kr:case Ur:return r=3,!1}else if(Fe(t)||M(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){let n=Mr(e,t);i.push(n)}}),{size:r,shape:n,stops:i,position:a,type:2}},Xr=(e,t)=>({...Lr(e,t),type:3}),Zr=(e,t)=>({...Jr(e,t),type:4}),Qr=(e,t)=>{let n=0,r=[],i=[];return k(t).forEach((t,a)=>{let o=!0;if(a===0){let i=!1,a=!1;o=t.reduce((t,o)=>{if(D(o))switch(o.value){case`from`:return i=!0,a=!1,!1;case`at`:return i=!1,a=!0,!1;case`center`:return r.push(P),t;case`top`:case`left`:return r.push(N),t;case`right`:case`bottom`:return r.push(F),t}return i?(n=Ge.parse(e,o),!1):(a&&M(o)&&r.push(o),t)},!0)}o&&t.length>0&&i.push(Mr(e,t))}),{type:5,angle:n,position:r,stops:i}},$r=(e,t)=>({...Qr(e,t),type:6}),ei=e=>e&&(T(e)&&(e.unit===`dppx`||e.unit===`x`)||E(e))?e.number:1,ti=(e,t)=>{let n=k(t),r=e.config.window.devicePixelRatio||1,i=[];for(let e of n){let t=e.find(e=>e.type===22||e.type===18);if(!t)continue;let n=e.find(e=>T(e)||E(e));i.push({imageToken:t,resolution:ei(n)})}if(i.length===0)throw Error(`image-set() requires at least one image candidate`);let a=i.filter(e=>e.resolution>=r).sort((e,t)=>e.resolution-t.resolution),o=c(a.length>0?a:i.slice().sort((e,t)=>t.resolution-e.resolution),0);return ci.parse(e,o.imageToken)},ni=e=>e.type===1,ri=e=>e.type===2,ii=e=>e.type===3,ai=e=>e.type===4,oi=e=>e.type===5,si=e=>e.type===6,ci={name:`image`,parse:(e,t)=>{if(t.type===22){let n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){let n=ui[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported image function "${t.name}"`);return n(e,t.values)}throw Error(`Unsupported image type ${t.type}`)}};function li(e){return(e.type!==20||e.value!==`none`)&&(e.type!==18||!!ui[e.name])}let ui={"linear-gradient":Lr,"-moz-linear-gradient":Rr,"-ms-linear-gradient":Rr,"-o-linear-gradient":Rr,"-webkit-linear-gradient":Rr,"radial-gradient":Jr,"-moz-radial-gradient":Yr,"-ms-radial-gradient":Yr,"-o-radial-gradient":Yr,"-webkit-radial-gradient":Yr,"-webkit-gradient":zr,"repeating-linear-gradient":Xr,"-webkit-repeating-linear-gradient":Xr,"-moz-repeating-linear-gradient":Xr,"-ms-repeating-linear-gradient":Xr,"-o-repeating-linear-gradient":Xr,"repeating-radial-gradient":Zr,"-webkit-repeating-radial-gradient":Zr,"-moz-repeating-radial-gradient":Zr,"conic-gradient":Qr,"-webkit-conic-gradient":Qr,"-moz-conic-gradient":Qr,"repeating-conic-gradient":$r,"-webkit-repeating-conic-gradient":$r,"-moz-repeating-conic-gradient":$r,"image-set":ti,"-webkit-image-set":ti},di={name:`background-image`,initialValue:`none`,type:1,prefix:!1,skipCache:!0,parse:(e,t)=>{if(t.length===0)return[];let n=t[0];return n&&n.type===20&&n.value===`none`?[]:t.filter(e=>O(e)&&li(e)).map(t=>ci.parse(e,t))}},fi={name:`background-origin`,initialValue:`border-box`,prefix:!1,type:1,parse:(e,t)=>t.map(e=>{if(D(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})},pi={name:`background-position`,initialValue:`0% 0%`,type:1,prefix:!1,parse:(e,t)=>k(t).map(e=>e.map(ze).filter(e=>e!==null)).map(Ve)},mi={name:`background-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:(e,t)=>k(t).map(e=>e.filter(D).map(e=>e.value).join(` `)).map(hi)},hi=e=>{switch(e){case`no-repeat`:return 1;case`repeat-x`:case`repeat no-repeat`:return 2;case`repeat-y`:case`no-repeat repeat`:return 3;default:return 0}},gi={name:`background-size`,initialValue:`0`,prefix:!1,type:1,parse:(e,t)=>k(t).map(e=>e.map(e=>_i(e)?e:ze(e)).filter(e=>e!==null))},_i=e=>D(e)||M(e),vi=e=>({name:`border-${e}-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`}),yi=vi(`top`),bi=vi(`right`),xi=vi(`bottom`),Si=vi(`left`),Ci=e=>({name:`border-${e}-radius`,initialValue:`0 0`,prefix:!1,type:1,parse:(e,t)=>Ve(t.filter(M))}),wi=Ci(`top-left`),Ti=Ci(`top-right`),Ei=Ci(`bottom-right`),Di=Ci(`bottom-left`),Oi=e=>({name:`border-${e}-style`,initialValue:`solid`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`none`:return 0;case`dashed`:return 2;case`dotted`:return 3;case`double`:return 4}return 1}}),ki=Oi(`top`),Ai=Oi(`right`),ji=Oi(`bottom`),Mi=Oi(`left`),Ni=e=>({name:`border-${e}-width`,initialValue:`0`,type:0,prefix:!1,parse:(e,t)=>T(t)?t.number:0}),Pi=Ni(`top`),Fi=Ni(`right`),Ii=Ni(`bottom`),Li=Ni(`left`),Ri={type:0},zi=e=>{let[t]=e;return t?D(t)?t.value===`farthest-side`?`farthest-side`:`closest-side`:M(t)?t:`closest-side`:`closest-side`},Bi=e=>{let t=null,n=null;for(let r of e)if(D(r))switch(r.value){case`left`:t=N;break;case`right`:t=F;break;case`top`:n=N;break;case`bottom`:n=F;break;case`center`:t===null?t=P:n===null&&(n=P)}else M(r)&&(t===null?t=r:n===null&&(n=r));return{cx:t??P,cy:n??P}},Vi=e=>{let t=[];for(let n of e)if(n.type!==31){if(D(n)&&n.value===`round`)break;M(n)&&t.push(n)}let n=t[0]??N,r=t[1]??n;return{type:1,top:n,right:r,bottom:t[2]??n,left:t[3]??r}},Hi=e=>{let t=e.filter(Te),n=t.findIndex(e=>we(e,`at`)),r=n===-1?t:t.slice(0,n),i=n===-1?[]:t.slice(n+1);return{type:2,radius:zi(r),...Bi(i)}},Ui=e=>{let t=e.filter(Te),n=t.findIndex(e=>we(e,`at`)),r=n===-1?t:t.slice(0,n),i=n===-1?[]:t.slice(n+1);return{type:3,rx:zi(r.slice(0,1)),ry:zi(r.slice(1,2)),...Bi(i)}},Wi=e=>{let t=k(e),n=[];for(let e of t){if(e.length===1&&e[0]&&D(e[0]))continue;let t=e.filter(M);t.length>=2&&n.push([c(t,0),c(t,1)])}return{type:4,points:n}},Gi=e=>{let t=e.find(e=>e.type===0);return t?{type:5,d:t.value}:Ri},Ki=e=>{let t=[];for(let n of e)if(n.type!==31){if(D(n)&&n.value===`round`)break;M(n)&&t.push(n)}return t.length<4?Ri:{type:6,x:c(t,0),y:c(t,1),width:c(t,2),height:c(t,3)}},qi=e=>{let t=[];for(let n of e)if(n.type!==31){if(D(n)){if(n.value===`round`)break;if(n.value===`auto`){t.push(`auto`);continue}return Ri}M(n)&&t.push(n)}if(t.length!==4)return Ri;let n=(e,t)=>e===`auto`?t===`top`||t===`left`?N:F:e;return{type:1,top:n(c(t,0),`top`),right:n(c(t,1),`right`),bottom:n(c(t,2),`bottom`),left:n(c(t,3),`left`)}},Ji={name:`clip-path`,initialValue:`none`,prefix:!1,type:0,parse:(e,t)=>{if(D(t)&&t.value===`none`)return Ri;if(t.type===18)switch(t.name){case`inset`:return Vi(t.values);case`circle`:return Hi(t.values);case`ellipse`:return Ui(t.values);case`polygon`:return Wi(t.values);case`path`:return Gi(t.values);case`xywh`:return Ki(t.values);case`rect`:return qi(t.values)}return Ri}},Yi={name:`color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Xi={name:`direction`,initialValue:`ltr`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`rtl`:return 1;default:return 0}}},Zi={name:`font-family`,initialValue:``,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=[],i=[],a=!1;return t.forEach(e=>{switch(e.type){case 20:n.push(e.value);break;case 0:a=!0,n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(` `)),i.push(a),a=!1,n.length=0}}),n.length&&(r.push(n.join(` `)),i.push(a)),r.map((e,t)=>i[t]||e.indexOf(` `)!==-1?`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\a `).replace(/\r/g,`\\d `).replace(/\f/g,`\\c `)}'`:e)}},Qi={name:`font-size`,initialValue:`0`,prefix:!1,type:3,format:`length`},$i={name:`letter-spacing`,initialValue:`0`,prefix:!1,type:0,parse:(e,t)=>t.type===20&&t.value===`normal`?0:t.type===17||t.type===15?t.number:0},ea={name:`line-break`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`strict`:return`strict`;default:return`normal`}}},ta={name:`line-height`,initialValue:`normal`,prefix:!1,type:4},na=(e,t)=>D(e)&&e.value===`normal`?1.2*t:e.type===17?t*e.number:M(e)?I(e,t):t,ra={name:`list-style-image`,initialValue:`none`,type:0,prefix:!1,skipCache:!0,parse:(e,t)=>t.type===20&&t.value===`none`||!li(t)?null:ci.parse(e,t)},ia={name:`list-style-position`,initialValue:`outside`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`inside`:return 0;default:return 1}}},aa=e=>({name:`margin-${e}`,initialValue:`0`,prefix:!1,type:4}),oa=aa(`top`),sa=aa(`right`),ca=aa(`bottom`),la=aa(`left`),ua={name:`overflow-wrap`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`break-word`:return`break-word`;default:return`normal`}}},da=e=>({name:`padding-${e}`,initialValue:`0`,prefix:!1,type:3,format:`length-percentage`}),fa=da(`top`),pa=da(`right`),ma=da(`bottom`),ha=da(`left`),ga={name:`text-align`,initialValue:`left`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`right`:return 2;case`center`:case`justify`:return 1;default:return 0}}},_a={name:`position`,initialValue:`static`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`relative`:return 1;case`absolute`:return 2;case`fixed`:return 3;case`sticky`:return 4}return 0}},va={name:`text-shadow`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.length===1&&we(c(t,0),`none`)?[]:k(t).map(t=>{let n={color:0,offsetX:N,offsetY:N,blur:N},r=0;for(let i=0;i<t.length;i++){let a=t[i];a&&(Fe(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:n.blur=a,r++):n.color=V.parse(e,a))}return n})},ya={name:`text-transform`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`uppercase`:return 2;case`lowercase`:return 1;case`capitalize`:return 3}return 0}},ba={name:`transform`,initialValue:`none`,prefix:!0,type:0,parse:(e,t)=>{if(t.type===20&&t.value===`none`)return null;if(t.type===18){let n=xa[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported transform function "${t.name}"`);return n(e,t.values)}return null}},xa={matrix:(e,t)=>{let n=t.filter(e=>e.type===17).map(e=>e.number);return n.length===6?n:null},matrix3d:(e,t)=>{let n=t.filter(e=>e.type===17).map(e=>e.number);return n.length===16?[c(n,0),c(n,1),c(n,4),c(n,5),c(n,12),c(n,13)]:null},rotate:(e,t)=>{if(t.length!==1)return null;let n=c(t,0),r=0;if(n.type===17&&n.number===0)r=0;else if(n.type===15)r=Ge.parse(e,n);else return null;let i=Math.cos(r),a=Math.sin(r);return[i,a,-a,i,0,0]}},Sa={type:16,number:50,flags:4},Ca=[Sa,Sa],wa={name:`transform-origin`,initialValue:`50% 50%`,prefix:!0,type:1,parse:(e,t)=>{let n=t.filter(M);return n.length===2?[c(n,0),c(n,1)]:Ca}},Ta={name:`rotate`,initialValue:`none`,prefix:!1,type:0,parse:(e,t)=>t.type===20&&t.value===`none`?null:t.type===17&&t.number===0?0:t.type===15?Ge.parse(e,t)*180/Math.PI:null},Ea={name:`visibility`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`hidden`:return 1;case`collapse`:return 2;default:return 0}}},Da={name:`word-break`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`break-all`:return`break-all`;case`keep-all`:return`keep-all`;default:return`normal`}}},Oa={name:`white-space`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`pre`:return`pre`;case`nowrap`:return`nowrap`;case`pre-wrap`:return`pre-wrap`;case`pre-line`:return`pre-line`;default:return`normal`}}},ka=e=>e!==0,Aa=e=>e===3||e===4,ja={name:`writing-mode`,initialValue:`horizontal-tb`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`vertical-rl`:return 1;case`vertical-lr`:return 2;case`sideways-rl`:return 3;case`sideways-lr`:return 4;default:return 0}}},Ma={name:`z-index`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>{if(t.type===20)return{auto:!0,order:0};if(E(t))return{auto:!1,order:t.number};throw Error(`Invalid z-index number parsed`)}},Na={name:`time`,parse:(e,t)=>{if(t.type===15)switch(t.unit.toLowerCase()){case`s`:return 1e3*t.number;case`ms`:return t.number}throw Error(`Unsupported time type`)}},Pa={name:`opacity`,initialValue:`1`,type:0,prefix:!1,parse:(e,t)=>E(t)?t.number:1},Fa={name:`text-decoration-style`,initialValue:`solid`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`double`:return 1;case`dotted`:return 2;case`dashed`:return 3;case`wavy`:return 4;default:return 0}}},Ia={name:`text-decoration-thickness`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>{if(D(t))switch(t.value){case`auto`:return`auto`;case`from-font`:return`from-font`}return T(t)?t.number:`auto`}},La={name:`text-underline-offset`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>D(t)&&t.value===`auto`?`auto`:T(t)?t.number:`auto`},Ra={name:`font-weight`,initialValue:`normal`,type:0,prefix:!1,parse:(e,t)=>{if(E(t))return t.number;if(D(t))switch(t.value){case`bold`:return 700;default:return 400}return 400}},za={name:`font-variant`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.filter(D).map(e=>e.value)},Ba={name:`font-style`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`oblique`:return`oblique`;case`italic`:return`italic`;default:return`normal`}}},Va={name:`duration`,initialValue:`0s`,prefix:!1,type:1,parse:(e,t)=>t.filter(T).map(t=>Na.parse(e,t))},Ha={name:`box-shadow`,initialValue:`none`,type:1,prefix:!1,parse:(e,t)=>t.length===1&&we(c(t,0),`none`)?[]:k(t).map(t=>{let n={color:255,offsetX:N,offsetY:N,blur:N,spread:N,inset:!1},r=0;for(let i=0;i<t.length;i++){let a=t[i];a&&(we(a,`inset`)?n.inset=!0:Fe(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:r===2?n.blur=a:n.spread=a,r++):n.color=V.parse(e,a))}return n})},Ua={name:`paint-order`,initialValue:`normal`,prefix:!1,type:1,parse:(e,t)=>{let n=[0,1,2],r=[];return t.filter(D).forEach(e=>{switch(e.value){case`stroke`:r.push(1);break;case`fill`:r.push(0);break;case`markers`:r.push(2)}}),n.forEach(e=>{r.indexOf(e)===-1&&r.push(e)}),r}},Wa={name:`-webkit-text-stroke-color`,initialValue:`currentcolor`,prefix:!1,type:3,format:`color`},Ga={name:`-webkit-text-stroke-width`,initialValue:`0`,type:0,prefix:!1,parse:(e,t)=>T(t)?t.number:0},Ka={name:`-webkit-line-clamp`,initialValue:`none`,prefix:!0,type:0,parse:(e,t)=>t.type===20&&t.value===`none`?0:t.type===17?Math.max(0,Math.floor(t.number)):0},qa={name:`object-fit`,initialValue:`fill`,prefix:!1,type:1,parse:(e,t)=>t.filter(D).reduce((e,t)=>e|Ja(t.value),0)},Ja=e=>{switch(e){case`contain`:return 2;case`cover`:return 4;case`none`:return 8;case`scale-down`:return 16}return 0},Ya={name:`text-overflow`,initialValue:`clip`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`ellipsis`:return 1;default:return 0}}},Xa={name:`image-rendering`,initialValue:`auto`,prefix:!1,type:2,parse:(e,t)=>{switch(t.toLowerCase()){case`crisp-edges`:case`-webkit-crisp-edges`:case`-moz-crisp-edges`:return 1;case`pixelated`:case`-webkit-optimize-contrast`:return 2;case`smooth`:case`high-quality`:return 3;default:return 0}}},K={NORMAL:`normal`,MULTIPLY:`multiply`,SCREEN:`screen`,OVERLAY:`overlay`,DARKEN:`darken`,LIGHTEN:`lighten`,COLOR_DODGE:`color-dodge`,COLOR_BURN:`color-burn`,HARD_LIGHT:`hard-light`,SOFT_LIGHT:`soft-light`,DIFFERENCE:`difference`,EXCLUSION:`exclusion`,HUE:`hue`,SATURATION:`saturation`,COLOR:`color`,LUMINOSITY:`luminosity`},Za=new Set(Object.values(K)),Qa={name:`mix-blend-mode`,initialValue:`normal`,type:2,prefix:!1,parse:(e,t)=>Za.has(t)?t:K.NORMAL},$a={name:`filter`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{if(t.length===1){let e=c(t,0);if(e.type===20&&e.value===`none`)return null}let n=[];for(let e of t)if(e.type===22)n.push(`url("${e.value}")`);else if(e.type===18){let t=e,r=eo(t.values);switch(t.name){case`blur`:n.push(`blur(${r})`);break;case`brightness`:case`contrast`:case`invert`:case`opacity`:case`saturate`:case`sepia`:n.push(`${t.name}(${r})`);break;case`grayscale`:n.push(`grayscale(${r})`);break;case`hue-rotate`:n.push(`hue-rotate(${r})`);break;case`drop-shadow`:n.push(`drop-shadow(${r})`);break;default:n.push(`${t.name}(${r})`)}}return n.length>0?n.join(` `):null}},eo=e=>{let t=[];for(let n of e)n.type===31?t.push(` `):n.type===18?t.push(`${n.name}(${eo(n.values)})`):n.type===4?t.push(`,`):n.type===6?t.push(n.value):n.type===15?t.push(`${n.number}${n.unit}`):n.type===17?t.push(`${n.number}`):n.type===16?t.push(`${n.number}%`):n.type===20?t.push(n.value):n.type===5&&t.push(`#${n.value}`);return t.join(``).trim()},to={name:`font-variant-ligatures`,initialValue:`normal`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`none`:return 1;case`common-ligatures`:return 2;case`no-common-ligatures`:return 3;case`discretionary-ligatures`:return 4;case`no-discretionary-ligatures`:return 5;case`historical-ligatures`:return 6;case`no-historical-ligatures`:return 7;case`contextual`:return 8;case`no-contextual`:return 9;default:return 0}}},no={name:`zoom`,initialValue:`1`,type:0,prefix:!1,parse:(e,t)=>t.type===16?Math.max(0,t.number/100):t.type===17?Math.max(0,t.number):1},ro={name:`object-position`,initialValue:`50% 50%`,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=0;for(;r<t.length&&n.length<2;){let e=t[r];if(!e)break;if(D(e))switch(e.value){case`left`:case`top`:n.push(N);break;case`center`:n.push(P);break;case`right`:case`bottom`:n.push(F)}else M(e)&&n.push(e);r++}for(;n.length<2;)n.push(P);return[c(n,0),c(n,1)]}},io=new Set(Object.values({NORMAL:`normal`,MULTIPLY:`multiply`,SCREEN:`screen`,OVERLAY:`overlay`,DARKEN:`darken`,LIGHTEN:`lighten`,COLOR_DODGE:`color-dodge`,COLOR_BURN:`color-burn`,HARD_LIGHT:`hard-light`,SOFT_LIGHT:`soft-light`,DIFFERENCE:`difference`,EXCLUSION:`exclusion`,HUE:`hue`,SATURATION:`saturation`,COLOR:`color`,LUMINOSITY:`luminosity`})),ao={name:`background-blend-mode`,initialValue:`normal`,prefix:!1,type:1,parse:(e,t)=>{let n=[],r=t.filter(O);for(let e of r)D(e)&&io.has(e.value)&&n.push(e.value);return n.length>0?n:[`normal`]}},oo={name:`border-image-source`,initialValue:`none`,prefix:!1,type:1,skipCache:!0,parse:(e,t)=>{if(t.length===0)return null;let n=t.filter(e=>O(e)&&li(e));return n.length===0?null:ci.parse(e,c(n,0))}},so=e=>{let t=[...e];if(t.length===1){let e=c(t,0);t.push(e,e,e)}else t.length===2?t.push(c(t,0),c(t,1)):t.length===3&&t.push(c(t,1));return[c(t,0),c(t,1),c(t,2),c(t,3)]},co={name:`border-image-slice`,initialValue:`100%`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(Te),r=[],i=!1,a=`percent`;for(let e of n)D(e)&&e.value===`fill`?i=!0:e.type===17?(r.push(e.number),a=`number`):e.type===16&&(r.push(e.number),a=`percent`);let[o,s,c,l]=so(r.length>0?r:[100]);return{top:o,right:s,bottom:c,left:l,fill:i,unit:a}}},lo=e=>{switch(e){case`repeat`:return 1;case`round`:return 2;case`space`:return 3;default:return 0}},uo={name:`border-image-repeat`,initialValue:`stretch`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(Te),r=[];for(let e of n)D(e)&&r.push(lo(e.value));let i=r[0]??0;return{horizontal:i,vertical:r[1]??i}}},fo={name:`box-decoration-break`,initialValue:`slice`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`clone`:return 1;default:return 0}}},po={name:`accent-color`,initialValue:`auto`,prefix:!1,type:0,parse:(e,t)=>D(t)&&t.value===`auto`?null:V.parse(e,t)},mo={name:`-webkit-text-fill-color`,initialValue:`currentcolor`,prefix:!0,type:0,parse:(e,t)=>D(t)&&t.value===`currentcolor`?null:V.parse(e,t)},ho={name:`isolation`,initialValue:`auto`,prefix:!1,type:2,parse:(e,t)=>+(t===`isolate`)},go={name:`outline-style`,initialValue:`none`,prefix:!1,type:2,parse:(e,t)=>{switch(t){case`solid`:return 2;case`dashed`:return 3;case`dotted`:return 4;case`double`:return 5;case`auto`:return 1;default:return 0}}},_o={name:`outline-color`,initialValue:`currentcolor`,prefix:!1,type:0,parse:(e,t)=>D(t)&&(t.value===`currentcolor`||t.value===`invert`)?null:V.parse(e,t)},vo={name:`outline-width`,initialValue:`medium`,prefix:!1,type:0,parse:Pi.parse},yo={name:`outline-offset`,initialValue:`0px`,prefix:!1,type:0,parse:(e,t)=>T(t)||E(t)?t.number:0},bo={name:`backdrop-filter`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>$a.parse(e,t)},xo={name:`mask-image`,initialValue:`none`,prefix:!1,type:1,skipCache:!0,parse:di.parse},So={name:`mask-position`,initialValue:`0%`,prefix:!1,type:1,parse:pi.parse},Co={name:`mask-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:mi.parse},wo={name:`mask-size`,initialValue:`auto`,prefix:!1,type:1,parse:gi.parse},To=[`dot`,`circle`,`double-circle`,`triangle`,`sesame`],Eo={name:`text-emphasis-style`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{let n=t.filter(Te);if(n.length===0)return null;let r=c(n,0);if(r.type===0)return r.value;if(D(r)){if(r.value===`none`)return null;if(r.value!==`filled`&&r.value!==`open`&&To.indexOf(r.value)===-1)return r.value}let i=!0,a=`circle`;for(let e of n)D(e)&&(e.value===`filled`?i=!0:e.value===`open`?i=!1:To.indexOf(e.value)!==-1&&(a=e.value));return{fill:i,shape:a}}},Do={name:`text-emphasis-color`,initialValue:`currentcolor`,prefix:!1,type:0,parse:(e,t)=>D(t)&&t.value===`currentcolor`?null:V.parse(e,t)},Oo={name:`text-emphasis-position`,initialValue:`over right`,prefix:!1,type:1,parse:(e,t)=>{let n=!0,r=!0;for(let e of t)if(D(e))switch(e.value){case`over`:n=!0;break;case`under`:n=!1;break;case`right`:r=!0;break;case`left`:r=!1}return{over:n,right:r}}},ko=e=>{let t=[...e];if(t.length===1){let e=c(t,0);t.push(e,e,e)}else t.length===2?t.push(c(t,0),c(t,1)):t.length===3&&t.push(c(t,1));return[c(t,0),c(t,1),c(t,2),c(t,3)]},Ao=e=>D(e)&&e.value===`auto`?{kind:`auto`}:e.type===17?{kind:`number`,value:e.number}:e.type===15&&e.unit===`px`?{kind:`length`,value:e.number}:e.type===16?{kind:`percentage`,value:e.number}:null,jo=e=>{let t=[];for(let n of e){if(n.type===31)continue;let e=Ao(n);if(!e)return null;t.push(e)}return t.length===0||t.length>4?null:ko(t)},Mo={name:`border-image-width`,initialValue:`auto`,prefix:!1,type:1,parse:(e,t)=>{let n=jo(t),r={kind:`auto`};return n?{top:n[0],right:n[1],bottom:n[2],left:n[3]}:{top:r,right:r,bottom:r,left:r}}},No={name:`border-image-outset`,initialValue:`0px`,prefix:!1,type:1,parse:(e,t)=>{let n=jo(t),r={kind:`length`,value:0};return n?{top:n[0],right:n[1],bottom:n[2],left:n[3]}:{top:r,right:r,bottom:r,left:r}}},Po={name:`-webkit-box-reflect`,initialValue:`none`,prefix:!0,type:1,skipCache:!0,parse:(e,t)=>{let n=null,r=0,i=null;for(let a of t)if(a.type!==31){if(n===null&&D(a)){if(a.value===`below`||a.value===`above`||a.value===`left`||a.value===`right`){n=a.value;continue}if(a.value===`none`)return null}r===0&&T(a)&&a.unit===`px`?r=a.number:i===null&&li(a)&&(i=ci.parse(e,a))}return n===null?null:{direction:n,offset:r,mask:i}}},Fo={name:`translate`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{let n=[];for(let e of t)M(e)&&n.push(e);return n.length===0?null:[c(n,0),n.length>1?c(n,1):N]}},Io={name:`scale`,initialValue:`none`,prefix:!1,type:1,parse:(e,t)=>{let n=[];for(let e of t)E(e)&&n.push(e.number);return n.length===0?null:[c(n,0),n.length>1?c(n,1):c(n,0)]}},Lo=3e4,Ro=6e4,zo=[[`animationDuration`,Va,`animationDuration`],[`backgroundClip`,Ar,`backgroundClip`],[`backgroundColor`,jr,`backgroundColor`],[`backgroundImage`,di,`backgroundImage`],[`backgroundOrigin`,fi,`backgroundOrigin`],[`backgroundPosition`,pi,`backgroundPosition`],[`backgroundRepeat`,mi,`backgroundRepeat`],[`backgroundSize`,gi,`backgroundSize`],[`borderTopColor`,yi,`borderTopColor`],[`borderRightColor`,bi,`borderRightColor`],[`borderBottomColor`,xi,`borderBottomColor`],[`borderLeftColor`,Si,`borderLeftColor`],[`borderTopLeftRadius`,wi,`borderTopLeftRadius`],[`borderTopRightRadius`,Ti,`borderTopRightRadius`],[`borderBottomRightRadius`,Ei,`borderBottomRightRadius`],[`borderBottomLeftRadius`,Di,`borderBottomLeftRadius`],[`borderTopStyle`,ki,`borderTopStyle`],[`borderRightStyle`,Ai,`borderRightStyle`],[`borderBottomStyle`,ji,`borderBottomStyle`],[`borderLeftStyle`,Mi,`borderLeftStyle`],[`borderTopWidth`,Pi,`borderTopWidth`],[`borderRightWidth`,Fi,`borderRightWidth`],[`borderBottomWidth`,Ii,`borderBottomWidth`],[`borderLeftWidth`,Li,`borderLeftWidth`],[`boxShadow`,Ha,`boxShadow`],[`clipPath`,Ji,`clipPath`],[`color`,Yi,`color`],[`direction`,Xi,`direction`],[`display`,vr,`display`],[`fontFamily`,Zi,`fontFamily`],[`fontSize`,Qi,`fontSize`],[`fontStyle`,Ba,`fontStyle`],[`fontVariant`,za,`fontVariant`],[`fontWeight`,Ra,`fontWeight`],[`letterSpacing`,$i,`letterSpacing`],[`lineBreak`,ea,`lineBreak`],[`lineHeight`,ta,`lineHeight`],[`listStyleImage`,ra,`listStyleImage`],[`listStylePosition`,ia,`listStylePosition`],[`listStyleType`,rr,`listStyleType`],[`marginTop`,oa,`marginTop`],[`marginRight`,sa,`marginRight`],[`marginBottom`,ca,`marginBottom`],[`marginLeft`,la,`marginLeft`],[`opacity`,Pa,`opacity`],[`overflowWrap`,ua,`overflowWrap`],[`paddingTop`,fa,`paddingTop`],[`paddingRight`,pa,`paddingRight`],[`paddingBottom`,ma,`paddingBottom`],[`paddingLeft`,ha,`paddingLeft`],[`paintOrder`,Ua,`paintOrder`],[`position`,_a,`position`],[`textAlign`,ga,`textAlign`],[`textDecorationStyle`,Fa,`textDecorationStyle`],[`textDecorationThickness`,Ia,`textDecorationThickness`],[`textUnderlineOffset`,La,`textUnderlineOffset`],[`textShadow`,va,`textShadow`],[`textTransform`,ya,`textTransform`],[`textOverflow`,Ya,`textOverflow`],[`transform`,ba,`transform`],[`transformOrigin`,wa,`transformOrigin`],[`rotate`,Ta,`rotate`],[`translate`,Fo,`translate`],[`scale`,Io,`scale`],[`visibility`,Ea,`visibility`],[`webkitTextStrokeColor`,Wa,`webkitTextStrokeColor`],[`webkitTextStrokeWidth`,Ga,`webkitTextStrokeWidth`],[`webkitLineClamp`,Ka,`webkitLineClamp`],[`wordBreak`,Da,`wordBreak`],[`whiteSpace`,Oa,`whiteSpace`],[`writingMode`,ja,`writingMode`],[`zIndex`,Ma,`zIndex`],[`objectFit`,qa,`objectFit`],[`imageRendering`,Xa,`imageRendering`],[`mixBlendMode`,Qa,`mixBlendMode`],[`filter`,$a,`filter`],[`fontVariantLigatures`,to,`fontVariantLigatures`],[`zoom`,no,`zoom`],[`objectPosition`,ro,`objectPosition`],[`backgroundBlendMode`,ao,`backgroundBlendMode`],[`borderImageSource`,oo,`borderImageSource`],[`borderImageSlice`,co,`borderImageSlice`],[`borderImageRepeat`,uo,`borderImageRepeat`],[`boxDecorationBreak`,fo,`boxDecorationBreak`],[`accentColor`,po,`accentColor`],[`webkitTextFillColor`,mo,`webkitTextFillColor`],[`isolation`,ho,`isolation`],[`outlineColor`,_o,`outlineColor`],[`outlineStyle`,go,`outlineStyle`],[`outlineWidth`,vo,`outlineWidth`],[`outlineOffset`,yo,`outlineOffset`],[`backdropFilter`,bo,`backdropFilter`],[`maskImage`,xo,`maskImage`],[`maskPosition`,So,`maskPosition`],[`maskRepeat`,Co,`maskRepeat`],[`maskSize`,wo,`maskSize`],[`textEmphasisStyle`,Eo,`textEmphasisStyle`],[`textEmphasisColor`,Do,`textEmphasisColor`],[`textEmphasisPosition`,Oo,`textEmphasisPosition`],[`borderImageWidth`,Mo,`borderImageWidth`],[`borderImageOutset`,No,`borderImageOutset`],[`webkitBoxReflect`,Po,`webkitBoxReflect`]],Bo=/* @__PURE__ */ new Map,Vo=(e,t,n)=>{let r=n==null?t.initialValue:n.toString();r.trim()===``&&(r=t.initialValue);let i=Bo.get(t);if(i){let e=i.get(r);if(e!==void 0)return i.delete(r),i.set(r,e),e}let a=xe.get();a.write(r);let o=new Se(a.read());xe.release(a);let s=(()=>{switch(t.type){case 2:{let n=o.parseComponentValue();return t.parse(e,D(n)?n.value:t.initialValue)}case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case`angle`:return Ge.parse(e,o.parseComponentValue());case`color`:return V.parse(e,o.parseComponentValue());case`image`:return ci.parse(e,o.parseComponentValue());case`length`:{let e=o.parseComponentValue();return Fe(e)?e:N}case`length-percentage`:{let e=o.parseComponentValue();return M(e)?e:N}case`time`:return Na.parse(e,o.parseComponentValue())}}})();if(i||(i=/* @__PURE__ */ new Map,Bo.set(t,i)),!(t.skipCache||t.type===3&&t.format===`image`)){if(i.size>=200){let e=i.keys().next().value;e!==void 0&&i.delete(e)}i.set(r,s)}return s};var Ho=class{styles;constructor(e){this.styles=e}get topColor(){return this.styles.borderTopColor}get rightColor(){return this.styles.borderRightColor}get bottomColor(){return this.styles.borderBottomColor}get leftColor(){return this.styles.borderLeftColor}get topStyle(){return this.styles.borderTopStyle}get rightStyle(){return this.styles.borderRightStyle}get bottomStyle(){return this.styles.borderBottomStyle}get leftStyle(){return this.styles.borderLeftStyle}get topWidth(){return this.styles.borderTopWidth}get rightWidth(){return this.styles.borderRightWidth}get bottomWidth(){return this.styles.borderBottomWidth}get leftWidth(){return this.styles.borderLeftWidth}get topLeftRadius(){return this.styles.borderTopLeftRadius}get topRightRadius(){return this.styles.borderTopRightRadius}get bottomRightRadius(){return this.styles.borderBottomRightRadius}get bottomLeftRadius(){return this.styles.borderBottomLeftRadius}get imageSource(){return this.styles.borderImageSource}get imageSlice(){return this.styles.borderImageSlice}get imageRepeat(){return this.styles.borderImageRepeat}get boxShadow(){return this.styles.boxShadow}},Uo=class{styles;constructor(e){this.styles=e}get color(){return this.styles.backgroundColor}get image(){return this.styles.backgroundImage}get clip(){return this.styles.backgroundClip}get origin(){return this.styles.backgroundOrigin}get position(){return this.styles.backgroundPosition}get repeat(){return this.styles.backgroundRepeat}get size(){return this.styles.backgroundSize}get blendMode(){return this.styles.backgroundBlendMode}},Wo=class{styles;constructor(e){this.styles=e}get family(){return this.styles.fontFamily}get size(){return this.styles.fontSize}get style(){return this.styles.fontStyle}get variant(){return this.styles.fontVariant}get weight(){return this.styles.fontWeight}get ligatures(){return this.styles.fontVariantLigatures}get color(){return this.styles.color}get letterSpacing(){return this.styles.letterSpacing}get lineHeight(){return this.styles.lineHeight}get textAlign(){return this.styles.textAlign}get textTransform(){return this.styles.textTransform}get textOverflow(){return this.styles.textOverflow}get textShadow(){return this.styles.textShadow}get textDecorationColor(){return this.styles.textDecorationColor}get textDecorationLine(){return this.styles.textDecorationLine}get textDecorationStyle(){return this.styles.textDecorationStyle}get textDecorationThickness(){return this.styles.textDecorationThickness}get textUnderlineOffset(){return this.styles.textUnderlineOffset}get wordBreak(){return this.styles.wordBreak}get lineBreak(){return this.styles.lineBreak}get overflowWrap(){return this.styles.overflowWrap}get writingMode(){return this.styles.writingMode}get direction(){return this.styles.direction}get webkitTextStrokeColor(){return this.styles.webkitTextStrokeColor}get webkitTextStrokeWidth(){return this.styles.webkitTextStrokeWidth}get webkitLineClamp(){return this.styles.webkitLineClamp}get paintOrder(){return this.styles.paintOrder}},Go=class{styles;constructor(e){this.styles=e}get display(){return this.styles.display}get position(){return this.styles.position}get float(){return this.styles.float}get zIndex(){return this.styles.zIndex}get marginTop(){return this.styles.marginTop}get marginRight(){return this.styles.marginRight}get marginBottom(){return this.styles.marginBottom}get marginLeft(){return this.styles.marginLeft}get paddingTop(){return this.styles.paddingTop}get paddingRight(){return this.styles.paddingRight}get paddingBottom(){return this.styles.paddingBottom}get paddingLeft(){return this.styles.paddingLeft}get overflowX(){return this.styles.overflowX}get overflowY(){return this.styles.overflowY}get opacity(){return this.styles.opacity}get visibility(){return this.styles.visibility}get transform(){return this.styles.transform}get transformOrigin(){return this.styles.transformOrigin}get rotate(){return this.styles.rotate}get zoom(){return this.styles.zoom}get clipPath(){return this.styles.clipPath}get mixBlendMode(){return this.styles.mixBlendMode}get filter(){return this.styles.filter}get imageRendering(){return this.styles.imageRendering}get objectFit(){return this.styles.objectFit}get objectPosition(){return this.styles.objectPosition}get boxDecorationBreak(){return this.styles.boxDecorationBreak}get listStyleImage(){return this.styles.listStyleImage}get listStylePosition(){return this.styles.listStylePosition}get listStyleType(){return this.styles.listStyleType}get animationDuration(){return this.styles.animationDuration}isVisible(){return this.styles.isVisible()}isTransparent(){return this.styles.isTransparent()}isTransformed(){return this.styles.isTransformed()}isPositioned(){return this.styles.isPositioned()}isPositionedWithZIndex(){return this.styles.isPositionedWithZIndex()}isFloating(){return this.styles.isFloating()}isInlineLevel(){return this.styles.isInlineLevel()}},Ko=class{animationDuration;backgroundClip;backgroundColor;backgroundImage;backgroundOrigin;backgroundPosition;backgroundRepeat;backgroundSize;borderTopColor;borderRightColor;borderBottomColor;borderLeftColor;borderTopLeftRadius;borderTopRightRadius;borderBottomRightRadius;borderBottomLeftRadius;borderTopStyle;borderRightStyle;borderBottomStyle;borderLeftStyle;borderTopWidth;borderRightWidth;borderBottomWidth;borderLeftWidth;boxShadow;clipPath;color;direction;display;float;fontFamily;fontSize;fontStyle;fontVariant;fontWeight;letterSpacing;lineBreak;lineHeight;listStyleImage;listStylePosition;listStyleType;marginTop;marginRight;marginBottom;marginLeft;opacity;overflowX;overflowY;overflowWrap;paddingTop;paddingRight;paddingBottom;paddingLeft;paintOrder;position;textAlign;textDecorationColor;textDecorationLine;textDecorationStyle;textDecorationThickness;textUnderlineOffset;textShadow;textTransform;textOverflow;transform;transformOrigin;rotate;translate;scale;visibility;webkitTextStrokeColor;webkitTextStrokeWidth;webkitLineClamp;wordBreak;whiteSpace;writingMode;zIndex;objectFit;imageRendering;mixBlendMode;filter;fontVariantLigatures;zoom;objectPosition;backgroundBlendMode;borderImageSource;borderImageSlice;borderImageRepeat;boxDecorationBreak;accentColor;webkitTextFillColor;isolation;outlineColor;outlineStyle;outlineWidth;outlineOffset;backdropFilter;maskImage;maskPosition;maskRepeat;maskSize;textEmphasisStyle;textEmphasisColor;textEmphasisPosition;borderImageWidth;borderImageOutset;webkitBoxReflect;_border;_background;_font;_layout;get border(){return this._border??=new Ho(this)}get background(){return this._background??=new Uo(this)}get font(){return this._font??=new Wo(this)}get layout(){return this._layout??=new Go(this)}constructor(e,t){if(t.display===`none`){this.display=0;for(let[t,n]of zo)t!==`display`&&(this[t]=Vo(e,n,void 0));Object.assign(this,qo(e,null))}else{for(let[n,r,i]of zo)this[n]=Vo(e,r,t[i]);Object.assign(this,qo(e,t))}}isVisible(){return this.display>0&&this.opacity>0&&this.visibility===0}isTransparent(){return R(this.backgroundColor)}isTransformed(){return this.transform!==null||this.rotate!==null||this.translate!==null||this.scale!==null}isPositioned(){return this.position!==0}isPositionedWithZIndex(){return this.isPositioned()&&!this.zIndex.auto}isFloating(){return this.float!==0}isInlineLevel(){return H(this.display,4)||H(this.display,33554432)||H(this.display,268435456)||H(this.display,536870912)||H(this.display,67108864)||H(this.display,134217728)}};let qo=(e,t)=>{let n=(e,n)=>{if(t)return t[e]??n},r=Vo(e,xr,n(`overflow`));return{float:Vo(e,br,n(`cssFloat`)),textDecorationColor:Vo(e,Sr,n(`textDecorationColor`,n(`color`))),textDecorationLine:Vo(e,Cr,n(`textDecorationLine`,n(`textDecoration`))),overflowX:r[0],overflowY:r[+(r.length>1)]}};var Jo=class{content;quotes;constructor(e,t){this.content=Vo(e,wr,t.content),this.quotes=Vo(e,Tr,t.quotes)}},Yo=class{counterIncrement;counterReset;constructor(e,t){this.counterIncrement=Vo(e,Or,t.counterIncrement),this.counterReset=Vo(e,kr,t.counterReset)}};let Xo=e=>{if(typeof e.getAttribute!=`function`)return 0;switch(e.getAttribute(`data-html2canvas-debug`)){case`all`:return 1;case`clone`:return 2;case`parse`:return 3;case`render`:return 4;default:return 0}},Zo=(e,t)=>{let n=Xo(e);return n===1||t===n},Qo=e=>{let t=``;for(let n of e)try{let e=n.cssRules;for(let n=0;n<e.length;n++){let r=e[n];r&&typeof r.cssText==`string`&&(t+=r.cssText)}}catch{}return t},$o=(e,t,n)=>{let r=Qo(t);if(!r)return null;let i=e.createElement(`style`);return i.textContent=r,n&&(i.nonce=n),i};var es=class{cloneNodeFn;options;context;constructor(e,t,n){this.cloneNodeFn=e,this.options=t,this.context=n}appendChildNode(e,t,n){this.safeAppendClonedChild(e,t,n)}cloneChildNodes(e,t,n){e.shadowRoot&&t.shadowRoot?(this.cloneShadowDOMChildren(e.shadowRoot,t.shadowRoot,n),this.cloneLightDOMChildren(e,t,n)):e.shadowRoot&&!t.shadowRoot?this.cloneShadowDOMAsLightDOM(e.shadowRoot,t,n):this.cloneLightDOMChildren(e,t,n)}shouldCloneChild(e){return!Fn(e)||!Jn(e)&&!e.hasAttribute(`data-html2canvas-ignore`)&&(typeof this.options.ignoreElements!=`function`||!this.options.ignoreElements(e))}shouldCloneStyleElement(e){return!this.options.copyStyles||!Fn(e)||!qn(e)}safeAppendClonedChild(e,t,n){this.shouldCloneChild(t)&&this.shouldCloneStyleElement(t)&&e.appendChild(this.cloneNodeFn(t,n))}cloneAssignedNodes(e,t,n){e.forEach(e=>{this.safeAppendClonedChild(t,e,n)})}cloneSlotFallbackContent(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)this.safeAppendClonedChild(t,r,n)}cloneSlotElement(e,t,n){if(!Zn(e))return;let r=e;if(typeof r.assignedNodes!=`function`){this.context.logger.warn(`HTMLSlotElement.assignedNodes is not available`,e),this.cloneSlotFallbackContent(e,t,n);return}let i=r.assignedNodes();!i||!Array.isArray(i)?(this.context.logger.warn(`assignedNodes() did not return a valid array`,e),this.cloneSlotFallbackContent(e,t,n)):i.length>0?this.cloneAssignedNodes(i,t,n):this.cloneSlotFallbackContent(e,t,n)}cloneShadowDOMChildren(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)Fn(r)&&Zn(r)?this.cloneSlotElement(r,t,n):this.safeAppendClonedChild(t,r,n);this.appendAdoptedStyleSheets(e,t,n)}cloneLightDOMChildren(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n)}cloneSlotElementAsLightDOM(e,t,n){if(!Zn(e))return;let r=e;if(typeof r.assignedNodes!=`function`){for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n);return}let i=r.assignedNodes();if(i&&Array.isArray(i)&&i.length>0)i.forEach(e=>this.appendChildNode(t,e,n));else for(let r=e.firstChild;r;r=r.nextSibling)this.appendChildNode(t,r,n)}cloneShadowDOMAsLightDOM(e,t,n){for(let r=e.firstChild;r;r=r.nextSibling)Fn(r)&&Zn(r)?this.cloneSlotElementAsLightDOM(r,t,n):this.appendChildNode(t,r,n);this.appendAdoptedStyleSheets(e,t,n)}appendAdoptedStyleSheets(e,t,n){if(n)return;let r=e.adoptedStyleSheets;if(!r||r.length===0)return;let i=`host`in t?t.host.ownerDocument:t.ownerDocument;if(!i)return;let a=$o(i,r,this.options.cspNonce);a&&t.appendChild(a)}};let ts=[`all`,`d`,`content`],ns=(e,t)=>{let n=[];for(let t=e.length-1;t>=0;t--){let r=e.item(t);if(ts.indexOf(r)===-1&&!r.startsWith(`--`)){let t=e.getPropertyValue(r);if(t){let i=e.getPropertyPriority(r);n.push(i?`${r}:${t} !${i}`:`${r}:${t}`)}}}return n.length>0&&(t.style.cssText=n.join(`;`)+`;`),t},rs=`___html2canvas___pseudoelement_before`,is=`___html2canvas___pseudoelement_after`,as=`{
7
7
  content: "" !important;
8
8
  display: none !important;
9
- }`,lc=(e,t)=>{uc(e,`.${oc}:before${cc}
10
- .${sc}:after${cc}`,t)},uc=(e,t,n)=>{let r=e.ownerDocument;if(r){let i=r.createElement(`style`);i.textContent=t,n&&(i.nonce=n),e.appendChild(i)}};var dc=class{constructor(e,t){this.context=e,this.counters=t,this.quoteDepth=0}resolvePseudoContent(e,t,n,r){if(!n)return;let i=n.content,a=t.ownerDocument;if(!a||!i||i===`none`||i===`-moz-alt-content`||n.display===`none`)return;this.counters.parse(new ec(this.context,n));let o=new $s(this.context,n),s=a.createElement(`html2canvaspseudoelement`);ac(n,s),o.content.forEach(t=>{if(t.type===0)s.appendChild(a.createTextNode(t.value));else if(t.type===22){let e=a.createElement(`img`);e.src=t.value,e.style.opacity=`1`,s.appendChild(e)}else if(t.type===18){if(t.name===`attr`){let n=t.values.filter(A);n.length&&n[0]&&s.appendChild(a.createTextNode(e.getAttribute(n[0].value)||``))}else if(t.name===`counter`){let[e,n]=t.values.filter(j);if(e&&A(e)){let t=this.counters.getCounterValue(e.value),r=n&&A(n)?mi.parse(this.context,n.value):3;s.appendChild(a.createTextNode(Oi(t,r,!1)))}}else if(t.name===`counters`){let[e,n,r]=t.values.filter(j);if(e&&A(e)){let t=this.counters.getCounterValues(e.value),i=r&&A(r)?mi.parse(this.context,r.value):3,o=n&&n.type===0?n.value:``,c=t.map(e=>Oi(e,i,!1)).join(o);s.appendChild(a.createTextNode(c))}}}else if(t.type===20)switch(t.value){case`open-quote`:s.appendChild(a.createTextNode(Li(o.quotes,this.quoteDepth++,!0)));break;case`close-quote`:{let e=this.quoteDepth>0;this.quoteDepth=Math.max(0,this.quoteDepth-1),e&&s.appendChild(a.createTextNode(Li(o.quotes,this.quoteDepth,!1)));break}default:s.appendChild(a.createTextNode(t.value))}}),s.className=`${oc} ${sc}`;let c=r===0?` ${oc}`:` ${sc}`;return Jr(t)?t.className.baseValue+=c:t.className+=c,s}};let fc=(e,t,n)=>{let r=e.createElement(`iframe`);return r.className=`html2canvas-container`,r.style.visibility=`hidden`,r.style.position=`fixed`,r.style.left=`-10000px`,r.style.top=`0px`,r.style.border=`0`,r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling=`no`,r.setAttribute(`data-html2canvas-ignore`,`true`),(n||e.body).appendChild(r),r},pc=e=>new Promise(t=>{if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t}),mc=e=>Promise.all([].slice.call(e.images,0).map(pc)),hc=e=>new Promise((t,n)=>{let r=e.contentWindow;if(!r)return n(`No window assigned for iframe`);let i=r.document;r.onload=e.onload=()=>{r.onload=e.onload=null;let n=0,a=setInterval(()=>{n++,(i.body.childNodes.length>0&&i.readyState===`complete`||n>=600)&&(clearInterval(a),t(e))},50)}}),gc=e=>{let t=``;return e&&(t+=`<!DOCTYPE `,e.name&&(t+=e.name),e.internalSubset&&(t+=` `+e.internalSubset.replace(/"/g,`&quot;`).replace(/>/g,`&gt;`)),e.publicId?(t+=` PUBLIC "`+e.publicId.replace(/"/g,`&quot;`)+`"`,e.systemId&&(t+=` "`+e.systemId.replace(/"/g,`&quot;`)+`"`)):e.systemId&&(t+=` SYSTEM "`+e.systemId.replace(/"/g,`&quot;`)+`"`),t+=`>`),t},_c=(e,t,n)=>{e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},vc=([e,t,n])=>{e.scrollLeft=t,e.scrollTop=n},yc=(e,t)=>{let n=e.ownerDocument.createElement(`base`);n.href=t;let r=e.getElementsByTagName(`head`).item(0);r?.insertBefore(n,r?.firstChild??null)},bc=(e,t,n,r)=>{let i=fc(t,n,r.container);if(!i.contentWindow)throw Error(`Unable to find iframe window`);let a=t.defaultView.pageXOffset,o=t.defaultView.pageYOffset,s=i.contentWindow,c=s.document,l=hc(i).then(async()=>{r.scrolledElements.forEach(vc),s&&s.scrollTo(n.left,n.top);let t=r.onclone,a=r.clonedReferenceElement;if(a===void 0)throw Error(`Error finding the ${r.referenceElementName} in the cloned document`);return c.fonts&&c.fonts.ready&&await c.fonts.ready,/(AppleWebKit)/g.test(navigator.userAgent)&&await mc(c),typeof t==`function`&&await Promise.resolve().then(()=>t(c,a)),s.scrollTo(n.left,n.top),/AppleWebKit/g.test(navigator.userAgent)&&(s.scrollY!==n.top||s.scrollX!==n.left)&&(e.logger.warn(`Unable to restore scroll position for cloned document`),e.adjustWindowBounds(s.scrollX-n.left,s.scrollY-n.top)),i}),u=t.baseURI;c.open();let d=gc(document.doctype)+`<html></html>`;try{let e=t.defaultView,n=e&&e.trustedTypes,r=n?.getPolicy?.(`html2canvas-pro`);!r&&n&&(r=n.createPolicy(`html2canvas-pro`,{createHTML:e=>e}));let i=r?r.createHTML(d):d;c.write(i)}catch{c.write(d)}_c(t,a,o),c.close();let f=c.adoptNode(r.documentElement);return yc(f,u),c.replaceChild(f,c.documentElement),l},xc=e=>{let t=e;for(;t;){if(t.parentNode&&t.parentNode.host)return t.parentNode;let e=t.getRootNode();if(e&&e!==t.ownerDocument&&e.host)return e;t=t.parentNode}return null};for(var Sc=class{constructor(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new hi,this.pseudoContents=new dc(e,this.counters),this.slotCloner=new rc((e,t)=>this.cloneNode(e,t),{ignoreElements:n.ignoreElements,copyStyles:n.copyStyles??!0},e),!t.ownerDocument)throw Error(`Cloned element does not have an owner document`);if(!this.options.iframeContainer){let e=xc(t);e&&(this.options.iframeContainer=e)}this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}toIFrame(e,t){return bc(this.context,e,t,{documentElement:this.documentElement,clonedReferenceElement:this.clonedReferenceElement,referenceElementName:this.referenceElement.nodeName,scrolledElements:this.scrolledElements,onclone:this.options.onclone,container:this.options.iframeContainer})}createElementClone(e){if(nc(e,2))debugger;if(ei(e))return this.createCanvasClone(e);if(ti(e))return this.createVideoClone(e);if(ii(e))return this.createStyleClone(e);let t=e.cloneNode(!1);return ni(t)&&(ni(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=``),t.loading===`lazy`&&(t.loading=`eager`)),di(t)&&!Jr(t)?this.createCustomElementClone(e,t):t}createCustomElementClone(e,t){let n=document.createElement(`div`);n.className=t.className,ac(t.style,n);let r=t.attributes;for(let e=0;e<r.length;e++){let t=r.item(e);t&&t.name!==`class`&&t.name!==`style`&&n.setAttribute(t.name,t.value)}if(e.shadowRoot)try{n.attachShadow({mode:`open`})}catch(e){this.context.logger.error(`Failed to attach shadow root to custom element clone:`,e)}return n}createStyleClone(e){try{let t=e.sheet;if(t&&t.cssRules){let n=[].slice.call(t.cssRules,0).reduce((e,t)=>t&&typeof t.cssText==`string`?e+t.cssText:e,``),r=e.cloneNode(!1);return r.textContent=n,this.options.cspNonce&&(r.nonce=this.options.cspNonce),r}}catch(e){if(this.context.logger.error(`Unable to access cssRules property`,e),e.name!==`SecurityError`)throw e}let t=e.cloneNode(!1);return this.options.cspNonce&&(t.nonce=this.options.cspNonce),t}createCanvasClone(e){if(this.options.inlineImages&&e.ownerDocument){let t=e.ownerDocument.createElement(`img`);try{return t.src=e.toDataURL(),t}catch{this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`,e)}}let t=e.cloneNode(!1);try{t.width=e.width,t.height=e.height;let n=e.getContext(`2d`),r=t.getContext(`2d`,{willReadFrequently:!0});if(r){if(!this.options.allowTaint&&n)r.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{let t=e.getContext(`webgl2`)??e.getContext(`webgl`);t&&t.getContextAttributes()?.preserveDrawingBuffer===!1&&this.context.logger.warn(`Unable to clone WebGL context as it has preserveDrawingBuffer=false`,e),r.drawImage(e,0,0)}}return t}catch{this.context.logger.info(`Unable to clone canvas as it is tainted`,e)}return t}createVideoClone(e){let t=e.ownerDocument.createElement(`canvas`);t.width=e.offsetWidth,t.height=e.offsetHeight;let n=t.getContext(`2d`);try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info(`Unable to clone video as it is tainted`,e)}let r=e.ownerDocument.createElement(`canvas`);return r.width=e.offsetWidth,r.height=e.offsetHeight,r}appendChildNode(e,t,n){this.slotCloner.appendChildNode(e,t,n)}cloneChildNodes(e,t,n){this.slotCloner.cloneChildNodes(e,t,n)}cloneNode(e,t){if(qr(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);let n=e.ownerDocument.defaultView;if(n&&Kr(e)&&(Yr(e)||Jr(e))){let r=this.createElementClone(e);r.style.transitionProperty=`none`;let i=n.getComputedStyle(e),a=pi(e);this.referenceElement===e&&Yr(r)&&(this.clonedReferenceElement=r),$r(r)&&lc(r,this.options.cspNonce);let o=this.counters.parse(new ec(this.context,i));if(a){let t=n.getComputedStyle(e,`:before`),i=this.pseudoContents.resolvePseudoContent(e,r,t,0);i&&r.insertBefore(i,r.firstChild)}if(di(e)&&(t=!0),ti(e)||this.cloneChildNodes(e,r,t),a){let t=n.getComputedStyle(e,`:after`),i=this.pseudoContents.resolvePseudoContent(e,r,t,1);i&&r.appendChild(i)}return this.counters.pop(o),(i&&(this.options.copyStyles||Jr(e))&&!ri(e)||t)&&ac(i,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(oi(e)||si(e))&&(oi(r)||si(r))&&(r.value=e.value),r}return e.cloneNode(!1)}static destroy(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1}},Cc=class{static normalizeElement(e,t){let n={};return Yr(e)?(t.animationDuration.some(e=>e>0)&&(n.animationDuration=e.style.animationDuration,e.style.animationDuration=`0s`),t.transform!==null&&(n.transform=e.style.transform,e.style.transform=`translate(0, 0)`),t.rotate!==null&&(n.rotate=e.style.rotate,e.style.rotate=`0deg`,n.transform===void 0&&(n.transform=e.style.transform,e.style.transform=`translate(0, 0)`)),n):n}static restoreElement(e,t){Yr(e)&&(t.animationDuration!==void 0&&(e.style.animationDuration=t.animationDuration),t.transform!==void 0&&(e.style.transform=t.transform),t.rotate!==void 0&&(e.style.rotate=t.rotate))}},wc=class{constructor(e,t,n={}){if(this.context=e,this.textNodes=[],this.elements=[],this.createsStackingContext=!1,this.createsRealStackingContext=!1,this.isListOwner=!1,this.debugRender=!1,nc(t,3))debugger;if(this.styles=new Zs(e,e.config.window.getComputedStyle(t,null)),n.normalizeDom!==!1&&Yr(t)&&(this.originalStyles=Cc.normalizeElement(t,this.styles),this.originalElement=t),this.bounds=o(this.context,t),t.tagName===`FIELDSET`){let e=t.querySelector(`:scope > legend`);if(e){let t=o(this.context,e);this.legendBounds=t;let n=t.top+t.height/2-this.styles.borderTopWidth/2;this.bounds=new a(this.bounds.left,n,this.bounds.width,this.bounds.height-(n-this.bounds.top))}}nc(t,4)&&(this.debugRender=!0)}restore(){this.originalStyles&&this.originalElement&&(Cc.restoreElement(this.originalElement,this.originalStyles),this.originalStyles=void 0,this.originalElement=void 0)}restoreTree(){this.restore();for(let e of this.elements)e.restoreTree()}},Tc=`AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAg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AAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=`,Ec=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Dc=typeof Uint8Array>`u`?[]:/* @__PURE__ */ new Uint8Array(256),Oc=0;Oc<Ec.length;Oc++)Dc[Ec.charCodeAt(Oc)]=Oc;for(var kc=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=Dc[e.charCodeAt(r)],o=Dc[e.charCodeAt(r+1)],s=Dc[e.charCodeAt(r+2)],c=Dc[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Ac=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},jc=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Mc=5,Nc=11,Pc=2,Fc=Nc-Mc,Ic=65536>>Mc,Lc=(1<<Mc)-1,Rc=Ic+(1024>>Mc)+32,zc=65536>>Nc,Bc=(1<<Fc)-1,Vc=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Hc=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},Uc=function(e,t){var n=kc(e),r=Array.isArray(n)?jc(n):new Uint32Array(n),i=Array.isArray(n)?Ac(n):new Uint16Array(n),a=24,o=Vc(i,a/2,r[4]/2),s=r[5]===2?Vc(i,(a+r[4])/2):Hc(r,Math.ceil((a+r[4])/4));return new Wc(r[0],r[1],r[2],r[3],o,s)},Wc=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Mc],t=(t<<Pc)+(e&Lc),this.data[t];if(e<=65535)return t=this.index[Ic+(e-55296>>Mc)],t=(t<<Pc)+(e&Lc),this.data[t];if(e<this.highStart)return t=Rc-zc+(e>>Nc),t=this.index[t],t+=e>>Mc&Bc,t=this.index[t],t=(t<<Pc)+(e&Lc),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Gc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Kc=typeof Uint8Array>`u`?[]:/* @__PURE__ */ new Uint8Array(256),qc=0;qc<Gc.length;qc++)Kc[Gc.charCodeAt(qc)]=qc;var Jc=1,Yc=2,Xc=3,Zc=4,Qc=5,$c=7,el=8,tl=9,nl=10,rl=11,il=12,al=13,ol=14,sl=15,cl=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},ll=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return``;for(var r=[],i=-1,a=``;++i<n;){var o=e[i];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},ul=Uc(Tc),dl=`×`,fl=`÷`,pl=function(e){return ul.get(e)},ml=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],o=t[n];if(a===Yc&&o===Xc)return dl;if(a===Yc||a===Xc||a===Zc||o===Yc||o===Xc||o===Zc)return fl;if(a===el&&[el,tl,rl,il].indexOf(o)!==-1||(a===rl||a===tl)&&(o===tl||o===nl)||(a===il||a===nl)&&o===nl||o===al||o===Qc||o===$c||a===Jc)return dl;if(a===al&&o===ol){for(;i===Qc;)i=t[--r];if(i===ol)return dl}if(a===sl&&o===sl){for(var s=0;i===sl;)s++,i=t[--r];if(s%2==0)return dl}return fl},hl=function(e){var t=cl(e),n=t.length,r=0,i=0,a=t.map(pl);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=dl;r<n&&(e=ml(t,a,++r))===dl;);if(e!==dl||r===n){var o=ll.apply(null,t.slice(i,r));return i=r,{value:o,done:!1}}return{done:!0,value:null}}}},gl=function(e){for(var t=hl(e),n=[],r;!(r=t.next()).done;)r.value&&n.push(r.value.slice());return n};let _l=e=>{if(e.createRange){let t=e.createRange();if(t.getBoundingClientRect){let n=e.createElement(`boundtest`);n.style.height=`123px`,n.style.display=`block`,e.body.appendChild(n),t.selectNode(n);let r=t.getBoundingClientRect(),i=Math.round(r.height);if(e.body.removeChild(n),i===123)return!0}}return!1},vl=e=>{let t=e.createElement(`boundtest`);t.style.width=`50px`,t.style.display=`block`,t.style.fontSize=`12px`,t.style.letterSpacing=`0px`,t.style.wordSpacing=`0px`,e.body.appendChild(t);let n=e.createRange();t.innerHTML=typeof``.repeat==`function`?`&#128104;`.repeat(10):``;let r=t.firstChild,i=c(r.data).map(e=>l(e)),a=0,o={},s=i.every((e,t)=>{n.setStart(r,a),n.setEnd(r,a+e.length);let i=n.getBoundingClientRect();a+=e.length;let s=i.x>o.x||i.y>o.y;return o=i,t===0||s});return e.body.removeChild(t),s},yl=()=>new Image().crossOrigin!==void 0,bl=()=>typeof new XMLHttpRequest().responseType==`string`,xl=e=>{let t=new Image,n=e.createElement(`canvas`),r=n.getContext(`2d`);if(!r)return!1;t.src=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>`;try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},Sl=e=>e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255,Cl=e=>{let t=e.createElement(`canvas`);t.width=100,t.height=100;let n=t.getContext(`2d`);if(!n)return Promise.reject(/* @__PURE__ */ Error(`Failed to get 2D rendering context`));n.fillStyle=`rgb(0, 255, 0)`,n.fillRect(0,0,100,100);let r=new Image,i=t.toDataURL();r.src=i;let a=wl(100,100,0,0,r);return n.fillStyle=`red`,n.fillRect(0,0,100,100),Tl(a).then(t=>{n.drawImage(t,0,0);let r=n.getImageData(0,0,100,100).data;n.fillStyle=`red`,n.fillRect(0,0,100,100);let a=e.createElement(`div`);return a.style.backgroundImage=`url(${i})`,a.style.height=`100px`,Sl(r)?Tl(wl(100,100,0,0,a)):Promise.reject(/* @__PURE__ */ Error(`ForeignObject rendering not supported`))}).then(e=>(n.drawImage(e,0,0),Sl(n.getImageData(0,0,100,100).data))).catch(()=>!1)},wl=(e,t,n,r,i)=>{let a=`http://www.w3.org/2000/svg`,o=document.createElementNS(a,`svg`),s=document.createElementNS(a,`foreignObject`);return o.setAttributeNS(null,`width`,e.toString()),o.setAttributeNS(null,`height`,t.toString()),s.setAttributeNS(null,`width`,`100%`),s.setAttributeNS(null,`height`,`100%`),s.setAttributeNS(null,`x`,n.toString()),s.setAttributeNS(null,`y`,r.toString()),s.setAttributeNS(null,`externalResourcesRequired`,`true`),o.appendChild(s),s.appendChild(i),o},Tl=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(e))}`}),q={get SUPPORT_RANGE_BOUNDS(){"use strict";let e=_l(document);return Object.defineProperty(q,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){"use strict";let e=q.SUPPORT_RANGE_BOUNDS&&vl(document);return Object.defineProperty(q,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){"use strict";let e=xl(document);return Object.defineProperty(q,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){"use strict";let e=typeof Array.from==`function`&&typeof window.fetch==`function`?Cl(document):Promise.resolve(!1);return Object.defineProperty(q,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){"use strict";let e=yl();return Object.defineProperty(q,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){"use strict";let e=bl();return Object.defineProperty(q,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){"use strict";let e=`withCredentials`in new XMLHttpRequest;return Object.defineProperty(q,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){"use strict";let e=!!(typeof Intl<`u`&&Intl.Segmenter);return Object.defineProperty(q,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}};var El=class{constructor(e,t){this.text=e,this.bounds=t}};let Dl=(e,t,n,r)=>{let i=Pl(t,n),o=[],s=0;return i.forEach(t=>{if(n.textDecorationLine.length||t.trim().length>0){if(q.SUPPORT_RANGE_BOUNDS){let n=kl(r,s,t.length).getClientRects();if(n.length>1){let n=Ml(t),i=0;n.forEach(t=>{o.push(new El(t,a.fromDOMRectList(e,kl(r,i+s,t.length).getClientRects()))),i+=t.length})}else o.push(new El(t,a.fromDOMRectList(e,n)))}else{let n=r.splitText(t.length);o.push(new El(t,Ol(e,r))),r=n}}else q.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length}),o},Ol=(e,t)=>{let n=t.ownerDocument;if(n){let r=n.createElement(`html2canvaswrapper`);r.appendChild(t.cloneNode(!0));let i=t.parentNode;if(i){i.replaceChild(r,t);let n=o(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),n}}return a.EMPTY},kl=(e,t,n)=>{let r=e.ownerDocument;if(!r)throw Error(`Node has no owner document`);let i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Al=/* @__PURE__ */ new Map,jl=e=>{let t=Al.get(e);if(!t){let n=Intl.Segmenter;t=new n(void 0,{granularity:e}),Al.set(e,t)}return t},Ml=e=>q.SUPPORT_NATIVE_TEXT_SEGMENTATION?Array.from(jl(`grapheme`).segment(e)).map(e=>e.segment):gl(e),Nl=(e,t)=>q.SUPPORT_NATIVE_TEXT_SEGMENTATION?Array.from(jl(`word`).segment(e)).map(e=>e.segment):Il(e,t),Pl=(e,t)=>Ho(t.writingMode)?Ml(e):t.letterSpacing===0?Nl(e,t):Ml(e),Fl=[32,160,4961,65792,65793,4153,4241],Il=(e,t)=>{let n=_t(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===`break-word`?`break-word`:t.wordBreak}),r=[],i;for(;!(i=n.next()).done;)if(i.value){let e=c(i.value.slice()),t=``;e.forEach(e=>{Fl.indexOf(e)===-1?t+=l(e):(t.length&&r.push(t),r.push(l(e)),t=``)}),t.length&&r.push(t)}return r};var Ll=class{constructor(e,t,n){this.text=Rl(t.data,n.textTransform),this.text.length!==t.data.length&&(t.data=this.text),this.textBounds=Dl(e,this.text,n,t)}};let Rl=(e,t)=>{switch(t){case 1:return e.toLowerCase();case 3:return e.replace(zl,Bl);case 2:return e.toUpperCase();default:return e}},zl=/(^|\s|:|-|\(|\))([a-z])/g,Bl=(e,t,n)=>e.length>0?t+n.toUpperCase():e;var Vl=class extends wc{constructor(e,t){super(e,t),this.src=t.currentSrc||t.src,this.intrinsicWidth=t.naturalWidth,this.intrinsicHeight=t.naturalHeight,this.context.cache.addImage(this.src)}},Hl=class extends wc{constructor(e,t){super(e,t),this.canvas=t,this.intrinsicWidth=t.width,this.intrinsicHeight=t.height}};let Ul=[`position`,`inset`,`top`,`right`,`bottom`,`left`,`inset-inline`,`inset-inline-start`,`inset-inline-end`,`inset-block`,`inset-block-start`,`inset-block-end`,`margin`,`margin-top`,`margin-right`,`margin-bottom`,`margin-left`,`margin-inline`,`margin-inline-start`,`margin-inline-end`,`margin-block`,`margin-block-start`,`margin-block-end`],Wl=(e,t)=>{let n=t.getAttribute(`style`);Ul.forEach(e=>t.style.removeProperty(e));let r=e.serializeToString(t);return n===null?t.removeAttribute(`style`):t.setAttribute(`style`,n),r};var Gl=class extends wc{constructor(e,t){super(e,t);let n=new XMLSerializer,r=o(e,t);t.setAttribute(`width`,`${r.width}px`),t.setAttribute(`height`,`${r.height}px`),this.svg=`data:image/svg+xml,${encodeURIComponent(Wl(n,t))}`,this.intrinsicWidth=t.width.baseVal.value,this.intrinsicHeight=t.height.baseVal.value,this.context.cache.addImage(this.svg)}},Kl=class extends wc{constructor(e,t){super(e,t),this.value=t.value}},ql=class extends wc{constructor(e,t){super(e,t),this.start=t.start,this.reversed=typeof t.reversed==`boolean`&&t.reversed===!0}};let Jl=[{type:15,flags:0,unit:`px`,number:3}],Yl=[{type:16,flags:0,number:50}],Xl=e=>e.width>e.height?new a(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new a(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e,Zl=e=>{let t=e.type===`password`?Array(e.value.length+1).join(`•`):e.value;return t.length===0?e.placeholder||``:t},Ql=e=>e.value.length===0&&!!e.placeholder;var $l=class extends wc{constructor(e,t){switch(super(e,t),this.type=t.type.toLowerCase(),this.checked=t.checked,this.value=Zl(t),this.isPlaceholder=Ql(t),(this.type===`checkbox`||this.type===`radio`)&&(this.styles.backgroundColor=3739148031,this.styles.borderTopColor=this.styles.borderRightColor=this.styles.borderBottomColor=this.styles.borderLeftColor=2779096575,this.styles.borderTopWidth=this.styles.borderRightWidth=this.styles.borderBottomWidth=this.styles.borderLeftWidth=1,this.styles.borderTopStyle=this.styles.borderRightStyle=this.styles.borderBottomStyle=this.styles.borderLeftStyle=1,this.styles.backgroundClip=[0],this.styles.backgroundOrigin=[0],this.bounds=Xl(this.bounds)),this.type){case`checkbox`:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Jl;break;case`radio`:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Yl}}},eu=class extends wc{constructor(e,t){super(e,t);let n=t.options[t.selectedIndex||0];this.value=n&&n.text||``}},tu=class extends wc{constructor(e,t){super(e,t),this.value=t.value}},nu=class extends wc{constructor(e,t,n){super(e,t),this.src=t.src,this.width=parseInt(t.width,10)||0,this.height=parseInt(t.height,10)||0,this.backgroundColor=this.styles.backgroundColor,this.parseTreeFn=n;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement&&this.parseTreeFn){this.tree=this.parseTreeFn(e,t.contentWindow.document.documentElement);let n=t.contentWindow.document.documentElement?Wr(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):0,r=t.contentWindow.document.body?Wr(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):0;this.backgroundColor=On(n)?On(r)?this.styles.backgroundColor:r:n}}catch{}}};let ru=[`OL`,`UL`,`MENU`],iu=(e,t,n,r,i=1)=>{for(let a=t.firstChild,o;a;a=o)o=a.nextSibling,au(e,a,n,r,i)},au=(e,t,n,r,i=1)=>{if(qr(t)&&t.data.length>0){let r=new Ll(e,t,n.styles);if(i!==1){let e=n.bounds.left,t=n.bounds.top;r.textBounds=r.textBounds.map(n=>new El(n.text,new a(e+(n.bounds.left-e)/i,t+(n.bounds.top-t)/i,n.bounds.width/i,n.bounds.height/i)))}n.textNodes.push(r)}else if(Kr(t)){if(ci(t)&&t.assignedNodes)t.assignedNodes().forEach(t=>au(e,t,n,r,i));else{let o=ou(e,t),s=o.styles.zoom||1;if(s!==1&&(o.bounds=new a(o.bounds.left,o.bounds.top,o.bounds.width/s,o.bounds.height/s)),o.styles.isVisible()){cu(t,o,r)?o.createsRealStackingContext=!0:lu(o.styles)&&(o.createsStackingContext=!0),ru.indexOf(t.tagName)!==-1&&(o.isListOwner=!0),n.elements.push(o);let a=i*(o.styles.zoom||1);t.shadowRoot?iu(e,t.shadowRoot,o,r,a):!oi(t)&&!Qr(t)&&!si(t)&&iu(e,t,o,r,a)}}}},ou=(e,t)=>ni(t)?new Vl(e,t):ei(t)?new Hl(e,t):Qr(t)?new Gl(e,t):li(t)?new Kl(e,t):ui(t)?new ql(e,t):Xr(t)?new $l(e,t):si(t)?new eu(e,t):oi(t)?new tu(e,t):ri(t)?new nu(e,t,su):new wc(e,t),su=(e,t)=>{let n=ou(e,t);return n.createsRealStackingContext=!0,iu(e,t,n,n),n},cu=(e,t,n)=>t.styles.isPositionedWithZIndex()||t.styles.opacity<1||!!t.styles.filter||!!t.styles.backdropFilter||t.styles.maskImage.length>0||!!t.styles.webkitBoxReflect||t.styles.isolation===1||t.styles.isTransformed()||$r(e)&&n.styles.isTransparent(),lu=e=>e.isPositioned()||e.isFloating()||e.mixBlendMode!==K.NORMAL?!0:U(e.display,268435456)||U(e.display,33554432)||U(e.display,536870912)||U(e.display,134217728),uu=(e,t)=>e.length===t.length&&e.some((e,n)=>e===t[n]),du=(e,t,n,r,i)=>e.map((e,a)=>{switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e});var J=class e{constructor(e,t){this.type=0,this.x=e,this.y=t}add(t,n){return new e(this.x+t,this.y+n)}};let fu=(e,t,n)=>new J(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n);var pu=class e{constructor(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}subdivide(t,n){let r=fu(this.start,this.startControl,t),i=fu(this.startControl,this.endControl,t),a=fu(this.endControl,this.end,t),o=fu(r,i,t),s=fu(i,a,t),c=fu(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)}add(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))}reverse(){return new e(this.end,this.endControl,this.startControl,this.start)}};let Y=e=>e.type===1;var mu=class{constructor(e){let t=e.styles,n=e.bounds,[r,i]=Sn(t.borderTopLeftRadius,n.width,n.height),[a,o]=Sn(t.borderTopRightRadius,n.width,n.height),[s,c]=Sn(t.borderBottomRightRadius,n.width,n.height),[l,u]=Sn(t.borderBottomLeftRadius,n.width,n.height),d=[];d.push((r+a)/n.width),d.push((l+s)/n.width),d.push((i+u)/n.height),d.push((o+c)/n.height);let f=Math.max(...d);f>1&&(r/=f,i/=f,a/=f,o/=f,s/=f,c/=f,l/=f,u/=f);let p=n.width-a,m=n.height-c,h=n.width-s,g=n.height-u,_=t.borderTopWidth,v=t.borderRightWidth,y=t.borderBottomWidth,b=t.borderLeftWidth,x=z(t.paddingTop,e.bounds.width),S=z(t.paddingRight,e.bounds.width),ee=z(t.paddingBottom,e.bounds.width),C=z(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||i>0?X(n.left+b/3,n.top+_/3,r-b/3,i-_/3,0):new J(n.left+b/3,n.top+_/3),this.topRightBorderDoubleOuterBox=r>0||i>0?X(n.left+p,n.top+_/3,a-v/3,o-_/3,1):new J(n.left+n.width-v/3,n.top+_/3),this.bottomRightBorderDoubleOuterBox=s>0||c>0?X(n.left+h,n.top+m,s-v/3,c-y/3,2):new J(n.left+n.width-v/3,n.top+n.height-y/3),this.bottomLeftBorderDoubleOuterBox=l>0||u>0?X(n.left+b/3,n.top+g,l-b/3,u-y/3,3):new J(n.left+b/3,n.top+n.height-y/3),this.topLeftBorderDoubleInnerBox=r>0||i>0?X(n.left+b*2/3,n.top+_*2/3,r-b*2/3,i-_*2/3,0):new J(n.left+b*2/3,n.top+_*2/3),this.topRightBorderDoubleInnerBox=r>0||i>0?X(n.left+p,n.top+_*2/3,a-v*2/3,o-_*2/3,1):new J(n.left+n.width-v*2/3,n.top+_*2/3),this.bottomRightBorderDoubleInnerBox=s>0||c>0?X(n.left+h,n.top+m,s-v*2/3,c-y*2/3,2):new J(n.left+n.width-v*2/3,n.top+n.height-y*2/3),this.bottomLeftBorderDoubleInnerBox=l>0||u>0?X(n.left+b*2/3,n.top+g,l-b*2/3,u-y*2/3,3):new J(n.left+b*2/3,n.top+n.height-y*2/3),this.topLeftBorderStroke=r>0||i>0?X(n.left+b/2,n.top+_/2,r-b/2,i-_/2,0):new J(n.left+b/2,n.top+_/2),this.topRightBorderStroke=r>0||i>0?X(n.left+p,n.top+_/2,a-v/2,o-_/2,1):new J(n.left+n.width-v/2,n.top+_/2),this.bottomRightBorderStroke=s>0||c>0?X(n.left+h,n.top+m,s-v/2,c-y/2,2):new J(n.left+n.width-v/2,n.top+n.height-y/2),this.bottomLeftBorderStroke=l>0||u>0?X(n.left+b/2,n.top+g,l-b/2,u-y/2,3):new J(n.left+b/2,n.top+n.height-y/2),this.topLeftBorderBox=r>0||i>0?X(n.left,n.top,r,i,0):new J(n.left,n.top),this.topRightBorderBox=a>0||o>0?X(n.left+p,n.top,a,o,1):new J(n.left+n.width,n.top),this.bottomRightBorderBox=s>0||c>0?X(n.left+h,n.top+m,s,c,2):new J(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=l>0||u>0?X(n.left,n.top+g,l,u,3):new J(n.left,n.top+n.height),this.topLeftPaddingBox=r>0||i>0?X(n.left+b,n.top+_,Math.max(0,r-b),Math.max(0,i-_),0):new J(n.left+b,n.top+_),this.topRightPaddingBox=a>0||o>0?X(n.left+Math.min(p,n.width-v),n.top+_,p>n.width+v?0:Math.max(0,a-v),Math.max(0,o-_),1):new J(n.left+n.width-v,n.top+_),this.bottomRightPaddingBox=s>0||c>0?X(n.left+Math.min(h,n.width-b),n.top+Math.min(m,n.height-y),Math.max(0,s-v),Math.max(0,c-y),2):new J(n.left+n.width-v,n.top+n.height-y),this.bottomLeftPaddingBox=l>0||u>0?X(n.left+b,n.top+Math.min(g,n.height-y),Math.max(0,l-b),Math.max(0,u-y),3):new J(n.left+b,n.top+n.height-y),this.topLeftContentBox=r>0||i>0?X(n.left+b+C,n.top+_+x,Math.max(0,r-(b+C)),Math.max(0,i-(_+x)),0):new J(n.left+b+C,n.top+_+x),this.topRightContentBox=a>0||o>0?X(n.left+Math.min(p,n.width+b+C),n.top+_+x,p>n.width+b+C?0:a-b+C,o-(_+x),1):new J(n.left+n.width-(v+S),n.top+_+x),this.bottomRightContentBox=s>0||c>0?X(n.left+Math.min(h,n.width-(b+C)),n.top+Math.min(m,n.height+_+x),Math.max(0,s-(v+S)),c-(y+ee),2):new J(n.left+n.width-(v+S),n.top+n.height-(y+ee)),this.bottomLeftContentBox=l>0||u>0?X(n.left+b+C,n.top+g,Math.max(0,l-(b+C)),u-(y+ee),3):new J(n.left+b+C,n.top+n.height-(y+ee))}};let X=(e,t,n,r,i)=>{let a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case 0:return new pu(new J(e,l),new J(e,l-s),new J(c-o,t),new J(c,t));case 1:return new pu(new J(e,t),new J(e+o,t),new J(c,l-s),new J(c,l));case 2:return new pu(new J(c,t),new J(c,t+s),new J(e+o,l),new J(e,l));default:return new pu(new J(c,l),new J(c-o,l),new J(e,t+s),new J(e,t))}},hu=e=>[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox],gu=e=>[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox],_u=e=>[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox];var vu=class{constructor(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}},yu=class{constructor(e,t){this.path=e,this.target=t,this.type=1}},bu=class{constructor(e){this.opacity=e,this.type=2,this.target=6}},xu=class{constructor(e){this.applyClip=e,this.type=3,this.target=6}};let Su={[K.NORMAL]:`source-over`,[K.MULTIPLY]:`multiply`,[K.SCREEN]:`screen`,[K.OVERLAY]:`overlay`,[K.DARKEN]:`darken`,[K.LIGHTEN]:`lighten`,[K.COLOR_DODGE]:`color-dodge`,[K.COLOR_BURN]:`color-burn`,[K.HARD_LIGHT]:`hard-light`,[K.SOFT_LIGHT]:`soft-light`,[K.DIFFERENCE]:`difference`,[K.EXCLUSION]:`exclusion`,[K.HUE]:`hue`,[K.SATURATION]:`saturation`,[K.COLOR]:`color`,[K.LUMINOSITY]:`luminosity`};var Cu=class{constructor(e){this.mixBlendMode=e,this.type=4,this.target=6,this.compositeOperation=Su[e]}},wu=class e{constructor(t){this.type=5,this.target=6;let n=e.parseDropShadow(t);this.shadow=n.shadow,this.safeFilterString=n.safeFilterString}static parseDropShadow(t){if(!t)return{safeFilterString:``};let n=e.findDropShadows(t);if(n.length===0)return{safeFilterString:t};let r=e.parseDropShadowBody(E(n,0).body),i=``,a=0;for(let e of n)i+=t.slice(a,e.start),a=e.end;return i+=t.slice(a),{shadow:r,safeFilterString:i.replace(/\s+/g,` `).trim()}}static findDropShadows(e){let t=[],n=/drop-shadow\(/gi,r;for(;(r=n.exec(e))!==null;){let n=r.index+12-1,i=r.index,a=1,o=n+1;for(;o<e.length&&a>0;){let t=e[o]??``;t===`(`?a++:t===`)`&&a--,o++}if(a!==0)break;let s=e.slice(n+1,o-1);t.push({body:s,start:i,end:o})}return t}static parseDropShadowBody(t){let n=e.tokenizeFilterArgs(t.trim()),r=[],i;for(let t of n)e.isCSSLength(t)?r.push(parseFloat(t)):t&&(i=t);if(!(r.length<2||r.length>3))return{offsetX:E(r,0),offsetY:E(r,1),blur:r.length>2?E(r,2):0,color:i??`rgba(0,0,0,1)`}}static tokenizeFilterArgs(e){let t=[],n=``,r=0;for(let i=0;i<e.length;i++){let a=e[i]??``;a===`(`?(r++,n+=a):a===`)`?(r--,n+=a):/\s/.test(a)?r>0?n+=a:n&&=(t.push(n),``):n+=a}return n&&t.push(n),t}static isCSSLength(e){return/^-?[\d.]+(px|em|rem|pt|cm|mm|in|pc|ex|ch|vw|vh|vmin|vmax|%)?$/i.test(e)}};let Tu=e=>e.type===0,Eu=e=>e.type===1,Du=e=>e.type===2,Ou=e=>e.type===3,ku=e=>e.type===4,Au=e=>e.type===5;var ju=class{constructor(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}},Mu=class{constructor(e,t){if(this.container=e,this.parent=t,this.effects=[],this.plainEffectsCache=null,this.curves=new mu(this.container),this.container.styles.opacity<1&&this.effects.push(new bu(this.container.styles.opacity)),this.container.styles.rotate!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+z(e[0],this.container.bounds.width),n=this.container.bounds.top+z(e[1],this.container.bounds.height),r=this.container.styles.rotate*Math.PI/180,i=Math.cos(r),a=Math.sin(r),o=[i,a,-a,i,0,0];this.effects.push(new vu(t,n,o))}if(this.container.styles.transform!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+z(e[0],this.container.bounds.width),n=this.container.bounds.top+z(e[1],this.container.bounds.height),r=this.container.styles.transform;this.effects.push(new vu(t,n,r))}if(Nu(this.container.styles)){let e=hu(this.curves),t=_u(this.curves);uu(e,t)?this.effects.push(new yu(e,6)):(this.effects.push(new yu(e,2)),this.effects.push(new yu(t,4)))}if(this.container.styles.clipPath.type!==0){let e=Fu(this.container.styles.clipPath,this.container.bounds);e&&this.effects.push(e)}if(this.container.styles.mixBlendMode!==K.NORMAL&&this.effects.push(new Cu(this.container.styles.mixBlendMode)),this.container.styles.filter!==null&&this.effects.push(new wu(this.container.styles.filter)),this.container.styles.zoom!==1){let e=this.container.bounds.left,t=this.container.bounds.top,n=this.container.styles.zoom,r=[n,0,0,n,0,0];this.effects.push(new vu(e,t,r))}}getEffects(e,t){if(!t){let t=this.plainEffectsCache;t||(t=/* @__PURE__ */ new Map,this.plainEffectsCache=t);let n=t.get(e);return n||(n=this.computeEffects(e),t.set(e,n)),n}return this.computeEffects(e,t)}computeEffects(e,t){let n=[2,3].indexOf(this.container.styles.position)===-1,r=this===t?null:this.parent,i=e=>e.effects.filter(n=>e!==t||!Au(n)&&!Du(n)&&!ku(n)),a=i(this);for(;r;){let e=i(r).filter(e=>!Eu(e));if(n||r.container.styles.position!==0||!r.parent){if(n=[2,3].indexOf(r.container.styles.position)===-1,Nu(r.container.styles)){let e=hu(r.curves),t=_u(r.curves);uu(e,t)||a.unshift(new yu(t,6))}a.unshift(...e)}else a.unshift(...e);r=r===t?null:r.parent}return a.filter(t=>U(t.target,e))}};let Nu=e=>e.overflowX!==0||e.overflowY!==0,Pu=(e,t,n,r,i)=>e===`closest-side`?Math.min(t-n,r-t):e===`farthest-side`?Math.max(t-n,r-t):z(e,i),Fu=(e,t)=>{let{left:n,top:r,width:i,height:a}=t;switch(e.type){case 1:{let t=z(e.left,i),o=z(e.top,a),s=n+t,c=r+o,l=Math.max(0,i-t-z(e.right,i)),u=Math.max(0,a-o-z(e.bottom,a));return new xu(e=>{e.beginPath(),e.rect(s,c,l,u),e.clip()})}case 2:{let t=n+z(e.cx,i),o=r+z(e.cy,a),s;return s=e.radius===`closest-side`?Math.min(t-n,o-r,n+i-t,r+a-o):e.radius===`farthest-side`?Math.max(t-n,o-r,n+i-t,r+a-o):z(e.radius,Math.sqrt(i*i+a*a)/Math.SQRT2),new xu(e=>{e.beginPath(),e.arc(t,o,Math.max(0,s),0,Math.PI*2),e.clip()})}case 3:{let t=n+z(e.cx,i),o=r+z(e.cy,a),s=Pu(e.rx,t,n,n+i,i),c=Pu(e.ry,o,r,r+a,a);return new xu(e=>{e.beginPath(),e.ellipse(t,o,Math.max(0,s),Math.max(0,c),0,0,Math.PI*2),e.clip()})}case 4:{let t=e.points.map(([e,t])=>[n+z(e,i),r+z(t,a)]);return new xu(e=>{if(e.beginPath(),t.length>0){e.moveTo(E(E(t,0),0),E(E(t,0),1));for(let n=1;n<t.length;n++)e.lineTo(E(E(t,n),0),E(E(t,n),1));e.closePath()}e.clip()})}case 5:{let{d:t}=e,i=null;return new xu(e=>{try{i||=new Path2D(t);let a=e.getTransform();e.translate(n,r),e.clip(i),e.setTransform(a)}catch{}})}case 6:{let t=n+z(e.x,i),o=r+z(e.y,a),s=Math.max(0,z(e.width,i)),c=Math.max(0,z(e.height,a));return new xu(e=>{e.beginPath(),e.rect(t,o,s,c),e.clip()})}case 0:return null;default:return null}},Iu=(e,t,n,r)=>{e.container.elements.forEach(i=>{let a=i.createsRealStackingContext,o=i.createsStackingContext,s=new Mu(i,e);U(i.styles.display,2048)&&r.push(s);let c=i.isListOwner?[]:r;if(a||o){let e=a||i.styles.isPositioned()?n:t,r=new ju(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){let t=i.styles.zIndex.order;if(t<0){let n=0;e.negativeZIndex.some((e,r)=>t>e.element.container.styles.zIndex.order?(n=r,!1):n>0),e.negativeZIndex.splice(n,0,r)}else if(t>0){let n=0;e.positiveZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(n=r+1,!1):n>0),e.positiveZIndex.splice(n,0,r)}else e.zeroOrAutoZIndexOrTransformedOrOpacity.push(r)}else i.styles.isFloating()?e.nonPositionedFloats.push(r):e.nonPositionedInlineLevel.push(r);Iu(s,r,a?r:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Iu(s,t,n,c);i.isListOwner&&Lu(i,c)})},Lu=(e,t)=>{let n=e instanceof ql?e.start:1,r=e instanceof ql&&e.reversed;for(let e=0;e<t.length;e++){let i=E(t,e);i.container instanceof Kl&&typeof i.container.value==`number`&&i.container.value!==0&&(n=i.container.value),i.listValue=Oi(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},Ru=e=>{let t=new Mu(e,null),n=new ju(t),r=[];return Iu(t,n,n,r),Lu(t.container,r),n},zu=e=>{let t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Bu=e=>{let t=e.styles,n=e.bounds,r=z(t.paddingLeft,n.width),i=z(t.paddingRight,n.width),a=z(t.paddingTop,n.width),o=z(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Vu=(e,t)=>e===0?t.bounds:e===2?Bu(t):zu(t),Hu=(e,t)=>e===0?t.bounds:e===2?Bu(t):zu(t),Uu=(e,t,n)=>{let r=Vu(qu(e.styles.backgroundOrigin,t),e),i=Hu(qu(e.styles.backgroundClip,t),e),a=Ku(qu(e.styles.backgroundSize,t),n,r),[o,s]=a,c=Sn(qu(e.styles.backgroundPosition,t),r.width-o,r.height-s),l=Ju(qu(e.styles.backgroundRepeat,t),c,a,r,i),u=Math.round(r.left+c[0]),d=Math.round(r.top+c[1]);return o=Math.max(1,o),s=Math.max(1,s),[l,u,d,o,s]},Wu=e=>A(e)&&e.value===`auto`,Gu=e=>typeof e==`number`,Ku=(e,[t,n,r],i)=>{let[a,o]=e;if(!a)return[0,0];if(F(a)&&o&&F(o))return[z(a,i.width),z(o,i.height)];let s=Gu(r);if(A(a)&&(a.value===`contain`||a.value===`cover`))return Gu(r)?i.width/i.height<r==(a.value===`cover`)?[i.height*r,i.height]:[i.width,i.width/r]:[i.width,i.height];let c=Gu(t),l=Gu(n),u=c||l;if(Wu(a)&&(!o||Wu(o)))return c&&l?[t,n]:!s&&!u?[i.width,i.height]:u&&s?[c?t:n*r,l?n:t/r]:[c?t:i.width,l?n:i.height];if(s){let e=0,t=0;return F(a)?e=z(a,i.width):o&&F(o)&&(t=z(o,i.height)),Wu(a)?e=t*r:(!o||Wu(o))&&(t=e/r),[e,t]}let d=null,f=null;if(F(a)?d=z(a,i.width):o&&F(o)&&(f=z(o,i.height)),d!==null&&(!o||Wu(o))&&(f=c&&l?d/t*n:i.height),f!==null&&Wu(a)&&(d=c&&l?f/n*t:i.width),d!==null&&f!==null)return[d,f];throw Error(`Unable to calculate background-size for element`)},qu=(e,t)=>{let n=e[t];return n===void 0?E(e,0):n},Ju=(e,[t,n],[r,i],a,o)=>{switch(e){case 2:return[new J(Math.round(a.left),Math.round(a.top+n)),new J(Math.round(a.left+a.width),Math.round(a.top+n)),new J(Math.round(a.left+a.width),Math.round(i+a.top+n)),new J(Math.round(a.left),Math.round(i+a.top+n))];case 3:return[new J(Math.round(a.left+t),Math.round(a.top)),new J(Math.round(a.left+t+r),Math.round(a.top)),new J(Math.round(a.left+t+r),Math.round(a.height+a.top)),new J(Math.round(a.left+t),Math.round(a.height+a.top))];case 1:return[new J(Math.round(a.left+t),Math.round(a.top+n)),new J(Math.round(a.left+t+r),Math.round(a.top+n)),new J(Math.round(a.left+t+r),Math.round(a.top+n+i)),new J(Math.round(a.left+t),Math.round(a.top+n+i))];default:return[new J(Math.round(o.left),Math.round(o.top)),new J(Math.round(o.left+o.width),Math.round(o.top)),new J(Math.round(o.left+o.width),Math.round(o.height+o.top)),new J(Math.round(o.left),Math.round(o.height+o.top))]}},Z=e=>{if(e?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`)};var Q=class extends Error{};let $=e=>{e.width=e.height=0},Yu=/* @__PURE__ */ new Map;function Xu(e){if(!e||e===`none`)return{blur:0};let t=Yu.get(e);if(t!==void 0)return Yu.delete(e),Yu.set(e,t),t;let n=Zu(e);if(Yu.size>=256){let e=Yu.keys().next().value;e!==void 0&&Yu.delete(e)}return Yu.set(e,n),n}function Zu(e){let t=new wu(e),n=e.match(/drop-shadow\(/g)||[];if(n.length>1||n.length===1&&!t.shadow)return null;let r=t.safeFilterString.match(/^blur\((\d+(?:\.\d+)?)px\)$/);return t.safeFilterString&&!r||r&&n.length&&e.indexOf(`blur(`)>e.indexOf(`drop-shadow(`)?null:{blur:r?Number(r[1]):0,shadow:t.shadow?{x:t.shadow.offsetX,y:t.shadow.offsetY,blur:t.shadow.blur,color:t.shadow.color}:void 0}}function Qu(e){return Math.ceil(3*(e.blur+(e.shadow?.blur??0))+Math.max(Math.abs(e.shadow?.x??0),Math.abs(e.shadow?.y??0)))}function $u(e){let t=document.createElement(`canvas`);return t.width=e.width,t.height=e.height,t}let ed=(e,t)=>new Promise((n,r)=>{let i=e=>{clearTimeout(o),t?.removeEventListener(`abort`,a),e?r(e):n()},a=()=>i(new DOMException(`The operation was aborted.`,`AbortError`)),o=setTimeout(()=>i(new Q(`Filter surface image decode timed out`)),1e4);t?.addEventListener(`abort`,a,{once:!0}),t?.aborted?a():e.decode().then(()=>i(),()=>i(new Q(`Filter surface image decode failed`)))}),td=/* @__PURE__ */ new WeakMap;function nd(e=document){let t=td.get(e);if(t!==void 0)return t;let n=e.createElement(`canvas`),r=e.createElement(`canvas`),i=!1;try{n.width=n.height=r.width=r.height=32;let e=n.getContext(`2d`),t=r.getContext(`2d`);if(e&&t&&`filter`in t){e.fillStyle=`#fff`,e.fillRect(8,8,8,8),t.filter=`blur(2px)`,t.drawImage(n,0,0);let r=(t.getImageData(6,12,1,1).data[3]??0)>0;t.clearRect(0,0,32,32),t.filter=`drop-shadow(12px 0px 0px rgba(255, 0, 0, 0.5))`,t.drawImage(n,0,0);let a=t.getImageData(24,12,1,1).data;i=r&&(a[0]??0)>240&&(a[1]??0)<10&&(a[3]??0)>=126&&(a[3]??0)<=129}}catch{}finally{$(n),$(r)}return td.set(e,i),i}function rd(e,{blur:t,shadow:n},r,i,a){let o,s,c=!1;try{Z(a),o=$u(e);let l=o.getContext(`2d`);if(!l||!(`filter`in l))return null;let u=[];if(t&&u.push(`blur(${t*i}px)`),n&&u.push(`drop-shadow(${n.x*i}px ${n.y*i}px ${n.blur*i}px ${n.color})`),l.filter=u.join(` `),l.filter===`none`)return null;l.drawImage(e,0,0),Z(a),s=$u(e);let d=s.getContext(`2d`);return d?(d.globalAlpha=r,d.drawImage(o,0,0),Z(a),c=!0,s):null}catch{return Z(a),null}finally{o&&$(o),s&&!c&&$(s)}}async function id(e,t,n,r,i){if(Z(i),(t.blur||t.shadow)&&nd()){let a=rd(e,t,n,r,i);if(a)return a}return ad(e,t,n,r,i)}async function ad(e,{blur:t,shadow:n},r,i,a){if(Z(a),!t&&!n){let t=$u(e),n=t.getContext(`2d`);if(!n)throw $(t),new Q(`Filter surface canvas is unavailable`);n.globalAlpha=r;try{return n.drawImage(e,0,0),t}catch{throw $(t),new Q(`Filter surface image cannot be drawn`)}}let o=(e,t={})=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.entries(t).forEach(([e,t])=>n.setAttribute(e,String(t))),n},s=o(`svg`,{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`}),c=o(`defs`),l=o(`filter`,{id:`composited-filter`,filterUnits:`userSpaceOnUse`,x:0,y:0,width:e.width,height:e.height,"color-interpolation-filters":`sRGB`});if(t&&l.appendChild(o(`feGaussianBlur`,{stdDeviation:t*i,result:`blurred-source`})),n){l.appendChild(o(`feGaussianBlur`,{in:t?`blurred-source`:`SourceAlpha`,stdDeviation:n.blur*i})),l.appendChild(o(`feOffset`,{dx:n.x*i,dy:n.y*i,result:`offset-shadow`})),l.appendChild(o(`feFlood`,{"flood-color":n.color})),l.appendChild(o(`feComposite`,{in2:`offset-shadow`,operator:`in`}));let e=o(`feMerge`);e.appendChild(o(`feMergeNode`)),e.appendChild(o(`feMergeNode`,{in:t?`blurred-source`:`SourceGraphic`})),l.appendChild(e)}c.appendChild(l),s.appendChild(c);let u;try{if(u=e.toDataURL(`image/png`),u===`data:,`)throw Error(`Canvas size is unsupported`)}catch{throw new Q(`Filter surface pixels cannot be serialized`)}s.appendChild(o(`image`,{width:e.width,height:e.height,href:u,filter:`url(#composited-filter)`}));let d=new Image,f;try{d.src=`data:image/svg+xml,${encodeURIComponent(new XMLSerializer().serializeToString(s))}`,await ed(d,a),Z(a),f=$u(e);let t=f.getContext(`2d`);if(!t)throw new Q(`Filter surface canvas is unavailable`);return t.globalAlpha=r,t.drawImage(d,0,0),f}catch(e){throw f&&$(f),a?.aborted&&Z(a),e instanceof Q?e:new Q(`Filter surface image cannot be drawn`)}finally{d.removeAttribute(`src`)}}function od(e,t,n){let r=t*n*4;return!Number.isFinite(r)||t<=0||n<=0||t>8192||n>8192||e.pixels+r>16777216?0:(e.pixels+=r,r)}let sd=(e,t)=>e.add(-t,-t,t*2,t*2),cd=(e,t)=>new a(Math.min(e.left,t.left),Math.min(e.top,t.top),Math.max(e.left+e.width,t.left+t.width)-Math.min(e.left,t.left),Math.max(e.top+e.height,t.top+t.height)-Math.min(e.top,t.top));function ld(e){let t=e.styles,n=e.bounds;for(let r of t.boxShadow)if(!r.inset){let t=Math.max(0,r.spread.number)+3*r.blur.number;n=cd(n,sd(e.bounds.add(r.offsetX.number,r.offsetY.number,0,0),t))}for(let r of e.textNodes)for(let i of r.textBounds){let r=sd(i.bounds,2*z(t.fontSize,e.bounds.height)+t.webkitTextStrokeWidth);n=cd(n,r);for(let e of t.textShadow)n=cd(n,sd(r.add(e.offsetX.number,e.offsetY.number,0,0),3*e.blur.number))}for(let t of e.elements)t.styles.isVisible()&&(n=cd(n,ld(t)));let r=Xu(t.filter);return sd(n,r?Qu(r):0)}function ud(e,t,n,r){let i=sd(t,n),o=Math.floor(Math.max(e.left,i.left)*r)/r,s=Math.floor(Math.max(e.top,i.top)*r)/r,c=Math.ceil(Math.min(e.left+e.width,i.left+i.width)*r)/r,l=Math.ceil(Math.min(e.top+e.height,i.top+i.height)*r)/r;return new a(o,s,Math.max(0,c-o),Math.max(0,l-s))}var dd=class{constructor(e){this.ctx=e}render(e,t){this.ctx.fillStyle=V(t.textDecorationColor||t.color);let n=1;typeof t.textDecorationThickness==`number`?n=t.textDecorationThickness:t.textDecorationThickness===`from-font`&&(n=Math.max(1,Math.floor(t.fontSize.number*.05)));let r=0;typeof t.textUnderlineOffset==`number`&&(r=t.textUnderlineOffset);let i=t.textDecorationStyle;t.textDecorationLine.forEach(t=>{let a=0;switch(t){case 1:a=e.top+e.height-n+r;break;case 2:a=e.top;break;case 3:a=e.top+(e.height/2-n/2);break;default:return}this.draw(e.left,a,e.width,n,i)})}draw(e,t,n,r,i){switch(i){case 0:this.ctx.fillRect(e,t,n,r);break;case 1:{let i=Math.max(1,r);this.ctx.fillRect(e,t,n,r),this.ctx.fillRect(e,t+r+i,n,r);break}case 2:this.drawPattern(e,t,n,r,[r,r*2]);break;case 3:this.drawPattern(e,t,n,r,[r*3,r*2]);break;case 4:this.drawWavy(e,t,n,r);break;default:this.ctx.fillRect(e,t,n,r)}}drawPattern(e,t,n,r,i){this.ctx.save(),this.ctx.beginPath(),this.ctx.setLineDash(i),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.moveTo(e,t+r/2),this.ctx.lineTo(e+n,t+r/2),this.ctx.stroke(),this.ctx.restore()}drawWavy(e,t,n,r){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle;let i=r*2,a=r*4,o=e;for(this.ctx.moveTo(o,t+r/2);o<e+n;){let s=Math.min(o+a/2,e+n);if(this.ctx.quadraticCurveTo(o+a/4,t+r/2-i,s,t+r/2),o=s,o<e+n){let s=Math.min(o+a/2,e+n);this.ctx.quadraticCurveTo(o+a/4,t+r/2+i,s,t+r/2),o=s}}this.ctx.stroke(),this.ctx.restore()}};let fd=e=>e!==void 0&&!Number.isNaN(e),pd=(e,t)=>{let n=e.measureText(`Mg`),r=n;return{baseline:fd(r.fontBoundingBoxAscent)?r.fontBoundingBoxAscent:fd(n.actualBoundingBoxAscent)?n.actualBoundingBoxAscent:t,height:fd(r.fontBoundingBoxAscent)&&fd(r.fontBoundingBoxDescent)?r.fontBoundingBoxAscent+r.fontBoundingBoxDescent:fd(n.actualBoundingBoxAscent)&&fd(n.actualBoundingBoxDescent)?n.actualBoundingBoxAscent+n.actualBoundingBoxDescent:t}},md=(e,t)=>pd(e,t).baseline,hd=[`-apple-system`,`system-ui`],gd=/[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/,_d=e=>gd.test(e),vd=()=>{if(typeof navigator>`u`)return null;let e=navigator.userAgent,t=/iPhone|iPad|iPod/.test(e),n=/Macintosh/.test(e)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>1;if(!t&&!n)return null;for(let t of[/(?:iPhone|CPU(?:\siPhone)?)\sOS\s(\d+)[\._](\d+)/,/Version\/(\d+)\.(\d+)/]){let n=e.match(t);if(n&&n[1])return parseInt(n[1],10)}return null},yd=e=>{let t=vd();return t!==null&&t>=15&&t<17?e.map(e=>hd.indexOf(e)===-1?e:`-apple-system, "Helvetica Neue", Arial, sans-serif`):e},bd=()=>(typeof window<`u`?window:void 0)?.chrome?`miter`:`round`;var xd=class{constructor(e){this.baselineCache=/* @__PURE__ */ new Map,this.glyphWidthCache=null,this.ctx=e.ctx,this.options=e.options,this.decorationRenderer=new dd(e.ctx)}cachedMeasureText(e,t){let n=this.glyphWidthCache;n||(n=/* @__PURE__ */ new Map,this.glyphWidthCache=n);let r=e+t,i=n.get(r);return i===void 0&&(i=this.ctx.measureText(e).width,n.set(r,i)),i}iterateLettersWithLetterSpacing(e,t,n,r,i){if(Ho(r)){this.iterateVerticalGlyphs(e,t,n,r,i);return}let a=Ml(e.text),o=e.bounds.top+n,s=this.ctx.font,c=e.bounds.left;for(let e of a)i(e,c,o),c+=this.cachedMeasureText(e,s)+t}iterateVerticalGlyphs(e,t,n,r,i){let a=Ml(e.text),o=this.ctx.font,s=r===4?-Math.PI/2:Math.PI/2,c=e.bounds.top;for(let l=0;l<a.length;){let u=a[l];if(!(Uo(r)||!_d(u)&&u.trim().length>0)){let r=this.ctx.textBaseline;_d(u)&&(this.ctx.textBaseline=`ideographic`),i(u,e.bounds.left,c+n),this.ctx.textBaseline=r,c+=this.cachedMeasureText(u,o)+t,l++;continue}let d=l;for(;l<a.length;){let e=a[l];if(!Uo(r)&&!_d(e)&&e.trim().length===0)break;if(Uo(r)||!_d(e)&&e.trim().length>0)l++;else break}this.ctx.save(),this.ctx.translate(e.bounds.left+n,c),this.ctx.rotate(s);let f=0;for(let e=d;e<l;e++){let n=a[e];i(n,0,f),f+=this.cachedMeasureText(n,o)+t}this.ctx.restore(),c+=f}}renderTextWithLetterSpacing(e,t,n,r=0){this.renderFillText(e,t,n,r)}canRenderWholeText(e,t){return e===0&&!Ho(t)}renderFillText(e,t,n,r){this.canRenderWholeText(t,r)?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):this.iterateLettersWithLetterSpacing(e,t,n,r,(e,t,n)=>{this.ctx.fillText(e,t,n)})}renderStrokeText(e,t,n,r){this.canRenderWholeText(t,r)?this.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+n):this.iterateLettersWithLetterSpacing(e,t,n,r,(e,t,n)=>{this.ctx.strokeText(e,t,n)})}renderTextStrokeWithStyle(e,t,n){t.webkitTextStrokeWidth&&e.text.trim().length&&(this.ctx.strokeStyle=V(t.webkitTextStrokeColor),this.ctx.lineWidth=t.webkitTextStrokeWidth,this.ctx.lineJoin=bd(),this.renderStrokeText(e,t.letterSpacing,n,t.writingMode),this.ctx.strokeStyle=``,this.ctx.lineWidth=0,this.ctx.lineJoin=`miter`)}renderTextFillWithShadows(e,t,n){this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,n,t.writingMode);let r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(r=>{this.ctx.shadowColor=V(r.color),this.ctx.shadowOffsetX=r.offsetX.number*this.options.scale,this.ctx.shadowOffsetY=r.offsetY.number*this.options.scale,this.ctx.shadowBlur=r.blur.number*this.options.scale,this.renderTextWithLetterSpacing(e,t.letterSpacing,n,t.writingMode)}),this.ctx.shadowColor=``,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0)}renderTextBoundWithPaintOrder(e,t,n,r){n.forEach(n=>{switch(n){case 0:this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,r,t.writingMode);break;case 1:this.renderTextStrokeWithStyle(e,t,r)}})}renderTextDecoration(e,t){this.decorationRenderer.render(e,t)}truncateTextWithEllipsis(e,t,n){let r=this.ctx.measureText(`…`).width,i=Ml(e);if(n===0){let e=e=>this.ctx.measureText(i.slice(0,e).join(``)).width+r<=t,n=0,a=i.length;for(;n<a;){let t=n+a+1>>1;e(t)?n=t:a=t-1}return i.slice(0,n).join(``)+`…`}{let e=this.ctx.font,a=r,o=[];for(let r of i){let i=this.cachedMeasureText(r,e);if(a+i>t)break;o.push(r),a+=i+n}return o.join(``)+`…`}}createFontStyle(e){let t=e.fontVariant.filter(e=>e===`normal`||e===`small-caps`).join(``),n=yd(e.fontFamily).join(`, `),r=O(e.fontSize)?`${e.fontSize.number}${e.fontSize.unit}`:`${e.fontSize.number}px`;return[[e.fontStyle,t,e.fontWeight,r,n].join(` `),n,r]}resolveFillColor(e){return V(e.webkitTextFillColor??e.color)}renderLineClampedText(e,t,n,r,i){let a=t.fontSize.number*1.5,o=[],s=[],c=E(e.textBounds,0).bounds.top;e.textBounds.forEach(e=>{Math.abs(e.bounds.top-c)>=a*.5?(s.length>0&&o.push(s),s=[e],c=e.bounds.top):s.push(e)}),s.length>0&&o.push(s);let l=t.webkitLineClamp;if(o.length<=l)return!1;for(let e=0;e<l-1;e++)E(o,e).forEach(e=>this.renderTextBoundWithPaintOrder(e,t,n,r));let u=o[l-1];if(u?.length&&i){let e=u.map(e=>e.text).join(``),a=E(u,0),o=i.width-(a.bounds.left-i.left),s=new El(this.truncateTextWithEllipsis(e,o,t.letterSpacing),a.bounds);for(let e of n)e===0?(this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(s,t.letterSpacing,r,t.writingMode)):e===1&&this.renderTextStrokeWithStyle(s,t,r)}return!0}renderEllipsisText(e,t,n,r,i){let a=t.fontSize.number*1.5,o=E(e.textBounds,0).bounds.top;if(!e.textBounds.every(e=>Math.abs(e.bounds.top-o)<a*.5))return!1;let s=e.textBounds.map(e=>e.text).join(``).replace(/\s+/g,` `).trim();if(this.ctx.measureText(s).width<=i.width+1)return!1;let c=new El(this.truncateTextWithEllipsis(s,i.width,t.letterSpacing),E(e.textBounds,0).bounds);for(let e of n)e===0?this.renderTextFillWithShadows(c,t,r):e===1&&this.renderTextStrokeWithStyle(c,t,r);return!0}measureBaselineCached(e,t){let n=this.baselineCache.get(e);return n===void 0&&(n=md(this.ctx,t),this.baselineCache.size>=64&&this.baselineCache.clear(),this.baselineCache.set(e,n)),n}async renderTextNode(e,t,n){this.glyphWidthCache=null;let[r]=this.createFontStyle(t);this.ctx.font=r??``,this.ctx.direction=t.direction===1?`rtl`:`ltr`,this.ctx.textAlign=`left`,this.ctx.textBaseline=`alphabetic`;let i=t.paintOrder,a=this.measureBaselineCached(r??``,t.fontSize.number);t.webkitLineClamp>0&&t.display&34&&t.overflowY===1&&e.textBounds.length>0&&this.renderLineClampedText(e,t,i,a,n)||t.textOverflow===1&&n&&t.overflowX===1&&e.textBounds.length>0&&this.renderEllipsisText(e,t,i,a,n)||(e.textBounds.forEach(e=>{i.forEach(n=>{n===0?(this.renderTextFillWithShadows(e,t,a),t.textDecorationLine.length&&this.renderTextDecoration(e.bounds,t)):n===1&&this.renderTextStrokeWithStyle(e,t,a)})}),t.textEmphasisStyle&&this.renderTextEmphasis(e,t,a))}renderTextEmphasis(e,t,n){if(Ho(t.writingMode))return;let r=t.textEmphasisStyle;if(!r)return;let i=t.fontSize.number,a=i*.5,o=V(t.textEmphasisColor??t.color),s=t.textEmphasisPosition,c=(e,t)=>{if(typeof r==`string`){let n=this.ctx.font;this.ctx.font=n.replace(/^\S+/,`${a}px`),this.ctx.textAlign=`center`,this.ctx.fillText(r,e,t+a/3),this.ctx.font=n,this.ctx.textAlign=`left`;return}let{fill:n,shape:i}=r,o=a*(i===`dot`?.3:i===`sesame`?.26:.34);this.ctx.beginPath(),i===`sesame`?this.ctx.ellipse(e,t,o*1.3,o*.8,Math.PI/4,0,Math.PI*2):i===`triangle`?(this.ctx.moveTo(e,t-o),this.ctx.lineTo(e+o*1.1,t+o*.8),this.ctx.lineTo(e-o*1.1,t+o*.8),this.ctx.closePath()):this.ctx.arc(e,t,o,0,Math.PI*2),n?i===`double-circle`?(this.ctx.lineWidth=o*.7,this.ctx.stroke(),this.ctx.beginPath(),this.ctx.arc(e,t,o*.4,0,Math.PI*2),this.ctx.lineWidth=o*.35,this.ctx.stroke()):this.ctx.fill():(this.ctx.lineWidth=Math.max(1,o*.35),this.ctx.stroke(),i===`double-circle`&&(this.ctx.beginPath(),this.ctx.arc(e,t,o*.5,0,Math.PI*2),this.ctx.stroke()))},l=this.ctx.font;for(let r of e.textBounds){let e=r.bounds.top+n,u=s.over?e-i-a*.4:e+a*.9,d=r.bounds.left;for(let e of Ml(r.text)){let n=this.cachedMeasureText(e,l);this.ctx.save();try{this.ctx.fillStyle=o,this.ctx.strokeStyle=o,this.ctx.lineWidth=1,c(d+n/2+t.letterSpacing/2,u)}finally{this.ctx.restore()}d+=n+t.letterSpacing}}}};let Sd=(e,t)=>{t.forEach((t,n)=>{let r=Y(t)?t.start:t;n===0?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y),Y(t)&&e.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},Cd=(e,t)=>{e.beginPath(),Sd(e,t),e.closePath()};var wd=class{constructor(e){this.maxSize=e,this._map=/* @__PURE__ */ new Map}get(e){if(!this._map.has(e))return;let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t}set(e,t){if(this._map.has(e))this._map.delete(e);else if(this._map.size>=this.maxSize){let e=this._map.keys().next().value;e!==void 0&&this._map.delete(e)}this._map.set(e,t)}get size(){return this._map.size}clear(){this._map.clear()}},Td=class{constructor(e){this.patternCache=new wd(50),this.ctx=e.ctx,this.context=e.context,this.canvas=e.canvas}async renderBackgroundImage(e){let t=e.styles.backgroundImage.length-1,n=e.styles.backgroundBlendMode,r=0;for(let i of e.styles.backgroundImage.slice(0).reverse()){if(r>0){let e=n[r]??n[0]??`normal`;e!==`normal`&&(this.ctx.save(),this.ctx.globalCompositeOperation=e)}i.type===0?await this.renderBackgroundURLImage(e,i,t):ma(i)?this.renderLinearGradient(e,i,t):ga(i)?this.renderRepeatingLinearGradient(e,i,t):ha(i)?this.renderRadialGradient(e,i,t):_a(i)?this.renderRepeatingRadialGradient(e,i,t):va(i)?this.renderConicGradient(e,i,t):ya(i)&&this.renderRepeatingConicGradient(e,i,t),r>0&&(n[r]??n[0]??`normal`)!==`normal`&&this.ctx.restore(),t--,r++}}async renderBackgroundURLImage(e,t,n){let r,i=t.url;try{r=await this.context.cache.match(i)}catch(e){this.context.logger.error(`Error loading background-image ${i}`),this.context.onError?.(e instanceof Error?e:Error(String(e)))}if(r){let t=isNaN(r.width)||r.width===0?1:r.width,a=isNaN(r.height)||r.height===0?1:r.height,[o,s,c,l,u]=Uu(e,n,[t,a,t/a]),d=qu(e.styles.backgroundRepeat,n),f=d===1?`no-repeat`:d===2?`repeat-x`:d===3?`repeat-y`:`repeat`,p=`${i}|${Math.round(l)}x${Math.round(u)}|${e.styles.imageRendering}|${f}`,m=this.patternCache.get(p);if(!m){let t=this.resizeImage(r,l,u,e.styles.imageRendering);m=this.ctx.createPattern(t,f),this.patternCache.set(p,m)}this.renderRepeat(o,m,s,c)}}renderRepeatingLinearGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),[c,l,u,d,f]=Gi(t.angle,o,s),p=i+l,m=i+u,h=a+d,g=a+f,_=G(t.stops,c||1),v=E(_,_.length-1),y=E(_,0),b=Math.max(v.stop-y.stop,.01);if(v.stop-y.stop<1e-6){let e=this.ctx.createLinearGradient(p,h,m,g);e.addColorStop(0,V(v.color)),e.addColorStop(1,V(v.color)),this.path(r),this.ctx.fillStyle=e,this.ctx.fill();return}let x=[],S=Math.ceil(1/b);for(let e=0;e<S;e++)for(let t of _){let n=e*b+(t.stop-y.stop);if(n>1)break;x.push({stop:n,color:V(t.color)})}x.push({stop:1,color:V(v.color)});let ee=this.ctx.createLinearGradient(p,h,m,g);x.forEach(e=>ee.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)),this.path(r),this.ctx.fillStyle=ee,this.ctx.fill()}renderLinearGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),[c,l,u,d,f]=Gi(t.angle,o,s),p=`lg|${t.angle}|${Math.round(o)}x${Math.round(s)}|${JSON.stringify(t.stops)}`,m=this.patternCache.get(p);if(!m){let e=(this.canvas.ownerDocument??document).createElement(`canvas`);e.width=o,e.height=s;let n=e.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(l,d,u,f);G(t.stops,c||1).forEach(e=>r.addColorStop(e.stop,V(e.color))),n.fillStyle=r,n.fillRect(0,0,o,s),o>0&&s>0&&(m=this.ctx.createPattern(e,`repeat`),this.patternCache.set(p,m))}m&&this.renderRepeat(r,m,i,a)}renderRadialGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),c=t.position.length===0?[L]:t.position,l=z(E(c,0),o),u=z(E(c,c.length-1),s),[d,f]=Ji(t,l,u,o,s);if((d===0||f===0)&&(d=Math.max(d,.01),f=Math.max(f,.01)),d>0&&f>0){let e=`rg|${Math.round(l)}x${Math.round(u)}|${Math.round(d)}x${Math.round(f)}|${JSON.stringify(t.stops)}`,n=G(t.stops,d),o=n[n.length-1],s=this.patternCache.get(e);if(!s){let t=(this.canvas.ownerDocument??document).createElement(`canvas`);t.width=Math.ceil(d*2),t.height=Math.ceil(f*2);let r=t.getContext(`2d`);if(r){let i=r.createRadialGradient(d,d,0,d,d,d);n.forEach(e=>i.addColorStop(e.stop,V(e.color))),r.fillStyle=i,d!==f&&r.scale(1,f/d),r.fillRect(0,0,d*2,d*2),s=this.ctx.createPattern(t,`no-repeat`),this.patternCache.set(e,s)}}s&&(this.path(r),this.ctx.save(),this.ctx.clip(),o&&(this.ctx.fillStyle=V(o.color),this.ctx.fill()),this.ctx.translate(i+l-d,a+u-f),this.ctx.fillStyle=s,this.ctx.fillRect(0,0,d*2,f*2),this.ctx.restore())}}renderRepeatingRadialGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),c=t.position.length===0?[L]:t.position,l=z(E(c,0),o),u=z(E(c,c.length-1),s),[d,f]=Ji(t,l,u,o,s);if((d===0||f===0)&&(d=Math.max(d,.01),f=Math.max(f,.01)),!(d>0&&f>0))return;let p=G(t.stops,d),m=E(p,0),h=E(p,p.length-1),g=Math.max(h.stop-m.stop,.01),_=[],v=Math.ceil(1/g);for(let e=0;e<v;e++)for(let t of p){let n=e*g+(t.stop-m.stop);if(n>1)break;_.push({stop:n,color:V(t.color)})}_.push({stop:1,color:V(h.color)});let y=`rrg|${Math.round(l)}x${Math.round(u)}|${Math.round(d)}x${Math.round(f)}|${_.length}|${JSON.stringify(t.stops)}`,b=this.patternCache.get(y);if(!b){let e=(this.canvas.ownerDocument??document).createElement(`canvas`);e.width=Math.ceil(d*2),e.height=Math.ceil(f*2);let t=e.getContext(`2d`);if(t){let n=t.createRadialGradient(d,d,0,d,d,d);_.forEach(e=>n.addColorStop(e.stop,e.color)),t.fillStyle=n,d!==f&&t.scale(1,f/d),t.fillRect(0,0,d*2,f*2),b=this.ctx.createPattern(e,`no-repeat`),this.patternCache.set(y,b)}}b&&(this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.translate(i+l-d,a+u-f),this.ctx.fillStyle=b,this.ctx.fillRect(0,0,d*2,f*2),this.ctx.restore())}renderConicGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),c=t.position.length===0?[L]:t.position,l=i+z(E(c,0),o),u=a+z(E(c,c.length-1),s),d=this.ctx.createConicGradient(t.angle-Math.PI/2,l,u);G(t.stops,1).forEach(e=>{d.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color))}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=d,this.ctx.fill(),this.ctx.restore()}renderRepeatingConicGradient(e,t,n){let[r,i,a,o,s]=Uu(e,n,[null,null,null]),c=t.position.length===0?[L]:t.position,l=i+z(E(c,0),o),u=a+z(E(c,c.length-1),s),d=G(t.stops,1),f=E(d,0),p=E(d,d.length-1),m=Math.max(p.stop-f.stop,.01);if(p.stop-f.stop<1e-6){let e=this.ctx.createConicGradient(t.angle-Math.PI/2,l,u);e.addColorStop(0,V(p.color)),e.addColorStop(1,V(p.color)),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=e,this.ctx.fill(),this.ctx.restore();return}let h=[],g=Math.ceil(1/m);for(let e=0;e<g;e++)for(let t of d){let n=e*m+(t.stop-f.stop);if(n>1)break;h.push({stop:n,color:V(t.color)})}let _=E(h,h.length-1);_&&_.stop<1&&h.push({stop:1,color:_.color});let v=this.ctx.createConicGradient(t.angle-Math.PI/2,l,u);h.forEach(e=>{v.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=v,this.ctx.fill(),this.ctx.restore()}renderRepeat(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)}resizeImage(e,t,n,r){let i=(this.canvas.ownerDocument??document).createElement(`canvas`);i.width=Math.max(1,t),i.height=Math.max(1,n);let a=i.getContext(`2d`);return a?(r===2||r===1?(this.context.logger.debug(`Disabling image smoothing for background image due to CSS image-rendering`),a.imageSmoothingEnabled=!1):r===3?(this.context.logger.debug(`Enabling image smoothing for background image due to CSS image-rendering: smooth`),a.imageSmoothingEnabled=!0):a.imageSmoothingEnabled=this.ctx.imageSmoothingEnabled,this.ctx.imageSmoothingQuality&&(a.imageSmoothingQuality=this.ctx.imageSmoothingQuality),a.drawImage(e,0,0,e.width,e.height,0,0,t,n),i):e}path(e){Cd(this.ctx,e)}};let Ed=(e,t)=>{switch(t){case 0:return jd(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return jd(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return jd(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return jd(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Dd=(e,t)=>{switch(t){case 0:return jd(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return jd(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return jd(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return jd(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Od=(e,t)=>{switch(t){case 0:return jd(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return jd(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return jd(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return jd(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},kd=(e,t)=>{switch(t){case 0:return Ad(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Ad(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Ad(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Ad(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Ad=(e,t)=>{let n=[];return Y(e)?n.push(e.subdivide(.5,!1)):n.push(e),Y(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},jd=(e,t,n,r)=>{let i=[];return Y(e)?i.push(e.subdivide(.5,!1)):i.push(e),Y(n)?i.push(n.subdivide(.5,!0)):i.push(n),Y(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Y(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i};var Md=class{constructor(e,t){this.ctx=e.ctx,this.pathCallbacks=t}async renderSolidBorder(e,t,n){this.pathCallbacks.path(Ed(n,t)),this.ctx.fillStyle=V(e),this.ctx.fill()}async renderDoubleBorder(e,t,n,r){if(t<3){await this.renderSolidBorder(e,n,r);return}let i=Dd(r,n);this.pathCallbacks.path(i),this.ctx.fillStyle=V(e),this.ctx.fill();let a=Od(r,n);this.pathCallbacks.path(a),this.ctx.fill()}async renderDashedDottedBorder(e,t,n,r,i){this.ctx.save();let a=kd(r,n),o=Ed(r,n);i===2&&(this.pathCallbacks.path(o),this.ctx.clip());let s,c,l,u;Y(E(o,0))?(s=E(o,0).start.x,c=E(o,0).start.y):(s=E(o,0).x,c=E(o,0).y),Y(E(o,1))?(l=E(o,1).end.x,u=E(o,1).end.y):(l=E(o,1).x,u=E(o,1).y);let d;d=Math.abs(n===0||n===2?s-l:c-u),this.ctx.beginPath(),i===3?this.pathCallbacks.formatPath(a):this.pathCallbacks.formatPath(o.slice(0,2));let f=t<3?t*3:t*2,p=t<3?t*2:t;i===3&&(f=t,p=t);let m=!0;if(d<=f*2)m=!1;else if(d<=f*2+p){let e=d/(2*f+p);f*=e,p*=e}else{let e=Math.floor((d+p)/(f+p)),t=(d-e*f)/(e-1),n=(d-(e+1)*f)/e;p=n<=0||Math.abs(p-t)<Math.abs(p-n)?t:n}if(m&&(i===3?this.ctx.setLineDash([0,f+p]):this.ctx.setLineDash([f,p])),i===3?(this.ctx.lineCap=`round`,this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=V(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2){if(Y(E(o,0))){let e=E(o,3),t=E(o,0);this.ctx.beginPath(),this.pathCallbacks.formatPath([new J(e.end.x,e.end.y),new J(t.start.x,t.start.y)]),this.ctx.stroke()}if(Y(E(o,1))){let e=E(o,1),t=E(o,2);this.ctx.beginPath(),this.pathCallbacks.formatPath([new J(e.end.x,e.end.y),new J(t.start.x,t.start.y)]),this.ctx.stroke()}}this.ctx.restore()}};let Nd=(e,t,n)=>{let r=e?[e.top,e.right,e.bottom,e.left]:null;return[0,1,2,3].map(e=>{let i=r?r[e]:null,a=t[e]??0;return!i||i.kind===`auto`?a:i.kind===`number`?a*(i.value??1):i.kind===`length`?i.value??0:(i.value??0)/100*(e===0||e===2?n.height:n.width)})},Pd=(e,t)=>{let n=e?[e.top,e.right,e.bottom,e.left]:null,r=e=>{let r=n?n[e]:null;return r?r.kind===`number`?(t[e]??0)*(r.value??0):r.value??0:0};return{top:r(0),right:r(1),bottom:r(2),left:r(3)}};var Fd=class{constructor(e){this.ctx=e}renderBorderImage(e,t,n,r,i,a,o,s,c={top:0,right:0,bottom:0,left:0}){e=e.add(-c.left,-c.top,c.left+c.right,c.top+c.bottom);let l=t.naturalWidth||t.width,u=t.naturalHeight||t.height;if(l<=0||u<=0)return;let d=Math.min(n.unit===`percent`?n.top/100*u:Math.min(n.top,u),u),f=Math.min(n.unit===`percent`?n.right/100*l:Math.min(n.right,l),l),p=Math.min(n.unit===`percent`?n.bottom/100*u:Math.min(n.bottom,u),u),m=Math.min(n.unit===`percent`?n.left/100*l:Math.min(n.left,l),l),{left:h,top:g,width:_,height:v}=e;if(_<=0||v<=0)return;let y=Math.min(i,v),b=Math.min(a,_),x=Math.min(o,v-y),S=Math.min(s,_-b);this.drawRegion(t,0,0,m,d,h,g,S,y),this.drawRegion(t,l-f,0,f,d,h+_-b,g,b,y),this.drawRegion(t,l-f,u-p,f,p,h+_-b,g+v-x,b,x),this.drawRegion(t,0,u-p,m,p,h,g+v-x,S,x);let ee=[{sx:m,sy:0,sw:l-m-f,sh:d,dx:h+S,dy:g,dw:_-S-b,dh:y,repeat:r.horizontal},{sx:l-f,sy:d,sw:f,sh:u-d-p,dx:h+_-b,dy:g+y,dw:b,dh:v-y-x,repeat:r.vertical},{sx:m,sy:u-p,sw:l-m-f,sh:p,dx:h+S,dy:g+v-x,dw:_-S-b,dh:x,repeat:r.horizontal},{sx:0,sy:d,sw:m,sh:u-d-p,dx:h,dy:g+y,dw:S,dh:v-y-x,repeat:r.vertical}];for(let e of ee){if(e.sw<=0||e.sh<=0||e.dw<=0||e.dh<=0)continue;let n=e.dw>=e.dh;e.repeat===0?this.ctx.drawImage(t,e.sx,e.sy,e.sw,e.sh,e.dx,e.dy,e.dw,e.dh):(e.repeat===1||e.repeat===2)&&this.drawRepeatedEdge(t,e,n,e.repeat===2)}if(n.fill){let e=m,n=d,r=l-m-f,i=u-d-p,a=h+S,o=g+y,s=_-S-b,c=v-y-x;this.drawRegion(t,e,n,r,i,a,o,s,c)}}drawRegion(e,t,n,r,i,a,o,s,c){r>0&&i>0&&s>0&&c>0&&this.ctx.drawImage(e,t,n,r,i,a,o,s,c)}drawRepeatedEdge(e,t,n,r){let i=n?t.sw:t.sh,a=n?t.dw:t.dh;if(i<=0||a<=0)return;let o,s;r?(s=Math.max(1,Math.round(a/i)),o=a/s):(o=i,s=Math.ceil(a/o)),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.dx,t.dy,t.dw,t.dh),this.ctx.clip();for(let r=0;r<s;r++){let i=r*o,s=a-i,c=Math.min(o,s);if(c<=0)break;n?this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx+i,t.dy,c,t.dh):this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx,t.dy+i,t.dw,c)}this.ctx.restore()}};let Id=/blur\((\d+(?:\.\d+)?)px\)/gi,Ld=(e,t)=>t===1?e:e.replace(Id,(e,n)=>`blur(${parseFloat(n)*t}px)`);var Rd=class{constructor(e,t){this.activeEffects=[],this.didSave=!1,this.saveAtDepth=-1,this.ctx=e.ctx,this.pathCallback=t,this.scale=e.scale??1}applyEffects(e){for(;this.activeEffects.length;)this.popEffect();this.didSave=!1,this.saveAtDepth=-1;let t=e=>Tu(e)||Eu(e)||Ou(e),n=e.reduceRight((e,n,r)=>e===-1?t(n)?r:-1:e,-1);for(let r=0;r<e.length;r++){let i=E(e,r);t(i)&&(this.didSave||=(this.ctx.save(),!0),r===n&&(this.saveAtDepth=this.activeEffects.length)),this.applyEffect(i)}}applyEffect(e){Tu(e)?(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)):Eu(e)?(this.pathCallback.path(e.path),this.ctx.clip()):Ou(e)?e.applyClip(this.ctx):Du(e)?this.ctx.globalAlpha*=e.opacity:ku(e)?this.ctx.globalCompositeOperation=e.compositeOperation:Au(e)&&(this.ctx.filter=Ld(e.safeFilterString,this.scale)||`none`,e.shadow&&(this.ctx.shadowOffsetX=e.shadow.offsetX*this.scale,this.ctx.shadowOffsetY=e.shadow.offsetY*this.scale,this.ctx.shadowBlur=e.shadow.blur*this.scale,this.ctx.shadowColor=e.shadow.color)),this.activeEffects.push(e)}popEffect(){this.activeEffects.length!==0&&(this.didSave&&this.activeEffects.length-1===this.saveAtDepth&&(this.ctx.restore(),this.didSave=!1,this.saveAtDepth=-1),this.activeEffects.pop(),!this.didSave&&this.activeEffects.length===0&&(this.ctx.globalAlpha=1,this.ctx.globalCompositeOperation=`source-over`,this.ctx.filter=`none`,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0,this.ctx.shadowColor=`rgba(0, 0, 0, 0)`))}getActiveEffectCount(){return this.activeEffects.length}hasActiveEffects(){return this.activeEffects.length>0}};let zd=(e,t)=>e.length===0?void 0:e[t%e.length]??e[0],Bd=(e,t,n,r)=>{let i=e?e[0]:void 0,a=e&&e.length>1?E(e,1):void 0,o=e=>e!==void 0&&A(e)?e.value:null,s=(e,t,n)=>e===void 0||A(e)?null:F(e)?z(e,t):n,c=o(i);if(c===`contain`||c===`cover`){let e=c===`contain`?Math.min(t.width/n,t.height/r):Math.max(t.width/n,t.height/r);return{width:n*e,height:r*e}}let l=s(i,t.width,n),u=s(a,t.height,r);return l===null&&u===null?(l=n,u=r):l===null?l=n/r*u:u===null&&(u=r/n*l),{width:l,height:u}},Vd=(e,t,n,r,i)=>{let a=t.naturalWidth||t.width||i.width,o=t.naturalHeight||t.height||i.height,{width:s,height:c}=Bd(zd(n.maskSize,r),i,a,o),l=zd(n.maskPosition,r)??[],u=i.left+z(E(l,0),i.width-s),d=i.top+z(E(l,l.length-1),i.height-c),f=zd(n.maskRepeat,r)??0,p=f===0||f===2,m=f===0||f===3,h=p?Math.ceil((u-i.left)/s):0,g=m?Math.ceil((d-i.top)/c):0,_=p?Math.ceil((i.left+i.width-u)/s):0,v=m?Math.ceil((i.top+i.height-d)/c):0;for(let n=-g;n<=v;n++)for(let r=-h;r<=_;r++)e.drawImage(t,u+r*s,d+n*c,s,c)},Hd=(e,t,n)=>{let{width:r,height:i}=n,a=t.position.length===0?[L]:t.position,o=z(E(a,0),r),s=z(E(a,a.length-1),i),[c,l]=Ji(t,o,s,r,i);c=Math.max(c,.01),l=Math.max(l,.01);let u=document.createElement(`canvas`);u.width=Math.ceil(c*2),u.height=Math.ceil(l*2);let d=u.getContext(`2d`);if(!d)return;let f=d.createRadialGradient(c,c,0,c,c,c);G(t.stops,c*2).forEach(e=>f.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color))),d.fillStyle=f,c!==l&&d.scale(1,l/c),d.fillRect(0,0,c*2,l*2),e.drawImage(u,n.left+o-c,n.top+s-l,c*2,l*2)},Ud=(e,t,n)=>{let{width:r,height:i}=n;if(r<=0||i<=0)return;if(ha(t)||_a(t)){Hd(e,t,n);return}let a=null;if(t.type===1||t.type===3){let o=t,[s,c,l,u,d]=Gi(o.angle||0,r,i);a=e.createLinearGradient(n.left+c,n.top+u,n.left+l,n.top+d),G(o.stops,s||1).forEach(e=>a.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color)))}else if(va(t)){let o=t;a=e.createConicGradient(o.angle-Math.PI/2,n.left+r/2,n.top+i/2),G(o.stops,1).forEach(e=>a.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color)))}a&&(e.fillStyle=a,e.fillRect(n.left,n.top,r,i))},Wd=async(e,t,n,r,i)=>{for(let a=0;a<t.length;a++){let o=E(t,a);if(o.type===0){let t=await i(o.url);t&&Vd(e,t,n,a,r)}else Ud(e,o,r)}},Gd=(e,t,n,r,i)=>{let a=0,o=0,s=e,c=t,l=n.left,u=n.top,d=n.width,f=n.height,p=d/f,m=s/c,h=i?z(i[0],1):.5,g=i?z(i[1],1):.5;return r===2?m>p?(f=d/m,u+=(n.height-f)*g):(d=f*m,l+=(n.width-d)*h):r===4?m>p?(s=c*p,a+=(e-s)*h):(c=s/p,o+=(t-c)*g):r===8?(s>d?(a+=(s-d)*h,s=d):(l+=(d-s)*h,d=s),c>f?(o+=(c-f)*g,c=f):(u+=(f-c)*g,f=c)):r===16&&((m>p?d:f*m)<(s>d?s:d)?m>p?(f=d/m,u+=(n.height-f)*g):(d=f*m,l+=(n.width-d)*h):(s>d?(a+=(s-d)*h,s=d):(l+=(d-s)*h,d=s),c>f?(o+=(c-f)*g,c=f):(u+=(f-c)*g,f=c))),{sx:a,sy:o,sw:s,sh:c,dx:l,dy:u,dw:d,dh:f}};async function Kd(e,t,n,r,i,a,o,s){if(i instanceof Vl)try{let n=await t.cache.match(i.src),r=e.imageSmoothingEnabled;o.imageRendering===2||o.imageRendering===1?e.imageSmoothingEnabled=!1:o.imageRendering===3&&(e.imageSmoothingEnabled=!0),s(i,a,n),e.imageSmoothingEnabled=r}catch(e){t.logger.error(`Error loading image ${i.src}`),t.onError?.(e instanceof Error?e:Error(String(e)))}if(i instanceof Hl&&s(i,a,i.canvas),i instanceof Gl)try{s(i,a,await t.cache.match(i.svg))}catch(e){t.logger.error(`Error loading svg ${i.svg.substring(0,255)}`),t.onError?.(e instanceof Error?e:Error(String(e)))}if(i instanceof nu&&i.tree){let a=await r(t,{scale:n.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}).render(i.tree);i.width&&i.height&&e.drawImage(a,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height)}}function qd(e,t,n,r,i){if(r instanceof $l){let t=Math.min(r.bounds.width,r.bounds.height);r.type===`checkbox`&&r.checked?(e.save(),n([new J(r.bounds.left+t*.39363,r.bounds.top+t*.79),new J(r.bounds.left+t*.16,r.bounds.top+t*.5549),new J(r.bounds.left+t*.27347,r.bounds.top+t*.44071),new J(r.bounds.left+t*.39694,r.bounds.top+t*.5649),new J(r.bounds.left+t*.72983,r.bounds.top+t*.23),new J(r.bounds.left+t*.84,r.bounds.top+t*.34085),new J(r.bounds.left+t*.39363,r.bounds.top+t*.79)]),e.fillStyle=V(r.styles.accentColor??7733247),e.fill(),e.restore()):r.type===`radio`&&r.checked&&(e.save(),e.beginPath(),e.arc(r.bounds.left+t/2,r.bounds.top+t/2,t/4,0,Math.PI*2,!0),e.fillStyle=V(r.styles.accentColor??7733247),e.fill(),e.restore())}if(Zd(r)&&r.value.length){let[o]=t.createFontStyle(i);e.font=o??``;let s=z(i.fontSize,0),{baseline:c,height:l}=pd(e,s);e.fillStyle=r instanceof $l&&r.isPlaceholder?V(1970632191):V(i.color),e.textBaseline=`alphabetic`,e.textAlign=Qd(r.styles.textAlign);let u=Bu(r),d=r instanceof $l?Jd(u,zu(r),l):u,f=0;switch(r.styles.textAlign){case 1:f+=u.width/2;break;case 2:f+=u.width}let p=0;r instanceof $l&&(p=(u.height-l)/2);let m=u.add(f,p,0,0);e.save(),n([new J(d.left,d.top),new J(d.left+d.width,d.top),new J(d.left+d.width,d.top+d.height),new J(d.left,d.top+d.height)]),e.clip();let h=Yd(e,r.value,u.width,i.whiteSpace===`pre`||i.whiteSpace===`nowrap`),g=ho(i.lineHeight,s);h.forEach((n,r)=>{let o=m.left,s=e.measureText(n).width;switch(i.textAlign){case 1:o+=(u.width-s)/2;break;case 2:o+=u.width-s}let l=new a(o,m.top+r*g,0,0);t.renderTextWithLetterSpacing(new El(n,l),i.letterSpacing,c,i.writingMode)}),e.restore(),e.textBaseline=`alphabetic`,e.textAlign=`left`}}let Jd=(e,t,n)=>e.height<n?new a(e.left,t.top,e.width,t.height):e,Yd=(e,t,n,r)=>{let i=[],a=t.split(`
11
- `);for(let t of a){if(r){i.push(t);continue}let a=t.split(/(\s+)/),o=``;for(let t of a){let r=o+t;e.measureText(r).width<=n||o===``?o=r:(i.push(o),o=t)}i.push(o)}return i};async function Xd(e,t,n,r,i,o){if(U(i.styles.display,2048)){if(i.styles.listStyleImage!==null){let n=i.styles.listStyleImage;if(n.type===0){let r=n.url;try{let n=await t.cache.match(r),a=z(o.fontSize,0),s=n?.naturalWidth||n.width,c=n?.naturalHeight||n.height;if(s<=0||c<=0)return;let l=Math.min(a/s,a/c),u=s*l,d=c*l,f=i.bounds.top+z(i.styles.paddingTop,i.bounds.width)+ho(o.lineHeight,o.fontSize.number)/2;e.drawImage(n,i.bounds.left-(u+10),f-d/2,u,d)}catch(e){t.logger.error(`Error loading list-style-image ${r}`),t.onError?.(e instanceof Error?e:Error(String(e)))}}}else if(r.listValue&&i.styles.listStyleType!==-1){let t=i.styles.listStyleType;if(t===0||t===1||t===2){let n=o.fontSize.number*.45,r=i.bounds.left-n*.9,a=i.bounds.top+z(i.styles.paddingTop,i.bounds.width)+ho(o.lineHeight,o.fontSize.number)/2;e.save(),e.fillStyle=V(o.color),e.beginPath(),t===2?e.rect(r-n/2,a-n/2,n,n):(e.arc(r,a,n/2,0,Math.PI*2),t===1&&(e.strokeStyle=V(o.color),e.lineWidth=n*.18)),t===1?e.stroke():e.fill(),e.restore()}else{let[t]=n.createFontStyle(o);e.font=t??``,e.fillStyle=V(o.color),e.textBaseline=`middle`,e.textAlign=`right`;let s=new a(i.bounds.left,i.bounds.top+z(i.styles.paddingTop,i.bounds.width),i.bounds.width,ho(o.lineHeight,o.fontSize.number)/2+1);n.renderTextWithLetterSpacing(new El(r.listValue,s),o.letterSpacing,ho(o.lineHeight,o.fontSize.number)/2+2,o.writingMode),e.textBaseline=`bottom`,e.textAlign=`left`}}}}let Zd=e=>e instanceof tu||e instanceof eu||e instanceof $l&&e.type!==`radio`&&e.type!==`checkbox`,Qd=e=>{switch(e){case 1:return`center`;case 2:return`right`;default:return`left`}},$d=(e,t)=>{let n=t>e?t*(1+(e/t-1)**3):t;return Math.max(0,e+n)},ef=(e,t)=>{if(t===0)return e;let n=e.map((e,t)=>Y(e)?{x:t%2==0?e.start.x:e.end.x,y:t%2==0?e.end.y:e.start.y,rx:Math.abs(e.end.x-e.start.x),ry:Math.abs(e.end.y-e.start.y)}:{x:e.x,y:e.y,rx:0,ry:0}),r=E(n,1).x-E(n,0).x+2*t,i=E(n,3).y-E(n,0).y+2*t;if(r<=0||i<=0)return[];let a=n.map(e=>({x:$d(e.rx,t),y:$d(e.ry,t)})),o=(e,t)=>t>0?e/t:1,s=Math.min(1,o(r,E(a,0).x+E(a,1).x),o(r,E(a,3).x+E(a,2).x),o(i,E(a,0).y+E(a,3).y),o(i,E(a,1).y+E(a,2).y));return e.map((e,r)=>{let i=E(n,r),o=i.x+(r===1||r===2?t:-t),c=i.y+(r>=2?t:-t);if(!Y(e))return new J(o,c);let l=E(a,r).x*s,u=E(a,r).y*s;if(!l||!u)return new J(o,c);let d=l/i.rx,f=u/i.ry,p=e=>new J(o+(e.x-i.x)*d,c+(e.y-i.y)*f);return new pu(p(e.start),p(e.startControl),p(e.endControl),p(e.end))})},tf=(e,t,n)=>{let{a:r,b:i,c:o,d:s,e:c,f:l}=e;if(![r,i,o,s,c,l,t,n].every(Number.isFinite))return null;let u=r*s-i*o;if(!Number.isFinite(u)||u===0)return null;let d=(e,t)=>({x:(s*(e-c)-o*(t-l))/u,y:(-i*(e-c)+r*(t-l))/u}),f=[d(0,0),d(t,0),d(t,n),d(0,n)];if(!f.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)))return null;let p=Math.min(...f.map(e=>e.x)),m=Math.min(...f.map(e=>e.y)),h=Math.max(...f.map(e=>e.x)),g=Math.max(...f.map(e=>e.y)),_=r*r+i*i,v=o*o+s*s,y=r*o+i*s,b=Math.sqrt((_+v+Math.hypot(_-v,2*y))/2);if(!Number.isFinite(b)||b<=0)return null;let x=1e-10*Math.max(_,v);return{matrix:e,viewport:new a(p,m,h-p,g-m),scale:b,uniform:Math.abs(_-v)<=x&&Math.abs(y)<=x}},nf=(e,t,n)=>{e.beginPath(),e.rect(t.left,t.top,t.width,t.height),n.length&&(Sd(e,n),e.closePath())},rf=(e,t)=>{let n=t.spread.number,r=zu(e.container);return r.width-2*n<=0||r.height-2*n<=0?[]:ef(_u(e.curves),-n)},af=async(e,t,n,r,i,a)=>{let o=zu(t.container),s=n.blur.number/2,c=Math.ceil(3*s)+2,l=n.spread.number,u=ud((n.inset?o:t.container.bounds.add(n.offsetX.number-l,n.offsetY.number-l,2*l,2*l)).add(-c,-c,2*c,2*c),a.viewport,c,a.scale);if(!u.width||!u.height)return!0;let d=Math.ceil(u.width*a.scale),f=Math.ceil(u.height*a.scale),p=od(i,d,f);if(!p)return!1;let m,h;try{m=e.canvas.ownerDocument.createElement(`canvas`),m.width=d,m.height=f;let i=m.getContext(`2d`);if(!i)return!1;i.scale(a.scale,a.scale),i.translate(-u.left,-u.top);let o=n.inset?rf(t,n):ef(hu(t.curves),l),c=du(o,n.offsetX.number,n.offsetY.number,0,0);n.inset?nf(i,u,c):Cd(i,c),i.fillStyle=V(n.color),i.fill(n.inset?`evenodd`:`nonzero`),h=await id(m,{blur:s},1,a.scale,r.signal),e.save();try{n.inset?(Cd(e,_u(t.curves)),e.clip()):(nf(e,a.viewport,hu(t.curves)),e.clip(`evenodd`)),e.drawImage(h,u.left,u.top,h.width/a.scale,h.height/a.scale)}finally{e.restore()}return!0}catch(e){if(!(e instanceof Q))throw e;return!1}finally{h&&h!==m&&$(h),m&&$(m),i.pixels-=p}},of=async(e,t,n,r,i)=>{if(r.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);if(On(n.color))return;let a=n.spread.number;if(!n.inset&&(t.container.bounds.width+2*a<=0||t.container.bounds.height+2*a<=0))return;let o=typeof e.getTransform==`function`,s=o?e.getTransform():{a:r.scale,b:0,c:0,d:r.scale,e:-r.x*r.scale,f:-r.y*r.scale},c=tf(s,e.canvas.width,e.canvas.height);if(!c)return;let{viewport:l}=c;if(n.blur.number>0&&(n.inset||!c.uniform)&&await af(e,t,n,r,i,c))return;let u=zu(t.container);e.save();try{if(n.inset&&n.blur.number===0){Cd(e,_u(t.curves)),e.clip(),nf(e,u,du(rf(t,n),n.offsetX.number,n.offsetY.number,0,0)),e.fillStyle=V(n.color),e.fill(`evenodd`);return}let r=Math.ceil(n.blur.number*2+Math.abs(a)+Math.abs(n.offsetX.number)+Math.abs(n.offsetY.number))+2,i=n.inset?u.add(-r,-r,2*r,2*r):t.container.bounds.add(-a,-a,2*a,2*a),{a:d,b:f,c:p,d:m,e:h,f:g}=s,_=i.left+i.width,v=i.top+i.height,y=Math.max(d*i.left+p*i.top+h,d*_+p*i.top+h,d*_+p*v+h,d*i.left+p*v+h),b=Math.max(1e4,y+r*c.scale+2);n.inset?(Cd(e,_u(t.curves)),e.clip()):(nf(e,l,hu(t.curves)),e.clip(`evenodd`)),o?e.setTransform(d,f,p,m,h-b,g):e.translate(-b/d,0),n.inset?nf(e,i,rf(t,n)):Cd(e,ef(hu(t.curves),a)),o?e.setTransform(d,f,p,m,h,g):e.translate(b/d,0),e.shadowOffsetX=b+d*n.offsetX.number+p*n.offsetY.number,e.shadowOffsetY=f*n.offsetX.number+m*n.offsetY.number,e.shadowBlur=n.blur.number*c.scale,e.shadowColor=V(n.color),e.fillStyle=`rgb(0, 0, 0)`,e.fill(n.inset?`evenodd`:`nonzero`)}finally{e.restore()}};var sf=class{constructor(e){this.ctx=e.ctx,this.context=e.context,this.scale=e.scale,this.createFontStyle=e.createFontStyle}async render(e){let t=e.container,n=t.styles,r=t.bounds,i=this.scale;if(r.width<=0||r.height<=0)return;let a=this.ctx.canvas.ownerDocument??document,o=Math.ceil(r.width),s=Math.ceil(r.height),c=Math.ceil(r.width*i),l=Math.ceil(r.height*i),u=this.createLayer(a,c,l);if(!u)return;u.ctx.scale(i,i);let[d]=this.createFontStyle(n);u.ctx.font=d??``,u.ctx.textBaseline=`alphabetic`,u.ctx.textAlign=`left`,u.ctx.direction=n.direction===1?`rtl`:`ltr`;let f=md(u.ctx,n.fontSize.number),p=new Td({ctx:u.ctx,context:this.context,canvas:u.canvas,options:{width:o,height:s,scale:1}});On(n.backgroundColor)||(u.ctx.fillStyle=V(n.backgroundColor),u.ctx.fillRect(0,0,o,s)),u.ctx.save(),u.ctx.translate(-r.left,-r.top),await p.renderBackgroundImage(t),u.ctx.restore();let m={bounds:r,baseline:f,letterSpacing:n.letterSpacing,writingMode:n.writingMode},h=this.createGlyphLayer(a,c,l,u.ctx);if(!h)return;let g=!!n.webkitTextStrokeWidth;g&&(h.ctx.strokeStyle=V(n.webkitTextStrokeColor),h.ctx.lineWidth=n.webkitTextStrokeWidth,h.ctx.lineJoin=this.getTextStrokeLineJoin());for(let e of t.textNodes)for(let t of e.textBounds)this.drawGlyphs(h,t,m,(e,t,n,r)=>{e.fillText(t,n,r),g&&e.strokeText(t,n,r)});u.ctx.globalCompositeOperation=`destination-in`,u.ctx.drawImage(h.canvas,0,0,o,s);let _=this.renderShadowSilhouettes(e,a,c,l,u.ctx,n,m);if(_){let e=this.createLayer(a,c,l);if(!e)return;for(let t of _)e.ctx.drawImage(t,0,0);e.ctx.drawImage(u.canvas,0,0),this.ctx.drawImage(e.canvas,r.left,r.top,r.width,r.height)}else this.ctx.drawImage(u.canvas,r.left,r.top,r.width,r.height)}createLayer(e,t,n){let r=e.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);return i?{canvas:r,ctx:i}:null}createGlyphLayer(e,t,n,r){let i=this.createLayer(e,t,n);return i?(i.ctx.scale(this.scale,this.scale),i.ctx.font=r.font,i.ctx.textBaseline=r.textBaseline,i.ctx.textAlign=r.textAlign,i.ctx.direction=r.direction,i.ctx.fillStyle=`#000`,i):null}drawGlyphs(e,t,n,r){let i=t.bounds.left-n.bounds.left,a=t.bounds.top-n.bounds.top+n.baseline,{letterSpacing:o,writingMode:s}=n;if(o<=0){r(e.ctx,t.text,i,a);return}if(Ho(s)){r(e.ctx,t.text,i,a);return}let c=i;for(let n of Ml(t.text))r(e.ctx,n,c,a),c+=e.ctx.measureText(n).width+o}renderShadowSilhouettes(e,t,n,r,i,a,o){let s=a.textShadow;if(!s.length)return null;let c=[];for(let a=s.length-1;a>=0;a--){let l=E(s,a),u=this.createGlyphLayer(t,n,r,i);if(u){u.ctx.shadowColor=V(l.color),u.ctx.shadowOffsetX=l.offsetX.number*this.scale,u.ctx.shadowOffsetY=l.offsetY.number*this.scale,u.ctx.shadowBlur=l.blur.number*this.scale,u.ctx.fillStyle=V(l.color);for(let t of e.container.textNodes)for(let e of t.textBounds)this.drawGlyphs(u,e,o,(e,t,n,r)=>{e.fillText(t,n,r)});c.push(u.canvas)}}return c.length?c:null}getTextStrokeLineJoin(){return(typeof window<`u`?window:void 0)?.chrome?`miter`:`round`}},cf=class e{constructor(e,t,n,r={pixels:0}){this.surfaceRoot=n,this.surfaceBudget=r,this.legacySubtree=!1,this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:document.createElement(`canvas`);let i=this.canvas.getContext(`2d`);if(!i)throw t.canvas||$(this.canvas),n?new Q(`Filter surface canvas is unavailable`):Error(`Failed to get 2D rendering context from canvas`);this.ctx=i,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.ctx.textBaseline=`bottom`,t.imageSmoothing!==void 0&&(this.ctx.imageSmoothingEnabled=t.imageSmoothing),t.imageSmoothingQuality&&(this.ctx.imageSmoothingQuality=t.imageSmoothingQuality),this.backgroundRenderer=new Td({ctx:this.ctx,context:this.context,canvas:this.canvas,options:{width:t.width,height:t.height,scale:t.scale}}),this.borderRenderer=new Md({ctx:this.ctx},{path:e=>this.path(e),formatPath:e=>this.formatPath(e)}),this.borderImageRenderer=new Fd(this.ctx),this.effectsRenderer=new Rd({ctx:this.ctx,scale:t.scale},{path:e=>this.path(e)}),this.textRenderer=new xd({ctx:this.ctx,options:{scale:t.scale}}),this.textClipRenderer=new sf({ctx:this.ctx,context:this.context,scale:t.scale,createFontStyle:e=>this.textRenderer.createFontStyle(e)}),this.context.logger.debug(`Canvas renderer initialized (${t.width}x${t.height}) with scale ${t.scale}`)}async renderStack(e){let t=e.element.container.styles;if(t.isVisible()){let n=Xu(t.filter),r=t.maskImage.length>0,i=t.webkitBoxReflect,a=t.mixBlendMode!==K.NORMAL;if(e.element!==this.surfaceRoot&&!this.legacySubtree&&(r||i||a||n&&(t.filter||t.opacity<1))&&this.canComposite(e.element)){if(!await this.renderCompositedStack(e,n,r,i,a)){this.legacySubtree=!0;try{await this.renderStackContent(e)}finally{this.legacySubtree=!1}}return}await this.renderStackContent(e)}}canComposite(e){let t=e=>{let t=e.styles;return!t.isTransformed()&&t.zoom===1&&t.clipPath.type===0&&!U(t.display,2048)&&Xu(t.filter)!==null},n=e=>t(e)&&e.elements.every(n),r=e.parent;for(;r&&r!==this.surfaceRoot;){if(!t(r.container))return!1;r=r.parent}return n(e.container)}async renderCompositedStack(t,n,r,i,o=!1){let s=this.options.signal;if(s?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let c=ud(ld(t.element.container),new a(this.options.x,this.options.y,this.options.width,this.options.height),n?Qu(n):0,this.options.scale);if(!c.width||!c.height)return!0;let l=od(this.surfaceBudget,Math.ceil(c.width*this.options.scale),Math.ceil(c.height*this.options.scale));if(!l)return this.context.logger.info(`Filter surface budget exceeded; using the existing renderer`),!1;let u={...this.options,canvas:void 0,backgroundColor:null,x:c.left,y:c.top,width:c.width,height:c.height},d,f;try{d=new e(this.context,u,t.element,this.surfaceBudget),await d.renderStackContent(t),d.effectsRenderer.applyEffects([]),n&&(f=await id(d.canvas,n,t.element.container.styles.opacity,u.scale,s));let a=f??d.canvas;if(r&&await this.applyMask(a,t.element.container.styles,c),s?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let l=t.element.effects,p=t.element.getEffects(4,this.surfaceRoot).filter(e=>!l.includes(e)||!Au(e)&&!Du(e)&&!ku(e)&&!Eu(e));return this.effectsRenderer.applyEffects(p),o?(this.ctx.save(),this.ctx.globalCompositeOperation=t.element.container.styles.mixBlendMode,this.ctx.drawImage(a,u.x,u.y,a.width/u.scale,a.height/u.scale),this.ctx.restore()):this.ctx.drawImage(a,u.x,u.y,a.width/u.scale,a.height/u.scale),i&&await this.drawReflection(a,t.element.container.bounds,c,i),!0}catch(e){if(!(e instanceof Q))throw e;return this.context.logger.info(`${e.message}; using the existing renderer`),!1}finally{d&&$(d.canvas),f&&$(f),this.surfaceBudget.pixels-=l}}async applyMask(e,t,n){let r=e.getContext(`2d`);if(!r)return;let i=document.createElement(`canvas`);i.width=e.width,i.height=e.height;let a=i.getContext(`2d`);if(a){a.scale(this.options.scale,this.options.scale),a.translate(-n.left,-n.top);try{await Wd(a,t.maskImage,t,{left:n.left,top:n.top,width:n.width,height:n.height},async e=>await this.context.cache.match(e))}catch(e){this.context.logger.error(`Error rendering mask-image: ${e instanceof Error?e.message:e}`);return}r.save();try{r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation=`destination-in`,r.drawImage(i,0,0)}finally{r.restore()}}}async drawReflection(e,t,n,r){let i=this.options.scale,a=Math.ceil(t.width*i),o=Math.ceil(t.height*i);if(a<=0||o<=0)return;let s=od(this.surfaceBudget,a,o);if(!s)return;let c,l;try{c=document.createElement(`canvas`),c.width=a,c.height=o;let s=c.getContext(`2d`);if(!s)return;let u=Math.round((t.left-n.left)*i),d=Math.round((t.top-n.top)*i),f=r.direction===`left`||r.direction===`right`;s.save();try{f?(s.translate(a,0),s.scale(-1,1)):(s.translate(0,o),s.scale(1,-1)),s.drawImage(e,-u,-d)}finally{s.restore()}if(r.mask){l=document.createElement(`canvas`),l.width=a,l.height=o;let e=l.getContext(`2d`);if(e){e.scale(i,i),await Wd(e,[r.mask],{maskPosition:[],maskRepeat:[],maskSize:[]},{left:0,top:0,width:t.width,height:t.height},async e=>await this.context.cache.match(e)),s.save();try{f?(s.translate(a,0),s.scale(-1,1)):(s.translate(0,o),s.scale(1,-1)),s.globalCompositeOperation=`destination-in`,s.drawImage(l,0,0,a,o)}finally{s.restore()}}}let p=r.offset,m=t.left,h=t.top;r.direction===`below`?h=t.top+t.height+p:r.direction===`above`?h=t.top-t.height-p:m=r.direction===`right`?t.left+t.width+p:t.left-t.width-p,this.ctx.save();try{this.ctx.filter=`none`,this.ctx.drawImage(c,m,h,t.width,t.height)}finally{this.ctx.restore()}}finally{c&&$(c),l&&$(l),this.surfaceBudget.pixels-=s}}async renderNode(e){if(e.container.debugRender)debugger;e.container.styles.isVisible()&&(await this.renderNodeBackgroundAndBorders(e),await this.renderNodeContent(e))}renderReplacedElement(e,t,n){let r=n.naturalWidth||e.intrinsicWidth,i=n.naturalHeight||e.intrinsicHeight;if(n&&r>0&&i>0){let a=Bu(e),o=_u(t);this.path(o),this.ctx.save(),this.ctx.clip();let{sx:s,sy:c,sw:l,sh:u,dx:d,dy:f,dw:p,dh:m}=Gd(r,i,a,e.styles.objectFit,e.styles.objectPosition);this.ctx.drawImage(n,s,c,l,u,d,f,p,m),this.ctx.restore()}}async renderNodeContent(t){this.effectsRenderer.applyEffects(t.getEffects(4,this.surfaceRoot));let n=t.container,r=t.curves,i=n.styles,a=Bu(n);for(let e of n.textNodes)await this.textRenderer.renderTextNode(e,i,a);await Kd(this.ctx,this.context,{scale:this.options.scale,backgroundColor:this.options.backgroundColor,x:this.options.x,y:this.options.y,width:this.options.width,height:this.options.height},(t,n)=>new e(t,n),n,r,i,(e,t,n)=>this.renderReplacedElement(e,t,n)),qd(this.ctx,this.textRenderer,this.path.bind(this),n,i),await Xd(this.ctx,this.context,this.textRenderer,t,n,i)}async renderStackContent(e){if(e.element.container.debugRender)debugger;let t=this.options.signal;await this.renderNodeBackgroundAndBorders(e.element);for(let n of e.negativeZIndex){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderNodeContent(e.element);for(let t of e.nonInlineLevel)await this.renderNode(t);for(let n of e.nonPositionedFloats){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let n of e.nonPositionedInlineLevel){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let t of e.inlineLevel)await this.renderNode(t);for(let n of e.zeroOrAutoZIndexOrTransformedOrOpacity){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let n of e.positiveZIndex){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}}mask(e){this.ctx.beginPath();let t=this.options.x,n=this.options.y;this.ctx.moveTo(t,n),this.ctx.lineTo(t+this.options.width,n),this.ctx.lineTo(t+this.options.width,n+this.options.height),this.ctx.lineTo(t,n+this.options.height),this.ctx.lineTo(t,n),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()}path(e){Cd(this.ctx,e)}formatPath(e){Sd(this.ctx,e)}async renderSurfaceBoxShadow(e,t){let n=t.spread.number,r=t.blur.number/2,i=Math.ceil(3*r)+1,o=e.container.bounds.add(-n,-n,2*n,2*n);if(o.width<=0||o.height<=0)return;let s=this.options.scale,c=ud(o.add(-i,-i,2*i,2*i),new a(this.options.x-t.offsetX.number,this.options.y-t.offsetY.number,this.options.width,this.options.height),i,s);if(!c.width||!c.height)return;let l=Math.ceil(c.width*s),u=Math.ceil(c.height*s),d=od(this.surfaceBudget,l,u);if(!d)throw new Q(`Box shadow surface budget exceeded`);let f,p;try{f=document.createElement(`canvas`),f.width=l,f.height=u;let i=f.getContext(`2d`);if(!i)throw new Q(`Box shadow surface canvas is unavailable`);i.scale(s,s),i.translate(-c.left,-c.top),Cd(i,du(hu(e.curves),-n,-n,2*n,2*n)),i.fillStyle=V(t.color),i.fill(),p=await id(f,{blur:r},1,s,this.options.signal),this.ctx.save();try{this.ctx.beginPath(),this.ctx.rect(this.options.x,this.options.y,this.options.width,this.options.height),Sd(this.ctx,hu(e.curves)),this.ctx.closePath(),this.ctx.clip(`evenodd`),this.ctx.drawImage(p,c.left+t.offsetX.number,c.top+t.offsetY.number,p.width/s,p.height/s)}finally{this.ctx.restore()}}finally{f&&$(f),p&&$(p),this.surfaceBudget.pixels-=d}}async renderNodeBackgroundAndBorders(e){this.effectsRenderer.applyEffects(e.getEffects(2,this.surfaceRoot)),!this.surfaceRoot&&e.container.styles.backdropFilter&&await this.renderBackdropFilter(e);let t=e.container.styles,n=!On(t.backgroundColor)||t.backgroundImage.length,r=uf(t),i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=qu(t.backgroundClip,0),o=lf(a,e.curves);if(n||t.boxShadow.length){r&&e.container.textNodes.length>0?await this.textClipRenderer.render(e):(this.ctx.save(),this.path(o),this.ctx.clip(),On(t.backgroundColor)||(this.ctx.fillStyle=V(t.backgroundColor),this.ctx.fill()),await this.backgroundRenderer.renderBackgroundImage(e.container),this.ctx.restore());for(let n of t.boxShadow.slice(0).reverse()){if(this.surfaceRoot&&!n.inset){await this.renderSurfaceBoxShadow(e,n);continue}await of(this.ctx,e,n,this.options,this.surfaceBudget)}}if(t.borderImageSource){let n=t.borderImageSource,r=e.container.bounds,i=[Math.max(0,t.borderTopWidth),Math.max(0,t.borderRightWidth),Math.max(0,t.borderBottomWidth),Math.max(0,t.borderLeftWidth)],a=null;if(n.type===0){let e=n.url;try{a=await this.context.cache.match(e)??null}catch{this.context.logger.error(`Error loading border-image ${e}`)}}else a=this.rasterizeGradientSource(n,r);if(a){let e=Pd(t.borderImageOutset,i),n=r.add(-e.left,-e.top,e.left+e.right,e.top+e.bottom),o=Nd(t.borderImageWidth,i,n);this.borderImageRenderer.renderBorderImage(r,a,t.borderImageSlice,t.borderImageRepeat,o[0],o[1],o[2],o[3],e)}return}let s=0;for(let t of i){if(t.style!==0&&!On(t.color)&&t.width>0){let n=async()=>{t.style===2?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,s,e.curves,2):t.style===3?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,s,e.curves,3):t.style===4?await this.borderRenderer.renderDoubleBorder(t.color,t.width,s,e.curves):await this.borderRenderer.renderSolidBorder(t.color,s,e.curves)},r=e.container.legendBounds;if(s===0&&r){let t=e.container.bounds,i=r.left-t.left,a=r.left+r.width-t.left;i>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,i,t.height),this.ctx.clip(),await n(),this.ctx.restore());let o=t.left+a,s=t.width-a;s>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(o,t.top,s,t.height),this.ctx.clip(),await n(),this.ctx.restore())}else await n()}s++}this.renderOutline(e)}renderOutline(e){let t=e.container.styles;if(t.outlineStyle===0||t.outlineStyle===1)return;let n=Math.max(0,t.outlineWidth);if(n<=0)return;let r=t.outlineColor??t.color;if(On(r))return;let i=Math.max(0,t.outlineOffset)+n/2,a=du(hu(e.curves),-i,-i,2*i,2*i);this.ctx.save();try{this.ctx.strokeStyle=V(r),this.ctx.lineWidth=n,t.outlineStyle===3?this.ctx.setLineDash([n*3,n*3]):t.outlineStyle===4&&this.ctx.setLineDash([n,n*2]),this.path(a),this.ctx.stroke()}finally{this.ctx.restore()}}rasterizeGradientSource(e,t){let n=Math.max(1,Math.ceil(t.width)),r=Math.max(1,Math.ceil(t.height)),i=(this.ctx.canvas.ownerDocument??document).createElement(`canvas`);i.width=n,i.height=r;let a=i.getContext(`2d`);if(!a)return null;if(e.type===1||e.type===3){let t=e,[o,s,c,l,u]=Gi(t.angle,n,r),d=a.createLinearGradient(s,c,l,u);return G(t.stops,o||n).forEach(e=>{d.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color))}),a.fillStyle=d,a.fillRect(0,0,n,r),i}if(e.type===2||e.type===4){let t=e,o=z(E(t.position,0),n),s=z(E(t.position,1),r),[c,l]=Ji(t,o,s,n,r);if(c<=0||l<=0)return null;a.save(),a.translate(o,s),a.scale(1,l/c),a.translate(-o,-s);let u=a.createRadialGradient(o,s,0,o,s,c);return G(t.stops,c).forEach(e=>{u.addColorStop(Math.min(1,Math.max(0,e.stop)),V(e.color))}),a.fillStyle=u,a.fillRect(0,0,n,r),a.restore(),i}if(e.type===5||e.type===6){let t=e,o=z(E(t.position,0),n),s=z(E(t.position,1),r),c=a.createConicGradient(t.angle-Math.PI/2,o,s),l;if(e.type===6){let e=G(t.stops,1),n=E(e,0),r=E(e,e.length-1),i=Math.max(r.stop-n.stop,.01);l=[];let a=Math.ceil(1/i);for(let t=0;t<a;t++)for(let r of e){let e=t*i+(r.stop-n.stop);if(e>1)break;l.push({stop:e,color:V(r.color)})}let o=E(l,l.length-1);o&&o.stop<1&&l.push({stop:1,color:o.color})}else l=G(t.stops,Math.max(n,r)).map(e=>({stop:e.stop,color:V(e.color)}));return l.forEach(e=>{c.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),a.fillStyle=c,a.fillRect(0,0,n,r),i}return this.context.logger.warn(`Unsupported border-image source; only URL and gradient images are supported`),null}async renderBackdropFilter(e){let t=Xu(e.container.styles.backdropFilter);if(!t||!t.blur&&!t.shadow)return;let n=e.container.bounds;if(n.width<=0||n.height<=0)return;let r=this.options.scale,i=Math.ceil(n.width*r),a=Math.ceil(n.height*r);if(i<=0||a<=0)return;let o=od(this.surfaceBudget,i,a);if(!o)return;let s,c;try{s=document.createElement(`canvas`),s.width=i,s.height=a;let e=s.getContext(`2d`);if(!e)return;let o=Math.round((n.left-this.options.x)*r),l=Math.round((n.top-this.options.y)*r);if(e.drawImage(this.canvas,o,l,i,a,0,0,i,a),c=await id(s,t,1,r,this.options.signal),this.options.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);this.ctx.save();try{this.ctx.filter=`none`,this.ctx.drawImage(c,n.left,n.top,n.width,n.height)}finally{this.ctx.restore()}}finally{s&&$(s),c&&$(c),this.surfaceBudget.pixels-=o}}async render(e){try{this.options.backgroundColor&&(this.ctx.fillStyle=V(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height));let t=Ru(e);return await this.renderStack(t),this.effectsRenderer.applyEffects([]),this.canvas}catch(e){throw this.options.canvas||$(this.canvas),e}}};let lf=(e,t)=>{switch(e){case 0:return hu(t);case 2:return gu(t);default:return _u(t)}},uf=e=>e.backgroundClip.some(e=>e===3);var df=class{constructor(e,t){this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:document.createElement(`canvas`);let n=this.canvas.getContext(`2d`);if(!n)throw Error(`Failed to get 2D rendering context from canvas`);this.ctx=n,this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`,this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (${t.width}x${t.height} at ${t.x},${t.y}) with scale ${t.scale}`)}async render(e){if(this.options.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let t=wl(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),n=await Tl(t);return this.options.backgroundColor&&(this.ctx.fillStyle=V(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),this.canvas}},ff=class{constructor({id:e,enabled:t}){this.id=e,this.enabled=t,this.start=Date.now()}debug(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.debug==`function`?console.debug(this.id,`${this.getTime()}ms`,...e):this.info(...e))}getTime(){return Date.now()-this.start}info(...e){this.enabled&&typeof window<`u`&&window.console&&typeof console.info==`function`&&console.info(this.id,`${this.getTime()}ms`,...e)}warn(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.warn==`function`?console.warn(this.id,`${this.getTime()}ms`,...e):this.info(...e))}error(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.error==`function`?console.error(this.id,`${this.getTime()}ms`,...e):this.info(...e))}},pf=class{get _evictionEnabled(){return this._evictionSuspendCount===0}constructor(e,t){if(this.context=e,this._options=t,this._cache=/* @__PURE__ */ new Map,this._pendingOperations=/* @__PURE__ */ new Map,this._deferMode=!1,this._collectedUrls=/* @__PURE__ */ new Set,this._evictionSuspendCount=0,this.maxSize=t.maxCacheSize??100,this.maxSize<1)throw Error(`Cache maxSize must be at least 1`);this.maxSize>1e4&&this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`)}startDefer(){this._deferMode=!0,this._evictionSuspendCount++}async preloadAll(e=10,t){this._deferMode=!1;let n=Array.from(this._collectedUrls);this._collectedUrls.clear();try{if(n.length===0)return;let r=Math.max(1,Math.min(e,100));this.context.logger.debug(`Preloading ${n.length} image(s) with concurrency ${r}`);let i=0;t?.(0,n.length);for(let e=0;e<n.length;e+=r){let a=n.slice(e,e+r),o=a.map(e=>this._addImageWithPending(e));await Promise.allSettled(o),i+=a.length,t?.(i,n.length)}}finally{this._evictionSuspendCount=Math.max(0,this._evictionSuspendCount-1)}}addImage(e){if(this._deferMode)return!this.has(e)&&(bf(e)||_f(e))&&this._collectedUrls.add(e),Promise.resolve();let t=this._pendingOperations.get(e);if(t)return t;if(this.has(e)){let t=this._cache.get(e);return this._cache.delete(e),this._cache.set(e,t),Promise.resolve()}return bf(e)||_f(e)?this._addImageWithPending(e):Promise.resolve()}_addImageWithPending(e){let t=this._pendingOperations.get(e);if(t)return t;let n=this._addImageInternal(e);return this._pendingOperations.set(e,n),n.finally(()=>{this._pendingOperations.delete(e)}),n}async _addImageInternal(e){let t=this._options.imageTimeout??15e3,n=this.withTimeout(this.loadImage(e),t,`Timed out (${t}ms) loading image`);n.catch(t=>{this.context.logger.error(`Failed to load image ${e}: ${t instanceof Error?t.message:`Unknown error`}`)}),this.set(e,n)}withTimeout(e,t,n){if(t<=0)return e;let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(n)),t)});return Promise.race([e,i]).finally(()=>{r!==void 0&&clearTimeout(r)})}match(e){let t=this._cache.get(e);if(t)return this._cache.delete(e),this._cache.set(e,t),t.value}set(e,t){if(this._cache.has(e))this._cache.delete(e);else if(this._evictionEnabled&&this._cache.size>=this.maxSize){let e=this._cache.keys().next().value;e!==void 0&&(this._cache.delete(e),this.context.logger.debug(`Cache: Evicted LRU entry: ${e}`))}this._cache.set(e,{value:t})}size(){return this._cache.size}getMaxSize(){return this.maxSize}clear(){this._cache.clear()}async loadImage(e){let t=this.context.originChecker,n=e=>t.isSameOrigin(e),r=typeof this._options.customIsSameOrigin==`function`?await this._options.customIsSameOrigin(e,n):n(e),i=!r&&this._options.allowTaint===!1&&!vf(e)&&!bf(e)&&typeof this._options.proxy!=`string`,a=!vf(e)&&(this._options.useCORS===!0||i)&&q.SUPPORT_CORS_IMAGES&&!r,o=!vf(e)&&!r&&!bf(e)&&typeof this._options.proxy==`string`&&q.SUPPORT_CORS_XHR&&!a;if(!r&&this._options.allowTaint===!1&&!vf(e)&&!bf(e)&&!o&&!a)return;let s=e;return o&&(s=await this.proxy(s)),this.context.logger.debug(`Added image ${e.substring(0,256)}`),await new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=t,(yf(s)||a)&&(n.crossOrigin=`anonymous`),n.src=s,n.complete===!0&&setTimeout(()=>e(n),500)})}has(e){return this._cache.has(e)}keys(){return Promise.resolve(Array.from(this._cache.keys()))}proxy(e){let t=this._options.proxy;if(!t)throw Error(`No proxy defined`);let n=e.substring(0,256);return new Promise((r,i)=>{let a=q.SUPPORT_RESPONSE_TYPE?`blob`:`text`,o=new XMLHttpRequest;o.onload=()=>{if(o.status===200){if(a===`text`)r(o.response);else{let e=new FileReader;e.addEventListener(`load`,()=>r(e.result),!1),e.addEventListener(`error`,e=>i(e),!1),e.readAsDataURL(o.response)}}else i(`Failed to proxy resource ${n} with status code ${o.status}`)},o.onerror=i;let s=t.indexOf(`?`)>-1?`&`:`?`;if(o.open(`GET`,`${t}${s}url=${encodeURIComponent(e)}&responseType=${a}`),a!==`text`&&o instanceof XMLHttpRequest&&(o.responseType=a),this._options.imageTimeout){let e=this._options.imageTimeout;o.timeout=e,o.ontimeout=()=>i(`Timed out (${e}ms) proxying ${n}`)}o.send()})}};let mf=/^data:image\/svg\+xml/i,hf=/^data:image\/.*;base64,/i,gf=/^data:image\/.*/i,_f=e=>q.SUPPORT_SVG_DRAWING||!xf(e),vf=e=>gf.test(e),yf=e=>hf.test(e),bf=e=>e.substring(0,4)===`blob`,xf=e=>e.slice(-3).toLowerCase()===`svg`||mf.test(e);var Sf=class{constructor(e){if(!e||!e.document)throw Error(`Valid window object required for OriginChecker`);if(!e.location||!e.location.href)throw Error(`Window object must have valid location`);this.link=e.document.createElement(`a`),this.origin=this.getOrigin(e.location.href)}getOrigin(e){return this.link.href=e,this.link.href=this.link.href,this.link.protocol+this.link.hostname+this.link.port}isSameOrigin(e){return this.getOrigin(e)===this.origin}getContextOrigin(){return this.origin}},Cf=class e{static{this.instanceCount=1}constructor(t,n,r){this.instanceName=`#${e.instanceCount++}`,this.config=r,this.logger=new ff({id:this.instanceName,enabled:t.logging}),this.originChecker=new Sf(r.window),this.cache=t.cache??r.cache??new pf(this,t),this.onError=t.onError,this._windowBounds=n}get windowBounds(){return this._windowBounds}adjustWindowBounds(e,t){this._windowBounds=this._windowBounds.add(e,t,0,0)}};let wf=e=>{[`scale`,`width`,`height`,`imageTimeout`,`x`,`y`,`windowWidth`,`windowHeight`,`scrollX`,`scrollY`].forEach(t=>{let n=e[t];if(n!=null&&typeof n!=`number`){let r=Number(n);Number.isNaN(r)||(e[t]=r)}})},Tf=e=>({allowTaint:e.allowTaint??!1,imageTimeout:e.imageTimeout??15e3,proxy:e.proxy,useCORS:e.useCORS??!1,customIsSameOrigin:e.customIsSameOrigin,maxCacheSize:e.maxCacheSize}),Ef=(e,t,n)=>({logging:e.logging??!0,cache:e.cache??t.cache,...n}),Df=(e,t)=>{let n=t;return{windowWidth:e.windowWidth??n.innerWidth??800,windowHeight:e.windowHeight??n.innerHeight??600,scrollX:e.scrollX??n.pageXOffset??0,scrollY:e.scrollY??n.pageYOffset??0}},Of=(e,t,n)=>({allowTaint:e.allowTaint??!1,onclone:e.onclone,ignoreElements:e.ignoreElements,iframeContainer:e.iframeContainer,inlineImages:n,copyStyles:n,cspNonce:e.cspNonce??t.cspNonce}),kf=(e,t,n,r,i,a,o)=>({canvas:e.canvas,backgroundColor:t,signal:e.signal,scale:e.scale??o??1,x:(e.x??0)+n,y:(e.y??0)+r,width:e.width??Math.ceil(i),height:e.height??Math.ceil(a),imageSmoothing:e.imageSmoothing,imageSmoothingQuality:e.imageSmoothingQuality}),Af=(e,t,n)=>{let r=t.ownerDocument,i=r.documentElement?Wr(e,getComputedStyle(r.documentElement).backgroundColor):0,a=r.body?Wr(e,getComputedStyle(r.body).backgroundColor):0,o=typeof n==`string`?Wr(e,n):n===null?0:4294967295;return t===r.documentElement?On(i)?On(a)?o:a:i:o},jf=(e,t,n,r)=>{if(e)try{e(n,r)}catch(e){t.logger.error(`onProgress callback failed: ${e instanceof Error?e.message:String(e)}`)}},Mf=async(e,t,n)=>{if(wf(t),!t.skipValidation){let n=t.validator||r(),i=n.validateElement(e);if(!i.valid)throw Error(i.error);let a=n.validateOptions(t);if(!a.valid)throw Error(`Invalid options: ${a.error}`)}if(!e||typeof e!=`object`)throw Error(`Invalid element provided as first argument`);let c=e.ownerDocument;if(!c)throw Error(`Element is not attached to a Document`);let l=c.defaultView;if(!l)throw Error(`Document is not attached to a Window`);let u=Tf(t),d=Ef(t,n,u),f=Df(t,l),p=new a(f.scrollX,f.scrollY,f.windowWidth,f.windowHeight),m=new Cf(d,p,n),h=t.enablePerformanceMonitoring??t.logging??!1,g=new i(m,h);g.start(`total`,{width:f.windowWidth,height:f.windowHeight});let _=t.signal;Z(_);let v=t.foreignObjectRendering??!1,y=Of(t,n,v);m.logger.debug(`Starting document clone with size ${p.width}x${p.height} scrolled to ${-p.left},${-p.top}`),jf(t.onProgress,m,`clone`,10),g.start(`clone`);let b=new Sc(m,e,y),x=b.clonedReferenceElement;if(!x)throw Error(`Unable to find element in cloned iframe`);let S=await b.toIFrame(c,p);g.end(`clone`),jf(t.onProgress,m,`clone`,30),_?.aborted&&((t.removeContainer??!0)&&Sc.destroy(S),Z(_));let{width:ee,height:C,left:te,top:ne}=$r(x)||Zr(x)?s(x.ownerDocument):o(m,x),re=Af(m,x,t.backgroundColor),ie=kf(t,re,te,ne,ee,C,l.devicePixelRatio??1),ae,oe;try{v?(m.logger.debug(`Document cloned, using foreign object rendering`),g.start(`render-foreignobject`),ae=await new df(m,ie).render(x),g.end(`render-foreignobject`)):(m.logger.debug(`Document cloned, element located at ${te},${ne} with size ${ee}x${C} using computed rendering`),m.logger.debug(`Starting DOM parsing`),g.start(`parse`),Z(_),m.cache.startDefer(),oe=su(m,x),g.end(`parse`),jf(t.onProgress,m,`parse`,50),g.start(`preload`),await m.cache.preloadAll(10,(e,n)=>{jf(t.onProgress,m,`preload`,50+Math.round(e/n*10))}),g.end(`preload`),jf(t.onProgress,m,`layout`,60),re===oe.styles.backgroundColor&&(oe.styles.backgroundColor=0),m.logger.debug(`Starting renderer for element at ${ie.x},${ie.y} with size ${ie.width}x${ie.height}`),g.start(`render`),Z(_),ae=await new cf(m,ie).render(oe),g.end(`render`)),jf(t.onProgress,m,`render`,90)}finally{g.start(`cleanup`);try{oe&&oe.restoreTree()}finally{(t.removeContainer??!0)&&Sc.destroy(S),g.end(`cleanup`)}}return g.end(`total`),m.logger.debug(`Finished rendering`),h&&g.logSummary(),jf(t.onProgress,m,`render`,100),ae},Nf=(e,n={},r)=>{let i=r||t.fromElement(e,{cspNonce:n.cspNonce,cache:n.cache});return Mf(e,n,i)};e.Html2CanvasConfig=t,e.PerformanceMonitor=i,e.Validator=n,e.createDefaultValidator=r,e.default=Nf,e.html2canvas=Nf}),typeof window<`u`&&window.html2canvas&&window.html2canvas.default&&(window.html2canvas=window.html2canvas.default);
9
+ }`,os=(e,t)=>{ss(e,`.${rs}:before${as}
10
+ .${is}:after${as}`,t)},ss=(e,t,n)=>{let r=e.ownerDocument;if(r){let i=r.createElement(`style`);i.textContent=t,n&&(i.nonce=n),e.appendChild(i)}};var cs=class{context;counters;quoteDepth=0;constructor(e,t){this.context=e,this.counters=t}resolvePseudoContent(e,t,n,r){if(!n)return;let i=n.content,a=t.ownerDocument;if(!a||!i||i===`none`||i===`-moz-alt-content`||n.display===`none`)return;this.counters.parse(new Yo(this.context,n));let o=new Jo(this.context,n),s=a.createElement(`html2canvaspseudoelement`);ns(n,s),o.content.forEach(t=>{if(t.type===0)s.appendChild(a.createTextNode(t.value));else if(t.type===22){let e=a.createElement(`img`);e.src=t.value,e.style.opacity=`1`,s.appendChild(e)}else if(t.type===18){if(t.name===`attr`){let n=t.values.filter(D);n.length&&n[0]&&s.appendChild(a.createTextNode(e.getAttribute(n[0].value)||``))}else if(t.name===`counter`){let[e,n]=t.values.filter(O);if(e&&D(e)){let t=this.counters.getCounterValue(e.value),r=n&&D(n)?rr.parse(this.context,n.value):3;s.appendChild(a.createTextNode(_r(t,r,!1)))}}else if(t.name===`counters`){let[e,n,r]=t.values.filter(O);if(e&&D(e)){let t=this.counters.getCounterValues(e.value),i=r&&D(r)?rr.parse(this.context,r.value):3,o=n&&n.type===0?n.value:``,c=t.map(e=>_r(e,i,!1)).join(o);s.appendChild(a.createTextNode(c))}}}else if(t.type===20)switch(t.value){case`open-quote`:s.appendChild(a.createTextNode(Er(o.quotes,this.quoteDepth++,!0)));break;case`close-quote`:{let e=this.quoteDepth>0;this.quoteDepth=Math.max(0,this.quoteDepth-1),e&&s.appendChild(a.createTextNode(Er(o.quotes,this.quoteDepth,!1)));break}default:s.appendChild(a.createTextNode(t.value))}}),s.className=`${rs} ${is}`;let c=r===0?` ${rs}`:` ${is}`;return Ln(t)?t.className.baseValue+=c:t.className+=c,s}};let q=e=>{if(e?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`)},ls=/* @__PURE__ */ new WeakMap,us=e=>{let t=e&&e.trustedTypes;if(!t)return null;if(ls.has(t))return ls.get(t)??null;let n=null;try{n=t.getPolicy?.(`html2canvas-pro`)??t.createPolicy(`html2canvas-pro`,{createHTML:e=>e})}catch{n=null}return ls.set(t,n),n},ds=(e,t,n)=>{let r=e.createElement(`iframe`);return r.className=`html2canvas-container`,r.style.visibility=`hidden`,r.style.position=`fixed`,r.style.left=`-10000px`,r.style.top=`0px`,r.style.border=`0`,r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling=`no`,r.setAttribute(`data-html2canvas-ignore`,`true`),(n||e.body).appendChild(r),r},fs=e=>new Promise(t=>{e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}),ps=e=>Promise.all([].slice.call(e.images,0).map(fs)),ms=(e,t,n)=>{if(n?.aborted)return Promise.resolve();let r=[],i=e.getElementsByTagName(`link`);for(let e=0;e<i.length;e++){let a=i[e];if(!a||a.sheet)continue;let o=(a.getAttribute(`rel`)??``).trim().toLowerCase().split(/\s+/);o.includes(`stylesheet`)&&!o.includes(`alternate`)&&!a.disabled&&a.getAttribute(`href`)&&r.push(new Promise(e=>{let r,i=()=>{a.removeEventListener(`load`,i),a.removeEventListener(`error`,i),n?.removeEventListener(`abort`,o),clearTimeout(r),e()},o=()=>i();r=setTimeout(()=>{t?.warn(`Stylesheet ${a.href} did not finish loading within ${Lo/1e3}s; continuing with a possibly unstyled clone`),i()},Lo),a.addEventListener(`load`,i),a.addEventListener(`error`,i),n?.addEventListener(`abort`,o,{once:!0}),a.sheet&&i()}))}return r.length===0?Promise.resolve():Promise.all(r).then(()=>void 0)},hs=(e,t,n)=>new Promise((r,i)=>{let a=e.contentWindow;if(!a)return i(`No window assigned for iframe`);let o=a.document,s,c=setTimeout(()=>{s&&clearInterval(s),i(/* @__PURE__ */ Error(`Cloned iframe did not fire its load event within ${Ro}ms`))},Ro),l=()=>{s&&clearInterval(s),clearTimeout(c),i(new DOMException(`The operation was aborted.`,`AbortError`))};a.onload=e.onload=()=>{a.onload=e.onload=null;let i=0;s=setInterval(()=>{i++,n?.aborted?l():o.body.childNodes.length>0&&o.readyState===`complete`?(clearInterval(s),s=void 0,clearTimeout(c),r(e)):i>=600&&(clearInterval(s),s=void 0,t?.warn(`Cloned iframe did not become ready within ${Lo/1e3} seconds; continuing with a possibly incomplete document`),r(e))},50)},n&&(n.aborted?l():n.addEventListener(`abort`,l,{once:!0}))}),gs=e=>e.replace(/[<>&"'`\\]|[\u0000-\u001f\u007f]/g,``),_s=e=>{let t=``;return e&&(t+=`<!DOCTYPE `,e.name&&(t+=gs(e.name)),e.internalSubset&&(t+=` `+gs(e.internalSubset)),e.publicId?(t+=` PUBLIC "`+gs(e.publicId)+`"`,e.systemId&&(t+=` "`+gs(e.systemId)+`"`)):e.systemId&&(t+=` SYSTEM "`+gs(e.systemId)+`"`),t+=`>`),t},vs=(e,t,n)=>{e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},ys=([e,t,n])=>{e.scrollLeft=t,e.scrollTop=n},bs=(e,t)=>{let n=e.ownerDocument.createElement(`base`);n.href=t;let r=e.getElementsByTagName(`head`).item(0);r?.insertBefore(n,r?.firstChild??null)},xs=(e,t,n,r)=>{let i=ds(t,n,r.container);if(!i.contentWindow)throw Error(`Unable to find iframe window`);let a=t.defaultView.pageXOffset,o=t.defaultView.pageYOffset,s=i.contentWindow,c=s.document,l=hs(i,e.logger,r.signal).then(async()=>{r.scrolledElements.forEach(ys),s&&s.scrollTo(n.left,n.top);let t=r.onclone,a=r.clonedReferenceElement;if(a===void 0)throw Error(`Error finding the ${r.referenceElementName} in the cloned document`);return q(r.signal),await p,q(r.signal),c.fonts&&c.fonts.ready&&await c.fonts.ready,q(r.signal),/(AppleWebKit)/g.test(navigator.userAgent)&&(await ps(c),q(r.signal)),typeof t==`function`&&await Promise.resolve().then(()=>t(c,a)),s.scrollTo(n.left,n.top),/AppleWebKit/g.test(navigator.userAgent)&&(s.scrollY!==n.top||s.scrollX!==n.left)&&(e.logger.warn(`Unable to restore scroll position for cloned document`),e.adjustWindowBounds(s.scrollX-n.left,s.scrollY-n.top)),i}),u=t.baseURI;c.open();let d=_s(t.doctype)+`<html></html>`;try{let e=us(t.defaultView),n=e?e.createHTML(d):d;c.write(n)}catch{c.write(d)}vs(t,a,o),c.close();let f=c.adoptNode(r.documentElement);bs(f,u),c.replaceChild(f,c.documentElement);let p=ms(c,e.logger,r.signal);return l},Ss=e=>{let t=e;for(;t;){if(t.parentNode&&t.parentNode.host)return t.parentNode;let e=t.getRootNode();if(e&&e!==t.ownerDocument&&e.host)return e;t=t.parentNode}return null};var Cs=class{context;options;scrolledElements;referenceElement;clonedReferenceElement;documentElement;counters;pseudoContents;slotCloner;constructor(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new ir,this.pseudoContents=new cs(e,this.counters),this.slotCloner=new es((e,t)=>this.cloneNode(e,t),{ignoreElements:n.ignoreElements,copyStyles:n.copyStyles??!0,cspNonce:n.cspNonce},e),!t.ownerDocument)throw Error(`Cloned element does not have an owner document`);if(!this.options.iframeContainer){let e=Ss(t);e&&(this.options.iframeContainer=e)}this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1),this.appendDocumentAdoptedStyles(t.ownerDocument)}appendDocumentAdoptedStyles(e){if(this.options.copyStyles)return;let t=e.adoptedStyleSheets;if(!t||t.length===0)return;let n=this.documentElement.getElementsByTagName(`head`).item(0);if(!n)return;let r=$o(this.documentElement.ownerDocument??e,t,this.options.cspNonce);r&&n.appendChild(r)}toIFrame(e,t){return xs(this.context,e,t,{documentElement:this.documentElement,clonedReferenceElement:this.clonedReferenceElement,referenceElementName:this.referenceElement.nodeName,scrolledElements:this.scrolledElements,onclone:this.options.onclone,container:this.options.iframeContainer,signal:this.options.signal})}createElementClone(e){if(Zo(e,2))debugger;if(Un(e))return this.createCanvasClone(e);if(Wn(e))return this.createVideoClone(e);if(qn(e))return this.createStyleClone(e);let t=e.cloneNode(!1);return Gn(t)&&(Gn(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=``),t.loading===`lazy`&&(t.loading=`eager`)),er(t)&&!Ln(t)?this.createCustomElementClone(e,t):t}createCustomElementClone(e,t){let n=document.createElement(`div`);n.className=t.className,ns(t.style,n);let r=t.attributes;for(let e=0;e<r.length;e++){let t=r.item(e);t&&t.name!==`class`&&t.name!==`style`&&n.setAttribute(t.name,t.value)}if(e.shadowRoot)try{n.attachShadow({mode:`open`})}catch(e){this.context.logger.error(`Failed to attach shadow root to custom element clone:`,e)}return n}createStyleClone(e){try{let t=e.sheet;if(t&&t.cssRules){let n=[].slice.call(t.cssRules,0).reduce((e,t)=>t&&typeof t.cssText==`string`?e+t.cssText:e,``),r=e.cloneNode(!1);return r.textContent=n,this.options.cspNonce&&(r.nonce=this.options.cspNonce),r}}catch(e){if(this.context.logger.error(`Unable to access cssRules property`,e),e.name!==`SecurityError`)throw e}let t=e.cloneNode(!1);return this.options.cspNonce&&(t.nonce=this.options.cspNonce),t}createCanvasClone(e){if(this.options.inlineImages&&e.ownerDocument){let t=e.ownerDocument.createElement(`img`);try{return t.src=e.toDataURL(),t}catch{this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`,e)}}let t=e.cloneNode(!1);try{t.width=e.width,t.height=e.height;let n=e.getContext(`2d`),r=t.getContext(`2d`,{willReadFrequently:!0});if(r){if(!this.options.allowTaint&&n)r.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{let t=e.getContext(`webgl2`)??e.getContext(`webgl`);t&&t.getContextAttributes()?.preserveDrawingBuffer===!1&&this.context.logger.warn(`Unable to clone WebGL context as it has preserveDrawingBuffer=false`,e),r.drawImage(e,0,0)}}return t}catch{this.context.logger.info(`Unable to clone canvas as it is tainted`,e)}return t}createVideoClone(e){let t=e.ownerDocument.createElement(`canvas`);t.width=e.offsetWidth,t.height=e.offsetHeight;let n=t.getContext(`2d`);try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info(`Unable to clone video as it is tainted`,e)}let r=e.ownerDocument.createElement(`canvas`);return r.width=e.offsetWidth,r.height=e.offsetHeight,r}appendChildNode(e,t,n){this.slotCloner.appendChildNode(e,t,n)}cloneChildNodes(e,t,n){this.slotCloner.cloneChildNodes(e,t,n)}cloneNode(e,t){if(In(e))return(e.ownerDocument??document).createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);let n=e.ownerDocument.defaultView;if(n&&Fn(e)&&(Rn(e)||Ln(e))){let r=this.createElementClone(e);r.style.transitionProperty=`none`;let i=n.getComputedStyle(e),a=nr(e);this.referenceElement===e&&Rn(r)&&(this.clonedReferenceElement=r),Hn(r)&&os(r,this.options.cspNonce);let o=this.counters.parse(new Yo(this.context,i));if(a){let t=n.getComputedStyle(e,`:before`),i=this.pseudoContents.resolvePseudoContent(e,r,t,0);i&&r.insertBefore(i,r.firstChild)}if(er(e)&&(t=!0),Wn(e)||this.cloneChildNodes(e,r,t),a){let t=n.getComputedStyle(e,`:after`),i=this.pseudoContents.resolvePseudoContent(e,r,t,1);i&&r.appendChild(i)}return this.counters.pop(o),(i&&(this.options.copyStyles||Ln(e))&&!Kn(e)||t)&&ns(i,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Yn(e)||Xn(e))&&(Yn(r)||Xn(r))&&(r.value=e.value),r}return e.cloneNode(!1)}static destroy(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1}},ws=class{static normalizeElement(e,t){let n={};if(!Rn(e)&&!Ln(e))return n;t.animationDuration.some(e=>e>0)&&(n.animationDuration=e.style.animationDuration,e.style.animationDuration=`0s`),t.transform!==null&&(n.transform=e.style.transform,e.style.transform=`translate(0, 0)`);let r=!1;return t.rotate!==null&&(n.rotate=e.style.rotate,e.style.rotate=`0deg`,r=!0),t.translate!==null&&(n.translate=e.style.translate,e.style.translate=`0px`,r=!0),t.scale!==null&&(n.scale=e.style.scale,e.style.scale=`1`,r=!0),r&&n.transform===void 0&&(n.transform=e.style.transform,e.style.transform=`translate(0, 0)`),n}static restoreElement(e,t){(Rn(e)||Ln(e))&&(t.animationDuration!==void 0&&(e.style.animationDuration=t.animationDuration),t.transform!==void 0&&(e.style.transform=t.transform),t.rotate!==void 0&&(e.style.rotate=t.rotate),t.translate!==void 0&&(e.style.translate=t.translate),t.scale!==void 0&&(e.style.scale=t.scale))}},Ts=class{context;styles;textNodes=[];elements=[];bounds;legendBounds;createsStackingContext=!1;createsRealStackingContext=!1;isListOwner=!1;debugRender=!1;originalStyles;originalElement;constructor(e,t,n={}){if(this.context=e,Zo(t,3))debugger;if(this.styles=new Ko(e,e.config.window.getComputedStyle(t,null)),n.normalizeDom!==!1&&(Rn(t)||Ln(t))&&(this.originalStyles=ws.normalizeElement(t,this.styles),this.originalElement=t),this.bounds=o(this.context,t),t.tagName===`FIELDSET`){let e=t.querySelector(`:scope > legend`);if(e){let t=o(this.context,e);this.legendBounds=t;let n=t.top+t.height/2-this.styles.borderTopWidth/2;this.bounds=new a(this.bounds.left,n,this.bounds.width,this.bounds.height-(n-this.bounds.top))}}Zo(t,4)&&(this.debugRender=!0)}restore(){this.originalStyles&&this.originalElement&&(ws.restoreElement(this.originalElement,this.originalStyles),this.originalStyles=void 0,this.originalElement=void 0)}restoreTree(){this.restore();for(let e of this.elements)e.restoreTree()}};let Es=e=>{if(e.createRange){let t=e.createRange();if(t.getBoundingClientRect){let n=e.createElement(`boundtest`);n.style.height=`123px`,n.style.display=`block`,e.body.appendChild(n),t.selectNode(n);let r=t.getBoundingClientRect(),i=Math.round(r.height);if(e.body.removeChild(n),i===123)return!0}}return!1},Ds=()=>new Image().crossOrigin!==void 0,Os=e=>{let t=new Image,n=e.createElement(`canvas`),r=n.getContext(`2d`);if(!r)return!1;t.src=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>`;try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},ks=(e,t,n,r,i)=>{let a=`http://www.w3.org/2000/svg`,o=document.createElementNS(a,`svg`),s=document.createElementNS(a,`foreignObject`);return o.setAttributeNS(null,`width`,e.toString()),o.setAttributeNS(null,`height`,t.toString()),s.setAttributeNS(null,`width`,`100%`),s.setAttributeNS(null,`height`,`100%`),s.setAttributeNS(null,`x`,n.toString()),s.setAttributeNS(null,`y`,r.toString()),s.setAttributeNS(null,`externalResourcesRequired`,`true`),o.appendChild(s),s.appendChild(i),o},As=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(e))}`}),js={get SUPPORT_RANGE_BOUNDS(){"use strict";let e=Es(document);return Object.defineProperty(js,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){"use strict";let e=Os(document);return Object.defineProperty(js,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){"use strict";let e=Ds();return Object.defineProperty(js,"SUPPORT_CORS_IMAGES",{value:e}),e}};var Ms=class{text;bounds;constructor(e,t){this.text=e,this.bounds=t}};let Ns=(e,t,n,r)=>{let i=Bs(t,n),o=[],s=0;return i.forEach(t=>{if(n.textDecorationLine.length||t.trim().length>0){if(js.SUPPORT_RANGE_BOUNDS){let n=Fs(r,s,t.length).getClientRects();if(n.length>1){let n=Rs(t),i=0;n.forEach(t=>{o.push(new Ms(t,a.fromDOMRectList(e,Fs(r,i+s,t.length).getClientRects()))),i+=t.length})}else o.push(new Ms(t,a.fromDOMRectList(e,n)))}else{let n=r.splitText(t.length);o.push(new Ms(t,Ps(e,r))),r=n}}else js.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length}),o},Ps=(e,t)=>{let n=t.ownerDocument;if(n){let r=n.createElement(`html2canvaswrapper`);r.appendChild(t.cloneNode(!0));let i=t.parentNode;if(i){i.replaceChild(r,t);let n=o(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),n}}return a.EMPTY},Fs=(e,t,n)=>{let r=e.ownerDocument;if(!r)throw Error(`Node has no owner document`);let i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Is=/* @__PURE__ */ new Map,Ls=e=>{let t=Is.get(e);return t||(t=new Intl.Segmenter(void 0,{granularity:e}),Is.set(e,t)),t},Rs=e=>Array.from(Ls(`grapheme`).segment(e),e=>e.segment),zs=e=>Array.from(Ls(`word`).segment(e),e=>e.segment),Bs=(e,t)=>ka(t.writingMode)?Rs(e):t.letterSpacing===0?zs(e):Rs(e);var Vs=class{text;textBounds;constructor(e,t,n){this.text=Hs(t.data,n.textTransform),this.text.length!==t.data.length&&(t.data=this.text),this.textBounds=Ns(e,this.text,n,t)}};let Hs=(e,t)=>{switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Us,Ws);case 2:return e.toUpperCase();default:return e}},Us=/(^|\s|:|-|\(|\))([a-z])/g,Ws=(e,t,n)=>e.length>0?t+n.toUpperCase():e;var Gs=class extends Ts{src;intrinsicWidth;intrinsicHeight;constructor(e,t,n={}){super(e,t,n),this.src=t.currentSrc||t.src,this.intrinsicWidth=t.naturalWidth,this.intrinsicHeight=t.naturalHeight,this.context.cache.addImage(this.src)}},Ks=class extends Ts{canvas;intrinsicWidth;intrinsicHeight;constructor(e,t,n={}){super(e,t,n),this.canvas=t,this.intrinsicWidth=t.width,this.intrinsicHeight=t.height}};let qs=[`position`,`inset`,`top`,`right`,`bottom`,`left`,`inset-inline`,`inset-inline-start`,`inset-inline-end`,`inset-block`,`inset-block-start`,`inset-block-end`,`margin`,`margin-top`,`margin-right`,`margin-bottom`,`margin-left`,`margin-inline`,`margin-inline-start`,`margin-inline-end`,`margin-block`,`margin-block-start`,`margin-block-end`],Js=(e,t)=>{let n=t.getAttribute(`style`);qs.forEach(e=>t.style.removeProperty(e));let r=e.serializeToString(t);return n===null?t.removeAttribute(`style`):t.setAttribute(`style`,n),r};var Ys=class extends Ts{svg;intrinsicWidth;intrinsicHeight;constructor(e,t,n={}){super(e,t,n);let r=new XMLSerializer,i=o(e,t);t.setAttribute(`width`,`${i.width}px`),t.setAttribute(`height`,`${i.height}px`),this.svg=`data:image/svg+xml,${encodeURIComponent(Js(r,t))}`,this.intrinsicWidth=t.width.baseVal.value,this.intrinsicHeight=t.height.baseVal.value,this.context.cache.addImage(this.svg)}},Xs=class extends Ts{value;constructor(e,t,n={}){super(e,t,n),this.value=t.value}},Zs=class extends Ts{start;reversed;constructor(e,t,n={}){super(e,t,n),this.start=t.start,this.reversed=typeof t.reversed==`boolean`&&t.reversed===!0}};let Qs=[{type:15,flags:0,unit:`px`,number:3}],$s=[{type:16,flags:0,number:50}],ec=e=>e.width>e.height?new a(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new a(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e,tc=e=>{let t=e.type===`password`?Array(e.value.length+1).join(`•`):e.value;return t.length===0?e.placeholder||``:t},nc=e=>e.value.length===0&&!!e.placeholder;var rc=class extends Ts{type;checked;value;isPlaceholder;constructor(e,t,n={}){switch(super(e,t,n),this.type=t.type.toLowerCase(),this.checked=t.checked,this.value=tc(t),this.isPlaceholder=nc(t),(this.type===`checkbox`||this.type===`radio`)&&(this.styles.backgroundColor=3739148031,this.styles.borderTopColor=this.styles.borderRightColor=this.styles.borderBottomColor=this.styles.borderLeftColor=2779096575,this.styles.borderTopWidth=this.styles.borderRightWidth=this.styles.borderBottomWidth=this.styles.borderLeftWidth=1,this.styles.borderTopStyle=this.styles.borderRightStyle=this.styles.borderBottomStyle=this.styles.borderLeftStyle=1,this.styles.backgroundClip=[0],this.styles.backgroundOrigin=[0],this.bounds=ec(this.bounds)),this.type){case`checkbox`:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=Qs;break;case`radio`:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=$s}}},ic=class extends Ts{value;constructor(e,t,n={}){super(e,t,n);let r=t.options[t.selectedIndex||0];this.value=r&&r.text||``}},ac=class extends Ts{value;constructor(e,t,n={}){super(e,t,n),this.value=t.value}},oc=class extends Ts{src;width;height;tree;backgroundColor;parseTreeFn;constructor(e,t,n,r={}){super(e,t,r),this.src=t.src,this.width=parseInt(t.width,10)||0,this.height=parseInt(t.height,10)||0,this.backgroundColor=this.styles.backgroundColor,this.parseTreeFn=n;try{let n=t.contentWindow,r=n?.document;if(n&&r&&r.documentElement&&this.parseTreeFn){this.tree=this.parseTreeFn(e,r.documentElement);let t=Nn(e,n.getComputedStyle(r.documentElement).backgroundColor),i=r.body?Nn(e,n.getComputedStyle(r.body).backgroundColor):0;this.backgroundColor=R(t)?R(i)?this.styles.backgroundColor:i:t}}catch(e){let t=e instanceof Error?e:Error(String(e));this.context.logger.warn(`Unable to render iframe content${this.src?` from ${this.src}`:``}: ${t.message}`),this.context.onError?.(t)}}};let sc=[`OL`,`UL`,`MENU`],cc=(e,t,n,r,i=1,a={})=>{for(let o=t.firstChild,s;o;o=s)s=o.nextSibling,lc(e,o,n,r,i,a)},lc=(e,t,n,r,i=1,o={})=>{if(In(t)&&t.data.length>0){let r=new Vs(e,t,n.styles);if(i!==1){let e=n.bounds.left,t=n.bounds.top;r.textBounds=r.textBounds.map(n=>new Ms(n.text,new a(e+(n.bounds.left-e)/i,t+(n.bounds.top-t)/i,n.bounds.width/i,n.bounds.height/i)))}n.textNodes.push(r)}else if(Fn(t)){if(Zn(t)&&t.assignedNodes)t.assignedNodes().forEach(t=>lc(e,t,n,r,i,o));else{let s=uc(e,t,o),c=s.styles.zoom||1;if(c!==1&&(s.bounds=new a(s.bounds.left,s.bounds.top,s.bounds.width/c,s.bounds.height/c)),s.styles.isVisible()){fc(t,s,r)?s.createsRealStackingContext=!0:pc(s.styles)&&(s.createsStackingContext=!0),sc.indexOf(t.tagName)!==-1&&(s.isListOwner=!0),n.elements.push(s);let a=i*(s.styles.zoom||1);t.shadowRoot?cc(e,t.shadowRoot,s,r,a,o):!Yn(t)&&!Vn(t)&&!Xn(t)&&cc(e,t,s,r,a,o)}}}},uc=(e,t,n={})=>Gn(t)?new Gs(e,t,n):Un(t)?new Ks(e,t,n):Vn(t)?new Ys(e,t,n):Qn(t)?new Xs(e,t,n):$n(t)?new Zs(e,t,n):zn(t)?new rc(e,t,n):Xn(t)?new ic(e,t,n):Yn(t)?new ac(e,t,n):Kn(t)?new oc(e,t,(e,t)=>dc(e,t,n),n):new Ts(e,t,n),dc=(e,t,n={})=>{let r=uc(e,t,n);return r.createsRealStackingContext=!0,cc(e,t,r,r,1,n),r},fc=(e,t,n)=>t.styles.isPositionedWithZIndex()||t.styles.opacity<1||!!t.styles.filter||!!t.styles.backdropFilter||t.styles.maskImage.length>0||!!t.styles.webkitBoxReflect||t.styles.isolation===1||t.styles.isTransformed()||Hn(e)&&n.styles.isTransparent(),pc=e=>e.isPositioned()||e.isFloating()||e.mixBlendMode!==K.NORMAL?!0:H(e.display,268435456)||H(e.display,33554432)||H(e.display,536870912)||H(e.display,134217728),mc=(e,t)=>e.length===t.length&&e.some((e,n)=>e===t[n]),hc=(e,t,n,r,i)=>e.map((e,a)=>{switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e});var J=class e{type;x;y;constructor(e,t){this.type=0,this.x=e,this.y=t}add(t,n){return new e(this.x+t,this.y+n)}};let gc=(e,t,n)=>new J(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n);var _c=class e{type;start;startControl;endControl;end;constructor(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}subdivide(t,n){let r=gc(this.start,this.startControl,t),i=gc(this.startControl,this.endControl,t),a=gc(this.endControl,this.end,t),o=gc(r,i,t),s=gc(i,a,t),c=gc(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)}add(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))}reverse(){return new e(this.end,this.endControl,this.startControl,this.start)}};let Y=e=>e.type===1;var vc=class{topLeftBorderDoubleOuterBox;topRightBorderDoubleOuterBox;bottomRightBorderDoubleOuterBox;bottomLeftBorderDoubleOuterBox;topLeftBorderDoubleInnerBox;topRightBorderDoubleInnerBox;bottomRightBorderDoubleInnerBox;bottomLeftBorderDoubleInnerBox;topLeftBorderStroke;topRightBorderStroke;bottomRightBorderStroke;bottomLeftBorderStroke;topLeftBorderBox;topRightBorderBox;bottomRightBorderBox;bottomLeftBorderBox;topLeftPaddingBox;topRightPaddingBox;bottomRightPaddingBox;bottomLeftPaddingBox;topLeftContentBox;topRightContentBox;bottomRightContentBox;bottomLeftContentBox;constructor(e){let t=e.styles,n=e.bounds,[r,i]=He(t.borderTopLeftRadius,n.width,n.height),[a,o]=He(t.borderTopRightRadius,n.width,n.height),[s,c]=He(t.borderBottomRightRadius,n.width,n.height),[l,u]=He(t.borderBottomLeftRadius,n.width,n.height),d=[];d.push((r+a)/n.width),d.push((l+s)/n.width),d.push((i+u)/n.height),d.push((o+c)/n.height);let f=Math.max(...d);f>1&&(r/=f,i/=f,a/=f,o/=f,s/=f,c/=f,l/=f,u/=f);let p=n.width-a,m=n.height-c,h=n.width-s,g=n.height-u,_=t.borderTopWidth,v=t.borderRightWidth,y=t.borderBottomWidth,b=t.borderLeftWidth,x=I(t.paddingTop,e.bounds.width),S=I(t.paddingRight,e.bounds.width),C=I(t.paddingBottom,e.bounds.width),w=I(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||i>0?X(n.left+b/3,n.top+_/3,r-b/3,i-_/3,0):new J(n.left+b/3,n.top+_/3),this.topRightBorderDoubleOuterBox=a>0||o>0?X(n.left+p,n.top+_/3,a-v/3,o-_/3,1):new J(n.left+n.width-v/3,n.top+_/3),this.bottomRightBorderDoubleOuterBox=s>0||c>0?X(n.left+h,n.top+m,s-v/3,c-y/3,2):new J(n.left+n.width-v/3,n.top+n.height-y/3),this.bottomLeftBorderDoubleOuterBox=l>0||u>0?X(n.left+b/3,n.top+g,l-b/3,u-y/3,3):new J(n.left+b/3,n.top+n.height-y/3),this.topLeftBorderDoubleInnerBox=r>0||i>0?X(n.left+b*2/3,n.top+_*2/3,r-b*2/3,i-_*2/3,0):new J(n.left+b*2/3,n.top+_*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?X(n.left+p,n.top+_*2/3,a-v*2/3,o-_*2/3,1):new J(n.left+n.width-v*2/3,n.top+_*2/3),this.bottomRightBorderDoubleInnerBox=s>0||c>0?X(n.left+h,n.top+m,s-v*2/3,c-y*2/3,2):new J(n.left+n.width-v*2/3,n.top+n.height-y*2/3),this.bottomLeftBorderDoubleInnerBox=l>0||u>0?X(n.left+b*2/3,n.top+g,l-b*2/3,u-y*2/3,3):new J(n.left+b*2/3,n.top+n.height-y*2/3),this.topLeftBorderStroke=r>0||i>0?X(n.left+b/2,n.top+_/2,r-b/2,i-_/2,0):new J(n.left+b/2,n.top+_/2),this.topRightBorderStroke=a>0||o>0?X(n.left+p,n.top+_/2,a-v/2,o-_/2,1):new J(n.left+n.width-v/2,n.top+_/2),this.bottomRightBorderStroke=s>0||c>0?X(n.left+h,n.top+m,s-v/2,c-y/2,2):new J(n.left+n.width-v/2,n.top+n.height-y/2),this.bottomLeftBorderStroke=l>0||u>0?X(n.left+b/2,n.top+g,l-b/2,u-y/2,3):new J(n.left+b/2,n.top+n.height-y/2),this.topLeftBorderBox=r>0||i>0?X(n.left,n.top,r,i,0):new J(n.left,n.top),this.topRightBorderBox=a>0||o>0?X(n.left+p,n.top,a,o,1):new J(n.left+n.width,n.top),this.bottomRightBorderBox=s>0||c>0?X(n.left+h,n.top+m,s,c,2):new J(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=l>0||u>0?X(n.left,n.top+g,l,u,3):new J(n.left,n.top+n.height),this.topLeftPaddingBox=r>0||i>0?X(n.left+b,n.top+_,Math.max(0,r-b),Math.max(0,i-_),0):new J(n.left+b,n.top+_),this.topRightPaddingBox=a>0||o>0?X(n.left+Math.min(p,n.width-v),n.top+_,p>n.width+v?0:Math.max(0,a-v),Math.max(0,o-_),1):new J(n.left+n.width-v,n.top+_),this.bottomRightPaddingBox=s>0||c>0?X(n.left+Math.min(h,n.width-b),n.top+Math.min(m,n.height-y),Math.max(0,s-v),Math.max(0,c-y),2):new J(n.left+n.width-v,n.top+n.height-y),this.bottomLeftPaddingBox=l>0||u>0?X(n.left+b,n.top+Math.min(g,n.height-y),Math.max(0,l-b),Math.max(0,u-y),3):new J(n.left+b,n.top+n.height-y),this.topLeftContentBox=r>0||i>0?X(n.left+b+w,n.top+_+x,Math.max(0,r-(b+w)),Math.max(0,i-(_+x)),0):new J(n.left+b+w,n.top+_+x),this.topRightContentBox=a>0||o>0?X(n.left+Math.min(p,n.width+b+w),n.top+_+x,p>n.width+b+w?0:a-b+w,o-(_+x),1):new J(n.left+n.width-(v+S),n.top+_+x),this.bottomRightContentBox=s>0||c>0?X(n.left+Math.min(h,n.width-(b+w)),n.top+Math.min(m,n.height+_+x),Math.max(0,s-(v+S)),c-(y+C),2):new J(n.left+n.width-(v+S),n.top+n.height-(y+C)),this.bottomLeftContentBox=l>0||u>0?X(n.left+b+w,n.top+g,Math.max(0,l-(b+w)),u-(y+C),3):new J(n.left+b+w,n.top+n.height-(y+C))}};let X=(e,t,n,r,i)=>{let a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case 0:return new _c(new J(e,l),new J(e,l-s),new J(c-o,t),new J(c,t));case 1:return new _c(new J(e,t),new J(e+o,t),new J(c,l-s),new J(c,l));case 2:return new _c(new J(c,t),new J(c,t+s),new J(e+o,l),new J(e,l));default:return new _c(new J(c,l),new J(c-o,l),new J(e,t+s),new J(e,t))}},yc=e=>[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox],bc=e=>[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox],xc=e=>[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox];var Sc=class{offsetX;offsetY;matrix;type=0;target=6;constructor(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n}},Cc=class{path;target;type=1;constructor(e,t){this.path=e,this.target=t}},wc=class{opacity;type=2;target=6;constructor(e){this.opacity=e}},Tc=class{applyClip;type=3;target=6;constructor(e){this.applyClip=e}};let Ec={[K.NORMAL]:`source-over`,[K.MULTIPLY]:`multiply`,[K.SCREEN]:`screen`,[K.OVERLAY]:`overlay`,[K.DARKEN]:`darken`,[K.LIGHTEN]:`lighten`,[K.COLOR_DODGE]:`color-dodge`,[K.COLOR_BURN]:`color-burn`,[K.HARD_LIGHT]:`hard-light`,[K.SOFT_LIGHT]:`soft-light`,[K.DIFFERENCE]:`difference`,[K.EXCLUSION]:`exclusion`,[K.HUE]:`hue`,[K.SATURATION]:`saturation`,[K.COLOR]:`color`,[K.LUMINOSITY]:`luminosity`};var Dc=class{mixBlendMode;type=4;target=6;compositeOperation;constructor(e){this.mixBlendMode=e,this.compositeOperation=Ec[e]}},Oc=class e{type=5;target=6;safeFilterString;shadow;constructor(t){let n=e.parseDropShadow(t);this.shadow=n.shadow,this.safeFilterString=n.safeFilterString}static parseDropShadow(t){if(!t)return{safeFilterString:``};let n=e.findDropShadows(t);if(n.length===0)return{safeFilterString:t};let r=e.parseDropShadowBody(c(n,0).body),i=``,a=0;for(let e of n)i+=t.slice(a,e.start),a=e.end;return i+=t.slice(a),{shadow:r,safeFilterString:i.replace(/\s+/g,` `).trim()}}static findDropShadows(e){let t=[],n=/drop-shadow\(/gi,r;for(;(r=n.exec(e))!==null;){let n=r.index+12-1,i=r.index,a=1,o=n+1;for(;o<e.length&&a>0;){let t=e[o]??``;t===`(`?a++:t===`)`&&a--,o++}if(a!==0)break;let s=e.slice(n+1,o-1);t.push({body:s,start:i,end:o})}return t}static parseDropShadowBody(t){let n=e.tokenizeFilterArgs(t.trim()),r=[],i;for(let t of n)e.isCSSLength(t)?r.push(parseFloat(t)):t&&(i=t);if(!(r.length<2||r.length>3))return{offsetX:c(r,0),offsetY:c(r,1),blur:r.length>2?c(r,2):0,color:i??`rgba(0,0,0,1)`}}static tokenizeFilterArgs(e){let t=[],n=``,r=0;for(let i=0;i<e.length;i++){let a=e[i]??``;a===`(`?(r++,n+=a):a===`)`?(r--,n+=a):/\s/.test(a)?r>0?n+=a:n&&=(t.push(n),``):n+=a}return n&&t.push(n),t}static isCSSLength(e){return/^-?[\d.]+(px|em|rem|pt|cm|mm|in|pc|ex|ch|vw|vh|vmin|vmax|%)?$/i.test(e)}};let kc=e=>e.type===0,Ac=e=>e.type===1,jc=e=>e.type===2,Mc=e=>e.type===3,Nc=e=>e.type===4,Pc=e=>e.type===5;var Fc=class{element;negativeZIndex;zeroOrAutoZIndexOrTransformedOrOpacity;positiveZIndex;nonPositionedFloats;nonPositionedInlineLevel;inlineLevel;nonInlineLevel;constructor(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}},Ic=class{container;parent;effects=[];curves;listValue;plainEffectsCache=null;constructor(e,t){if(this.container=e,this.parent=t,this.curves=new vc(this.container),this.container.styles.opacity<1&&this.effects.push(new wc(this.container.styles.opacity)),this.container.styles.translate!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+I(e[0],this.container.bounds.width),n=this.container.bounds.top+I(e[1],this.container.bounds.height),[r,i]=this.container.styles.translate,a=I(r,this.container.bounds.width),o=I(i,this.container.bounds.height);this.effects.push(new Sc(t,n,[1,0,0,1,a,o]))}if(this.container.styles.rotate!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+I(e[0],this.container.bounds.width),n=this.container.bounds.top+I(e[1],this.container.bounds.height),r=this.container.styles.rotate*Math.PI/180,i=Math.cos(r),a=Math.sin(r),o=[i,a,-a,i,0,0];this.effects.push(new Sc(t,n,o))}if(this.container.styles.scale!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+I(e[0],this.container.bounds.width),n=this.container.bounds.top+I(e[1],this.container.bounds.height),[r,i]=this.container.styles.scale;this.effects.push(new Sc(t,n,[r,0,0,i,0,0]))}if(this.container.styles.transform!==null){let e=this.container.styles.transformOrigin,t=this.container.bounds.left+I(e[0],this.container.bounds.width),n=this.container.bounds.top+I(e[1],this.container.bounds.height),r=this.container.styles.transform;this.effects.push(new Sc(t,n,r))}if(Lc(this.container.styles)){let e=yc(this.curves),t=xc(this.curves);mc(e,t)?this.effects.push(new Cc(e,6)):(this.effects.push(new Cc(e,2)),this.effects.push(new Cc(t,4)))}if(this.container.styles.clipPath.type!==0){let e=zc(this.container.styles.clipPath,this.container.bounds);e&&this.effects.push(e)}if(this.container.styles.mixBlendMode!==K.NORMAL&&this.effects.push(new Dc(this.container.styles.mixBlendMode)),this.container.styles.filter!==null&&this.effects.push(new Oc(this.container.styles.filter)),this.container.styles.zoom!==1){let e=this.container.bounds.left,t=this.container.bounds.top,n=this.container.styles.zoom,r=[n,0,0,n,0,0];this.effects.push(new Sc(e,t,r))}}getEffects(e,t){if(!t){let t=this.plainEffectsCache;t||(t=/* @__PURE__ */ new Map,this.plainEffectsCache=t);let n=t.get(e);return n||(n=this.computeEffects(e),t.set(e,n)),n}return this.computeEffects(e,t)}computeEffects(e,t){let n=[2,3].indexOf(this.container.styles.position)===-1,r=this===t?null:this.parent,i=e=>e.effects.filter(n=>e!==t||!Pc(n)&&!jc(n)&&!Nc(n)),a=i(this);for(;r;){let e=i(r).filter(e=>!Ac(e));if(n||r.container.styles.position!==0||!r.parent){if(n=[2,3].indexOf(r.container.styles.position)===-1,Lc(r.container.styles)){let e=yc(r.curves),t=xc(r.curves);mc(e,t)||a.unshift(new Cc(t,6))}a.unshift(...e)}else a.unshift(...e);r=r===t?null:r.parent}return a.filter(t=>H(t.target,e))}};let Lc=e=>e.overflowX!==0||e.overflowY!==0,Rc=(e,t,n,r,i)=>e===`closest-side`?Math.min(t-n,r-t):e===`farthest-side`?Math.max(t-n,r-t):I(e,i),zc=(e,t)=>{let{left:n,top:r,width:i,height:a}=t;switch(e.type){case 1:{let t=I(e.left,i),o=I(e.top,a),s=n+t,c=r+o,l=Math.max(0,i-t-I(e.right,i)),u=Math.max(0,a-o-I(e.bottom,a));return new Tc(e=>{e.beginPath(),e.rect(s,c,l,u),e.clip()})}case 2:{let t=n+I(e.cx,i),o=r+I(e.cy,a),s;return s=e.radius===`closest-side`?Math.min(t-n,o-r,n+i-t,r+a-o):e.radius===`farthest-side`?Math.max(t-n,o-r,n+i-t,r+a-o):I(e.radius,Math.sqrt(i*i+a*a)/Math.SQRT2),new Tc(e=>{e.beginPath(),e.arc(t,o,Math.max(0,s),0,Math.PI*2),e.clip()})}case 3:{let t=n+I(e.cx,i),o=r+I(e.cy,a),s=Rc(e.rx,t,n,n+i,i),c=Rc(e.ry,o,r,r+a,a);return new Tc(e=>{e.beginPath(),e.ellipse(t,o,Math.max(0,s),Math.max(0,c),0,0,Math.PI*2),e.clip()})}case 4:{let t=e.points.map(([e,t])=>[n+I(e,i),r+I(t,a)]);return new Tc(e=>{if(e.beginPath(),t.length>0){e.moveTo(c(c(t,0),0),c(c(t,0),1));for(let n=1;n<t.length;n++)e.lineTo(c(c(t,n),0),c(c(t,n),1));e.closePath()}e.clip()})}case 5:{let{d:t}=e,i=null;return new Tc(e=>{try{i||=new Path2D(t);let a=e.getTransform();e.translate(n,r),e.clip(i),e.setTransform(a)}catch{}})}case 6:{let t=n+I(e.x,i),o=r+I(e.y,a),s=Math.max(0,I(e.width,i)),c=Math.max(0,I(e.height,a));return new Tc(e=>{e.beginPath(),e.rect(t,o,s,c),e.clip()})}case 0:return null;default:return null}},Bc=(e,t,n,r)=>{e.container.elements.forEach(i=>{let a=i.createsRealStackingContext,o=i.createsStackingContext,s=new Ic(i,e);H(i.styles.display,2048)&&r.push(s);let c=i.isListOwner?[]:r;if(a||o){let e=a||i.styles.isPositioned()?n:t,r=new Fc(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){let t=i.styles.zIndex.order;if(t<0){let n=0;e.negativeZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(n=r+1,!1):n>0),e.negativeZIndex.splice(n,0,r)}else if(t>0){let n=0;e.positiveZIndex.some((e,r)=>t>=e.element.container.styles.zIndex.order?(n=r+1,!1):n>0),e.positiveZIndex.splice(n,0,r)}else e.zeroOrAutoZIndexOrTransformedOrOpacity.push(r)}else i.styles.isFloating()?e.nonPositionedFloats.push(r):e.nonPositionedInlineLevel.push(r);Bc(s,r,a?r:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Bc(s,t,n,c);i.isListOwner&&Vc(i,c)})},Vc=(e,t)=>{let n=e instanceof Zs?e.start:1,r=e instanceof Zs&&e.reversed;for(let e=0;e<t.length;e++){let i=c(t,e);i.container instanceof Xs&&typeof i.container.value==`number`&&i.container.value!==0&&(n=i.container.value),i.listValue=_r(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},Hc=e=>{let t=new Ic(e,null),n=new Fc(t),r=[];return Bc(t,n,n,r),Vc(t.container,r),n},Uc=e=>Math.min(1,Math.max(0,e)),Wc=e=>{let t=c(e,0),n=c(e,e.length-1);if(n.stop-t.stop<1e-6)return null;let r=Math.max(n.stop-t.stop,.01),i=[],a=Math.ceil(1/r);for(let n=0;n<a;n++)for(let a of e){let e=n*r+(a.stop-t.stop);if(e>1)break;i.push({stop:e,color:z(a.color)})}let o=i[i.length-1];return(!o||o.stop<1)&&i.push({stop:1,color:z(n.color)}),i},Gc=e=>e.map(e=>({stop:Uc(e.stop),color:z(e.color)})),Kc=(e,t,n,r,i=!1)=>{let a=W(r,t),o=c(a,a.length-1),s=z(o.color),l=e.createElement(`canvas`);l.width=Math.max(1,Math.ceil(t*2)),l.height=Math.max(1,Math.ceil(n*2));let u=l.getContext(`2d`);if(!u)return null;let d;if(i){let e=Wc(a);if(!e)return u.fillStyle=s,u.fillRect(0,0,l.width,l.height),{canvas:l,lastColor:s,rx:t,ry:n};d=e}else d=Gc(a);let f=u.createRadialGradient(t,t,0,t,t,t);return d.forEach(e=>f.addColorStop(Uc(e.stop),e.color)),u.fillStyle=f,t!==n&&u.scale(1,n/t),u.fillRect(0,0,t*2,t*2),{canvas:l,lastColor:s,rx:t,ry:n}},qc=e=>{let t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Jc=e=>{let t=e.styles,n=e.bounds,r=I(t.paddingLeft,n.width),i=I(t.paddingRight,n.width),a=I(t.paddingTop,n.width),o=I(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},Yc=(e,t)=>e===0?t.bounds:e===2?Jc(t):qc(t),Xc=(e,t)=>e===0?t.bounds:e===2?Jc(t):qc(t),Zc=(e,t,n)=>{let r=Yc(tl(e.styles.backgroundOrigin,t),e),i=Xc(tl(e.styles.backgroundClip,t),e),a=el(tl(e.styles.backgroundSize,t),n,r),[o,s]=a,c=He(tl(e.styles.backgroundPosition,t),r.width-o,r.height-s),l=nl(tl(e.styles.backgroundRepeat,t),c,a,r,i),u=Math.round(r.left+c[0]),d=Math.round(r.top+c[1]);return o=Math.max(1,o),s=Math.max(1,s),[l,u,d,o,s]},Qc=e=>D(e)&&e.value===`auto`,$c=e=>typeof e==`number`,el=(e,[t,n,r],i)=>{let[a,o]=e;if(!a)return[0,0];if(M(a)&&o&&M(o))return[I(a,i.width),I(o,i.height)];let s=$c(r);if(D(a)&&(a.value===`contain`||a.value===`cover`))return $c(r)?i.width/i.height<r==(a.value===`cover`)?[i.height*r,i.height]:[i.width,i.width/r]:[i.width,i.height];let c=$c(t),l=$c(n),u=c||l;if(Qc(a)&&(!o||Qc(o)))return c&&l?[t,n]:!s&&!u?[i.width,i.height]:u&&s?[c?t:n*r,l?n:t/r]:[c?t:i.width,l?n:i.height];if(s){let e=0,t=0;return M(a)?e=I(a,i.width):o&&M(o)&&(t=I(o,i.height)),Qc(a)?e=t*r:(!o||Qc(o))&&(t=e/r),[e,t]}let d=null,f=null;if(M(a)?d=I(a,i.width):o&&M(o)&&(f=I(o,i.height)),d!==null&&(!o||Qc(o))&&(f=c&&l?d/t*n:i.height),f!==null&&Qc(a)&&(d=c&&l?f/n*t:i.width),d!==null&&f!==null)return[d,f];throw Error(`Unable to calculate background-size for element`)},tl=(e,t)=>{let n=e[t];return n===void 0?c(e,0):n},nl=(e,[t,n],[r,i],a,o)=>{switch(e){case 2:return[new J(Math.round(a.left),Math.round(a.top+n)),new J(Math.round(a.left+a.width),Math.round(a.top+n)),new J(Math.round(a.left+a.width),Math.round(i+a.top+n)),new J(Math.round(a.left),Math.round(i+a.top+n))];case 3:return[new J(Math.round(a.left+t),Math.round(a.top)),new J(Math.round(a.left+t+r),Math.round(a.top)),new J(Math.round(a.left+t+r),Math.round(a.height+a.top)),new J(Math.round(a.left+t),Math.round(a.height+a.top))];case 1:return[new J(Math.round(a.left+t),Math.round(a.top+n)),new J(Math.round(a.left+t+r),Math.round(a.top+n)),new J(Math.round(a.left+t+r),Math.round(a.top+n+i)),new J(Math.round(a.left+t),Math.round(a.top+n+i))];default:return[new J(Math.round(o.left),Math.round(o.top)),new J(Math.round(o.left+o.width),Math.round(o.top)),new J(Math.round(o.left+o.width),Math.round(o.height+o.top)),new J(Math.round(o.left),Math.round(o.height+o.top))]}};var Z=class extends Error{};let Q=e=>{e.width=e.height=0},rl=[`brightness`,`contrast`,`grayscale`,`hue-rotate`,`invert`,`opacity`,`saturate`,`sepia`],il=/* @__PURE__ */ new Map,al={functions:[]};function ol(e){if(!e||e===`none`)return al;let t=il.get(e);if(t!==void 0)return il.delete(e),il.set(e,t),t;let n=sl(e);if(il.size>=256){let e=il.keys().next().value;e!==void 0&&il.delete(e)}return il.set(e,n),n}let sl=e=>{let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===` `||r===`
11
+ `||r===` `){n++;continue}let i=e.indexOf(`(`,n);if(i===-1)return null;let a=e.slice(n,i).trim();if(!/^[a-zA-Z-]+$/.test(a))return null;let o=cl(e,i);if(o===-1)return null;let s=ul(a,e.slice(i+1,o).trim());if(!s)return null;t.push(s),n=o+1}return{functions:t}},cl=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r++){let t=e[r];if(t===`(`)n++;else if(t===`)`&&(n--,n===0))return r}return-1},ll=/^-?\d+(?:\.\d+)?px$/,ul=(e,t)=>{if(e===`blur`){if(t===`0`)return{kind:`blur`,value:0};if(!ll.test(t))return null;let e=Number.parseFloat(t);return e<0?null:{kind:`blur`,value:e}}if(e===`drop-shadow`)return fl(t);if(rl.indexOf(e)!==-1){let n=e;if(n===`hue-rotate`){let e=pl(t);return e===null?null:{kind:`unitless`,name:n,value:e}}let r=t.trim(),i=r.endsWith(`%`),a=i?r.slice(0,-1):r;return/^-?\d+(?:\.\d+)?$/.test(a)?{kind:`unitless`,name:n,value:Number.parseFloat(a)*(i?1/100:1)}:null}return null},dl=e=>{let t=[],n=0,r=``;for(let i of e)i===`(`?n++:i===`)`&&n--,i===` `&&n===0?(r&&t.push(r),r=``):r+=i;return r&&t.push(r),t},fl=e=>{let t=dl(e),n=t.filter(e=>ll.test(e)).map(e=>Number.parseFloat(e));if(n.length<2||n.length>3)return null;let r=t.filter(e=>!ll.test(e));return t.length-r.length===n.length?{kind:`drop-shadow`,x:n[0],y:n[1],blur:n[2]??0,color:r.join(` `)||`rgba(0, 0, 0, 0)`}:null},pl=e=>{let t=e.trim();if(t===`0`)return 0;let n=Number.parseFloat(t);return Number.isNaN(n)?null:t.endsWith(`deg`)?n:t.endsWith(`grad`)?n*.9:t.endsWith(`rad`)?n*180/Math.PI:t.endsWith(`turn`)?n*360:null},ml=(e,t)=>e.functions.map(e=>{switch(e.kind){case`blur`:return`blur(${e.value*t}px)`;case`drop-shadow`:return`drop-shadow(${e.x*t}px ${e.y*t}px ${e.blur*t}px ${e.color})`;case`unitless`:return e.name===`hue-rotate`?`hue-rotate(${e.value}deg)`:`${e.name}(${e.value})`}}).join(` `);function hl(e){let t=0,n=0;for(let r of e.functions)r.kind===`blur`?t+=r.value:r.kind===`drop-shadow`&&(t+=r.blur,n=Math.max(n,Math.abs(r.x),Math.abs(r.y)));return Math.ceil(3*t+n)}function gl(e){let t=(e.ownerDocument??document).createElement(`canvas`);return t.width=e.width,t.height=e.height,t}let _l=(e,t)=>new Promise((n,r)=>{let i=e=>{clearTimeout(o),t?.removeEventListener(`abort`,a),e?r(e):n()},a=()=>i(new DOMException(`The operation was aborted.`,`AbortError`)),o=setTimeout(()=>i(new Z(`Filter surface image decode timed out`)),1e4);t?.addEventListener(`abort`,a,{once:!0}),t?.aborted?a():e.decode().then(()=>i(),()=>i(new Z(`Filter surface image decode failed`)))}),vl=/* @__PURE__ */ new WeakMap;function yl(e=document){let t=vl.get(e);if(t!==void 0)return t;let n=e.createElement(`canvas`),r=e.createElement(`canvas`),i=!1;try{n.width=n.height=r.width=r.height=32;let e=n.getContext(`2d`),t=r.getContext(`2d`);if(e&&t&&`filter`in t){e.fillStyle=`#fff`,e.fillRect(8,8,8,8),t.filter=`blur(2px)`,t.drawImage(n,0,0);let r=(t.getImageData(6,12,1,1).data[3]??0)>0;t.clearRect(0,0,32,32),t.filter=`drop-shadow(12px 0px 0px rgba(255, 0, 0, 0.5))`,t.drawImage(n,0,0);let a=t.getImageData(24,12,1,1).data;i=r&&(a[0]??0)>240&&(a[1]??0)<10&&(a[3]??0)>=126&&(a[3]??0)<=129}}catch{}finally{Q(n),Q(r)}return vl.set(e,i),i}function bl(e,t,n,r,i){let a,o,s=!1;try{q(i),a=gl(e);let c=a.getContext(`2d`);if(!c||!(`filter`in c)||(c.filter=ml(t,r),c.filter===`none`||c.filter===``))return null;c.drawImage(e,0,0),q(i),o=gl(e);let l=o.getContext(`2d`);return l?(l.globalAlpha=n,l.drawImage(a,0,0),q(i),s=!0,o):null}catch{return q(i),null}finally{a&&Q(a),o&&!s&&Q(o)}}let xl=e=>{let t=0,n=0;for(let r of e.functions)if(r.kind===`blur`)t++;else if(r.kind===`drop-shadow`)n++;else return!1;return t>1||n>1?!1:t>0&&n>0?e.functions.findIndex(e=>e.kind===`blur`)<e.functions.findIndex(e=>e.kind===`drop-shadow`):!0};async function Sl(e,t,n,r,i){if(q(i),t.functions.length>0&&yl(e.ownerDocument??document)){let a=bl(e,t,n,r,i);if(a)return a}if(!xl(t))throw new Z(`Filter chain requires native canvas filters`);return Cl(e,t,n,r,i)}async function Cl(e,t,n,r,i){q(i);let a=t.functions.find(e=>e.kind===`blur`),o=t.functions.find(e=>e.kind===`drop-shadow`),s=a&&a.kind===`blur`?a.value:0,c=o&&o.kind===`drop-shadow`?{x:o.x,y:o.y,blur:o.blur,color:o.color}:void 0;if(!s&&!c){let t=gl(e),r=t.getContext(`2d`);if(!r)throw Q(t),new Z(`Filter surface canvas is unavailable`);r.globalAlpha=n;try{return r.drawImage(e,0,0),t}catch{throw Q(t),new Z(`Filter surface image cannot be drawn`)}}let l=e.ownerDocument??document,u=(e,t={})=>{let n=l.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.entries(t).forEach(([e,t])=>n.setAttribute(e,String(t))),n},d=u(`svg`,{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`}),f=u(`defs`),p=u(`filter`,{id:`composited-filter`,filterUnits:`userSpaceOnUse`,x:0,y:0,width:e.width,height:e.height,"color-interpolation-filters":`sRGB`});if(s&&p.appendChild(u(`feGaussianBlur`,{stdDeviation:s*r,result:`blurred-source`})),c){p.appendChild(u(`feGaussianBlur`,{in:s?`blurred-source`:`SourceAlpha`,stdDeviation:c.blur*r})),p.appendChild(u(`feOffset`,{dx:c.x*r,dy:c.y*r,result:`offset-shadow`})),p.appendChild(u(`feFlood`,{"flood-color":c.color})),p.appendChild(u(`feComposite`,{in2:`offset-shadow`,operator:`in`}));let e=u(`feMerge`);e.appendChild(u(`feMergeNode`)),e.appendChild(u(`feMergeNode`,{in:s?`blurred-source`:`SourceGraphic`})),p.appendChild(e)}f.appendChild(p),d.appendChild(f);let m;try{if(m=e.toDataURL(`image/png`),m===`data:,`)throw Error(`Canvas size is unsupported`)}catch{throw new Z(`Filter surface pixels cannot be serialized`)}d.appendChild(u(`image`,{width:e.width,height:e.height,href:m,filter:`url(#composited-filter)`}));let h=l.defaultView,g=h?.Image?new h.Image:new Image,_;try{g.src=`data:image/svg+xml,${encodeURIComponent(new XMLSerializer().serializeToString(d))}`,await _l(g,i),q(i),_=gl(e);let t=_.getContext(`2d`);if(!t)throw new Z(`Filter surface canvas is unavailable`);return t.globalAlpha=n,t.drawImage(g,0,0),_}catch(e){throw _&&Q(_),i?.aborted&&q(i),e instanceof Z?e:new Z(`Filter surface image cannot be drawn`)}finally{g.removeAttribute(`src`)}}function wl(e,t,n){let r=t*n*4;return!Number.isFinite(r)||t<=0||n<=0||t>8192||n>8192||e.pixels+r>16777216?0:(e.pixels+=r,r)}let Tl=(e,t)=>e.add(-t,-t,t*2,t*2),El=(e,t)=>new a(Math.min(e.left,t.left),Math.min(e.top,t.top),Math.max(e.left+e.width,t.left+t.width)-Math.min(e.left,t.left),Math.max(e.top+e.height,t.top+t.height)-Math.min(e.top,t.top));function Dl(e){let t=e.styles,n=e.bounds;for(let r of t.boxShadow)if(!r.inset){let t=Math.max(0,r.spread.number)+3*r.blur.number;n=El(n,Tl(e.bounds.add(r.offsetX.number,r.offsetY.number,0,0),t))}for(let r of e.textNodes)for(let i of r.textBounds){let r=Tl(i.bounds,2*I(t.fontSize,e.bounds.height)+t.webkitTextStrokeWidth);n=El(n,r);for(let e of t.textShadow)n=El(n,Tl(r.add(e.offsetX.number,e.offsetY.number,0,0),3*e.blur.number))}for(let t of e.elements)t.styles.isVisible()&&(n=El(n,Dl(t)));let r=ol(t.filter);return Tl(n,r?hl(r):0)}function Ol(e,t,n,r){let i=Tl(t,n),o=Math.floor(Math.max(e.left,i.left)*r)/r,s=Math.floor(Math.max(e.top,i.top)*r)/r,c=Math.ceil(Math.min(e.left+e.width,i.left+i.width)*r)/r,l=Math.ceil(Math.min(e.top+e.height,i.top+i.height)*r)/r;return new a(o,s,Math.max(0,c-o),Math.max(0,l-s))}var kl=class{ctx;constructor(e){this.ctx=e}render(e,t){this.ctx.fillStyle=z(t.textDecorationColor??t.color);let n=1;typeof t.textDecorationThickness==`number`?n=t.textDecorationThickness:t.textDecorationThickness===`from-font`&&(n=Math.max(1,Math.floor(t.fontSize.number*.05)));let r=0;typeof t.textUnderlineOffset==`number`&&(r=t.textUnderlineOffset);let i=t.textDecorationStyle;t.textDecorationLine.forEach(t=>{let a=0;switch(t){case 1:a=e.top+e.height-n+r;break;case 2:a=e.top;break;case 3:a=e.top+(e.height/2-n/2);break;default:return}this.draw(e.left,a,e.width,n,i)})}draw(e,t,n,r,i){switch(i){case 0:this.ctx.fillRect(e,t,n,r);break;case 1:{let i=Math.max(1,r);this.ctx.fillRect(e,t,n,r),this.ctx.fillRect(e,t+r+i,n,r);break}case 2:this.drawPattern(e,t,n,r,[r,r*2]);break;case 3:this.drawPattern(e,t,n,r,[r*3,r*2]);break;case 4:this.drawWavy(e,t,n,r);break;default:this.ctx.fillRect(e,t,n,r)}}drawPattern(e,t,n,r,i){this.ctx.save(),this.ctx.beginPath(),this.ctx.setLineDash(i),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.moveTo(e,t+r/2),this.ctx.lineTo(e+n,t+r/2),this.ctx.stroke(),this.ctx.restore()}drawWavy(e,t,n,r){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=r,this.ctx.strokeStyle=this.ctx.fillStyle;let i=r*2,a=r*4,o=e;for(this.ctx.moveTo(o,t+r/2);o<e+n;){let s=Math.min(o+a/2,e+n);if(this.ctx.quadraticCurveTo(o+a/4,t+r/2-i,s,t+r/2),o=s,o<e+n){let s=Math.min(o+a/2,e+n);this.ctx.quadraticCurveTo(o+a/4,t+r/2+i,s,t+r/2),o=s}}this.ctx.stroke(),this.ctx.restore()}};let Al=e=>e!==void 0&&!Number.isNaN(e),jl=(e,t)=>{let n=e.measureText(`Mg`),r=n;return{baseline:Al(r.fontBoundingBoxAscent)?r.fontBoundingBoxAscent:Al(n.actualBoundingBoxAscent)?n.actualBoundingBoxAscent:t,height:Al(r.fontBoundingBoxAscent)&&Al(r.fontBoundingBoxDescent)?r.fontBoundingBoxAscent+r.fontBoundingBoxDescent:Al(n.actualBoundingBoxAscent)&&Al(n.actualBoundingBoxDescent)?n.actualBoundingBoxAscent+n.actualBoundingBoxDescent:t}},Ml=(e,t)=>jl(e,t).baseline,Nl=/[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/,Pl=e=>Nl.test(e),Fl=()=>typeof navigator>`u`?!1:navigator.userAgentData!==void 0||(typeof window<`u`?window:void 0)?.chrome!==void 0,Il=()=>Fl()?`miter`:`round`;var Ll=class{ctx;options;decorationRenderer;baselineCache=/* @__PURE__ */ new Map;glyphWidthCache=null;constructor(e){this.ctx=e.ctx,this.options=e.options,this.decorationRenderer=new kl(e.ctx)}cachedMeasureText(e,t){let n=this.glyphWidthCache;n||(n=/* @__PURE__ */ new Map,this.glyphWidthCache=n);let r=e+t,i=n.get(r);return i===void 0&&(i=this.ctx.measureText(e).width,n.set(r,i)),i}iterateLettersWithLetterSpacing(e,t,n,r,i){if(ka(r)){this.iterateVerticalGlyphs(e,t,n,r,i);return}let a=Rs(e.text),o=e.bounds.top+n,s=this.ctx.font,c=e.bounds.left;for(let e of a)i(e,c,o),c+=this.cachedMeasureText(e,s)+t}iterateVerticalGlyphs(e,t,n,r,i){let a=Rs(e.text),o=this.ctx.font,s=r===4?-Math.PI/2:Math.PI/2,c=e.bounds.top;for(let l=0;l<a.length;){let u=a[l];if(!(Aa(r)||!Pl(u)&&u.trim().length>0)){let r=this.ctx.textBaseline;Pl(u)&&(this.ctx.textBaseline=`ideographic`),i(u,e.bounds.left,c+n),this.ctx.textBaseline=r,c+=this.cachedMeasureText(u,o)+t,l++;continue}let d=l;for(;l<a.length;){let e=a[l];if(!Aa(r)&&!Pl(e)&&e.trim().length===0)break;if(Aa(r)||!Pl(e)&&e.trim().length>0)l++;else break}this.ctx.save(),this.ctx.translate(e.bounds.left+n,c),this.ctx.rotate(s);let f=0;for(let e=d;e<l;e++){let n=a[e];i(n,0,f),f+=this.cachedMeasureText(n,o)+t}this.ctx.restore(),c+=f}}renderTextWithLetterSpacing(e,t,n,r=0){this.renderFillText(e,t,n,r)}canRenderWholeText(e,t){return e===0&&!ka(t)}renderFillText(e,t,n,r){this.canRenderWholeText(t,r)?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):this.iterateLettersWithLetterSpacing(e,t,n,r,(e,t,n)=>{this.ctx.fillText(e,t,n)})}renderStrokeText(e,t,n,r){this.canRenderWholeText(t,r)?this.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+n):this.iterateLettersWithLetterSpacing(e,t,n,r,(e,t,n)=>{this.ctx.strokeText(e,t,n)})}renderTextStrokeWithStyle(e,t,n){t.webkitTextStrokeWidth&&e.text.trim().length&&(this.ctx.strokeStyle=z(t.webkitTextStrokeColor),this.ctx.lineWidth=t.webkitTextStrokeWidth,this.ctx.lineJoin=Il(),this.renderStrokeText(e,t.letterSpacing,n,t.writingMode),this.ctx.strokeStyle=``,this.ctx.lineWidth=0,this.ctx.lineJoin=`miter`)}renderTextFillWithShadows(e,t,n){this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,n,t.writingMode);let r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(r=>{this.ctx.shadowColor=z(r.color),this.ctx.shadowOffsetX=r.offsetX.number*this.options.scale,this.ctx.shadowOffsetY=r.offsetY.number*this.options.scale,this.ctx.shadowBlur=r.blur.number*this.options.scale,this.renderTextWithLetterSpacing(e,t.letterSpacing,n,t.writingMode)}),this.ctx.shadowColor=``,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0)}renderTextBoundWithPaintOrder(e,t,n,r){n.forEach(n=>{switch(n){case 0:this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(e,t.letterSpacing,r,t.writingMode);break;case 1:this.renderTextStrokeWithStyle(e,t,r)}})}renderTextDecoration(e,t){this.decorationRenderer.render(e,t)}truncateTextWithEllipsis(e,t,n){let r=this.ctx.measureText(`…`).width,i=Rs(e);if(n===0){let e=e=>this.ctx.measureText(i.slice(0,e).join(``)).width+r<=t,n=0,a=i.length;for(;n<a;){let t=n+a+1>>1;e(t)?n=t:a=t-1}return i.slice(0,n).join(``)+`…`}{let e=this.ctx.font,a=r,o=[];for(let r of i){let i=this.cachedMeasureText(r,e);if(a+i>t)break;o.push(r),a+=i+n}return o.join(``)+`…`}}createFontStyle(e){let t=e.fontVariant.filter(e=>e===`normal`||e===`small-caps`).join(``),n=e.fontFamily.join(`, `),r=T(e.fontSize)?`${e.fontSize.number}${e.fontSize.unit}`:`${e.fontSize.number}px`;return[[e.fontStyle,t,e.fontWeight,r,n].join(` `),n,r]}resolveFillColor(e){return z(e.webkitTextFillColor??e.color)}renderLineClampedText(e,t,n,r,i){let a=na(t.lineHeight,t.fontSize.number),o=[],s=[],l=c(e.textBounds,0).bounds.top;e.textBounds.forEach(e=>{Math.abs(e.bounds.top-l)>=a*.5?(s.length>0&&o.push(s),s=[e],l=e.bounds.top):s.push(e)}),s.length>0&&o.push(s);let u=t.webkitLineClamp;if(o.length<=u)return!1;for(let e=0;e<u-1;e++)c(o,e).forEach(e=>this.renderTextBoundWithPaintOrder(e,t,n,r));let d=o[u-1];if(d?.length&&i){let e=d.map(e=>e.text).join(``),a=c(d,0),o=i.width-(a.bounds.left-i.left),s=new Ms(this.truncateTextWithEllipsis(e,o,t.letterSpacing),a.bounds);for(let e of n)e===0?(this.ctx.fillStyle=this.resolveFillColor(t),this.renderTextWithLetterSpacing(s,t.letterSpacing,r,t.writingMode)):e===1&&this.renderTextStrokeWithStyle(s,t,r)}return!0}renderEllipsisText(e,t,n,r,i){let a=na(t.lineHeight,t.fontSize.number),o=c(e.textBounds,0).bounds.top;if(!e.textBounds.every(e=>Math.abs(e.bounds.top-o)<a*.5))return!1;let s=e.textBounds.map(e=>e.text).join(``).replace(/\s+/g,` `).trim();if(this.ctx.measureText(s).width<=i.width+1)return!1;let l=new Ms(this.truncateTextWithEllipsis(s,i.width,t.letterSpacing),c(e.textBounds,0).bounds);for(let e of n)e===0?this.renderTextFillWithShadows(l,t,r):e===1&&this.renderTextStrokeWithStyle(l,t,r);return!0}measureBaselineCached(e,t){let n=this.baselineCache.get(e);return n===void 0&&(n=Ml(this.ctx,t),this.baselineCache.size>=64&&this.baselineCache.clear(),this.baselineCache.set(e,n)),n}async renderTextNode(e,t,n){this.glyphWidthCache=null;let[r]=this.createFontStyle(t);this.ctx.font=r??``,this.ctx.direction=t.direction===1?`rtl`:`ltr`,this.ctx.textAlign=`left`,this.ctx.textBaseline=`alphabetic`;let i=t.paintOrder,a=this.measureBaselineCached(r??``,t.fontSize.number);t.webkitLineClamp>0&&t.display&34&&t.overflowY===1&&e.textBounds.length>0&&this.renderLineClampedText(e,t,i,a,n)||t.textOverflow===1&&n&&t.overflowX===1&&e.textBounds.length>0&&this.renderEllipsisText(e,t,i,a,n)||(e.textBounds.forEach(e=>{i.forEach(n=>{n===0?(this.renderTextFillWithShadows(e,t,a),t.textDecorationLine.length&&this.renderTextDecoration(e.bounds,t)):n===1&&this.renderTextStrokeWithStyle(e,t,a)})}),t.textEmphasisStyle&&this.renderTextEmphasis(e,t,a))}renderTextEmphasis(e,t,n){if(ka(t.writingMode))return;let r=t.textEmphasisStyle;if(!r)return;let i=t.fontSize.number,a=i*.5,o=z(t.textEmphasisColor??t.color),s=t.textEmphasisPosition,c=(e,t)=>{if(typeof r==`string`){let n=this.ctx.font;this.ctx.font=n.replace(/^\S+/,`${a}px`),this.ctx.textAlign=`center`,this.ctx.fillText(r,e,t+a/3),this.ctx.font=n,this.ctx.textAlign=`left`;return}let{fill:n,shape:i}=r,o=a*(i===`dot`?.3:i===`sesame`?.26:.34);this.ctx.beginPath(),i===`sesame`?this.ctx.ellipse(e,t,o*1.3,o*.8,Math.PI/4,0,Math.PI*2):i===`triangle`?(this.ctx.moveTo(e,t-o),this.ctx.lineTo(e+o*1.1,t+o*.8),this.ctx.lineTo(e-o*1.1,t+o*.8),this.ctx.closePath()):this.ctx.arc(e,t,o,0,Math.PI*2),n?i===`double-circle`?(this.ctx.lineWidth=o*.7,this.ctx.stroke(),this.ctx.beginPath(),this.ctx.arc(e,t,o*.4,0,Math.PI*2),this.ctx.lineWidth=o*.35,this.ctx.stroke()):this.ctx.fill():(this.ctx.lineWidth=Math.max(1,o*.35),this.ctx.stroke(),i===`double-circle`&&(this.ctx.beginPath(),this.ctx.arc(e,t,o*.5,0,Math.PI*2),this.ctx.stroke()))},l=this.ctx.font;for(let r of e.textBounds){let e=r.bounds.top+n,u=s.over?e-i-a*.4:e+a*.9,d=r.bounds.left;for(let e of Rs(r.text)){let n=this.cachedMeasureText(e,l);this.ctx.save();try{this.ctx.fillStyle=o,this.ctx.strokeStyle=o,this.ctx.lineWidth=1,c(d+n/2+t.letterSpacing/2,u)}finally{this.ctx.restore()}d+=n+t.letterSpacing}}}};let Rl=(e,t)=>{t.forEach((t,n)=>{let r=Y(t)?t.start:t;n===0?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y),Y(t)&&e.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},zl=(e,t)=>{e.beginPath(),Rl(e,t),e.closePath()};var Bl=class{maxSize;_map;constructor(e){this.maxSize=e,this._map=/* @__PURE__ */ new Map}get(e){if(!this._map.has(e))return;let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t}set(e,t){if(this._map.has(e))this._map.delete(e);else if(this._map.size>=this.maxSize){let e=this._map.keys().next().value;e!==void 0&&this._map.delete(e)}this._map.set(e,t)}get size(){return this._map.size}clear(){this._map.clear()}},Vl=class{ctx;context;canvas;patternCache=new Bl(50);constructor(e){this.ctx=e.ctx,this.context=e.context,this.canvas=e.canvas}async renderBackgroundImage(e){let t=e.styles.backgroundImage.length-1,n=e.styles.backgroundBlendMode,r=0;for(let i of e.styles.backgroundImage.slice(0).reverse()){if(r>0){let e=n[r]??n[0]??`normal`;e!==`normal`&&(this.ctx.save(),this.ctx.globalCompositeOperation=e)}i.type===0?await this.renderBackgroundURLImage(e,i,t):ni(i)?this.renderLinearGradient(e,i,t):ii(i)?this.renderRepeatingLinearGradient(e,i,t):ri(i)?this.renderRadialGradient(e,i,t):ai(i)?this.renderRepeatingRadialGradient(e,i,t):oi(i)?this.renderConicGradient(e,i,t):si(i)&&this.renderRepeatingConicGradient(e,i,t),r>0&&(n[r]??n[0]??`normal`)!==`normal`&&this.ctx.restore(),t--,r++}}async renderBackgroundURLImage(e,t,n){let r,i=t.url;try{r=await this.context.cache.match(i)}catch{this.context.logger.error(`Error loading background-image ${i}`)}if(r){let t=isNaN(r.width)||r.width===0?1:r.width,a=isNaN(r.height)||r.height===0?1:r.height,[o,s,c,l,u]=Zc(e,n,[t,a,t/a]),d=tl(e.styles.backgroundRepeat,n),f=d===1?`no-repeat`:d===2?`repeat-x`:d===3?`repeat-y`:`repeat`,p=`${i}|${Math.round(l)}x${Math.round(u)}|${e.styles.imageRendering}|${f}`,m=this.patternCache.get(p);if(!m){let t=this.resizeImage(r,l,u,e.styles.imageRendering);m=this.ctx.createPattern(t,f),this.patternCache.set(p,m)}this.renderRepeat(o,m,s,c)}}renderRepeatingLinearGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),[l,u,d,f,p]=Pr(t.angle,o,s),m=i+u,h=i+d,g=a+f,_=a+p,v=W(t.stops,l||1),y=Wc(v),b=this.ctx.createLinearGradient(m,g,h,_);if(y)y.forEach(e=>b.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color));else{let e=z(c(v,v.length-1).color);b.addColorStop(0,e),b.addColorStop(1,e)}this.path(r),this.ctx.fillStyle=b,this.ctx.fill()}renderLinearGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),[c,l,u,d,f]=Pr(t.angle,o,s),p=`lg|${t.angle}|${Math.round(o)}x${Math.round(s)}|${JSON.stringify(t.stops)}`,m=this.patternCache.get(p);if(!m){let e=(this.canvas.ownerDocument??document).createElement(`canvas`);e.width=o,e.height=s;let n=e.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(l,d,u,f);W(t.stops,c||1).forEach(e=>r.addColorStop(e.stop,z(e.color))),n.fillStyle=r,n.fillRect(0,0,o,s),o>0&&s>0&&(m=this.ctx.createPattern(e,`repeat`),this.patternCache.set(p,m))}m&&this.renderRepeat(r,m,i,a)}renderRadialGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),l=t.position.length===0?[P]:t.position,u=I(c(l,0),o),d=I(c(l,l.length-1),s),[f,p]=Ir(t,u,d,o,s);if((f===0||p===0)&&(f=Math.max(f,.01),p=Math.max(p,.01)),f>0&&p>0){let e=`rg|${Math.round(u)}x${Math.round(d)}|${Math.round(f)}x${Math.round(p)}|${JSON.stringify(t.stops)}`,n=W(t.stops,f),o=z(c(n,n.length-1).color),s=this.patternCache.get(e);if(!s){let n=this.canvas.ownerDocument??document,r=Kc(n,f,p,t.stops,!1);if(!r)return;s=this.ctx.createPattern(r.canvas,`no-repeat`),this.patternCache.set(e,s)}this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=o,this.ctx.fill(),this.ctx.translate(i+u-f,a+d-p),this.ctx.fillStyle=s,this.ctx.fillRect(0,0,f*2,p*2),this.ctx.restore()}}renderRepeatingRadialGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),l=t.position.length===0?[P]:t.position,u=I(c(l,0),o),d=I(c(l,l.length-1),s),[f,p]=Ir(t,u,d,o,s);if((f===0||p===0)&&(f=Math.max(f,.01),p=Math.max(p,.01)),!(f>0&&p>0))return;let m=`rrg|${Math.round(u)}x${Math.round(d)}|${Math.round(f)}x${Math.round(p)}|${JSON.stringify(t.stops)}`,h=this.patternCache.get(m);if(!h){let e=this.canvas.ownerDocument??document,n=Kc(e,f,p,t.stops,!0);if(!n)return;h=this.ctx.createPattern(n.canvas,`no-repeat`),this.patternCache.set(m,h)}h&&(this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.translate(i+u-f,a+d-p),this.ctx.fillStyle=h,this.ctx.fillRect(0,0,f*2,p*2),this.ctx.restore())}renderConicGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),l=t.position.length===0?[P]:t.position,u=i+I(c(l,0),o),d=a+I(c(l,l.length-1),s),f=this.ctx.createConicGradient(t.angle-Math.PI/2,u,d);W(t.stops,1).forEach(e=>{f.addColorStop(Math.min(1,Math.max(0,e.stop)),z(e.color))}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=f,this.ctx.fill(),this.ctx.restore()}renderRepeatingConicGradient(e,t,n){let[r,i,a,o,s]=Zc(e,n,[null,null,null]),l=t.position.length===0?[P]:t.position,u=i+I(c(l,0),o),d=a+I(c(l,l.length-1),s),f=W(t.stops,1),p=c(f,0),m=c(f,f.length-1),h=Math.max(m.stop-p.stop,.01);if(m.stop-p.stop<1e-6){let e=this.ctx.createConicGradient(t.angle-Math.PI/2,u,d);e.addColorStop(0,z(m.color)),e.addColorStop(1,z(m.color)),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=e,this.ctx.fill(),this.ctx.restore();return}let g=[],_=Math.ceil(1/h);for(let e=0;e<_;e++)for(let t of f){let n=e*h+(t.stop-p.stop);if(n>1)break;g.push({stop:n,color:z(t.color)})}let v=c(g,g.length-1);v&&v.stop<1&&g.push({stop:1,color:v.color});let y=this.ctx.createConicGradient(t.angle-Math.PI/2,u,d);g.forEach(e=>{y.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.fillStyle=y,this.ctx.fill(),this.ctx.restore()}renderRepeat(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)}resizeImage(e,t,n,r){let i=(this.canvas.ownerDocument??document).createElement(`canvas`);i.width=Math.max(1,t),i.height=Math.max(1,n);let a=i.getContext(`2d`);return a?(r===2||r===1?(this.context.logger.debug(`Disabling image smoothing for background image due to CSS image-rendering`),a.imageSmoothingEnabled=!1):r===3?(this.context.logger.debug(`Enabling image smoothing for background image due to CSS image-rendering: smooth`),a.imageSmoothingEnabled=!0):a.imageSmoothingEnabled=this.ctx.imageSmoothingEnabled,this.ctx.imageSmoothingQuality&&(a.imageSmoothingQuality=this.ctx.imageSmoothingQuality),a.drawImage(e,0,0,e.width,e.height,0,0,t,n),i):e}path(e){zl(this.ctx,e)}};let Hl=(e,t)=>{switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return $(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Ul=(e,t)=>{switch(t){case 0:return $(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return $(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return $(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return $(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Wl=(e,t)=>{switch(t){case 0:return $(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return $(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return $(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return $(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Gl=(e,t)=>{switch(t){case 0:return Kl(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Kl(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Kl(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Kl(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Kl=(e,t)=>{let n=[];return Y(e)?n.push(e.subdivide(.5,!1)):n.push(e),Y(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},$=(e,t,n,r)=>{let i=[];return Y(e)?i.push(e.subdivide(.5,!1)):i.push(e),Y(n)?i.push(n.subdivide(.5,!0)):i.push(n),Y(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Y(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i};var ql=class{ctx;pathCallbacks;constructor(e,t){this.ctx=e.ctx,this.pathCallbacks=t}async renderSolidBorder(e,t,n){this.pathCallbacks.path(Hl(n,t)),this.ctx.fillStyle=z(e),this.ctx.fill()}async renderDoubleBorder(e,t,n,r){if(t<3){await this.renderSolidBorder(e,n,r);return}let i=Ul(r,n);this.pathCallbacks.path(i),this.ctx.fillStyle=z(e),this.ctx.fill();let a=Wl(r,n);this.pathCallbacks.path(a),this.ctx.fill()}async renderDashedDottedBorder(e,t,n,r,i){this.ctx.save();let a=Gl(r,n),o=Hl(r,n);i===2&&(this.pathCallbacks.path(o),this.ctx.clip());let s,l,u,d;Y(c(o,0))?(s=c(o,0).start.x,l=c(o,0).start.y):(s=c(o,0).x,l=c(o,0).y),Y(c(o,1))?(u=c(o,1).end.x,d=c(o,1).end.y):(u=c(o,1).x,d=c(o,1).y);let f;f=Math.abs(n===0||n===2?s-u:l-d),this.ctx.beginPath(),i===3?this.pathCallbacks.formatPath(a):this.pathCallbacks.formatPath(o.slice(0,2));let p=t<3?t*3:t*2,m=t<3?t*2:t;i===3&&(p=t,m=t);let h=!0;if(f<=p*2)h=!1;else if(f<=p*2+m){let e=f/(2*p+m);p*=e,m*=e}else{let e=Math.floor((f+m)/(p+m)),t=(f-e*p)/(e-1),n=(f-(e+1)*p)/e;m=n<=0||Math.abs(m-t)<Math.abs(m-n)?t:n}if(h&&(i===3?this.ctx.setLineDash([0,p+m]):this.ctx.setLineDash([p,m])),i===3?(this.ctx.lineCap=`round`,this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=z(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2){if(Y(c(o,0))){let e=c(o,3),t=c(o,0);this.ctx.beginPath(),this.pathCallbacks.formatPath([new J(e.end.x,e.end.y),new J(t.start.x,t.start.y)]),this.ctx.stroke()}if(Y(c(o,1))){let e=c(o,1),t=c(o,2);this.ctx.beginPath(),this.pathCallbacks.formatPath([new J(e.end.x,e.end.y),new J(t.start.x,t.start.y)]),this.ctx.stroke()}}this.ctx.restore()}};let Jl=(e,t,n)=>{let r=e?[e.top,e.right,e.bottom,e.left]:null;return[0,1,2,3].map(e=>{let i=r?r[e]:null,a=t[e]??0;return!i||i.kind===`auto`?a:i.kind===`number`?a*(i.value??1):i.kind===`length`?i.value??0:(i.value??0)/100*(e===0||e===2?n.height:n.width)})},Yl=(e,t)=>{let n=e?[e.top,e.right,e.bottom,e.left]:null,r=e=>{let r=n?n[e]:null;return r?r.kind===`number`?(t[e]??0)*(r.value??0):r.value??0:0};return{top:r(0),right:r(1),bottom:r(2),left:r(3)}};var Xl=class{ctx;constructor(e){this.ctx=e}renderBorderImage(e,t,n,r,i,a,o,s,c={top:0,right:0,bottom:0,left:0}){e=e.add(-c.left,-c.top,c.left+c.right,c.top+c.bottom);let l=t.naturalWidth||t.width,u=t.naturalHeight||t.height;if(l<=0||u<=0)return;let d=Math.min(n.unit===`percent`?n.top/100*u:Math.min(n.top,u),u),f=Math.min(n.unit===`percent`?n.right/100*l:Math.min(n.right,l),l),p=Math.min(n.unit===`percent`?n.bottom/100*u:Math.min(n.bottom,u),u),m=Math.min(n.unit===`percent`?n.left/100*l:Math.min(n.left,l),l),{left:h,top:g,width:_,height:v}=e;if(_<=0||v<=0)return;let y=Math.min(i,v),b=Math.min(a,_),x=Math.min(o,v-y),S=Math.min(s,_-b);this.drawRegion(t,0,0,m,d,h,g,S,y),this.drawRegion(t,l-f,0,f,d,h+_-b,g,b,y),this.drawRegion(t,l-f,u-p,f,p,h+_-b,g+v-x,b,x),this.drawRegion(t,0,u-p,m,p,h,g+v-x,S,x);let C=[{sx:m,sy:0,sw:l-m-f,sh:d,dx:h+S,dy:g,dw:_-S-b,dh:y,repeat:r.horizontal,horizontal:!0},{sx:l-f,sy:d,sw:f,sh:u-d-p,dx:h+_-b,dy:g+y,dw:b,dh:v-y-x,repeat:r.vertical,horizontal:!1},{sx:m,sy:u-p,sw:l-m-f,sh:p,dx:h+S,dy:g+v-x,dw:_-S-b,dh:x,repeat:r.horizontal,horizontal:!0},{sx:0,sy:d,sw:m,sh:u-d-p,dx:h,dy:g+y,dw:S,dh:v-y-x,repeat:r.vertical,horizontal:!1}];for(let e of C)e.sw<=0||e.sh<=0||e.dw<=0||e.dh<=0||(e.repeat===0?this.ctx.drawImage(t,e.sx,e.sy,e.sw,e.sh,e.dx,e.dy,e.dw,e.dh):(e.repeat===1||e.repeat===2)&&this.drawRepeatedEdge(t,e,e.horizontal,e.repeat===2));n.fill&&this.drawCenterRegion(t,{sx:m,sy:d,sw:l-m-f,sh:u-d-p},{dx:h+S,dy:g+y,dw:_-S-b,dh:v-y-x},r)}drawRegion(e,t,n,r,i,a,o,s,c){r>0&&i>0&&s>0&&c>0&&this.ctx.drawImage(e,t,n,r,i,a,o,s,c)}drawRepeatedEdge(e,t,n,r){let i=n?t.sw:t.sh,a=n?t.dw:t.dh;if(i<=0||a<=0)return;let o,s;r?(s=Math.max(1,Math.round(a/i)),o=a/s):(o=i,s=Math.ceil(a/o)),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.dx,t.dy,t.dw,t.dh),this.ctx.clip();for(let r=0;r<s;r++){let i=r*o;n?this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx+i,t.dy,o,t.dh):this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,t.dx,t.dy+i,t.dw,o)}this.ctx.restore()}drawCenterRegion(e,t,n,r){if(t.sw<=0||t.sh<=0||n.dw<=0||n.dh<=0)return;let i=(e,t,n)=>{if(e===0)return{size:n,count:1};if(e===2){let e=Math.max(1,Math.round(n/t));return{size:n/e,count:e}}return{size:t,count:Math.max(1,Math.ceil(n/t))}},a=i(r.horizontal,t.sw,n.dw),o=i(r.vertical,t.sh,n.dh);this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(n.dx,n.dy,n.dw,n.dh),this.ctx.clip();for(let r=0;r<o.count;r++)for(let i=0;i<a.count;i++)this.ctx.drawImage(e,t.sx,t.sy,t.sw,t.sh,n.dx+i*a.size,n.dy+r*o.size,a.size,o.size);this.ctx.restore()}};let Zl=/blur\((\d+(?:\.\d+)?)px\)/gi,Ql=(e,t)=>t===1?e:e.replace(Zl,(e,n)=>`blur(${parseFloat(n)*t}px)`);var $l=class{ctx;pathCallback;scale;activeEffects=[];didSave=!1;saveAtDepth=-1;constructor(e,t){this.ctx=e.ctx,this.pathCallback=t,this.scale=e.scale??1}applyEffects(e){for(;this.activeEffects.length;)this.popEffect();this.didSave=!1,this.saveAtDepth=-1;let t=e=>kc(e)||Ac(e)||Mc(e),n=e.reduceRight((e,n,r)=>e===-1?t(n)?r:-1:e,-1);for(let r=0;r<e.length;r++){let i=c(e,r);t(i)&&(this.didSave||=(this.ctx.save(),!0),r===n&&(this.saveAtDepth=this.activeEffects.length)),this.applyEffect(i)}}applyEffect(e){kc(e)?(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)):Ac(e)?(this.pathCallback.path(e.path),this.ctx.clip()):Mc(e)?e.applyClip(this.ctx):jc(e)?this.ctx.globalAlpha*=e.opacity:Nc(e)?this.ctx.globalCompositeOperation=e.compositeOperation:Pc(e)&&(this.ctx.filter=Ql(e.safeFilterString,this.scale)||`none`,e.shadow&&(this.ctx.shadowOffsetX=e.shadow.offsetX*this.scale,this.ctx.shadowOffsetY=e.shadow.offsetY*this.scale,this.ctx.shadowBlur=e.shadow.blur*this.scale,this.ctx.shadowColor=e.shadow.color)),this.activeEffects.push(e)}popEffect(){this.activeEffects.length!==0&&(this.didSave&&this.activeEffects.length-1===this.saveAtDepth&&(this.ctx.restore(),this.didSave=!1,this.saveAtDepth=-1),this.activeEffects.pop(),!this.didSave&&this.activeEffects.length===0&&(this.ctx.globalAlpha=1,this.ctx.globalCompositeOperation=`source-over`,this.ctx.filter=`none`,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0,this.ctx.shadowColor=`rgba(0, 0, 0, 0)`))}getActiveEffectCount(){return this.activeEffects.length}hasActiveEffects(){return this.activeEffects.length>0}};let eu=(e,t)=>e.length===0?void 0:e[t%e.length]??e[0],tu=(e,t,n,r)=>{let i=e?e[0]:void 0,a=e&&e.length>1?c(e,1):void 0,o=e=>e!==void 0&&D(e)?e.value:null,s=(e,t,n)=>e===void 0||D(e)?null:M(e)?I(e,t):n,l=o(i);if(l===`contain`||l===`cover`){let e=l===`contain`?Math.min(t.width/n,t.height/r):Math.max(t.width/n,t.height/r);return{width:n*e,height:r*e}}let u=s(i,t.width,n),d=s(a,t.height,r);return u===null&&d===null?(u=n,d=r):u===null?u=n/r*d:d===null&&(d=r/n*u),{width:u,height:d}},nu=(e,t,n,r,i)=>{let a=t.naturalWidth||t.width||i.width,o=t.naturalHeight||t.height||i.height,{width:s,height:l}=tu(eu(n.maskSize,r),i,a,o),u=eu(n.maskPosition,r)??[],d=i.left+I(c(u,0),i.width-s),f=i.top+I(c(u,u.length-1),i.height-l),p=eu(n.maskRepeat,r)??0,m=p===0||p===2,h=p===0||p===3,g=m?Math.ceil((d-i.left)/s):0,_=h?Math.ceil((f-i.top)/l):0,v=m?Math.ceil((i.left+i.width-d)/s):0,y=h?Math.ceil((i.top+i.height-f)/l):0;for(let n=-_;n<=y;n++)for(let r=-g;r<=v;r++)e.drawImage(t,d+r*s,f+n*l,s,l)},ru=(e,t,n)=>{let{width:r,height:i}=n,a=t.position.length===0?[P]:t.position,o=I(c(a,0),r),s=I(c(a,a.length-1),i),[l,u]=Ir(t,o,s,r,i);l=Math.max(l,.01),u=Math.max(u,.01);let d=e.canvas.ownerDocument??document,f=Kc(d,l,u,t.stops,ai(t));f&&(e.fillStyle=f.lastColor,e.fillRect(n.left,n.top,n.width,n.height),e.drawImage(f.canvas,n.left+o-l,n.top+s-u,l*2,u*2))},iu=(e,t,n)=>{let{width:r,height:i}=n;if(r<=0||i<=0)return;if(ri(t)||ai(t)){ru(e,t,n);return}let a=null;if(t.type===1||t.type===3){let o=t,[s,l,u,d,f]=Pr(o.angle||0,r,i),p=W(o.stops,s||1);if(t.type===3){let t=Wc(p);if(!t){e.fillStyle=z(c(p,p.length-1).color),e.fillRect(n.left,n.top,r,i);return}a=e.createLinearGradient(n.left+l,n.top+d,n.left+u,n.top+f),t.forEach(e=>a.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}else a=e.createLinearGradient(n.left+l,n.top+d,n.left+u,n.top+f),Gc(p).forEach(e=>a.addColorStop(e.stop,e.color))}else if(t.type===5||t.type===6){let o=t,s=W(o.stops,1),l=t.type===6;if(l&&!Wc(s)){e.fillStyle=z(c(s,s.length-1).color),e.fillRect(n.left,n.top,r,i);return}a=e.createConicGradient(o.angle-Math.PI/2,n.left+r/2,n.top+i/2),((l?Wc(s):null)??Gc(s)).forEach(e=>a.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color))}a&&(e.fillStyle=a,e.fillRect(n.left,n.top,r,i))},au=async(e,t,n,r,i)=>{for(let a=0;a<t.length;a++){let o=c(t,a);if(o.type===0){let t=await i(o.url);t&&nu(e,t,n,a,r)}else iu(e,o,r)}},ou=(e,t,n,r,i)=>{let a=0,o=0,s=e,c=t,l=n.left,u=n.top,d=n.width,f=n.height,p=d/f,m=s/c,h=i?I(i[0],1):.5,g=i?I(i[1],1):.5;if(r===2)m>p?(f=d/m,u+=(n.height-f)*g):(d=f*m,l+=(n.width-d)*h);else if(r===4)m>p?(s=c*p,a+=(e-s)*h):(c=s/p,o+=(t-c)*g);else if(r===8)s>d?(a+=(s-d)*h,s=d):(l+=(d-s)*h,d=s),c>f?(o+=(c-f)*g,c=f):(u+=(f-c)*g,f=c);else if(r===16){let e=m>p?d:f*m,t=m>p?d/m:f,r=Math.min(s,d),i=Math.min(c,f);e*t<r*i?m>p?(f=d/m,u+=(n.height-f)*g):(d=f*m,l+=(n.width-d)*h):(s>d?(a+=(s-d)*h,s=d):(l+=(d-s)*h,d=s),c>f?(o+=(c-f)*g,c=f):(u+=(f-c)*g,f=c))}return{sx:a,sy:o,sw:s,sh:c,dx:l,dy:u,dw:d,dh:f}};async function su(e,t,n,r,i,a,o,s){if(i instanceof Gs)try{let n=await t.cache.match(i.src),r=e.imageSmoothingEnabled;o.imageRendering===2||o.imageRendering===1?e.imageSmoothingEnabled=!1:o.imageRendering===3&&(e.imageSmoothingEnabled=!0),s(i,a,n),e.imageSmoothingEnabled=r}catch{t.logger.error(`Error loading image ${i.src}`)}if(i instanceof Ks&&s(i,a,i.canvas),i instanceof Ys)try{s(i,a,await t.cache.match(i.svg))}catch{t.logger.error(`Error loading svg ${i.svg.substring(0,255)}`)}if(i instanceof oc&&i.tree){let a=await r(t,{scale:n.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}).render(i.tree);i.width&&i.height&&e.drawImage(a,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height)}}function cu(e,t,n,r,i){if(r instanceof rc){let t=Math.min(r.bounds.width,r.bounds.height);r.type===`checkbox`&&r.checked?(e.save(),n([new J(r.bounds.left+t*.39363,r.bounds.top+t*.79),new J(r.bounds.left+t*.16,r.bounds.top+t*.5549),new J(r.bounds.left+t*.27347,r.bounds.top+t*.44071),new J(r.bounds.left+t*.39694,r.bounds.top+t*.5649),new J(r.bounds.left+t*.72983,r.bounds.top+t*.23),new J(r.bounds.left+t*.84,r.bounds.top+t*.34085),new J(r.bounds.left+t*.39363,r.bounds.top+t*.79)]),e.fillStyle=z(r.styles.accentColor??7733247),e.fill(),e.restore()):r.type===`radio`&&r.checked&&(e.save(),e.beginPath(),e.arc(r.bounds.left+t/2,r.bounds.top+t/2,t/4,0,Math.PI*2,!0),e.fillStyle=z(r.styles.accentColor??7733247),e.fill(),e.restore())}if(fu(r)&&r.value.length){let[o]=t.createFontStyle(i);e.font=o??``;let s=I(i.fontSize,0),{baseline:c,height:l}=jl(e,s);e.fillStyle=r instanceof rc&&r.isPlaceholder?z(1970632191):z(i.color),e.textBaseline=`alphabetic`,e.textAlign=pu(r.styles.textAlign);let u=Jc(r),d=r instanceof rc?lu(u,qc(r),l):u,f=0;switch(r.styles.textAlign){case 1:f+=u.width/2;break;case 2:f+=u.width}let p=0;r instanceof rc&&(p=(u.height-l)/2);let m=u.add(f,p,0,0);e.save(),n([new J(d.left,d.top),new J(d.left+d.width,d.top),new J(d.left+d.width,d.top+d.height),new J(d.left,d.top+d.height)]),e.clip();let h=uu(e,r.value,u.width,i.whiteSpace===`pre`||i.whiteSpace===`nowrap`),g=na(i.lineHeight,s);h.forEach((n,r)=>{let o=m.left,s=e.measureText(n).width;switch(i.textAlign){case 1:o+=(u.width-s)/2;break;case 2:o+=u.width-s}let l=new a(o,m.top+r*g,0,0);t.renderTextWithLetterSpacing(new Ms(n,l),i.letterSpacing,c,i.writingMode)}),e.restore(),e.textBaseline=`alphabetic`,e.textAlign=`left`}}let lu=(e,t,n)=>e.height<n?new a(e.left,t.top,e.width,t.height):e,uu=(e,t,n,r)=>{let i=[],a=t.split(`
12
+ `);for(let t of a){if(r){i.push(t);continue}let a=t.split(/(\s+)/),o=``;for(let t of a){let r=o+t;e.measureText(r).width<=n||o===``?o=r:(i.push(o),o=t)}i.push(o)}return i};async function du(e,t,n,r,i,o){if(H(i.styles.display,2048)){if(i.styles.listStyleImage!==null){let n=i.styles.listStyleImage;if(n.type===0){let r=n.url;try{let n=await t.cache.match(r),a=I(o.fontSize,0),s=n?.naturalWidth||n.width,c=n?.naturalHeight||n.height;if(s<=0||c<=0)return;let l=Math.min(a/s,a/c),u=s*l,d=c*l,f=i.bounds.top+I(i.styles.paddingTop,i.bounds.width)+na(o.lineHeight,o.fontSize.number)/2;e.drawImage(n,i.bounds.left-(u+10),f-d/2,u,d)}catch{t.logger.error(`Error loading list-style-image ${r}`)}}}else if(r.listValue&&i.styles.listStyleType!==-1){let t=i.styles.listStyleType;if(t===0||t===1||t===2){let n=o.fontSize.number*.45,r=i.bounds.left-n*.9,a=i.bounds.top+I(i.styles.paddingTop,i.bounds.width)+na(o.lineHeight,o.fontSize.number)/2;e.save(),e.fillStyle=z(o.color),e.beginPath(),t===2?e.rect(r-n/2,a-n/2,n,n):(e.arc(r,a,n/2,0,Math.PI*2),t===1&&(e.strokeStyle=z(o.color),e.lineWidth=n*.18)),t===1?e.stroke():e.fill(),e.restore()}else{let[t]=n.createFontStyle(o);e.font=t??``,e.fillStyle=z(o.color),e.textBaseline=`middle`,e.textAlign=`right`;let s=new a(i.bounds.left,i.bounds.top+I(i.styles.paddingTop,i.bounds.width),i.bounds.width,na(o.lineHeight,o.fontSize.number)/2+1);n.renderTextWithLetterSpacing(new Ms(r.listValue,s),o.letterSpacing,na(o.lineHeight,o.fontSize.number)/2+2,o.writingMode),e.textBaseline=`bottom`,e.textAlign=`left`}}}}let fu=e=>e instanceof ac||e instanceof ic||e instanceof rc&&e.type!==`radio`&&e.type!==`checkbox`,pu=e=>{switch(e){case 1:return`center`;case 2:return`right`;default:return`left`}},mu=(e,t)=>{let n=t>e?t*(1+(e/t-1)**3):t;return Math.max(0,e+n)},hu=(e,t)=>{if(t===0)return e;let n=e.map((e,t)=>Y(e)?{x:t%2==0?e.start.x:e.end.x,y:t%2==0?e.end.y:e.start.y,rx:Math.abs(e.end.x-e.start.x),ry:Math.abs(e.end.y-e.start.y)}:{x:e.x,y:e.y,rx:0,ry:0}),r=c(n,1).x-c(n,0).x+2*t,i=c(n,3).y-c(n,0).y+2*t;if(r<=0||i<=0)return[];let a=n.map(e=>({x:mu(e.rx,t),y:mu(e.ry,t)})),o=(e,t)=>t>0?e/t:1,s=Math.min(1,o(r,c(a,0).x+c(a,1).x),o(r,c(a,3).x+c(a,2).x),o(i,c(a,0).y+c(a,3).y),o(i,c(a,1).y+c(a,2).y));return e.map((e,r)=>{let i=c(n,r),o=i.x+(r===1||r===2?t:-t),l=i.y+(r>=2?t:-t);if(!Y(e))return new J(o,l);let u=c(a,r).x*s,d=c(a,r).y*s;if(!u||!d)return new J(o,l);let f=u/i.rx,p=d/i.ry,m=e=>new J(o+(e.x-i.x)*f,l+(e.y-i.y)*p);return new _c(m(e.start),m(e.startControl),m(e.endControl),m(e.end))})},gu=(e,t,n)=>{let{a:r,b:i,c:o,d:s,e:c,f:l}=e;if(![r,i,o,s,c,l,t,n].every(Number.isFinite))return null;let u=r*s-i*o;if(!Number.isFinite(u)||u===0)return null;let d=(e,t)=>({x:(s*(e-c)-o*(t-l))/u,y:(-i*(e-c)+r*(t-l))/u}),f=[d(0,0),d(t,0),d(t,n),d(0,n)];if(!f.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y)))return null;let p=Math.min(...f.map(e=>e.x)),m=Math.min(...f.map(e=>e.y)),h=Math.max(...f.map(e=>e.x)),g=Math.max(...f.map(e=>e.y)),_=r*r+i*i,v=o*o+s*s,y=r*o+i*s,b=Math.sqrt((_+v+Math.hypot(_-v,2*y))/2);if(!Number.isFinite(b)||b<=0)return null;let x=1e-10*Math.max(_,v);return{matrix:e,viewport:new a(p,m,h-p,g-m),scale:b,uniform:Math.abs(_-v)<=x&&Math.abs(y)<=x}},_u=(e,t,n)=>{e.beginPath(),e.rect(t.left,t.top,t.width,t.height),n.length&&(Rl(e,n),e.closePath())},vu=(e,t)=>{let n=t.spread.number,r=qc(e.container);return r.width-2*n<=0||r.height-2*n<=0?[]:hu(xc(e.curves),-n)},yu=async(e,t,n,r,i,a)=>{let o=qc(t.container),s=n.blur.number/2,c=Math.ceil(3*s)+2,l=n.spread.number,u=Ol((n.inset?o:t.container.bounds.add(n.offsetX.number-l,n.offsetY.number-l,2*l,2*l)).add(-c,-c,2*c,2*c),a.viewport,c,a.scale);if(!u.width||!u.height)return!0;let d=Math.ceil(u.width*a.scale),f=Math.ceil(u.height*a.scale),p=wl(i,d,f);if(!p)return!1;let m,h;try{m=e.canvas.ownerDocument.createElement(`canvas`),m.width=d,m.height=f;let i=m.getContext(`2d`);if(!i)return!1;i.scale(a.scale,a.scale),i.translate(-u.left,-u.top);let o=n.inset?vu(t,n):hu(yc(t.curves),l),c=hc(o,n.offsetX.number,n.offsetY.number,0,0);n.inset?_u(i,u,c):zl(i,c),i.fillStyle=z(n.color),i.fill(n.inset?`evenodd`:`nonzero`),h=await Sl(m,{functions:[{kind:`blur`,value:s}]},1,a.scale,r.signal),e.save();try{n.inset?(zl(e,xc(t.curves)),e.clip()):(_u(e,a.viewport,yc(t.curves)),e.clip(`evenodd`)),e.drawImage(h,u.left,u.top,h.width/a.scale,h.height/a.scale)}finally{e.restore()}return!0}catch(e){if(!(e instanceof Z))throw e;return!1}finally{h&&h!==m&&Q(h),m&&Q(m),i.pixels-=p}},bu=async(e,t,n,r,i)=>{if(r.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);if(R(n.color))return;let a=n.spread.number;if(!n.inset&&(t.container.bounds.width+2*a<=0||t.container.bounds.height+2*a<=0))return;let o=typeof e.getTransform==`function`,s=o?e.getTransform():{a:r.scale,b:0,c:0,d:r.scale,e:-r.x*r.scale,f:-r.y*r.scale},c=gu(s,e.canvas.width,e.canvas.height);if(!c)return;let{viewport:l}=c;if(n.blur.number>0&&(n.inset||!c.uniform)&&await yu(e,t,n,r,i,c))return;let u=qc(t.container);e.save();try{if(n.inset&&n.blur.number===0){zl(e,xc(t.curves)),e.clip(),_u(e,u,hc(vu(t,n),n.offsetX.number,n.offsetY.number,0,0)),e.fillStyle=z(n.color),e.fill(`evenodd`);return}let r=Math.ceil(n.blur.number*2+Math.abs(a)+Math.abs(n.offsetX.number)+Math.abs(n.offsetY.number))+2,i=n.inset?u.add(-r,-r,2*r,2*r):t.container.bounds.add(-a,-a,2*a,2*a),{a:d,b:f,c:p,d:m,e:h,f:g}=s,_=i.left+i.width,v=i.top+i.height,y=Math.max(d*i.left+p*i.top+h,d*_+p*i.top+h,d*_+p*v+h,d*i.left+p*v+h),b=Math.max(1e4,y+r*c.scale+2);n.inset?(zl(e,xc(t.curves)),e.clip()):(_u(e,l,yc(t.curves)),e.clip(`evenodd`)),o?e.setTransform(d,f,p,m,h-b,g):e.translate(-b/d,0),n.inset?_u(e,i,vu(t,n)):zl(e,hu(yc(t.curves),a)),o?e.setTransform(d,f,p,m,h,g):e.translate(b/d,0),e.shadowOffsetX=b+d*n.offsetX.number+p*n.offsetY.number,e.shadowOffsetY=f*n.offsetX.number+m*n.offsetY.number,e.shadowBlur=n.blur.number*c.scale,e.shadowColor=z(n.color),e.fillStyle=`rgb(0, 0, 0)`,e.fill(n.inset?`evenodd`:`nonzero`)}finally{e.restore()}};var xu=class{ctx;context;scale;createFontStyle;constructor(e){this.ctx=e.ctx,this.context=e.context,this.scale=e.scale,this.createFontStyle=e.createFontStyle}async render(e){let t=e.container,n=t.styles,r=t.bounds,i=this.scale;if(r.width<=0||r.height<=0)return;let a=this.ctx.canvas.ownerDocument??document,o=Math.ceil(r.width),s=Math.ceil(r.height),c=Math.ceil(r.width*i),l=Math.ceil(r.height*i),u=this.createLayer(a,c,l);if(!u)return;let d=null,f=null,p=null;try{u.ctx.scale(i,i);let[m]=this.createFontStyle(n);u.ctx.font=m??``,u.ctx.textBaseline=`alphabetic`,u.ctx.textAlign=`left`,u.ctx.direction=n.direction===1?`rtl`:`ltr`;let h=Ml(u.ctx,n.fontSize.number),g=new Vl({ctx:u.ctx,context:this.context,canvas:u.canvas,options:{width:o,height:s,scale:1}});R(n.backgroundColor)||(u.ctx.fillStyle=z(n.backgroundColor),u.ctx.fillRect(0,0,o,s)),u.ctx.save(),u.ctx.translate(-r.left,-r.top),await g.renderBackgroundImage(t),u.ctx.restore();let _={bounds:r,baseline:h,letterSpacing:n.letterSpacing,writingMode:n.writingMode};if(d=this.createGlyphLayer(a,c,l,u.ctx),!d)return;let v=!!n.webkitTextStrokeWidth;v&&(d.ctx.strokeStyle=z(n.webkitTextStrokeColor),d.ctx.lineWidth=n.webkitTextStrokeWidth,d.ctx.lineJoin=Il());for(let e of t.textNodes)for(let t of e.textBounds)this.drawGlyphs(d,t,_,(e,t,n,r)=>{e.fillText(t,n,r),v&&e.strokeText(t,n,r)});if(u.ctx.globalCompositeOperation=`destination-in`,u.ctx.drawImage(d.canvas,0,0,o,s),p=this.renderShadowSilhouettes(e,a,c,l,u.ctx,n,_),p){if(f=this.createLayer(a,c,l),!f)return;for(let e of p)f.ctx.drawImage(e,0,0);f.ctx.drawImage(u.canvas,0,0),this.ctx.drawImage(f.canvas,r.left,r.top,r.width,r.height)}else this.ctx.drawImage(u.canvas,r.left,r.top,r.width,r.height)}finally{Q(u.canvas),d&&Q(d.canvas),f&&Q(f.canvas),p&&p.forEach(Q)}}createLayer(e,t,n){let r=e.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);return i?{canvas:r,ctx:i}:null}createGlyphLayer(e,t,n,r){let i=this.createLayer(e,t,n);return i?(i.ctx.scale(this.scale,this.scale),i.ctx.font=r.font,i.ctx.textBaseline=r.textBaseline,i.ctx.textAlign=r.textAlign,i.ctx.direction=r.direction,i.ctx.fillStyle=`#000`,i):null}drawGlyphs(e,t,n,r){let i=t.bounds.left-n.bounds.left,a=t.bounds.top-n.bounds.top+n.baseline,{letterSpacing:o,writingMode:s}=n;if(o<=0||ka(s)){r(e.ctx,t.text,i,a);return}let c=i;for(let n of Rs(t.text))r(e.ctx,n,c,a),c+=e.ctx.measureText(n).width+o}renderShadowSilhouettes(e,t,n,r,i,a,o){let s=a.textShadow;if(!s.length)return null;let l=[];for(let a=s.length-1;a>=0;a--){let u=c(s,a),d=this.createGlyphLayer(t,n,r,i);if(d){d.ctx.shadowColor=z(u.color),d.ctx.shadowOffsetX=u.offsetX.number*this.scale,d.ctx.shadowOffsetY=u.offsetY.number*this.scale,d.ctx.shadowBlur=u.blur.number*this.scale,d.ctx.fillStyle=z(u.color);for(let t of e.container.textNodes)for(let e of t.textBounds)this.drawGlyphs(d,e,o,(e,t,n,r)=>{e.fillText(t,n,r)});l.push(d.canvas)}}return l.length?l:null}},Su=class e{surfaceRoot;surfaceBudget;canvas;ctx;context;options;backgroundRenderer;borderRenderer;borderImageRenderer;effectsRenderer;textRenderer;textClipRenderer;legacySubtree=!1;constructor(e,t,n,r={pixels:0}){this.surfaceRoot=n,this.surfaceBudget=r,this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement(`canvas`);let i=this.canvas.getContext(`2d`);if(!i)throw t.canvas||Q(this.canvas),n?new Z(`Filter surface canvas is unavailable`):Error(`Failed to get 2D rendering context from canvas`);this.ctx=i,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.ctx.textBaseline=`bottom`,t.imageSmoothing!==void 0&&(this.ctx.imageSmoothingEnabled=t.imageSmoothing),t.imageSmoothingQuality&&(this.ctx.imageSmoothingQuality=t.imageSmoothingQuality),this.backgroundRenderer=new Vl({ctx:this.ctx,context:this.context,canvas:this.canvas,options:{width:t.width,height:t.height,scale:t.scale}}),this.borderRenderer=new ql({ctx:this.ctx},{path:e=>this.path(e),formatPath:e=>this.formatPath(e)}),this.borderImageRenderer=new Xl(this.ctx),this.effectsRenderer=new $l({ctx:this.ctx,scale:t.scale},{path:e=>this.path(e)}),this.textRenderer=new Ll({ctx:this.ctx,options:{scale:t.scale}}),this.textClipRenderer=new xu({ctx:this.ctx,context:this.context,scale:t.scale,createFontStyle:e=>this.textRenderer.createFontStyle(e)}),this.context.logger.debug(`Canvas renderer initialized (${t.width}x${t.height}) with scale ${t.scale}`)}async renderStack(e){let t=e.element.container.styles;if(t.isVisible()){let n=ol(t.filter),r=n!==null&&n.functions.length>0,i=t.maskImage.length>0,a=t.webkitBoxReflect,o=t.mixBlendMode!==K.NORMAL;if(e.element!==this.surfaceRoot&&!this.legacySubtree&&(i||a||o||n!==null&&(r||t.opacity<1))&&this.canComposite(e.element)){if(!await this.renderCompositedStack(e,n,i,a,o)){this.legacySubtree=!0;try{await this.renderStackContent(e)}finally{this.legacySubtree=!1}}return}await this.renderStackContent(e)}}canComposite(e){let t=e=>{let t=e.styles;return!t.isTransformed()&&t.zoom===1&&t.clipPath.type===0&&!H(t.display,2048)&&ol(t.filter)!==null},n=e=>t(e)&&e.elements.every(n),r=e.parent;for(;r&&r!==this.surfaceRoot;){if(!t(r.container))return!1;r=r.parent}return n(e.container)}async renderCompositedStack(t,n,r,i,o=!1){let s=this.options.signal;if(s?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let c=Ol(Dl(t.element.container),new a(this.options.x,this.options.y,this.options.width,this.options.height),n?hl(n):0,this.options.scale);if(!c.width||!c.height)return!0;let l=wl(this.surfaceBudget,Math.ceil(c.width*this.options.scale),Math.ceil(c.height*this.options.scale));if(!l)return this.context.logger.info(`Filter surface budget exceeded; using the existing renderer`),!1;let u={...this.options,canvas:void 0,backgroundColor:null,x:c.left,y:c.top,width:c.width,height:c.height},d,f;try{d=new e(this.context,u,t.element,this.surfaceBudget),await d.renderStackContent(t),d.effectsRenderer.applyEffects([]),n&&(f=await Sl(d.canvas,n,t.element.container.styles.opacity,u.scale,s));let a=f??d.canvas;if(r&&await this.applyMask(a,t.element.container.styles,c),s?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let l=t.element.effects,p=t.element.getEffects(4,this.surfaceRoot).filter(e=>!l.includes(e)||!Pc(e)&&!jc(e)&&!Nc(e)&&!Ac(e));return this.effectsRenderer.applyEffects(p),o?(this.ctx.save(),this.ctx.globalCompositeOperation=t.element.container.styles.mixBlendMode,this.ctx.drawImage(a,u.x,u.y,a.width/u.scale,a.height/u.scale),this.ctx.restore()):this.ctx.drawImage(a,u.x,u.y,a.width/u.scale,a.height/u.scale),i&&await this.drawReflection(a,t.element.container.bounds,c,i),!0}catch(e){if(!(e instanceof Z))throw e;return this.context.logger.info(`${e.message}; using the existing renderer`),!1}finally{d&&Q(d.canvas),f&&Q(f),this.surfaceBudget.pixels-=l}}async applyMask(e,t,n){let r=e.getContext(`2d`);if(!r)return;let i=this.context.resourceDocument.createElement(`canvas`);i.width=e.width,i.height=e.height;let a=i.getContext(`2d`);if(a){a.scale(this.options.scale,this.options.scale),a.translate(-n.left,-n.top);try{await au(a,t.maskImage,t,{left:n.left,top:n.top,width:n.width,height:n.height},async e=>await this.context.cache.match(e))}catch(e){this.context.logger.error(`Error rendering mask-image: ${e instanceof Error?e.message:e}`);return}r.save();try{r.setTransform(1,0,0,1,0,0),r.globalCompositeOperation=`destination-in`,r.drawImage(i,0,0)}finally{r.restore()}}}async drawReflection(e,t,n,r){let i=this.options.scale,a=Math.ceil(t.width*i),o=Math.ceil(t.height*i);if(a<=0||o<=0)return;let s=wl(this.surfaceBudget,a,o);if(!s)return;let c,l;try{c=this.context.resourceDocument.createElement(`canvas`),c.width=a,c.height=o;let s=c.getContext(`2d`);if(!s)return;let u=Math.round((t.left-n.left)*i),d=Math.round((t.top-n.top)*i),f=r.direction===`left`||r.direction===`right`;s.save();try{f?(s.translate(a,0),s.scale(-1,1)):(s.translate(0,o),s.scale(1,-1)),s.drawImage(e,-u,-d)}finally{s.restore()}if(r.mask){l=this.context.resourceDocument.createElement(`canvas`),l.width=a,l.height=o;let e=l.getContext(`2d`);if(e){e.scale(i,i),await au(e,[r.mask],{maskPosition:[],maskRepeat:[],maskSize:[]},{left:0,top:0,width:t.width,height:t.height},async e=>await this.context.cache.match(e)),s.save();try{f?(s.translate(a,0),s.scale(-1,1)):(s.translate(0,o),s.scale(1,-1)),s.globalCompositeOperation=`destination-in`,s.drawImage(l,0,0,a,o)}finally{s.restore()}}}let p=r.offset,m=t.left,h=t.top;r.direction===`below`?h=t.top+t.height+p:r.direction===`above`?h=t.top-t.height-p:m=r.direction===`right`?t.left+t.width+p:t.left-t.width-p,this.ctx.save();try{this.ctx.filter=`none`,this.ctx.drawImage(c,m,h,t.width,t.height)}finally{this.ctx.restore()}}finally{c&&Q(c),l&&Q(l),this.surfaceBudget.pixels-=s}}async renderNode(e){if(e.container.debugRender)debugger;e.container.styles.isVisible()&&(await this.renderNodeBackgroundAndBorders(e),await this.renderNodeContent(e))}renderReplacedElement(e,t,n){let r=n.naturalWidth||e.intrinsicWidth,i=n.naturalHeight||e.intrinsicHeight;if(n&&r>0&&i>0){let a=Jc(e),o=xc(t);this.path(o),this.ctx.save(),this.ctx.clip();let{sx:s,sy:c,sw:l,sh:u,dx:d,dy:f,dw:p,dh:m}=ou(r,i,a,e.styles.objectFit,e.styles.objectPosition);this.ctx.drawImage(n,s,c,l,u,d,f,p,m),this.ctx.restore()}}async renderNodeContent(t){this.effectsRenderer.applyEffects(t.getEffects(4,this.surfaceRoot));let n=t.container,r=t.curves,i=n.styles,a=Jc(n);for(let e of n.textNodes)await this.textRenderer.renderTextNode(e,i,a);await su(this.ctx,this.context,{scale:this.options.scale,backgroundColor:this.options.backgroundColor,x:this.options.x,y:this.options.y,width:this.options.width,height:this.options.height},(t,n)=>new e(t,n),n,r,i,(e,t,n)=>this.renderReplacedElement(e,t,n)),cu(this.ctx,this.textRenderer,this.path.bind(this),n,i),await du(this.ctx,this.context,this.textRenderer,t,n,i)}async renderStackContent(e){if(e.element.container.debugRender)debugger;let t=this.options.signal;await this.renderNodeBackgroundAndBorders(e.element);for(let n of e.negativeZIndex){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderNodeContent(e.element);for(let t of e.nonInlineLevel)await this.renderNode(t);for(let n of e.nonPositionedFloats){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let n of e.nonPositionedInlineLevel){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let t of e.inlineLevel)await this.renderNode(t);for(let n of e.zeroOrAutoZIndexOrTransformedOrOpacity){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}for(let n of e.positiveZIndex){if(t?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);await this.renderStack(n)}}path(e){zl(this.ctx,e)}formatPath(e){Rl(this.ctx,e)}async renderSurfaceBoxShadow(e,t){let n=t.spread.number,r=t.blur.number/2,i=Math.ceil(3*r)+1,o=e.container.bounds.add(-n,-n,2*n,2*n);if(o.width<=0||o.height<=0)return;let s=this.options.scale,c=Ol(o.add(-i,-i,2*i,2*i),new a(this.options.x-t.offsetX.number,this.options.y-t.offsetY.number,this.options.width,this.options.height),i,s);if(!c.width||!c.height)return;let l=Math.ceil(c.width*s),u=Math.ceil(c.height*s),d=wl(this.surfaceBudget,l,u);if(!d)throw new Z(`Box shadow surface budget exceeded`);let f,p;try{f=this.context.resourceDocument.createElement(`canvas`),f.width=l,f.height=u;let i=f.getContext(`2d`);if(!i)throw new Z(`Box shadow surface canvas is unavailable`);i.scale(s,s),i.translate(-c.left,-c.top),zl(i,hc(yc(e.curves),-n,-n,2*n,2*n)),i.fillStyle=z(t.color),i.fill(),p=await Sl(f,{functions:[{kind:`blur`,value:r}]},1,s,this.options.signal),this.ctx.save();try{this.ctx.beginPath(),this.ctx.rect(this.options.x,this.options.y,this.options.width,this.options.height),Rl(this.ctx,yc(e.curves)),this.ctx.closePath(),this.ctx.clip(`evenodd`),this.ctx.drawImage(p,c.left+t.offsetX.number,c.top+t.offsetY.number,p.width/s,p.height/s)}finally{this.ctx.restore()}}finally{f&&Q(f),p&&Q(p),this.surfaceBudget.pixels-=d}}async renderNodeBackgroundAndBorders(e){this.effectsRenderer.applyEffects(e.getEffects(2,this.surfaceRoot)),!this.surfaceRoot&&e.container.styles.backdropFilter&&await this.renderBackdropFilter(e);let t=e.container.styles,n=!R(t.backgroundColor)||t.backgroundImage.length,r=wu(t),i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=tl(t.backgroundClip,0),o=Cu(a,e.curves);if(n||t.boxShadow.length){r&&e.container.textNodes.length>0?await this.textClipRenderer.render(e):(this.ctx.save(),this.path(o),this.ctx.clip(),R(t.backgroundColor)||(this.ctx.fillStyle=z(t.backgroundColor),this.ctx.fill()),await this.backgroundRenderer.renderBackgroundImage(e.container),this.ctx.restore());for(let n of t.boxShadow.slice(0).reverse())this.surfaceRoot&&!n.inset?await this.renderSurfaceBoxShadow(e,n):await bu(this.ctx,e,n,this.options,this.surfaceBudget)}if(t.borderImageSource){let n=t.borderImageSource,r=e.container.bounds,i=[Math.max(0,t.borderTopWidth),Math.max(0,t.borderRightWidth),Math.max(0,t.borderBottomWidth),Math.max(0,t.borderLeftWidth)],a=null;if(n.type===0){let e=n.url;try{a=await this.context.cache.match(e)??null}catch{this.context.logger.error(`Error loading border-image ${e}`)}}else a=this.rasterizeGradientSource(n,r);if(a){let e=Yl(t.borderImageOutset,i),n=r.add(-e.left,-e.top,e.left+e.right,e.top+e.bottom),o=Jl(t.borderImageWidth,i,n);this.borderImageRenderer.renderBorderImage(r,a,t.borderImageSlice,t.borderImageRepeat,o[0],o[1],o[2],o[3],e)}return}let s=0;for(let t of i){if(t.style!==0&&!R(t.color)&&t.width>0){let n=async()=>{t.style===2?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,s,e.curves,2):t.style===3?await this.borderRenderer.renderDashedDottedBorder(t.color,t.width,s,e.curves,3):t.style===4?await this.borderRenderer.renderDoubleBorder(t.color,t.width,s,e.curves):await this.borderRenderer.renderSolidBorder(t.color,s,e.curves)},r=e.container.legendBounds;if(s===0&&r){let t=e.container.bounds,i=r.left-t.left,a=r.left+r.width-t.left;i>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,i,t.height),this.ctx.clip(),await n(),this.ctx.restore());let o=t.left+a,s=t.width-a;s>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(o,t.top,s,t.height),this.ctx.clip(),await n(),this.ctx.restore())}else await n()}s++}this.renderOutline(e)}renderOutline(e){let t=e.container.styles;if(t.outlineStyle===0||t.outlineStyle===1)return;let n=Math.max(0,t.outlineWidth);if(n<=0)return;let r=t.outlineColor??t.color;if(R(r))return;let i=Math.max(0,t.outlineOffset)+n/2,a=hc(yc(e.curves),-i,-i,2*i,2*i);this.ctx.save();try{this.ctx.strokeStyle=z(r),this.ctx.lineWidth=n,t.outlineStyle===3?this.ctx.setLineDash([n*3,n*3]):t.outlineStyle===4&&this.ctx.setLineDash([n,n*2]),this.path(a),this.ctx.stroke()}finally{this.ctx.restore()}}rasterizeGradientSource(e,t){let n=Math.max(1,Math.ceil(t.width)),r=Math.max(1,Math.ceil(t.height)),i=(this.ctx.canvas.ownerDocument??document).createElement(`canvas`);i.width=n,i.height=r;let a=i.getContext(`2d`);if(!a)return null;if(e.type===1||e.type===3){let t=e,[o,s,l,u,d]=Pr(t.angle,n,r),f=W(t.stops,o||n),p=e.type===3,m=p?Wc(f):null,h=a.createLinearGradient(s,l,u,d);if(m)m.forEach(e=>{h.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)});else if(p){let e=z(c(f,f.length-1).color);h.addColorStop(0,e),h.addColorStop(1,e)}else Gc(f).forEach(e=>{h.addColorStop(e.stop,e.color)});return a.fillStyle=h,a.fillRect(0,0,n,r),i}if(e.type===2||e.type===4){let t=e,o=t.position.length===0?[P]:t.position,s=I(c(o,0),n),l=I(c(o,o.length-1),r),[u,d]=Ir(t,s,l,n,r);if(u<=0||d<=0)return null;let f=this.ctx.canvas.ownerDocument??document,p=Kc(f,u,d,t.stops,e.type===4);return p?(a.fillStyle=p.lastColor,a.fillRect(0,0,n,r),a.drawImage(p.canvas,s-u,l-d,u*2,d*2),i):null}if(e.type===5||e.type===6){let t=e,o=I(c(t.position,0),n),s=I(c(t.position,1),r),l=a.createConicGradient(t.angle-Math.PI/2,o,s),u;if(e.type===6){let e=W(t.stops,1),n=c(e,0),r=c(e,e.length-1),i=Math.max(r.stop-n.stop,.01);u=[];let a=Math.ceil(1/i);for(let t=0;t<a;t++)for(let r of e){let e=t*i+(r.stop-n.stop);if(e>1)break;u.push({stop:e,color:z(r.color)})}let o=c(u,u.length-1);o&&o.stop<1&&u.push({stop:1,color:o.color})}else u=W(t.stops,Math.max(n,r)).map(e=>({stop:e.stop,color:z(e.color)}));return u.forEach(e=>{l.addColorStop(Math.min(1,Math.max(0,e.stop)),e.color)}),a.fillStyle=l,a.fillRect(0,0,n,r),i}return this.context.logger.warn(`Unsupported border-image source; only URL and gradient images are supported`),null}async renderBackdropFilter(e){let t=ol(e.container.styles.backdropFilter);if(!t||t.functions.length===0)return;let n=e.container.bounds;if(n.width<=0||n.height<=0)return;let r=this.options.scale,i=Math.ceil(n.width*r),a=Math.ceil(n.height*r);if(i<=0||a<=0)return;let o=wl(this.surfaceBudget,i,a);if(!o)return;let s,c;try{s=this.context.resourceDocument.createElement(`canvas`),s.width=i,s.height=a;let e=s.getContext(`2d`);if(!e)return;let o=Math.round((n.left-this.options.x)*r),l=Math.round((n.top-this.options.y)*r);e.drawImage(this.canvas,o,l,i,a,0,0,i,a);try{c=await Sl(s,t,1,r,this.options.signal)}catch(e){if(e instanceof Z){this.context.logger.info(`${e.message}; rendering without the backdrop effect`);return}throw e}if(this.options.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);this.ctx.save();try{this.ctx.filter=`none`,this.ctx.drawImage(c,n.left,n.top,n.width,n.height)}finally{this.ctx.restore()}}finally{s&&Q(s),c&&Q(c),this.surfaceBudget.pixels-=o}}async render(e){try{this.options.backgroundColor&&(this.ctx.fillStyle=z(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height));let t=Hc(e);return await this.renderStack(t),this.effectsRenderer.applyEffects([]),this.canvas}catch(e){throw this.options.canvas||Q(this.canvas),e}}};let Cu=(e,t)=>{switch(e){case 0:return yc(t);case 2:return bc(t);default:return xc(t)}},wu=e=>e.backgroundClip.some(e=>e===3);var Tu=class{canvas;ctx;options;context;constructor(e,t){this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:e.resourceDocument.createElement(`canvas`);let n=this.canvas.getContext(`2d`);if(!n)throw Error(`Failed to get 2D rendering context from canvas`);this.ctx=n,this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`,this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (${t.width}x${t.height} at ${t.x},${t.y}) with scale ${t.scale}`)}async render(e){if(this.options.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);let t=Du(e),n=ks(this.options.width,this.options.height,0,0,e),r=As(n);t();let i=await r;if(this.options.signal?.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`);return this.options.backgroundColor&&(this.ctx.fillStyle=z(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),this.ctx.drawImage(i,this.options.x,this.options.y,this.options.width,this.options.height),this.canvas}};let Eu=[`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`top`,`right`,`bottom`,`left`],Du=e=>{let t=e.style,n=Eu.map(e=>[e,t[e]]);for(let e of Eu)t[e]=e.startsWith(`margin`)?`0px`:`auto`;return()=>{for(let[e,r]of n)t[e]=r}};var Ou=class{id;enabled;start;constructor({id:e,enabled:t}){this.id=e,this.enabled=t,this.start=Date.now()}debug(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.debug==`function`?console.debug(this.id,`${this.getTime()}ms`,...e):this.info(...e))}getTime(){return Date.now()-this.start}info(...e){this.enabled&&typeof window<`u`&&window.console&&typeof console.info==`function`&&console.info(this.id,`${this.getTime()}ms`,...e)}warn(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.warn==`function`?console.warn(this.id,`${this.getTime()}ms`,...e):this.info(...e))}error(...e){this.enabled&&(typeof window<`u`&&window.console&&typeof console.error==`function`?console.error(this.id,`${this.getTime()}ms`,...e):this.info(...e))}},ku=class{context;_options;_cache=/* @__PURE__ */ new Map;maxSize;_pendingOperations=/* @__PURE__ */ new Map;_deferMode=!1;_collectedUrls=/* @__PURE__ */ new Set;_evictionSuspendCount=0;get _evictionEnabled(){return this._evictionSuspendCount===0}constructor(e,t){if(this.context=e,this._options=t,this.maxSize=t.maxCacheSize??100,this.maxSize<1)throw Error(`Cache maxSize must be at least 1`);this.maxSize>1e4&&this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`)}startDefer(){this._deferMode=!0,this._evictionSuspendCount++}async preloadAll(e=10,t,n){this._deferMode=!1;let r=Array.from(this._collectedUrls);this._collectedUrls.clear();try{if(r.length===0)return;let i=Math.max(1,Math.min(e,100));this.context.logger.debug(`Preloading ${r.length} image(s) with concurrency ${i}`);let a=0,o=n?new Promise((e,t)=>{let r=()=>t(new DOMException(`The operation was aborted.`,`AbortError`));n.aborted?r():n.addEventListener(`abort`,r,{once:!0})}):null;o?.catch(()=>void 0),t?.(0,r.length);for(let e=0;e<r.length;e+=i){q(n);let s=r.slice(e,e+i);s.map(e=>this._addImageWithPending(e));let c=Promise.allSettled(s.map(e=>this._cache.get(e)?.value??Promise.resolve()));await(o?Promise.race([c,o]):c),a+=s.length,t?.(a,r.length)}}finally{this._evictionSuspendCount=Math.max(0,this._evictionSuspendCount-1)}}addImage(e){if(this._deferMode)return!this.has(e)&&(Iu(e)||Nu(e))&&this._collectedUrls.add(e),Promise.resolve();let t=this._pendingOperations.get(e);if(t)return t;if(this.has(e)){let t=this._cache.get(e);return this._cache.delete(e),this._cache.set(e,t),Promise.resolve()}return Iu(e)||Nu(e)?this._addImageWithPending(e):Promise.resolve()}_addImageWithPending(e){let t=this._pendingOperations.get(e);if(t)return t;let n=this._addImageInternal(e);return this._pendingOperations.set(e,n),n.finally(()=>{this._pendingOperations.delete(e)}),n}async _addImageInternal(e){let t=this._options.imageTimeout??15e3,n=this.withTimeout(this.loadImage(e),t,`Timed out (${t}ms) loading image`);n.catch(t=>{let n=t instanceof Error?t.message:String(t),r=`Failed to load image ${e.substring(0,256)}: ${n}`;this.context.logger.error(r),this.context.onError?.(Error(r))}),this.set(e,n)}withTimeout(e,t,n){if(t<=0)return e;let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(n)),t)});return Promise.race([e,i]).finally(()=>{r!==void 0&&clearTimeout(r)})}match(e){let t=this._cache.get(e);if(t)return this._cache.delete(e),this._cache.set(e,t),t.value}set(e,t){if(this._cache.has(e))this._cache.delete(e);else if(this._evictionEnabled&&this._cache.size>=this.maxSize){let e=this._cache.keys().next().value;e!==void 0&&(this._cache.delete(e),this.context.logger.debug(`Cache: Evicted LRU entry: ${e}`))}this._cache.set(e,{value:t})}size(){return this._cache.size}getMaxSize(){return this.maxSize}clear(){this._cache.clear()}async loadImage(e){let t=this.context.originChecker,n=e=>t.isSameOrigin(e),r=typeof this._options.customIsSameOrigin==`function`?await this._options.customIsSameOrigin(e,n):n(e),i=!r&&this._options.allowTaint===!1&&!Pu(e)&&!Iu(e)&&typeof this._options.proxy!=`string`,a=!Pu(e)&&(this._options.useCORS===!0||i)&&js.SUPPORT_CORS_IMAGES&&!r,o=!Pu(e)&&!r&&!Iu(e)&&typeof this._options.proxy==`string`&&!a;if(!r&&this._options.allowTaint===!1&&!Pu(e)&&!Iu(e)&&!o&&!a)return;let s=e;o&&(s=await this.proxy(s)),this.context.logger.debug(`Added image ${e.substring(0,256)}`);let c=this.context.config.window.Image??Image;return await new Promise((e,t)=>{let n=new c;n.onload=()=>e(n),n.onerror=t,(Fu(s)||a)&&(n.crossOrigin=`anonymous`),n.src=s,n.complete===!0&&(typeof n.decode==`function`?n.decode().then(()=>e(n),()=>t(/* @__PURE__ */ Error(`Failed to decode image ${s.substring(0,256)}`))):setTimeout(()=>e(n),500))})}has(e){return this._cache.has(e)}keys(){return Promise.resolve(Array.from(this._cache.keys()))}proxy(e){let t=this._options.proxy;if(!t)throw Error(`No proxy defined`);let n=e.substring(0,256);return new Promise((r,i)=>{let a=new XMLHttpRequest;a.onload=()=>{if(a.status===200){let e=new FileReader;e.addEventListener(`load`,()=>r(e.result),!1),e.addEventListener(`error`,e=>i(e),!1),e.readAsDataURL(a.response)}else i(`Failed to proxy resource ${n} with status code ${a.status}`)},a.onerror=i;let o=t.indexOf(`?`)>-1?`&`:`?`;if(a.open(`GET`,`${t}${o}url=${encodeURIComponent(e)}&responseType=blob`),a.responseType=`blob`,this._options.imageTimeout){let e=this._options.imageTimeout;a.timeout=e,a.ontimeout=()=>i(`Timed out (${e}ms) proxying ${n}`)}a.send()})}};let Au=/^data:image\/svg\+xml/i,ju=/^data:image\/.*;base64,/i,Mu=/^data:image\/.*/i,Nu=e=>js.SUPPORT_SVG_DRAWING||!Lu(e),Pu=e=>Mu.test(e),Fu=e=>ju.test(e),Iu=e=>e.substring(0,4)===`blob`,Lu=e=>e.slice(-3).toLowerCase()===`svg`||Au.test(e);var Ru=class{baseUri;origin;constructor(e){if(!e||!e.document)throw Error(`Valid window object required for OriginChecker`);if(!e.location||!e.location.href)throw Error(`Window object must have valid location`);this.baseUri=e.location.href,this.origin=this.getOrigin(e.location.href)}getOrigin(e){try{return new URL(e,this.baseUri).origin}catch{return``}}isSameOrigin(e){return this.getOrigin(e)===this.origin}getContextOrigin(){return this.origin}},zu=class e{static instanceCount=1;instanceName=`#${e.instanceCount++}`;logger;cache;originChecker;config;onError;_windowBounds;constructor(e,t,n){this.config=n,this.logger=new Ou({id:this.instanceName,enabled:e.logging}),this.originChecker=new Ru(n.window),this.cache=e.cache??n.cache??new ku(this,e),this.onError=e.onError,this._windowBounds=t}get windowBounds(){return this._windowBounds}get resourceDocument(){return this.config.window.document||(typeof document<`u`?document:void 0)}adjustWindowBounds(e,t){this._windowBounds=this._windowBounds.add(e,t,0,0)}};let Bu=e=>{[`scale`,`width`,`height`,`imageTimeout`,`x`,`y`,`windowWidth`,`windowHeight`,`scrollX`,`scrollY`].forEach(t=>{let n=e[t];if(n!=null&&typeof n!=`number`){let r=Number(n);Number.isNaN(r)||(e[t]=r)}})},Vu=e=>({allowTaint:e.allowTaint??!1,imageTimeout:e.imageTimeout??15e3,proxy:e.proxy,useCORS:e.useCORS??!1,customIsSameOrigin:e.customIsSameOrigin,maxCacheSize:e.maxCacheSize}),Hu=(e,t,n)=>({logging:e.logging??!0,cache:e.cache??t.cache,...n}),Uu=(e,t)=>{let n=t;return{windowWidth:e.windowWidth??n.innerWidth??800,windowHeight:e.windowHeight??n.innerHeight??600,scrollX:e.scrollX??n.pageXOffset??0,scrollY:e.scrollY??n.pageYOffset??0}},Wu=(e,t,n)=>({allowTaint:e.allowTaint??!1,onclone:e.onclone,ignoreElements:e.ignoreElements,iframeContainer:e.iframeContainer,inlineImages:n,copyStyles:n,cspNonce:e.cspNonce??t.cspNonce,signal:e.signal}),Gu=(e,t,n,r,i,a,o)=>({canvas:e.canvas,backgroundColor:t,signal:e.signal,scale:e.scale??o??1,x:(e.x??0)+n,y:(e.y??0)+r,width:e.width??Math.ceil(i),height:e.height??Math.ceil(a),imageSmoothing:e.imageSmoothing,imageSmoothingQuality:e.imageSmoothingQuality}),Ku=(e,t,n)=>{let r=t.ownerDocument,i=r.documentElement?Nn(e,getComputedStyle(r.documentElement).backgroundColor):0,a=r.body?Nn(e,getComputedStyle(r.body).backgroundColor):0,o=typeof n==`string`?Nn(e,n):n===null?0:4294967295;return t===r.documentElement?R(i)?R(a)?o:a:i:o},qu=(e,t,n,r)=>{if(e)try{e(n,r)}catch(e){t.logger.error(`onProgress callback failed: ${e instanceof Error?e.message:String(e)}`)}},Ju=async(e,t,n)=>{if(Bu(t),!t.skipValidation){let n=t.validator||r(),i=n.validateElement(e);if(!i.valid)throw Error(i.error);let a=n.validateOptions(t);if(!a.valid)throw Error(`Invalid options: ${a.error}`)}if(!e||typeof e!=`object`)throw Error(`Invalid element provided as first argument`);let c=e.ownerDocument;if(!c)throw Error(`Element is not attached to a Document`);let l=c.defaultView;if(!l)throw Error(`Document is not attached to a Window`);let u=Vu(t),d=Hu(t,n,u),f=Uu(t,l),p=new a(f.scrollX,f.scrollY,f.windowWidth,f.windowHeight),m=new zu(d,p,n),h=t.enablePerformanceMonitoring??t.logging??!1,g=new i(m,h);g.start(`total`,{width:f.windowWidth,height:f.windowHeight});let _=t.signal;q(_);let v=t.foreignObjectRendering??!1,y=Wu(t,n,v);m.logger.debug(`Starting document clone with size ${p.width}x${p.height} scrolled to ${-p.left},${-p.top}`),qu(t.onProgress,m,`clone`,10),g.start(`clone`);let b=new Cs(m,e,y),x=b.clonedReferenceElement;if(!x)throw Error(`Unable to find element in cloned iframe`);let S=await b.toIFrame(c,p);g.end(`clone`),qu(t.onProgress,m,`clone`,30),_?.aborted&&((t.removeContainer??!0)&&Cs.destroy(S),q(_));let{width:C,height:w,left:ee,top:te}=Hn(x)||Bn(x)?s(x.ownerDocument):o(m,x),ne=Ku(m,x,t.backgroundColor),re=Gu(t,ne,ee,te,C,w,l.devicePixelRatio??1),ie,ae;try{v?(m.logger.debug(`Document cloned, using foreign object rendering`),g.start(`render-foreignobject`),ie=await new Tu(m,re).render(x),g.end(`render-foreignobject`)):(m.logger.debug(`Document cloned, element located at ${ee},${te} with size ${C}x${w} using computed rendering`),m.logger.debug(`Starting DOM parsing`),g.start(`parse`),q(_),m.cache.startDefer(),ae=dc(m,x,{normalizeDom:t.normalizeDom}),g.end(`parse`),qu(t.onProgress,m,`parse`,50),g.start(`preload`),await m.cache.preloadAll(10,(e,n)=>{qu(t.onProgress,m,`preload`,50+Math.round(e/n*10))},_),g.end(`preload`),qu(t.onProgress,m,`layout`,60),ne===ae.styles.backgroundColor&&(ae.styles.backgroundColor=0),m.logger.debug(`Starting renderer for element at ${re.x},${re.y} with size ${re.width}x${re.height}`),g.start(`render`),q(_),ie=await new Su(m,re).render(ae),g.end(`render`)),qu(t.onProgress,m,`render`,90)}finally{g.start(`cleanup`);try{ae&&ae.restoreTree()}finally{(t.removeContainer??!0)&&Cs.destroy(S),g.end(`cleanup`)}}return g.end(`total`),m.logger.debug(`Finished rendering`),h&&g.logSummary(),qu(t.onProgress,m,`render`,100),ie},Yu=(e,n={},r)=>{let i=r||t.fromElement(e,{cspNonce:n.cspNonce,cache:n.cache});return Ju(e,n,i)};e.Html2CanvasConfig=t,e.PerformanceMonitor=i,e.Validator=n,e.createDefaultValidator=r,e.default=Yu,e.html2canvas=Yu}),typeof window<`u`&&window.html2canvas&&window.html2canvas.default&&(window.html2canvasExports=window.html2canvas,window.html2canvas=window.html2canvas.default);