modern-canvas 0.6.8 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +36 -55
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +46 -95
- package/dist/index.mjs +36 -55
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(h,pA){typeof exports=="object"&&typeof module<"u"?pA(exports):typeof define=="function"&&define.amd?define(["exports"],pA):(h=typeof globalThis<"u"?globalThis:h||self,pA(h.modernCanvas={}))})(this,function(h){"use strict";var pA=typeof document<"u"?document.currentScript:null,Pu={grad:.9,turn:360,rad:360/(2*Math.PI)},Ge=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},St=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},fe=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},to=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},eo=function(r){return{r:fe(r.r,0,255),g:fe(r.g,0,255),b:fe(r.b,0,255),a:fe(r.a)}},os=function(r){return{r:St(r.r),g:St(r.g),b:St(r.b),a:St(r.a,3)}},ku=/^#([0-9a-f]{3,8})$/i,Ar=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},Ao=function(r){var t=r.r,e=r.g,A=r.b,i=r.a,s=Math.max(t,e,A),n=s-Math.min(t,e,A),o=n?s===t?(e-A)/n:s===e?2+(A-t)/n:4+(t-e)/n:0;return{h:60*(o<0?o+6:o),s:s?n/s*100:0,v:s/255*100,a:i}},io=function(r){var t=r.h,e=r.s,A=r.v,i=r.a;t=t/360*6,e/=100,A/=100;var s=Math.floor(t),n=A*(1-e),o=A*(1-(t-s)*e),a=A*(1-(1-t+s)*e),l=s%6;return{r:255*[A,o,n,n,a,A][l],g:255*[a,A,A,o,n,n][l],b:255*[n,n,a,A,A,o][l],a:i}},ro=function(r){return{h:to(r.h),s:fe(r.s,0,100),l:fe(r.l,0,100),a:fe(r.a)}},so=function(r){return{h:St(r.h),s:St(r.s),l:St(r.l),a:St(r.a,3)}},no=function(r){return io((e=(t=r).s,{h:t.h,s:(e*=((A=t.l)<50?A:100-A)/100)>0?2*e/(A+e)*100:0,v:A+e,a:t.a}));var t,e,A},li=function(r){return{h:(t=Ao(r)).h,s:(i=(200-(e=t.s))*(A=t.v)/100)>0&&i<200?e*A/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,e,A,i},Uu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,as={string:[[function(r){var t=ku.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?St(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?St(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=Tu.exec(r)||Lu.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:eo({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=Uu.exec(r)||Nu.exec(r);if(!t)return null;var e,A,i=ro({h:(e=t[1],A=t[2],A===void 0&&(A="deg"),Number(e)*(Pu[A]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return no(i)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,A=r.b,i=r.a,s=i===void 0?1:i;return Ge(t)&&Ge(e)&&Ge(A)?eo({r:Number(t),g:Number(e),b:Number(A),a:Number(s)}):null},"rgb"],[function(r){var t=r.h,e=r.s,A=r.l,i=r.a,s=i===void 0?1:i;if(!Ge(t)||!Ge(e)||!Ge(A))return null;var n=ro({h:Number(t),s:Number(e),l:Number(A),a:Number(s)});return no(n)},"hsl"],[function(r){var t=r.h,e=r.s,A=r.v,i=r.a,s=i===void 0?1:i;if(!Ge(t)||!Ge(e)||!Ge(A))return null;var n=function(o){return{h:to(o.h),s:fe(o.s,0,100),v:fe(o.v,0,100),a:fe(o.a)}}({h:Number(t),s:Number(e),v:Number(A),a:Number(s)});return io(n)},"hsv"]]},oo=function(r,t){for(var e=0;e<t.length;e++){var A=t[e][0](r);if(A)return[A,t[e][1]]}return[null,void 0]},Gu=function(r){return typeof r=="string"?oo(r.trim(),as.string):typeof r=="object"&&r!==null?oo(r,as.object):[null,void 0]},ls=function(r,t){var e=li(r);return{h:e.h,s:fe(e.s+100*t,0,100),l:e.l,a:e.a}},us=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},ao=function(r,t){var e=li(r);return{h:e.h,s:e.s,l:fe(e.l+100*t,0,100),a:e.a}},cs=function(){function r(t){this.parsed=Gu(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return St(us(this.rgba),2)},r.prototype.isDark=function(){return us(this.rgba)<.5},r.prototype.isLight=function(){return us(this.rgba)>=.5},r.prototype.toHex=function(){return t=os(this.rgba),e=t.r,A=t.g,i=t.b,n=(s=t.a)<1?Ar(St(255*s)):"","#"+Ar(e)+Ar(A)+Ar(i)+n;var t,e,A,i,s,n},r.prototype.toRgb=function(){return os(this.rgba)},r.prototype.toRgbString=function(){return t=os(this.rgba),e=t.r,A=t.g,i=t.b,(s=t.a)<1?"rgba("+e+", "+A+", "+i+", "+s+")":"rgb("+e+", "+A+", "+i+")";var t,e,A,i,s},r.prototype.toHsl=function(){return so(li(this.rgba))},r.prototype.toHslString=function(){return t=so(li(this.rgba)),e=t.h,A=t.s,i=t.l,(s=t.a)<1?"hsla("+e+", "+A+"%, "+i+"%, "+s+")":"hsl("+e+", "+A+"%, "+i+"%)";var t,e,A,i,s},r.prototype.toHsv=function(){return t=Ao(this.rgba),{h:St(t.h),s:St(t.s),v:St(t.v),a:St(t.a,3)};var t},r.prototype.invert=function(){return we({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),we(ls(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),we(ls(this.rgba,-t))},r.prototype.grayscale=function(){return we(ls(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),we(ao(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),we(ao(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?we({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):St(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=li(this.rgba);return typeof t=="number"?we({h:t,s:e.s,l:e.l,a:e.a}):St(e.h)},r.prototype.isEqual=function(t){return this.toHex()===we(t).toHex()},r}(),we=function(r){return r instanceof cs?r:new cs(r)},lo=[],Ou=function(r){r.forEach(function(t){lo.indexOf(t)<0&&(t(cs,as),lo.push(t))})};const Hu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ju=(r=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+=Hu[e[r]&63];return t};class Oe{eventListeners=new Map;addEventListener(t,e,A){const i={value:e,options:A},s=this.eventListeners.get(t);return s?Array.isArray(s)?s.push(i):this.eventListeners.set(t,[s,i]):this.eventListeners.set(t,i),this}removeEventListener(t,e,A){if(!e)return this.eventListeners.delete(t),this;const i=this.eventListeners.get(t);if(!i)return this;if(Array.isArray(i)){const s=[];for(let n=0,o=i.length;n<o;n++){const a=i[n];(a.value!==e||typeof A=="object"&&A?.once&&(typeof a.options=="boolean"||!a.options?.once))&&s.push(a)}s.length?this.eventListeners.set(t,s.length===1?s[0]:s):this.eventListeners.delete(t)}else i.value===e&&(typeof A=="boolean"||!A?.once||typeof i.options=="boolean"||i.options?.once)&&this.eventListeners.delete(t);return this}removeAllListeners(){return this.eventListeners.clear(),this}hasEventListener(t){return this.eventListeners.has(t)}dispatchEvent(t,...e){const A=this.eventListeners.get(t);if(A){if(Array.isArray(A))for(let i=A.length,s=0;s<i;s++){const n=A[s];typeof n.options=="object"&&n.options?.once&&this.off(t,n.value,n.options),n.value.apply(this,e)}else typeof A.options=="object"&&A.options?.once&&this.off(t,A.value,A.options),A.value.apply(this,e);return!0}else return!1}on(t,e,A){return this.addEventListener(t,e,A)}once(t,e){return this.addEventListener(t,e,{once:!0})}off(t,e,A){return this.removeEventListener(t,e,A)}emit(t,...e){this.dispatchEvent(t,...e)}}function lt(r){return r==null||r==="none"}function SA(r,t=0,e=10**t){return Math.round(e*r)/e+0}function ui(r,t=!1){if(typeof r!="object"||!r)return r;if(Array.isArray(r))return t?r.map(A=>ui(A,t)):r;const e={};for(const A in r){const i=r[A];i!=null&&(t?e[A]=ui(i,t):e[A]=i)}return e}function hs(r,t){const e={};return t.forEach(A=>{A in r&&(e[A]=r[A])}),e}function Ku(r,t,e){const A=t.length-1;if(A<0)return r===void 0?e:r;for(let i=0;i<A;i++){if(r==null)return e;r=r[t[i]]}return r==null||r[t[A]]===void 0?e:r[t[A]]}function Yu(r,t,e){const A=t.length-1;for(let i=0;i<A;i++)typeof r[t[i]]!="object"&&(r[t[i]]={}),r=r[t[i]];r[t[A]]=e}function Vu(r,t,e){return r==null||!t||typeof t!="string"?e:r[t]!==void 0?r[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),Ku(r,t.split("."),e))}function zu(r,t,e){if(!(typeof r!="object"||!t))return t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),Yu(r,t.split("."),e)}let uo=class{_map=new WeakMap;_toRaw(t){if(t&&typeof t=="object"){const e=t.__v_raw;e&&(t=this._toRaw(e))}return t}delete(t){return this._map.delete(this._toRaw(t))}get(t){return this._map.get(this._toRaw(t))}has(t){return this._map.has(this._toRaw(t))}set(t,e){return this._map.set(this._toRaw(t),this._toRaw(e)),this}};function gs(r){let t;return typeof r=="number"?t={r:r>>24&255,g:r>>16&255,b:r>>8&255,a:(r&255)/255}:t=r,we(t)}function Wu(r){return{r:SA(r.r),g:SA(r.g),b:SA(r.b),a:SA(r.a,3)}}function ir(r){const t=r.toString(16);return t.length<2?`0${t}`:t}const co="#000000FF";function qu(r){return gs(r).isValid()}function se(r,t=!1){const e=gs(r);if(!e.isValid()){if(typeof r=="string")return r;const o=`Failed to normalizeColor ${r}`;if(t)throw new Error(o);return console.warn(o),co}const{r:A,g:i,b:s,a:n}=Wu(e.rgba);return`#${ir(A)}${ir(i)}${ir(s)}${ir(SA(n*255))}`}var rr=rr||{};rr.parse=function(){const r={linearGradient:/^(-(webkit|o|ms|moz)-)?(linear-gradient)/i,repeatingLinearGradient:/^(-(webkit|o|ms|moz)-)?(repeating-linear-gradient)/i,radialGradient:/^(-(webkit|o|ms|moz)-)?(radial-gradient)/i,repeatingRadialGradient:/^(-(webkit|o|ms|moz)-)?(repeating-radial-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?((\d*\.\d+)|(\d+\.?)))px/,percentageValue:/^(-?((\d*\.\d+)|(\d+\.?)))%/,emValue:/^(-?((\d*\.\d+)|(\d+\.?)))em/,angleValue:/^(-?((\d*\.\d+)|(\d+\.?)))deg/,radianValue:/^(-?((\d*\.\d+)|(\d+\.?)))rad/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^#([0-9a-f]+)/i,literalColor:/^([a-z]+)/i,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-z0-9-,\s#]+)/i,number:/^((\d*\.\d+)|(\d+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i};let t="";function e(k){const P=new Error(`${t}: ${k}`);throw P.source=t,P}function A(){const k=i();return t.length>0&&e("Invalid input not EOF"),k}function i(){return y(s)}function s(){return n("linear-gradient",r.linearGradient,a)||n("repeating-linear-gradient",r.repeatingLinearGradient,a)||n("radial-gradient",r.radialGradient,c)||n("repeating-radial-gradient",r.repeatingRadialGradient,c)}function n(k,P,q){return o(P,Z=>{const nt=q();return nt&&(T(r.comma)||e("Missing comma before color stops")),{type:k,orientation:nt,colorStops:y(_)}})}function o(k,P){const q=T(k);if(q){T(r.startCall)||e("Missing (");const Z=P(q);return T(r.endCall)||e("Missing )"),Z}}function a(){const k=l();if(k)return k;const P=At("position-keyword",r.positionKeywords,1);return P?{type:"directional",value:P.value}:u()}function l(){return At("directional",r.sideOrCorner,1)}function u(){return At("angular",r.angleValue,1)||At("angular",r.radianValue,1)}function c(){let k,P=g(),q;return P&&(k=[],k.push(P),q=t,T(r.comma)&&(P=g(),P?k.push(P):t=q)),k}function g(){let k=f()||d();if(k)k.at=I();else{const P=B();if(P){k=P;const q=I();q&&(k.at=q)}else{const q=I();if(q)k={type:"default-radial",at:q};else{const Z=F();Z&&(k={type:"default-radial",at:Z})}}}return k}function f(){const k=At("shape",/^(circle)/i,0);return k&&(k.style=W()||B()),k}function d(){const k=At("shape",/^(ellipse)/i,0);return k&&(k.style=F()||L()||B()),k}function B(){return At("extent-keyword",r.extentKeywords,1)}function I(){if(At("position",/^at/,0)){const k=F();return k||e("Missing positioning value"),k}}function F(){const k=b();if(k.x||k.y)return{type:"position",value:k}}function b(){return{x:L(),y:L()}}function y(k){let P=k();const q=[];if(P)for(q.push(P);T(r.comma);)P=k(),P?q.push(P):e("One extra comma");return q}function _(){const k=Q();return k||e("Expected color definition"),k.length=L(),k}function Q(){return S()||J()||z()||V()||M()||et()||D()}function D(){return At("literal",r.literalColor,0)}function S(){return At("hex",r.hexColor,1)}function M(){return o(r.rgbColor,()=>({type:"rgb",value:y(K)}))}function V(){return o(r.rgbaColor,()=>({type:"rgba",value:y(K)}))}function et(){return o(r.varColor,()=>({type:"var",value:$()}))}function z(){return o(r.hslColor,()=>{T(r.percentageValue)&&e("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");const P=K();T(r.comma);let q=T(r.percentageValue);const Z=q?q[1]:null;T(r.comma),q=T(r.percentageValue);const nt=q?q[1]:null;return(!Z||!nt)&&e("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[P,Z,nt]}})}function J(){return o(r.hslaColor,()=>{const k=K();T(r.comma);let P=T(r.percentageValue);const q=P?P[1]:null;T(r.comma),P=T(r.percentageValue);const Z=P?P[1]:null;T(r.comma);const nt=K();return(!q||!Z)&&e("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[k,q,Z,nt]}})}function $(){return T(r.variableName)[1]}function K(){return T(r.number)[1]}function L(){return At("%",r.percentageValue,1)||it()||G()||W()}function it(){return At("position-keyword",r.positionKeywords,1)}function G(){return o(r.calcValue,()=>{let k=1,P=0;for(;k>0&&P<t.length;){const Z=t.charAt(P);Z==="("?k++:Z===")"&&k--,P++}k>0&&e("Missing closing parenthesis in calc() expression");const q=t.substring(0,P-1);return tt(P-1),{type:"calc",value:q}})}function W(){return At("px",r.pixelValue,1)||At("em",r.emValue,1)}function At(k,P,q){const Z=T(P);if(Z)return{type:k,value:Z[q]}}function T(k){let P,q;return q=/^\s+/.exec(t),q&&tt(q[0].length),P=k.exec(t),P&&tt(P[0].length),P}function tt(k){t=t.substr(k)}return function(k){return t=k.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),A()}}();const Xu=rr.parse.bind(rr);var sr=sr||{};sr.stringify=function(){var r={"visit_linear-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return r.visit_gradient(t)},"visit_radial-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return r.visit_gradient(t)},visit_gradient:function(t){var e=r.visit(t.orientation);return e&&(e+=", "),t.type+"("+e+r.visit(t.colorStops)+")"},visit_shape:function(t){var e=t.value,A=r.visit(t.at),i=r.visit(t.style);return i&&(e+=" "+i),A&&(e+=" at "+A),e},"visit_default-radial":function(t){var e="",A=r.visit(t.at);return A&&(e+=A),e},"visit_extent-keyword":function(t){var e=t.value,A=r.visit(t.at);return A&&(e+=" at "+A),e},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return r.visit(t.value.x)+" "+r.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return r.visit_color(t.value,t)},visit_hex:function(t){return r.visit_color("#"+t.value,t)},visit_rgb:function(t){return r.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return r.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return r.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return r.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return r.visit_color("var("+t.value+")",t)},visit_color:function(t,e){var A=t,i=r.visit(e.length);return i&&(A+=" "+i),A},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var e="",A=t.length;return t.forEach(function(i,s){e+=r.visit(i),s<A-1&&(e+=", ")}),e},visit_object:function(t){return t.width&&t.height?r.visit(t.width)+" "+r.visit(t.height):""},visit:function(t){if(!t)return"";if(t instanceof Array)return r.visit_array(t);if(typeof t=="object"&&!t.type)return r.visit_object(t);if(t.type){var e=r["visit_"+t.type];if(e)return e(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return r.visit(t)}}(),sr.stringify.bind(sr);function ho(r){const t=r.length-1;return r.map((e,A)=>{const i=e.value;let s=SA(A/t,3),n="#00000000";switch(e.type){case"rgb":n=se({r:Number(i[0]??0),g:Number(i[1]??0),b:Number(i[2]??0)});break;case"rgba":n=se({r:Number(i[0]??0),g:Number(i[1]??0),b:Number(i[2]??0),a:Number(i[3]??0)});break;case"literal":n=se(e.value);break;case"hex":n=se(`#${e.value}`);break}switch(e.length?.type){case"%":s=Number(e.length.value)/100;break}return{offset:s,color:n}})}function go(r){let t=0;switch(r.orientation?.type){case"angular":t=Number(r.orientation.value);break}return{type:"linear-gradient",angle:t,stops:ho(r.colorStops)}}function fo(r){return r.orientation?.map(t=>{switch(t?.type){case"shape":case"default-radial":case"extent-keyword":default:return null}}),{type:"radial-gradient",stops:ho(r.colorStops)}}function ci(r){return r.startsWith("linear-gradient(")||r.startsWith("radial-gradient(")}function ju(r){return Xu(r).map(t=>{switch(t?.type){case"linear-gradient":return go(t);case"repeating-linear-gradient":return{...go(t),repeat:!0};case"radial-gradient":return fo(t);case"repeating-radial-gradient":return{...fo(t),repeat:!0};default:return}}).filter(Boolean)}function Zu(r){let t;return typeof r=="string"?t={color:r}:t=r,{color:se(t.color)}}function $u(r){let t;if(typeof r=="string"?t={image:r}:t=r,t.image){const{type:e,...A}=ju(t.image)[0]??{};switch(e){case"radial-gradient":return{radialGradient:A};case"linear-gradient":return{linearGradient:A}}}return t}function tc(r){let t;return typeof r=="string"?t={image:r}:t=r,t}function ec(r){let t;return typeof r=="string"?t={preset:r}:t=r,{preset:t.preset,foregroundColor:lt(t.foregroundColor)?void 0:se(t.foregroundColor),backgroundColor:lt(t.backgroundColor)?void 0:se(t.backgroundColor)}}function Ac(r){return!lt(r.color)}function ic(r){return typeof r=="string"?qu(r):Ac(r)}function rc(r){return!lt(r.image)&&ci(r.image)||!!r.linearGradient||!!r.radialGradient}function sc(r){return typeof r=="string"?ci(r):rc(r)}function nc(r){return!lt(r.image)&&!ci(r.image)}function oc(r){return typeof r=="string"?!ci(r):nc(r)}function ac(r){return!lt(r.preset)}function lc(r){return typeof r=="string"?!1:ac(r)}function EA(r){return ic(r)?Zu(r):sc(r)?$u(r):oc(r)?tc(r):lc(r)?ec(r):{}}function uc(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...hs(r,["fillWithShape"])}}const fs=Symbol("properties");function ds(r){let t;if(Object.hasOwn(r,fs))t=r[fs];else{const e=Object.getPrototypeOf(r);t=new Map(e?ds(e):void 0),r[fs]=t}return t}function cc(r,t={}){const e=Symbol.for(r),{default:A,fallback:i,alias:s}=t,n={declaration:t,internalKey:e},o=()=>typeof A=="function"?A():A,a=()=>typeof i=="function"?i():i;let l=!0;function u(){let g;if(s&&s!==r?g=Vu(this,s):typeof this.getter<"u"?g=this.getter(r,n):g=this[e],g=g??a(),g===void 0&&l){l=!1;const f=o();f!==void 0&&(c.call(this,f),g=f)}return g}function c(g){s&&s!==r?zu(this,s,g):typeof this.setter<"u"?this.setter(r,g,n):this[e]=g}return{get:u,set:c}}function nr(r,t,e={}){ds(r).set(t,e);const A=cc(t,e);Object.defineProperty(r.prototype,t,{get(){return A.get.call(this)},set(i){const s=A.get.call(this);A.set.call(this,i),this.onUpdateProperty?.(t,i,s,e)},configurable:!0,enumerable:!0})}function w(r){return function(t,e){if(typeof e!="string")throw new TypeError("Failed to @property decorator, prop name cannot be a symbol");nr(t.constructor,e,r)}}function hc(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...hs(r,["fillWithShape"])}}const Io=()=>Ju(10);function gc(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...hs(r,["width","style","headEnd","tailEnd"])}}function fc(r){return typeof r=="string"?{color:se(r)}:{...r,color:lt(r.color)?co:se(r.color)}}function dc(){return{boxShadow:"none"}}function Ic(r){return typeof r=="string"?r.startsWith("<svg")?{svg:r}:{paths:[{data:r}]}:Array.isArray(r)?{paths:r.map(t=>typeof t=="string"?{data:t}:t)}:r}function pc(){return{overflow:"visible",direction:void 0,display:void 0,boxSizing:void 0,width:void 0,height:void 0,maxHeight:void 0,maxWidth:void 0,minHeight:void 0,minWidth:void 0,position:void 0,left:0,top:0,right:void 0,bottom:void 0,borderTop:void 0,borderLeft:void 0,borderRight:void 0,borderBottom:void 0,borderWidth:0,border:void 0,flex:void 0,flexBasis:void 0,flexDirection:void 0,flexGrow:void 0,flexShrink:void 0,flexWrap:void 0,justifyContent:void 0,gap:void 0,alignContent:void 0,alignItems:void 0,alignSelf:void 0,marginTop:void 0,marginLeft:void 0,marginRight:void 0,marginBottom:void 0,margin:void 0,paddingTop:void 0,paddingLeft:void 0,paddingRight:void 0,paddingBottom:void 0,padding:void 0}}function Ec(){return{rotate:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"center"}}function Bc(){return{...pc(),...Ec(),...dc(),backgroundImage:"none",backgroundSize:"auto, auto",backgroundColor:"none",backgroundColormap:"none",borderRadius:0,borderColor:"none",borderStyle:"solid",outlineWidth:0,outlineOffset:0,outlineColor:"rgb(0, 0, 0)",outlineStyle:"none",visibility:"visible",filter:"none",opacity:1,pointerEvents:"auto",maskImage:"none"}}function Cc(){return{highlight:{},highlightImage:"none",highlightReferImage:"none",highlightColormap:"none",highlightLine:"none",highlightSize:"cover",highlightThickness:"100%"}}function Qc(){return{listStyle:{},listStyleType:"none",listStyleImage:"none",listStyleColormap:"none",listStyleSize:"cover",listStylePosition:"outside"}}function yc(){return{...Cc(),color:"rgb(0, 0, 0)",verticalAlign:"baseline",letterSpacing:0,wordSpacing:0,fontSize:14,fontWeight:"normal",fontFamily:"",fontStyle:"normal",fontKerning:"normal",textTransform:"none",textOrientation:"mixed",textDecoration:"none"}}function Dc(){return{...Qc(),writingMode:"horizontal-tb",textWrap:"wrap",textAlign:"start",textIndent:0,lineHeight:1.2}}function mc(){return{...Dc(),...yc(),textStrokeWidth:0,textStrokeColor:"rgb(0, 0, 0)"}}function or(r){return ui({...r,color:lt(r.color)?void 0:se(r.color),backgroundColor:lt(r.backgroundColor)?void 0:se(r.backgroundColor),borderColor:lt(r.borderColor)?void 0:se(r.borderColor),outlineColor:lt(r.outlineColor)?void 0:se(r.outlineColor),shadowColor:lt(r.shadowColor)?void 0:se(r.shadowColor)})}function po(){return{...Bc(),...mc()}}const Eo=/\r\n|\n\r|\n|\r/,wc=new RegExp(`${Eo.source}|<br\\/>`,"g"),vc=new RegExp(`^(${Eo.source})$`),ar=`
|
|
2
|
-
`;function MA(r){return vc.test(r)}function hi(r){return r.replace(wc,ar)}function _c(r,t){const e=Array.from(new Set([...Object.keys(r),...Object.keys(t)]));return!e.length||e.every(A=>r[A]===t[A])}function RA(r){const t=[];function e(){return t[t.length-1]}function A(o={}){let a=t[t.length-1];return a?.fragments.length===0?(a={...o,fragments:[]},t[t.length-1]=a):(a={...o,fragments:[]},t.push(a)),a}function i(o="",a={}){Array.from(o).forEach(l=>{if(MA(l)){const{fragments:u,...c}=e()||A();u.length||u.push({...a,content:ar}),A(c)}else{const u=e()||A(),c=u.fragments[u.fragments.length-1];if(c){const{content:g,...f}=c;if(_c(a,f)){c.content=`${g}${l}`;return}}u.fragments.push({...a,content:l})}})}(Array.isArray(r)?r:[r]).forEach(o=>{if(typeof o=="string")A(),i(o);else if("content"in o){const{content:a,...l}=o;A(or(l)),i(a)}else if("fragments"in o){const{fragments:a,...l}=o;A(or(l)),a.forEach(u=>{const{content:c,...g}=u;i(c,or(g))})}else Array.isArray(o)?(A(),o.forEach(a=>{if(typeof a=="string")i(a);else{const{content:l,...u}=a;i(l,or(u))}})):console.warn("Failed to parse text content",o)});const n=e();return n&&!n.fragments.length&&n.fragments.push({content:ar}),t}function bc(r){return typeof r=="string"?{content:RA(r)}:"content"in r?{...r,content:RA(r.content)}:{content:RA(r)}}function Bo(r){return RA(r).map(t=>{const e=hi(t.fragments.flatMap(A=>A.content).join(""));return MA(e)?"":e}).join(ar)}const lr=new Map;function st(r,t){return function(e){Object.defineProperty(e.prototype,"is",{value:r,enumerable:!0,configurable:!0}),t&&Object.keys(t).forEach(A=>{nr(e,A,{fallback:t[A]})}),lr.set(r,e)}}function xc(r="node",t={}){const e=lr.get(r);if(!e)throw new Error(`Failed to createNode, tag: ${r}`);return new e().setProperties(t)}class Kt{static _queue=[];static _currentTime=0;static _elapsed=0;static _requestId;static get currentTime(){return this._currentTime}static get elapsed(){return this._elapsed}static on(t,e={}){const{sort:A=0,once:i=!1}=e;this._queue[A]||(this._queue[A]=[]),this._queue[A].push({cb:t,once:i})}static off(t,e={}){const{sort:A=0}=e,i=this._queue[A];if(!i)return;const s=[];for(let n=i.length,o=0;o<n;o++){const a=i[o];a.cb!==t&&s.push(a)}s.length?this._queue[A]=s:this._queue.splice(A,1)}static start(){"requestAnimationFrame"in globalThis&&(this._currentTime=performance.now(),this._requestId=requestAnimationFrame(t=>this._update(t)))}static stop(){this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=void 0)}static _update(t){this._elapsed=t-this._currentTime,this._currentTime=t,this._requestId=requestAnimationFrame(e=>this._update(e)),this._performUpdate()}static _performUpdate(){const t=this._queue,e=[];for(let A=t.length,i=A;i>=0;i--){const s=t[i];if(!s)continue;const n=[];for(let o=s.length,a=0;a<o;a++){const l=s[a];try{l.cb()}catch(u){console.warn(u)}l.once||n.push(l)}n.length&&(e[i]=n)}this._queue=e}}Kt.start();async function Is(r){return new Promise(t=>{Kt.on(()=>{r?.(),t()},{sort:1,once:!0})})}const ur=Math.PI,oe=ur*2;let Fc=0;function Co(r){return r?.__SPECTOR_Object_TAG?.id??++Fc}function ps(r){return!(r&r-1)&&!!r}const Sc=/([\w-]+)\((.+?)\)/g,Mc=/[^,]+/g,Rc=/([-e.\d]+)(.*)/;function Es(r){return Array.isArray(r)?r.map(t=>({name:t.name,args:t.args.map(e=>({...e,normalizedIntValue:e.normalizedDefaultIntValue}))})):{...r,normalizedIntValue:r.normalizedDefaultIntValue}}function gi(r,t,e={}){const A=fi(t,e);return A.length?A:Qo(r,t,e)}function fi(r,t={}){const e=[];let A;for(;(A=Sc.exec(r))!==null;){const[,i,s]=A;i&&e.push({name:i,args:Pc(i,s,t)})}return e}function Pc(r,t,e={}){const A=[];let i,s=0;for(;(i=Mc.exec(t))!==null;)A.push(Qo(r,i[0],{...e,index:s++}));return A}function Qo(r,t,e={}){const{width:A=1,height:i=1,index:s=0}=e,n=t.match(Rc),o={unit:n?.[2]??null,value:t,intValue:Number(n?.[1]),normalizedIntValue:0,normalizedDefaultIntValue:0};switch(r){case"scale":case"scaleX":case"scaleY":case"scale3d":o.normalizedDefaultIntValue=1;break}switch(o.unit){case"%":o.normalizedIntValue=o.intValue/100;break;case"rad":o.normalizedIntValue=o.intValue/oe;break;case"deg":o.normalizedIntValue=o.intValue/360;break;case"px":switch(s){case 0:o.normalizedIntValue=o.intValue/A;break;case 1:o.normalizedIntValue=o.intValue/i;break}break;case"turn":case"em":case"rem":default:o.normalizedIntValue=o.intValue;break}return o}const yo="WebGL2RenderingContext"in globalThis,Do="ImageBitmap"in globalThis,mo="ResizeObserver"in globalThis,PA="PointerEvent"in globalThis,wo="WheelEvent"in globalThis,kc="MouseEvent"in globalThis,He="ontouchstart"in globalThis,vo="onclick"in globalThis,Bs="createImageBitmap"in globalThis,Cs="AudioContext"in globalThis,Qs="webkitAudioContext"in globalThis,ys="OfflineAudioContext"in globalThis,_o="webkitOfflineAudioContext"in globalThis,bo=Cs||Qs,di=typeof window<"u",Ds=globalThis.devicePixelRatio||1,ms=r=>r!==null&&typeof r=="object"&&r.nodeType===1,xo=r=>ms(r)&&r.tagName==="VIDEO",Uc=r=>ms(r)&&r.tagName==="IMG";function Fo(r){return typeof r=="object"&&r!==null&&r.nodeType===1&&r.tagName==="CANVAS"}function So(r){return yo&&r instanceof globalThis.WebGL2RenderingContext}function Mo(){if(di)return globalThis.document.createElement("canvas")}function Ro(r,t=globalThis.location){if(r.startsWith("data:"))return"";t=t||globalThis.location;const e=new URL(r,document.baseURI);return e.hostname!==t.hostname||e.port!==t.port||e.protocol!==t.protocol?"anonymous":""}function Po(r,t,e){e===null&&!t.startsWith("data:")?r.crossOrigin=Ro(t):e!==!1&&(r.crossOrigin=typeof e=="string"?e:"anonymous")}class ws{_map=new WeakMap;_toRaw(t){if(t&&typeof t=="object"){const e=t.__v_raw;e&&(t=this._toRaw(e))}return t}delete(t){return this._map.delete(this._toRaw(t))}get(t){return this._map.get(this._toRaw(t))}has(t){return this._map.has(this._toRaw(t))}set(t,e){return this._map.set(this._toRaw(t),this._toRaw(e)),this}}class cr{bubbles=!0;cancelable=!1;which;cancelBubble=!0;returnValue;srcElement;composed=!1;currentTarget;defaultPrevented=!1;eventPhase=cr.prototype.NONE;isTrusted;target;timeStamp;type;nativeEvent;originalEvent;propagationStopped=!1;propagationImmediatelyStopped=!1;path;detail;view;layer={x:0,y:0};get layerX(){return this.layer.x}get layerY(){return this.layer.y}page={x:0,y:0};get pageX(){return this.page.x}get pageY(){return this.page.y}initEvent(...t){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(...t){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}composedPath(){return this.path}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3}class vs extends cr{altKey;button;buttons;ctrlKey;metaKey;relatedTarget;shiftKey;client={x:0,y:0};get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}movement={x:0,y:0};get movementX(){return this.movement.x}get movementY(){return this.movement.y}offset={x:0,y:0};get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}global={x:0,y:0};get globalX(){return this.global.x}get globalY(){return this.global.y}screen={x:0,y:0};get screenX(){return this.screen.x}get screenY(){return this.screen.y}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(...t){throw new Error("Method not implemented.")}}class ko extends vs{width=0;height=0;isPrimary=!1;pointerType;pressure;tangentialPressure;tiltX;tiltY;twist;getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class Uo extends vs{deltaMode;deltaX;deltaY;deltaZ;static DOM_DELTA_PIXEL=0;DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;DOM_DELTA_PAGE=2}const Nc={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};class No extends Oe{target;cursor="default";cursorStyles={default:"inherit",pointer:"pointer"};setuped=!1;event;enableMoveEvent=!0;enableWheelEvent=!0;enableClickEvent=!0;setTarget(t){this.removeEventListeners(),this.target=t,this.addEventListeners()}removeEventListeners(){if(!this.setuped||!this.target)return;const t=this.target.style;globalThis.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):PA&&(t.touchAction=""),PA?(this.target.removeEventListener("pointerdown",this.onPointerDown),this.target.removeEventListener("pointerleave",this.onPointerOver),this.target.removeEventListener("pointerover",this.onPointerOver),this.target.removeEventListener("pointermove",this.onPointerMove),this.target.removeEventListener("pointerup",this.onPointerUp)):(this.target.removeEventListener("mousedown",this.onPointerDown),this.target.removeEventListener("mouseout",this.onPointerOver),this.target.removeEventListener("mouseover",this.onPointerOver),this.target.removeEventListener("mousemove",this.onPointerMove),this.target.removeEventListener("mouseup",this.onPointerUp)),He&&(this.target.removeEventListener("touchstart",this.onPointerDown),this.target.removeEventListener("touchmove",this.onPointerMove),this.target.removeEventListener("touchend",this.onPointerUp)),this.target.removeEventListener("wheel",this.onWheel),this.target=void 0,this.setuped=!1}addEventListeners(){if(this.setuped||!this.target)return;const t=this.target.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):PA&&(t.touchAction="none")),PA?(this.target.addEventListener("pointerdown",this.onPointerDown),this.target.addEventListener("pointerleave",this.onPointerOver),this.target.addEventListener("pointerover",this.onPointerOver),this.target.addEventListener("pointermove",this.onPointerMove),this.target.addEventListener("pointerup",this.onPointerUp)):(this.target.addEventListener("mousedown",this.onPointerDown),this.target.addEventListener("mouseout",this.onPointerOver),this.target.addEventListener("mouseover",this.onPointerOver),this.target.addEventListener("mousemove",this.onPointerMove),this.target.addEventListener("mouseup",this.onPointerUp)),He&&(this.target.addEventListener("touchstart",this.onPointerDown),this.target.addEventListener("touchmove",this.onPointerMove),this.target.addEventListener("touchend",this.onPointerUp)),this.target.addEventListener("wheel",this.onWheel),this.setuped=!0}normalize(t){const e=[];if(He&&t instanceof globalThis.TouchEvent)for(let A=0,i=t.changedTouches.length;A<i;A++){const s=t.changedTouches[A];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=t.touches.length===1&&t.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.type=t.type,e.push(s)}else if(wo&&t instanceof globalThis.WheelEvent)e.push(t);else if(PA&&t instanceof globalThis.PointerEvent)e.push(t);else{const A=t;typeof A.isPrimary>"u"&&(A.isPrimary=!0),typeof A.width>"u"&&(A.width=1),typeof A.height>"u"&&(A.height=1),typeof A.tiltX>"u"&&(A.tiltX=0),typeof A.tiltY>"u"&&(A.tiltY=0),typeof A.pointerType>"u"&&(A.pointerType="mouse"),typeof A.pointerId>"u"&&(A.pointerId=1),typeof A.pressure>"u"&&(A.pressure=.5),typeof A.twist>"u"&&(A.twist=0),typeof A.tangentialPressure>"u"&&(A.tangentialPressure=0),e.push(A)}return e}cloneWheelEvent(t){const e=new Uo;return this.copyMouseEvent(e,t),e.wheelDeltaY=t.wheelDeltaY,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,e.deltaMode=t.deltaMode,this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.x=e.screen.x,e.global.y=e.screen.y,e.offset.x=e.screen.x,e.offset.y=e.screen.y,e.nativeEvent=t,e.type=t.type,e}clonePointerEvent(t){const e=new ko;return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,e.isTrusted=t.isTrusted,this.copyMouseEvent(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.x=e.screen.x,e.global.y=e.screen.y,e.offset.x=e.screen.x,e.offset.y=e.screen.y,e.type==="pointerleave"?e.type="pointerout":e.type.startsWith("mouse")?e.type=e.type.replace("mouse","pointer"):e.type.startsWith("touch")&&(e.type=Nc[e.type]||e.type),e}copyMouseEvent(t,e){t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.relatedTarget=null,t.shiftKey=e.shiftKey}setCursor(t){if(!this.target||(t=t||"default",this.cursor===t))return;this.cursor=t;const e=!(globalThis.OffscreenCanvas&&this.target instanceof OffscreenCanvas),A=this.cursorStyles[t];if(A)switch(typeof A){case"string":e&&(this.target.style.cursor=A);break;case"function":A(t);break;case"object":e&&Object.assign(this.target.style,A);break}else e&&typeof t=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.target.style.cursor=t)}mapPositionToPoint(t,e,A){if(!this.target)return;const i=Number(this.target.getAttribute("width"))||0,s=Number(this.target.getAttribute("height"))||0,n=Number(this.target.getAttribute("data-pixel-ratio"))||1,o=this.target.isConnected?this.target.getBoundingClientRect():{width:i,height:s,left:0,top:0},a=1/n;t.x=(e-o.left)*(i/o.width)*a,t.y=(A-o.top)*(s/o.height)*a}onPointerDown=t=>{if(He&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointerdown",this.event=this.clonePointerEvent(e[A]));this.setCursor(this.cursor)};onPointerOver=t=>{if(!this.enableClickEvent||He&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointerover",this.event=this.clonePointerEvent(e[A]))};onPointerMove=t=>{if(!this.enableMoveEvent||He&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointermove",this.event=this.clonePointerEvent(e[A]))};onPointerUp=t=>{if(!this.enableClickEvent||He&&t.pointerType==="touch")return;let e=t.target;t.composedPath&&t.composedPath().length>0&&(e=t.composedPath()[0]);const A=e!==this.target?"outside":"",i=this.normalize(t);for(let s=0,n=i.length;s<n;s++){const o=this.clonePointerEvent(i[s]);o.type+=A,this.emit("pointerup",this.event=o)}};onWheel=t=>{if(!this.enableWheelEvent)return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("wheel",this.event=this.cloneWheelEvent(e[A]))}}let Tc=0;class tA extends Oe{instanceId=++Tc;_customPropertyAccessor;_properties=new Map;_updatedProperties=new Map;_changedProperties=new Set;_updatingPromise=Promise.resolve();_updating=!1;useCustomPropertyAccessor(t){return this._customPropertyAccessor=t,this.getPropertyDeclarations().forEach((e,A)=>{const i=t.get(A,()=>{}),s=this._properties.get(A);i===void 0?s!==void 0&&t.set(A,s):i!==s&&(e.alias&&e.alias!==A?this.setProperty(A,i):this._properties.set(A,i),this._updateProperty(A,i,s,e),this.emit("updateProperty",A,i,s,e))}),this}getter(t,e){return e?.declaration.protected?this[e.internalKey]:this._customPropertyAccessor?this._customPropertyAccessor.get(t,()=>this._properties.get(t)):this._properties.get(t)}setter(t,e,A){A?.declaration.protected?this[A.internalKey]=e:(this._customPropertyAccessor&&this._customPropertyAccessor.set(t,e),this._properties.set(t,e))}equal(t){return!!(t&&this.instanceId===t.instanceId)}async _enqueueUpdate(){this._updating=!0;try{await this._updatingPromise}catch(t){Promise.reject(t)}await Is(),this._updating&&(this.update(),this._updating=!1)}update(){this._update(this._updatedProperties),this._updatedProperties=new Map}_update(t){}_updateProperty(t,e,A,i){}isDirty(t){return this._updatedProperties.has(t)}getPropertyDeclarations(){return ds(this.constructor)}getPropertyDeclaration(t){return this.getPropertyDeclarations().get(t)}getProperty(t){return this[t]}setProperty(t,e){return this[t]=e,this}getProperties(t){const e={};for(const[A,i]of this.getPropertyDeclarations())!i.protected&&!i.alias&&(!t||t.includes(A))&&(e[A]=this.getProperty(A));return e}setProperties(t){if(t&&typeof t=="object")for(const[e]of this.getPropertyDeclarations())e in t&&this.setProperty(e,t[e]);return this}resetProperties(){for(const[t,e]of this.getPropertyDeclarations())this.setProperty(t,typeof e.fallback=="function"?e.fallback():e.fallback);return this}onUpdateProperty(t,e,A,i){this.requestUpdate(t,e,A,i)}requestUpdate(t,e,A,i){if(t!==void 0)if(!Object.is(e,A))this._updatedProperties.set(t,A),this._changedProperties.add(t),i??=this.getPropertyDeclaration(t),this._updateProperty(t,e,A,i),this.emit("updateProperty",t,e,A,i);else return;this._updating||(this._updatingPromise=this._enqueueUpdate())}toJSON(){const t={};return this._properties.forEach((e,A)=>{e!==void 0&&(e&&typeof e=="object"?"toJSON"in e&&typeof e.toJSON=="function"?t[A]=e.toJSON():t[A]={...e}:t[A]=e)}),t}clone(){return new this.constructor(this.toJSON())}free(){this.removeAllListeners()}}class To extends tA{}class Je extends To{}function Lc(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},A={};for(var i in e)A[e[i]]=i;var s={};r.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,l=A[this.toHex()];if(l)return l;if(n?.closest){var u=this.toRgb(),c=1/0,g="black";if(!s.length)for(var f in e)s[f]=new r(e[f]).toRgb();for(var d in e){var B=(o=u,a=s[d],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));B<c&&(c=B,g=d)}return g}},t.string.push([function(n){var o=n.toLowerCase(),a=o==="transparent"?"#0000":e[o];return a?new r(a).toRgb():null},"name"])}Ou([Lc]);class ve{get value(){return this._value}set value(t){this._colord=gs(t??"none")}get r8(){return this._colord.rgba.r}get g8(){return this._colord.rgba.g}get b8(){return this._colord.rgba.b}get a8(){return this._colord.rgba.a*255&255}get r(){return this.r8/255}get g(){return this.g8/255}get b(){return this.b8/255}get a(){return this._colord.rgba.a}get rgb(){return(this.r8<<16)+(this.g8<<8)+this.b8}get bgr(){return(this.b8<<16)+(this.g8<<8)+this.r8}get abgr(){return(this.a8<<24)+this.bgr}constructor(t=0){this.value=t}toHex(){return this._colord.toHex()}toRgb(){return this._colord.toRgb()}toRgbString(){return this._colord.toRgbString()}toHsl(){return this._colord.toHsl()}toHslString(){return this._colord.toHslString()}toHsv(){return this._colord.toHsv()}toArgb(t=this.a,e=!0){if(t===1)return(255<<24)+this.rgb;if(t===0)return e?0:this.rgb;let A=this.r8,i=this.g8,s=this.b8;return e&&(A=A*t+.5|0,i=i*t+.5|0,s=s*t+.5|0),(t*255<<24)+(A<<16)+(i<<8)+s}toArray(){return[this.r,this.g,this.b,this.a]}}class Ee extends Oe{constructor(t){super(),this.dim=t}_array=[];get length(){return this.dim}_operate(t,e,A){const{dim:i,_array:s}=this;let n;typeof e=="number"?n=Array.from({length:i},()=>e):e instanceof _e||e instanceof Ee?n=e.toArray():n=e;let o,a=[];if(A?A instanceof Ee?o=A:a=A:o=this,e instanceof _e){const{cols:l}=e;switch(t){case"*":for(let u=0;u<i;u++){let c=0;for(let g=0;g<i;g++)c+=s[u]*n[g*l+u];a[u]=c}break;default:throw new Error(`Not support operator in '${this.toName()} ${t} ${e.toName()}'`)}}else switch(t){case"+":for(let l=0;l<i;l++)a[l]=s[l]+n[l];break;case"-":for(let l=0;l<i;l++)a[l]=s[l]-n[l];break;case"*":for(let l=0;l<i;l++)a[l]=s[l]*n[l];break;case"/":for(let l=0;l<i;l++)a[l]=s[l]/n[l];break;case"rot":{const l=Math.cos(n[0]),u=Math.sin(n[0]);a[0]=s[0]*l-s[1]*u,a[1]=s[1]*l+s[0]*u;break}case"==":{let l=!0;for(let u=0;u<i;u++)l=l&&s[u]===n[u];return l}case"=":for(let l=0;l<i;l++){const u=n[l];u!==void 0&&(s[l]=u)}return this._onUpdate(s),this.emit("update",s),this;default:throw new Error(`Not support operator in '${this.toName()} ${t} Vector'`)}return o?.set(a)??a}add(t,e){return this._operate("+",t,e)}sub(t,e){return this._operate("-",t,e)}multiply(t,e){return this._operate("*",t,e)}divide(t,e){return this._operate("/",t,e)}rotate(t){return this._operate("rot",t)}set(t,...e){return e.length&&typeof t=="number"&&(t=[t,...e]),this._operate("=",t)}equals(t){return this._operate("==",t)}copy(t){return this.set(t)}clone(){const t=new this.constructor;return t.set(this.toArray()),t}_onUpdate(t){}toArray(){return this._array.slice()}toName(){return`Vector${this.dim}`}}class _e extends Oe{constructor(t,e,A){super(),this.rows=t,this.cols=e,A?this.set(A):this.identity()}_array=[];dirtyId=0;get length(){return this.cols*this.rows}_operate(t,e,A){const{cols:i,rows:s,length:n,_array:o}=this;let a;typeof e=="number"?a=Array.from({length:n},()=>e):e instanceof Ee||e instanceof _e?a=e.toArray():a=e;let l,u=[];if(A?A instanceof Ee||A instanceof _e?l=A:u=A:e instanceof Ee?l=new e.constructor:l=this,e instanceof Ee){const{dim:c}=e;switch(t){case"*":for(let g=0;g<c;g++){let f=0;for(let d=0;d<i;d++)d<c&&(f+=o[g*i+d]*(a[d]??0));u[g]=f}break;default:throw new Error(`Not support operator in '${this.toName()} ${t} ${e.toName()}'`)}}else switch(t){case"*":for(let c=0;c<i;c++)for(let g=0;g<s;g++){const f=g*i;let d=0;for(let B=0;B<s;B++){const I=f+B,F=B*i+c;d+=o[I]*(a[F]??0)}u[f+c]=d}break;case"=":for(let c=0;c<n;c++){const g=a[c];g!==void 0&&(o[c]=g)}return this._onUpdate(o),this.emit("update",o),this;default:throw new Error(`Not support operator in '${this.toName()} ${t} Matrix2'`)}return l?.set(u)??u}identity(){const{cols:t,rows:e}=this,A=[];for(let i=0;i<t;i++)for(let s=0;s<e;s++){const n=s*t,o=i+n;A[o]=s+n===o?1:0}return this.set(A)}set(t){return this._operate("=",t)}copy(t){return this.set(t)}clone(){const t=new this.constructor;return t.set(this.toArray()),t}multiply(t,e){return this._operate("*",t,e)}_onUpdate(t){this.dirtyId++}toArray(t=!1){const{cols:e,rows:A,_array:i}=this;if(t){const s=[];for(let n=0;n<A;n++)for(let o=0;o<e;o++)s[n+o*e]=i[o+n*e];return s}return i.slice()}toName(){return`Matrix${this.rows}(${this.rows}x${this.cols})`}toJSON(){return this._array}}class Lo extends _e{constructor(t){super(4,4,t)}}const Go=ur/180,Gc=180/ur;function Ke(r,t,e){return Math.max(r,Math.min(t,e))}function bt(r,t,e){return(1-e)*r+e*t}const Oc={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,t=20){if(!this.adaptive||!r||Number.isNaN(r))return t;let e=Math.ceil(r/this.maxLength);return e<this.minSegments?e=this.minSegments:e>this.maxSegments&&(e=this.maxSegments),e}};class Oo extends Ee{constructor(t=0,e=0,A=0,i=0){super(4),this.set([t,e,A,i])}}class _s extends _e{constructor(t){super(4,5,t)}hueRotate(t=0){const e=Math.sin(t),A=Math.cos(t),i=.213,s=.715,n=.072;return this.multiply([i+A*(1-i)+e*-i,s+A*-s+e*-s,n+A*-n+e*(1-n),0,0,i+A*-i+e*.143,s+A*(1-s)+e*.14,n+A*-n+e*-.283,0,0,i+A*-i+e*-.787,s+A*-s+e*s,n+A*(1-n)+e*n,0,0,0,0,0,1,0])}saturate(t=1){const e=(t-1)*2/3+1,A=(e-1)*-.5;return this.multiply([e,A,A,0,0,A,e,A,0,0,A,A,e,0,0,0,0,0,1,0])}brightness(t=1){const e=t;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0])}contrast(t=1){const e=t,A=-128*(e-1);return this.multiply([e,0,0,0,A,0,e,0,0,A,0,0,e,0,A,0,0,0,1,0])}invert(t=1){const e=bt(1,-1,t),A=bt(0,255,t);return this.multiply([e,0,0,0,A,0,e,0,0,A,0,0,e,0,A,0,0,0,1,0])}sepia(t=1){const e=Ke(0,t,1);return this.multiply([bt(1,.393,e),bt(0,.7689999,e),bt(0,.18899999,e),0,0,bt(0,.349,e),bt(1,.6859999,e),bt(0,.16799999,e),0,0,bt(0,.272,e),bt(0,.5339999,e),bt(1,.13099999,e),0,0,0,0,0,1,0])}opacity(t=1){return this.multiply([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,t,0])}grayscale(t=1){const e=Ke(0,t,1),A=bt(1,.3,e),i=bt(0,.3,e),s=bt(1,.59,e),n=bt(0,.59,e),o=bt(1,.11,e),a=bt(0,.11,e);return this.multiply([A,n,a,0,0,i,s,a,0,0,i,n,o,0,0,0,0,0,1,0])}multiply(t){const e=t,A=this._array;return this.set([A[0]*e[0]+A[1]*e[5]+A[2]*e[10]+A[3]*e[15],A[0]*e[1]+A[1]*e[6]+A[2]*e[11]+A[3]*e[16],A[0]*e[2]+A[1]*e[7]+A[2]*e[12]+A[3]*e[17],A[0]*e[3]+A[1]*e[8]+A[2]*e[13]+A[3]*e[18],A[0]*e[4]+A[1]*e[9]+A[2]*e[14]+A[3]*e[19]+A[4],A[5]*e[0]+A[6]*e[5]+A[7]*e[10]+A[8]*e[15],A[5]*e[1]+A[6]*e[6]+A[7]*e[11]+A[8]*e[16],A[5]*e[2]+A[6]*e[7]+A[7]*e[12]+A[8]*e[17],A[5]*e[3]+A[6]*e[8]+A[7]*e[13]+A[8]*e[18],A[5]*e[4]+A[6]*e[9]+A[7]*e[14]+A[8]*e[19]+A[9],A[10]*e[0]+A[11]*e[5]+A[12]*e[10]+A[13]*e[15],A[10]*e[1]+A[11]*e[6]+A[12]*e[11]+A[13]*e[16],A[10]*e[2]+A[11]*e[7]+A[12]*e[12]+A[13]*e[17],A[10]*e[3]+A[11]*e[8]+A[12]*e[13]+A[13]*e[18],A[10]*e[4]+A[11]*e[9]+A[12]*e[14]+A[13]*e[19]+A[14],A[15]*e[0]+A[16]*e[5]+A[17]*e[10]+A[18]*e[15],A[15]*e[1]+A[16]*e[6]+A[17]*e[11]+A[18]*e[16],A[15]*e[2]+A[16]*e[7]+A[17]*e[12]+A[18]*e[17],A[15]*e[3]+A[16]*e[8]+A[17]*e[13]+A[18]*e[18],A[15]*e[4]+A[16]*e[9]+A[17]*e[14]+A[18]*e[19]+A[19]])}toMatrix4(){const t=this._array;return new Lo([t[0],t[1],t[2],t[3],t[5],t[6],t[7],t[8],t[10],t[11],t[12],t[13],t[15],t[16],t[17],t[18]])}toVector4(){const t=this._array;return new Oo(t[4]/255,t[9]/255,t[14]/255,t[19]/255)}}class Hc extends _e{constructor(t){super(2,2,t)}}let bs=class extends _e{constructor(t){super(3,3,t)}invert(){const[t,e,A,i,s,n,o,a,l]=this._array,u=l*s-n*a,c=n*o-l*i,g=a*i-s*o,f=t*u+e*c+A*g;if(f===0)return this.set([0,0,0,0,0,0,0,0,0]);const d=1/f;return this.set([u*d,(A*a-l*e)*d,(n*e-A*s)*d,c*d,(l*t-A*o)*d,(A*i-n*t)*d,g*d,(e*o-a*t)*d,(s*t-e*i)*d])}};class Ho extends bs{constructor(t=0,e=0,A=0,i=0,s=!1){super(),this._x=t,this._y=e,this._width=A,this._height=i,this._flipY=s,this._performUpdateArray()}flipY(t){return this._flipY!==t&&(this._flipY=t,this._performUpdateArray()),this}translate(t,e){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._performUpdateArray()),this}resize(t,e){return(this._width!==t||this._height!==e)&&(this._width=t,this._height=e,this._performUpdateArray()),this}_performUpdateArray(){const t=this._width,e=this._height;if(!t||!e)return;const A=this._x,i=this._y,s=this._flipY?-1:1,n=1/t*2,o=s*(1/e*2),a=-1-A*n,l=-s-i*o;this.set([n,0,a,0,o,l,0,0,1])}}let ae=class ns extends Ee{get x(){return this._array[0]}set x(t){const[e,A]=this._array;e!==t&&this.set(t,A)}get y(){return this._array[1]}set y(t){const[e,A]=this._array;A!==t&&this.set(e,t)}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}get left(){return this.x}set left(t){this.x=t}get top(){return this.y}set top(t){this.y=t}constructor(t=0,e){super(2),this.set(typeof t=="number"?[t,e??t]:t)}update(t,e){const[A,i]=this._array;return(A!==t||i!==e)&&this.set(t,e),this}getLength(){const[t,e]=this._array;return Math.sqrt(t*t+e*e)}getAngle(){const[t,e]=this._array;return Math.atan2(-t,-e)+Math.PI}distanceTo(t){return Math.hypot(t.x-this.x,t.y-this.y)}normalize(){const[t,e]=this._array,A=1/(this.getLength()||1);return this.set(t*A,e*A),this}static lerp(t,e,A){return new ns(e).clone().sub(new ns(t)).multiply(A).add(new ns(t))}};class xs{get x(){return this.position.x}get y(){return this.position.y}get left(){return this.position.x}get top(){return this.position.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get width(){return this.size.x}get height(){return this.size.y}end=new ae;position;size;constructor(...t){const e=new ae,A=new ae;switch(t.length){case 0:break;case 1:e.set(t[0].position),A.set(t[0].size);break;case 2:e.set(t[0]),A.set(t[1]);break;default:e.set(t[0],t[1]),A.set(t[2],t[3]);break}this.update=this.update.bind(this),this.position=e.on("update",this.update),this.size=A.on("update",this.update),this.update()}update(){return this.end.set(this.position.x+this.size.x,this.position.y+this.size.y),this}toArray(){return[this.x,this.y,this.width,this.height]}}class Yt extends bs{static _t2d=new Yt;premultiply(t){return t.multiply(this,this)}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skew(t,e){return this.premultiply(Yt._t2d.makeSkew(t,e))}makeSkew(t,e){const A=Math.tan(t),i=Math.tan(e);return this.set([1,i,0,A,1,0,0,0,1]),this}translateX(t){return this.translate(t,0)}translateY(t){return this.translate(0,t)}translateZ(t){return this.translate(0,0,t)}translate3d(t,e,A){return this.translate(t,e,A)}translate(t,e,A=0){return this.premultiply(Yt._t2d.makeTranslation(t,e,A))}makeTranslation(t,e,A=0){return this.set([1,0,t,0,1,e,0,0,1]),this}scaleX(t){return this.scale(t,1)}scaleY(t){return this.scale(1,t)}scale3d(t,e,A=1){return this.scale(t,e,A)}scale(t,e,A=1){return this.premultiply(Yt._t2d.makeScale(t,e,A))}makeScale(t,e,A=1){return this.set([t,0,0,0,e,0,0,0,1]),this}rotateX(t){return this.scaleY(this._rotateToScale(t))}rotateY(t){return this.scaleX(this._rotateToScale(t))}rotateZ(t){return this.rotate(t)}rotate(t){return this.premultiply(Yt._t2d.makeRotation(t))}rotate3d(t,e,A,i){const[s,n,o]=this._rotate3d(t,e,A,i);return s&&this.rotateX(s),n&&this.rotateY(n),o&&this.rotateZ(o),this}_rotateToScale(t){const e=t/oe;return e<=.5?e*-4+1:(e-1)*4+1}_rotate3d(t,e,A,i){if(t===1&&e===0&&A===0)return[i,0,0];if(t===0&&e===1&&A===0)return[0,i,0];if(t===0&&e===0)return[0,0,i];{const s=Math.cos(i),n=Math.sin(i),o=s+t*t*(1-s),a=t*e*(1-s)-A*n,l=t*A*(1-s)+e*n,u=s+e*e*(1-s),c=e*A*(1-s)-t*n,g=s+A*A*(1-s),f=-Math.atan2(-c,u),d=-Math.atan2(l,Math.sqrt(c*c+g*g)),B=-Math.atan2(-a,o);return[f,d,B]}}makeRotation(t){const e=Math.cos(t),A=Math.sin(t);return this.set([e,-A,0,A,e,0,0,0,1]),this}applyToPoint(t,e){const{a:A,c:i,tx:s,b:n,d:o,ty:a}=this.toObject();return[A*t+i*e+s,n*t+o*e+a]}inverse(){return this.clone().invert()}isIdentity(){const{a:t,b:e,c:A,d:i,tx:s,ty:n}=this.toObject();return t===1&&e===0&&A===0&&i===1&&s===0&&n===0}toObject(){const[t,e,A,i,s,n,,,o]=this._array;return{a:t,c:e,tx:A,b:i,d:s,ty:n,tz:o}}}class Jc extends Ee{constructor(){super(3)}}var Kc=Object.defineProperty,Jo=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Kc(t,e,i),i};class hr extends tA{_starting=!1;_nextDeltaTime=0;get starting(){return this._starting}get spf(){return this.fps?Math.floor(1e3/this.fps):0}constructor(){super(),this._onNextTick=this._onNextTick.bind(this)}start(t){this._starting||(this._starting=!0,this.off("process"),this.on("process",t),Kt.on(this._onNextTick,{sort:0}))}stop(){this._starting&&(this._starting=!1,Kt.off(this._onNextTick,{sort:0}))}_onNextTick(){const t=Kt.elapsed*this.speed;if((this._nextDeltaTime-=t)<=0){const A=(this._nextDeltaTime=this.spf)||t;this.emit("process",A)}}free(){super.free(),this.stop()}}Jo([w({fallback:24})],hr.prototype,"fps"),Jo([w({fallback:1})],hr.prototype,"speed");class Ko{view;pixelRatio=Ds;screen={x:0,y:0,width:0,height:0};related=new ws;getRelated(t,e){let A=this.related.get(t);return A||(e?(this.related.set(t,A=e()),A):(console.warn("Failed to get related",t),null))}resize(t,e,A=!0){this.view&&(this.view.width=Math.floor(t*this.pixelRatio),this.view.height=Math.floor(e*this.pixelRatio)),this.screen.width=t,this.screen.height=e,A&&this.view&&(this.view.style.width=`${t}px`,this.view.style.height=`${e}px`)}}var kA=(r=>(r.NORMAL="normal",r.ADD="add",r.MULTIPLY="multiply",r.SCREEN="screen",r.NONE="none",r.NORMAL_NPM="normal_npm",r.ADD_NPM="add_npm",r.SCREEN_NPM="screen_npm",r.SRC_IN="src_in",r.SRC_OUT="src_out",r.SRC_ATOP="src_atop",r.DST_OVER="dst_over",r.DST_IN="dst_in",r.DST_OUT="dst_out",r.DST_ATOP="dst_atop",r.XOR="xor",r.SUBTRACT="subtract",r))(kA||{});function Yo(r){return{normal:[r.ONE,r.ONE_MINUS_SRC_ALPHA],add:[r.ONE,r.ONE],multiply:[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],screen:[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],none:[0,0],normal_npm:[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],add_npm:[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],screen_npm:[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],src_in:[r.DST_ALPHA,r.ZERO],src_out:[r.ONE_MINUS_DST_ALPHA,r.ZERO],src_atop:[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],dst_over:[r.ONE_MINUS_DST_ALPHA,r.ONE],dst_in:[r.ZERO,r.SRC_ALPHA],dst_out:[r.ZERO,r.ONE_MINUS_SRC_ALPHA],dst_atop:[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],xor:[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],subtract:[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD]}}class de{get gl(){return this._renderer.gl}install(t){this._renderer=t}onUpdateContext(){}flush(){}reset(){}free(){}}class BA{static _properties=["blend","offsets","culling","depthTest","clockwiseFrontFace","depthMask"];static _init(){this._properties.forEach((t,e)=>{Object.defineProperty(this.prototype,t,{get(){return!!(this.bitmap&1<<e)},set(A){!!(this.bitmap&1<<e)!==A&&(this.bitmap^=1<<e)},enumerable:!0,configurable:!0})})}static for2D(){const t=new BA;return t.depthTest=!1,t.blend=!0,t}_blendMode=kA.NORMAL;_polygonOffset=0;bitmap=0;get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==kA.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}constructor(t){if(t)for(const e in t)this[e]=t[e]}}BA._init();class Vo extends de{install(t){super.install(t),t.state=this}_blendEq=!1;_setters=BA._properties.map(t=>this[`set${t.replace(/^\S/,e=>e.toUpperCase())}`]);boundStateBitmap=0;boundBlendMode;blendModes;defaultState=new BA({blend:!0});onUpdateContext(){super.onUpdateContext(),this.blendModes=Yo(this._renderer.gl)}toggle(t,e){this._renderer.gl[e?"enable":"disable"](t)}setBlend(t){this.toggle(this._renderer.gl.BLEND,t)}setOffsets(t){this.toggle(this._renderer.gl.POLYGON_OFFSET_FILL,t)}setCulling(t){this.toggle(this._renderer.gl.CULL_FACE,t)}setDepthTest(t){this.toggle(this._renderer.gl.DEPTH_TEST,t)}setDepthMask(t){this._renderer.gl.depthMask(t)}setClockwiseFrontFace(t){const e=this._renderer.gl;e.frontFace(e[t?"CW":"CCW"])}setBlendMode(t){if(t===this.boundBlendMode)return;this.boundBlendMode=t;const e=this.blendModes[t],A=this._renderer.gl;e.length===2?A.blendFunc(e[0],e[1]):A.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,A.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,A.blendEquationSeparate(A.FUNC_ADD,A.FUNC_ADD))}setPolygonOffset(t,e){this._renderer.gl.polygonOffset(t,e)}bind(t){if(this.boundStateBitmap!==t.bitmap){let e=this.boundStateBitmap^t.bitmap,A=0;for(;e;)e&1&&this._setters[A]?.call(this,!!(t.bitmap&1<<A)),e=e>>1,A++;this.boundStateBitmap=t.bitmap}t.blend&&this.setBlendMode(t.blendMode),t.offsets&&this.setPolygonOffset(1,t.polygonOffset)}reset(){super.reset();const t=this._renderer.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!1),this.bind(this.defaultState),this._blendEq=!0,this.setBlendMode(kA.NORMAL)}}class zo extends de{install(t){super.install(t),t.batch2D=this}_state=BA.for2D();_batchSize=4096*4;_drawCallUid=0;_defaultModulate=4294967295;_defaultBackgroundColor=0;_defaultColorMatrixOffset=[0,0,0,0];_defaultColorMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];_batchables=[];_vertexCount=0;_indexCount=0;_attributeBuffer=[];_indexBuffers=[];_shaders=new Map;_attributes={aTextureId:{size:1,normalized:!0,type:"float"},aPosition:{size:2,normalized:!1,type:"float"},aUv:{size:2,normalized:!1,type:"float"},aModulate:{size:4,normalized:!0,type:"unsigned_byte"},aBackgroundColor:{size:4,normalized:!0,type:"unsigned_byte"},aDisableWrapMode:{size:4,normalized:!0,type:"float"},aColorMatrixOffset:{size:4,normalized:!1,type:"float"},aColorMatrix:{size:4,normalized:!1,type:"float"}};_vertexSize=31;_getShader(t){let e=this._shaders.get(t);return e||this._shaders.set(t,e=this._createShader(t)),e}_createShader(t){const e=this._renderer,A=e.program.create({vert:`precision highp float;
|
|
1
|
+
(function(g,pA){typeof exports=="object"&&typeof module<"u"?pA(exports):typeof define=="function"&&define.amd?define(["exports"],pA):(g=typeof globalThis<"u"?globalThis:g||self,pA(g.modernCanvas={}))})(this,function(g){"use strict";var pA=typeof document<"u"?document.currentScript:null,xc={grad:.9,turn:360,rad:360/(2*Math.PI)},Le=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},Mt=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},fe=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},jn=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Zn=function(r){return{r:fe(r.r,0,255),g:fe(r.g,0,255),b:fe(r.b,0,255),a:fe(r.a)}},rs=function(r){return{r:Mt(r.r),g:Mt(r.g),b:Mt(r.b),a:Mt(r.a,3)}},Sc=/^#([0-9a-f]{3,8})$/i,$i=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},$n=function(r){var t=r.r,e=r.g,A=r.b,i=r.a,s=Math.max(t,e,A),n=s-Math.min(t,e,A),o=n?s===t?(e-A)/n:s===e?2+(A-t)/n:4+(t-e)/n:0;return{h:60*(o<0?o+6:o),s:s?n/s*100:0,v:s/255*100,a:i}},to=function(r){var t=r.h,e=r.s,A=r.v,i=r.a;t=t/360*6,e/=100,A/=100;var s=Math.floor(t),n=A*(1-e),o=A*(1-(t-s)*e),a=A*(1-(1-t+s)*e),l=s%6;return{r:255*[A,o,n,n,a,A][l],g:255*[a,A,A,o,n,n][l],b:255*[n,n,a,A,A,o][l],a:i}},eo=function(r){return{h:jn(r.h),s:fe(r.s,0,100),l:fe(r.l,0,100),a:fe(r.a)}},Ao=function(r){return{h:Mt(r.h),s:Mt(r.s),l:Mt(r.l),a:Mt(r.a,3)}},io=function(r){return to((e=(t=r).s,{h:t.h,s:(e*=((A=t.l)<50?A:100-A)/100)>0?2*e/(A+e)*100:0,v:A+e,a:t.a}));var t,e,A},oi=function(r){return{h:(t=$n(r)).h,s:(i=(200-(e=t.s))*(A=t.v)/100)>0&&i<200?e*A/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,e,A,i},Mc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ss={string:[[function(r){var t=Sc.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?Mt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?Mt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=kc.exec(r)||Pc.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=Mc.exec(r)||Rc.exec(r);if(!t)return null;var e,A,i=eo({h:(e=t[1],A=t[2],A===void 0&&(A="deg"),Number(e)*(xc[A]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return io(i)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,A=r.b,i=r.a,s=i===void 0?1:i;return Le(t)&&Le(e)&&Le(A)?Zn({r:Number(t),g:Number(e),b:Number(A),a:Number(s)}):null},"rgb"],[function(r){var t=r.h,e=r.s,A=r.l,i=r.a,s=i===void 0?1:i;if(!Le(t)||!Le(e)||!Le(A))return null;var n=eo({h:Number(t),s:Number(e),l:Number(A),a:Number(s)});return io(n)},"hsl"],[function(r){var t=r.h,e=r.s,A=r.v,i=r.a,s=i===void 0?1:i;if(!Le(t)||!Le(e)||!Le(A))return null;var n=function(o){return{h:jn(o.h),s:fe(o.s,0,100),v:fe(o.v,0,100),a:fe(o.a)}}({h:Number(t),s:Number(e),v:Number(A),a:Number(s)});return to(n)},"hsv"]]},ro=function(r,t){for(var e=0;e<t.length;e++){var A=t[e][0](r);if(A)return[A,t[e][1]]}return[null,void 0]},Uc=function(r){return typeof r=="string"?ro(r.trim(),ss.string):typeof r=="object"&&r!==null?ro(r,ss.object):[null,void 0]},ns=function(r,t){var e=oi(r);return{h:e.h,s:fe(e.s+100*t,0,100),l:e.l,a:e.a}},os=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},so=function(r,t){var e=oi(r);return{h:e.h,s:e.s,l:fe(e.l+100*t,0,100),a:e.a}},as=function(){function r(t){this.parsed=Uc(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return Mt(os(this.rgba),2)},r.prototype.isDark=function(){return os(this.rgba)<.5},r.prototype.isLight=function(){return os(this.rgba)>=.5},r.prototype.toHex=function(){return t=rs(this.rgba),e=t.r,A=t.g,i=t.b,n=(s=t.a)<1?$i(Mt(255*s)):"","#"+$i(e)+$i(A)+$i(i)+n;var t,e,A,i,s,n},r.prototype.toRgb=function(){return rs(this.rgba)},r.prototype.toRgbString=function(){return t=rs(this.rgba),e=t.r,A=t.g,i=t.b,(s=t.a)<1?"rgba("+e+", "+A+", "+i+", "+s+")":"rgb("+e+", "+A+", "+i+")";var t,e,A,i,s},r.prototype.toHsl=function(){return Ao(oi(this.rgba))},r.prototype.toHslString=function(){return t=Ao(oi(this.rgba)),e=t.h,A=t.s,i=t.l,(s=t.a)<1?"hsla("+e+", "+A+"%, "+i+"%, "+s+")":"hsl("+e+", "+A+"%, "+i+"%)";var t,e,A,i,s},r.prototype.toHsv=function(){return t=$n(this.rgba),{h:Mt(t.h),s:Mt(t.s),v:Mt(t.v),a:Mt(t.a,3)};var t},r.prototype.invert=function(){return ve({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),ve(ns(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),ve(ns(this.rgba,-t))},r.prototype.grayscale=function(){return ve(ns(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),ve(so(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),ve(so(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?ve({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):Mt(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=oi(this.rgba);return typeof t=="number"?ve({h:t,s:e.s,l:e.l,a:e.a}):Mt(e.h)},r.prototype.isEqual=function(t){return this.toHex()===ve(t).toHex()},r}(),ve=function(r){return r instanceof as?r:new as(r)},no=[],Nc=function(r){r.forEach(function(t){no.indexOf(t)<0&&(t(as,ss),no.push(t))})};const Fc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Tc=(r=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+=Fc[e[r]&63];return t};class Ge{eventListeners=new Map;addEventListener(t,e,A){const i={value:e,options:A},s=this.eventListeners.get(t);return s?Array.isArray(s)?s.push(i):this.eventListeners.set(t,[s,i]):this.eventListeners.set(t,i),this}removeEventListener(t,e,A){if(!e)return this.eventListeners.delete(t),this;const i=this.eventListeners.get(t);if(!i)return this;if(Array.isArray(i)){const s=[];for(let n=0,o=i.length;n<o;n++){const a=i[n];(a.value!==e||typeof A=="object"&&A?.once&&(typeof a.options=="boolean"||!a.options?.once))&&s.push(a)}s.length?this.eventListeners.set(t,s.length===1?s[0]:s):this.eventListeners.delete(t)}else i.value===e&&(typeof A=="boolean"||!A?.once||typeof i.options=="boolean"||i.options?.once)&&this.eventListeners.delete(t);return this}removeAllListeners(){return this.eventListeners.clear(),this}hasEventListener(t){return this.eventListeners.has(t)}dispatchEvent(t,...e){const A=this.eventListeners.get(t);if(A){if(Array.isArray(A))for(let i=A.length,s=0;s<i;s++){const n=A[s];typeof n.options=="object"&&n.options?.once&&this.off(t,n.value,n.options),n.value.apply(this,e)}else typeof A.options=="object"&&A.options?.once&&this.off(t,A.value,A.options),A.value.apply(this,e);return!0}else return!1}on(t,e,A){return this.addEventListener(t,e,A)}once(t,e){return this.addEventListener(t,e,{once:!0})}off(t,e,A){return this.removeEventListener(t,e,A)}emit(t,...e){this.dispatchEvent(t,...e)}}function lt(r){return r==null||r==="none"}function MA(r,t=0,e=10**t){return Math.round(e*r)/e+0}function ai(r,t=!1){if(typeof r!="object"||!r)return r;if(Array.isArray(r))return t?r.map(A=>ai(A,t)):r;const e={};for(const A in r){const i=r[A];i!=null&&(t?e[A]=ai(i,t):e[A]=i)}return e}function ls(r,t){const e={};return t.forEach(A=>{A in r&&(e[A]=r[A])}),e}function Lc(r,t,e){const A=t.length-1;if(A<0)return r===void 0?e:r;for(let i=0;i<A;i++){if(r==null)return e;r=r[t[i]]}return r==null||r[t[A]]===void 0?e:r[t[A]]}function Gc(r,t,e){const A=t.length-1;for(let i=0;i<A;i++)typeof r[t[i]]!="object"&&(r[t[i]]={}),r=r[t[i]];r[t[A]]=e}function Oc(r,t,e){return r==null||!t||typeof t!="string"?e:r[t]!==void 0?r[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),Lc(r,t.split("."),e))}function Hc(r,t,e){if(!(typeof r!="object"||!t))return t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),Gc(r,t.split("."),e)}let oo=class{_map=new WeakMap;_toRaw(t){if(t&&typeof t=="object"){const e=t.__v_raw;e&&(t=this._toRaw(e))}return t}delete(t){return this._map.delete(this._toRaw(t))}get(t){return this._map.get(this._toRaw(t))}has(t){return this._map.has(this._toRaw(t))}set(t,e){return this._map.set(this._toRaw(t),this._toRaw(e)),this}};function cs(r){let t;return typeof r=="number"?t={r:r>>24&255,g:r>>16&255,b:r>>8&255,a:(r&255)/255}:t=r,ve(t)}function Jc(r){return{r:MA(r.r),g:MA(r.g),b:MA(r.b),a:MA(r.a,3)}}function tr(r){const t=r.toString(16);return t.length<2?`0${t}`:t}const ao="#000000FF";function Kc(r){return cs(r).isValid()}function se(r,t=!1){const e=cs(r);if(!e.isValid()){if(typeof r=="string")return r;const o=`Failed to normalizeColor ${r}`;if(t)throw new Error(o);return console.warn(o),ao}const{r:A,g:i,b:s,a:n}=Jc(e.rgba);return`#${tr(A)}${tr(i)}${tr(s)}${tr(MA(n*255))}`}var er=er||{};er.parse=function(){const r={linearGradient:/^(-(webkit|o|ms|moz)-)?(linear-gradient)/i,repeatingLinearGradient:/^(-(webkit|o|ms|moz)-)?(repeating-linear-gradient)/i,radialGradient:/^(-(webkit|o|ms|moz)-)?(radial-gradient)/i,repeatingRadialGradient:/^(-(webkit|o|ms|moz)-)?(repeating-radial-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?((\d*\.\d+)|(\d+\.?)))px/,percentageValue:/^(-?((\d*\.\d+)|(\d+\.?)))%/,emValue:/^(-?((\d*\.\d+)|(\d+\.?)))em/,angleValue:/^(-?((\d*\.\d+)|(\d+\.?)))deg/,radianValue:/^(-?((\d*\.\d+)|(\d+\.?)))rad/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^#([0-9a-f]+)/i,literalColor:/^([a-z]+)/i,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-z0-9-,\s#]+)/i,number:/^((\d*\.\d+)|(\d+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i};let t="";function e(U){const P=new Error(`${t}: ${U}`);throw P.source=t,P}function A(){const U=i();return t.length>0&&e("Invalid input not EOF"),U}function i(){return w(s)}function s(){return n("linear-gradient",r.linearGradient,a)||n("repeating-linear-gradient",r.repeatingLinearGradient,a)||n("radial-gradient",r.radialGradient,h)||n("repeating-radial-gradient",r.repeatingRadialGradient,h)}function n(U,P,q){return o(P,Z=>{const nt=q();return nt&&(T(r.comma)||e("Missing comma before color stops")),{type:U,orientation:nt,colorStops:w(D)}})}function o(U,P){const q=T(U);if(q){T(r.startCall)||e("Missing (");const Z=P(q);return T(r.endCall)||e("Missing )"),Z}}function a(){const U=l();if(U)return U;const P=At("position-keyword",r.positionKeywords,1);return P?{type:"directional",value:P.value}:c()}function l(){return At("directional",r.sideOrCorner,1)}function c(){return At("angular",r.angleValue,1)||At("angular",r.radianValue,1)}function h(){let U,P=u(),q;return P&&(U=[],U.push(P),q=t,T(r.comma)&&(P=u(),P?U.push(P):t=q)),U}function u(){let U=d()||f();if(U)U.at=p();else{const P=B();if(P){U=P;const q=p();q&&(U.at=q)}else{const q=p();if(q)U={type:"default-radial",at:q};else{const Z=S();Z&&(U={type:"default-radial",at:Z})}}}return U}function d(){const U=At("shape",/^(circle)/i,0);return U&&(U.style=W()||B()),U}function f(){const U=At("shape",/^(ellipse)/i,0);return U&&(U.style=S()||L()||B()),U}function B(){return At("extent-keyword",r.extentKeywords,1)}function p(){if(At("position",/^at/,0)){const U=S();return U||e("Missing positioning value"),U}}function S(){const U=R();if(U.x||U.y)return{type:"position",value:U}}function R(){return{x:L(),y:L()}}function w(U){let P=U();const q=[];if(P)for(q.push(P);T(r.comma);)P=U(),P?q.push(P):e("One extra comma");return q}function D(){const U=Q();return U||e("Expected color definition"),U.length=L(),U}function Q(){return x()||J()||z()||V()||M()||et()||m()}function m(){return At("literal",r.literalColor,0)}function x(){return At("hex",r.hexColor,1)}function M(){return o(r.rgbColor,()=>({type:"rgb",value:w(K)}))}function V(){return o(r.rgbaColor,()=>({type:"rgba",value:w(K)}))}function et(){return o(r.varColor,()=>({type:"var",value:$()}))}function z(){return o(r.hslColor,()=>{T(r.percentageValue)&&e("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");const P=K();T(r.comma);let q=T(r.percentageValue);const Z=q?q[1]:null;T(r.comma),q=T(r.percentageValue);const nt=q?q[1]:null;return(!Z||!nt)&&e("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[P,Z,nt]}})}function J(){return o(r.hslaColor,()=>{const U=K();T(r.comma);let P=T(r.percentageValue);const q=P?P[1]:null;T(r.comma),P=T(r.percentageValue);const Z=P?P[1]:null;T(r.comma);const nt=K();return(!q||!Z)&&e("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[U,q,Z,nt]}})}function $(){return T(r.variableName)[1]}function K(){return T(r.number)[1]}function L(){return At("%",r.percentageValue,1)||it()||G()||W()}function it(){return At("position-keyword",r.positionKeywords,1)}function G(){return o(r.calcValue,()=>{let U=1,P=0;for(;U>0&&P<t.length;){const Z=t.charAt(P);Z==="("?U++:Z===")"&&U--,P++}U>0&&e("Missing closing parenthesis in calc() expression");const q=t.substring(0,P-1);return tt(P-1),{type:"calc",value:q}})}function W(){return At("px",r.pixelValue,1)||At("em",r.emValue,1)}function At(U,P,q){const Z=T(P);if(Z)return{type:U,value:Z[q]}}function T(U){let P,q;return q=/^\s+/.exec(t),q&&tt(q[0].length),P=U.exec(t),P&&tt(P[0].length),P}function tt(U){t=t.substr(U)}return function(U){return t=U.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),A()}}();const Yc=er.parse.bind(er);var Ar=Ar||{};Ar.stringify=function(){var r={"visit_linear-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return r.visit_gradient(t)},"visit_radial-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return r.visit_gradient(t)},visit_gradient:function(t){var e=r.visit(t.orientation);return e&&(e+=", "),t.type+"("+e+r.visit(t.colorStops)+")"},visit_shape:function(t){var e=t.value,A=r.visit(t.at),i=r.visit(t.style);return i&&(e+=" "+i),A&&(e+=" at "+A),e},"visit_default-radial":function(t){var e="",A=r.visit(t.at);return A&&(e+=A),e},"visit_extent-keyword":function(t){var e=t.value,A=r.visit(t.at);return A&&(e+=" at "+A),e},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return r.visit(t.value.x)+" "+r.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return r.visit_color(t.value,t)},visit_hex:function(t){return r.visit_color("#"+t.value,t)},visit_rgb:function(t){return r.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return r.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return r.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return r.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return r.visit_color("var("+t.value+")",t)},visit_color:function(t,e){var A=t,i=r.visit(e.length);return i&&(A+=" "+i),A},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var e="",A=t.length;return t.forEach(function(i,s){e+=r.visit(i),s<A-1&&(e+=", ")}),e},visit_object:function(t){return t.width&&t.height?r.visit(t.width)+" "+r.visit(t.height):""},visit:function(t){if(!t)return"";if(t instanceof Array)return r.visit_array(t);if(typeof t=="object"&&!t.type)return r.visit_object(t);if(t.type){var e=r["visit_"+t.type];if(e)return e(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return r.visit(t)}}(),Ar.stringify.bind(Ar);function lo(r){const t=r.length-1;return r.map((e,A)=>{const i=e.value;let s=MA(A/t,3),n="#00000000";switch(e.type){case"rgb":n=se({r:Number(i[0]??0),g:Number(i[1]??0),b:Number(i[2]??0)});break;case"rgba":n=se({r:Number(i[0]??0),g:Number(i[1]??0),b:Number(i[2]??0),a:Number(i[3]??0)});break;case"literal":n=se(e.value);break;case"hex":n=se(`#${e.value}`);break}switch(e.length?.type){case"%":s=Number(e.length.value)/100;break}return{offset:s,color:n}})}function co(r){let t=0;switch(r.orientation?.type){case"angular":t=Number(r.orientation.value);break}return{type:"linear-gradient",angle:t,stops:lo(r.colorStops)}}function ho(r){return r.orientation?.map(t=>{switch(t?.type){case"shape":case"default-radial":case"extent-keyword":default:return null}}),{type:"radial-gradient",stops:lo(r.colorStops)}}function li(r){return r.startsWith("linear-gradient(")||r.startsWith("radial-gradient(")}function Vc(r){return Yc(r).map(t=>{switch(t?.type){case"linear-gradient":return co(t);case"repeating-linear-gradient":return{...co(t),repeat:!0};case"radial-gradient":return ho(t);case"repeating-radial-gradient":return{...ho(t),repeat:!0};default:return}}).filter(Boolean)}function zc(r){let t;return typeof r=="string"?t={color:r}:t=r,{color:se(t.color)}}function Wc(r){let t;if(typeof r=="string"?t={image:r}:t=r,t.image){const{type:e,...A}=Vc(t.image)[0]??{};switch(e){case"radial-gradient":return{radialGradient:A};case"linear-gradient":return{linearGradient:A}}}return t}function qc(r){let t;return typeof r=="string"?t={image:r}:t=r,t}function Xc(r){let t;return typeof r=="string"?t={preset:r}:t=r,{preset:t.preset,foregroundColor:lt(t.foregroundColor)?void 0:se(t.foregroundColor),backgroundColor:lt(t.backgroundColor)?void 0:se(t.backgroundColor)}}function jc(r){return!lt(r.color)}function Zc(r){return typeof r=="string"?Kc(r):jc(r)}function $c(r){return!lt(r.image)&&li(r.image)||!!r.linearGradient||!!r.radialGradient}function th(r){return typeof r=="string"?li(r):$c(r)}function eh(r){return!lt(r.image)&&!li(r.image)}function Ah(r){return typeof r=="string"?!li(r):eh(r)}function ih(r){return!lt(r.preset)}function rh(r){return typeof r=="string"?!1:ih(r)}function EA(r){return Zc(r)?zc(r):th(r)?Wc(r):Ah(r)?qc(r):rh(r)?Xc(r):{}}function sh(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...ls(r,["fillWithShape"])}}const hs=Symbol("properties");function gs(r){let t;if(Object.hasOwn(r,hs))t=r[hs];else{const e=Object.getPrototypeOf(r);t=new Map(e?gs(e):void 0),r[hs]=t}return t}function nh(r,t={}){const e=Symbol.for(r),{default:A,fallback:i,alias:s}=t,n={declaration:t,internalKey:e},o=()=>typeof A=="function"?A():A,a=()=>typeof i=="function"?i():i;let l=!0;function c(){let u;if(s&&s!==r?u=Oc(this,s):typeof this.getter<"u"?u=this.getter(r,n):u=this[e],u=u??a(),u===void 0&&l){l=!1;const d=o();d!==void 0&&(h.call(this,d),u=d)}return u}function h(u){s&&s!==r?Hc(this,s,u):typeof this.setter<"u"?this.setter(r,u,n):this[e]=u}return{get:c,set:h}}function ir(r,t,e={}){gs(r).set(t,e);const A=nh(t,e);Object.defineProperty(r.prototype,t,{get(){return A.get.call(this)},set(i){const s=A.get.call(this);A.set.call(this,i),this.onUpdateProperty?.(t,i,s,e)},configurable:!0,enumerable:!0})}function v(r){return function(t,e){if(typeof e!="string")throw new TypeError("Failed to @property decorator, prop name cannot be a symbol");ir(t.constructor,e,r)}}function oh(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...ls(r,["fillWithShape"])}}const go=()=>Tc(10);function ah(r){return typeof r=="string"?{...EA(r)}:{...EA(r),...ls(r,["width","style","headEnd","tailEnd"])}}function lh(r){return typeof r=="string"?{color:se(r)}:{...r,color:lt(r.color)?ao:se(r.color)}}function ch(){return{boxShadow:"none"}}function hh(r){return typeof r=="string"?r.startsWith("<svg")?{svg:r}:{paths:[{data:r}]}:Array.isArray(r)?{paths:r.map(t=>typeof t=="string"?{data:t}:t)}:r}function gh(){return{overflow:"visible",direction:void 0,display:void 0,boxSizing:void 0,width:void 0,height:void 0,maxHeight:void 0,maxWidth:void 0,minHeight:void 0,minWidth:void 0,position:void 0,left:0,top:0,right:void 0,bottom:void 0,borderTop:void 0,borderLeft:void 0,borderRight:void 0,borderBottom:void 0,borderWidth:0,border:void 0,flex:void 0,flexBasis:void 0,flexDirection:void 0,flexGrow:void 0,flexShrink:void 0,flexWrap:void 0,justifyContent:void 0,gap:void 0,alignContent:void 0,alignItems:void 0,alignSelf:void 0,marginTop:void 0,marginLeft:void 0,marginRight:void 0,marginBottom:void 0,margin:void 0,paddingTop:void 0,paddingLeft:void 0,paddingRight:void 0,paddingBottom:void 0,padding:void 0}}function uh(){return{rotate:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"center"}}function fh(){return{...gh(),...uh(),...ch(),backgroundImage:"none",backgroundSize:"auto, auto",backgroundColor:"none",backgroundColormap:"none",borderRadius:0,borderColor:"none",borderStyle:"solid",outlineWidth:0,outlineOffset:0,outlineColor:"rgb(0, 0, 0)",outlineStyle:"none",visibility:"visible",filter:"none",opacity:1,pointerEvents:"auto",maskImage:"none"}}function dh(){return{highlight:{},highlightImage:"none",highlightReferImage:"none",highlightColormap:"none",highlightLine:"none",highlightSize:"cover",highlightThickness:"100%"}}function Ih(){return{listStyle:{},listStyleType:"none",listStyleImage:"none",listStyleColormap:"none",listStyleSize:"cover",listStylePosition:"outside"}}function ph(){return{...dh(),color:"rgb(0, 0, 0)",verticalAlign:"baseline",letterSpacing:0,wordSpacing:0,fontSize:14,fontWeight:"normal",fontFamily:"",fontStyle:"normal",fontKerning:"normal",textTransform:"none",textOrientation:"mixed",textDecoration:"none"}}function Eh(){return{...Ih(),writingMode:"horizontal-tb",textWrap:"wrap",textAlign:"start",textIndent:0,lineHeight:1.2}}function Bh(){return{...Eh(),...ph(),textStrokeWidth:0,textStrokeColor:"rgb(0, 0, 0)"}}function rr(r){return ai({...r,color:lt(r.color)?void 0:se(r.color),backgroundColor:lt(r.backgroundColor)?void 0:se(r.backgroundColor),borderColor:lt(r.borderColor)?void 0:se(r.borderColor),outlineColor:lt(r.outlineColor)?void 0:se(r.outlineColor),shadowColor:lt(r.shadowColor)?void 0:se(r.shadowColor)})}function uo(){return{...fh(),...Bh()}}const Ch=/\r\n|\n\r|\n|\r/,Qh=new RegExp(`^(${Ch.source})$`),fo=`
|
|
2
|
+
`;function yh(r){return Qh.test(r)}function mh(r,t){const e=Array.from(new Set([...Object.keys(r),...Object.keys(t)]));return!e.length||e.every(A=>r[A]===t[A])}function sr(r){const t=[];function e(){return t[t.length-1]}function A(o={}){let a=t[t.length-1];return a?.fragments.length===0?(a={...o,fragments:[]},t[t.length-1]=a):(a={...o,fragments:[]},t.push(a)),a}function i(o="",a={}){Array.from(o).forEach(l=>{if(yh(l)){const{fragments:c,...h}=e()||A();c.length||c.push({...a,content:fo}),A(h)}else{const c=e()||A(),h=c.fragments[c.fragments.length-1];if(h){const{content:u,...d}=h;if(mh(a,d)){h.content=`${u}${l}`;return}}c.fragments.push({...a,content:l})}})}(Array.isArray(r)?r:[r]).forEach(o=>{if(typeof o=="string")A(),i(o);else if("content"in o){const{content:a,...l}=o;A(rr(l)),i(a)}else if("fragments"in o){const{fragments:a,...l}=o;A(rr(l)),a.forEach(c=>{const{content:h,...u}=c;i(h,rr(u))})}else Array.isArray(o)?(A(),o.forEach(a=>{if(typeof a=="string")i(a);else{const{content:l,...c}=a;i(l,rr(c))}})):console.warn("Failed to parse text content",o)});const n=e();return n&&!n.fragments.length&&n.fragments.push({content:fo}),t}function wh(r){return typeof r=="string"?{content:sr(r)}:"content"in r?{...r,content:sr(r.content)}:{content:sr(r)}}const nr=new Map;function st(r,t){return function(e){Object.defineProperty(e.prototype,"is",{value:r,enumerable:!0,configurable:!0}),t&&Object.keys(t).forEach(A=>{ir(e,A,{fallback:t[A]})}),nr.set(r,e)}}function vh(r="node",t={}){const e=nr.get(r);if(!e)throw new Error(`Failed to createNode, tag: ${r}`);return new e().setProperties(t)}class Kt{static _queue=[];static _currentTime=0;static _elapsed=0;static _requestId;static get currentTime(){return this._currentTime}static get elapsed(){return this._elapsed}static on(t,e={}){const{sort:A=0,once:i=!1}=e;this._queue[A]||(this._queue[A]=[]),this._queue[A].push({cb:t,once:i})}static off(t,e={}){const{sort:A=0}=e,i=this._queue[A];if(!i)return;const s=[];for(let n=i.length,o=0;o<n;o++){const a=i[o];a.cb!==t&&s.push(a)}s.length?this._queue[A]=s:this._queue.splice(A,1)}static start(){"requestAnimationFrame"in globalThis&&(this._currentTime=performance.now(),this._requestId=requestAnimationFrame(t=>this._update(t)))}static stop(){this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=void 0)}static _update(t){this._elapsed=t-this._currentTime,this._currentTime=t,this._requestId=requestAnimationFrame(e=>this._update(e)),this._performUpdate()}static _performUpdate(){const t=this._queue,e=[];for(let A=t.length,i=A;i>=0;i--){const s=t[i];if(!s)continue;const n=[];for(let o=s.length,a=0;a<o;a++){const l=s[a];try{l.cb()}catch(c){console.warn(c)}l.once||n.push(l)}n.length&&(e[i]=n)}this._queue=e}}Kt.start();async function us(r){return new Promise(t=>{Kt.on(()=>{r?.(),t()},{sort:1,once:!0})})}const or=Math.PI,oe=or*2;let _h=0;function Io(r){return r?.__SPECTOR_Object_TAG?.id??++_h}function fs(r){return!(r&r-1)&&!!r}const bh=/([\w-]+)\((.+?)\)/g,Dh=/[^,]+/g,xh=/([-e.\d]+)(.*)/;function ds(r){return Array.isArray(r)?r.map(t=>({name:t.name,args:t.args.map(e=>({...e,normalizedIntValue:e.normalizedDefaultIntValue}))})):{...r,normalizedIntValue:r.normalizedDefaultIntValue}}function ci(r,t,e={}){const A=hi(t,e);return A.length?A:po(r,t,e)}function hi(r,t={}){const e=[];let A;for(;(A=bh.exec(r))!==null;){const[,i,s]=A;i&&e.push({name:i,args:Sh(i,s,t)})}return e}function Sh(r,t,e={}){const A=[];let i,s=0;for(;(i=Dh.exec(t))!==null;)A.push(po(r,i[0],{...e,index:s++}));return A}function po(r,t,e={}){const{width:A=1,height:i=1,index:s=0}=e,n=t.match(xh),o={unit:n?.[2]??null,value:t,intValue:Number(n?.[1]),normalizedIntValue:0,normalizedDefaultIntValue:0};switch(r){case"scale":case"scaleX":case"scaleY":case"scale3d":o.normalizedDefaultIntValue=1;break}switch(o.unit){case"%":o.normalizedIntValue=o.intValue/100;break;case"rad":o.normalizedIntValue=o.intValue/oe;break;case"deg":o.normalizedIntValue=o.intValue/360;break;case"px":switch(s){case 0:o.normalizedIntValue=o.intValue/A;break;case 1:o.normalizedIntValue=o.intValue/i;break}break;case"turn":case"em":case"rem":default:o.normalizedIntValue=o.intValue;break}return o}const Eo="WebGL2RenderingContext"in globalThis,Bo="ImageBitmap"in globalThis,Co="ResizeObserver"in globalThis,RA="PointerEvent"in globalThis,Qo="WheelEvent"in globalThis,Mh="MouseEvent"in globalThis,Oe="ontouchstart"in globalThis,yo="onclick"in globalThis,Is="createImageBitmap"in globalThis,ps="AudioContext"in globalThis,Es="webkitAudioContext"in globalThis,Bs="OfflineAudioContext"in globalThis,mo="webkitOfflineAudioContext"in globalThis,wo=ps||Es,gi=typeof window<"u",Cs=globalThis.devicePixelRatio||1,Qs=r=>r!==null&&typeof r=="object"&&r.nodeType===1,vo=r=>Qs(r)&&r.tagName==="VIDEO",Rh=r=>Qs(r)&&r.tagName==="IMG";function _o(r){return typeof r=="object"&&r!==null&&r.nodeType===1&&r.tagName==="CANVAS"}function bo(r){return Eo&&r instanceof globalThis.WebGL2RenderingContext}function Do(){if(gi)return globalThis.document.createElement("canvas")}function xo(r,t=globalThis.location){if(r.startsWith("data:"))return"";t=t||globalThis.location;const e=new URL(r,document.baseURI);return e.hostname!==t.hostname||e.port!==t.port||e.protocol!==t.protocol?"anonymous":""}function So(r,t,e){e===null&&!t.startsWith("data:")?r.crossOrigin=xo(t):e!==!1&&(r.crossOrigin=typeof e=="string"?e:"anonymous")}class ys{_map=new WeakMap;_toRaw(t){if(t&&typeof t=="object"){const e=t.__v_raw;e&&(t=this._toRaw(e))}return t}delete(t){return this._map.delete(this._toRaw(t))}get(t){return this._map.get(this._toRaw(t))}has(t){return this._map.has(this._toRaw(t))}set(t,e){return this._map.set(this._toRaw(t),this._toRaw(e)),this}}class ar{bubbles=!0;cancelable=!1;which;cancelBubble=!0;returnValue;srcElement;composed=!1;currentTarget;defaultPrevented=!1;eventPhase=ar.prototype.NONE;isTrusted;target;timeStamp;type;nativeEvent;originalEvent;propagationStopped=!1;propagationImmediatelyStopped=!1;path;detail;view;layer={x:0,y:0};get layerX(){return this.layer.x}get layerY(){return this.layer.y}page={x:0,y:0};get pageX(){return this.page.x}get pageY(){return this.page.y}initEvent(...t){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(...t){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}composedPath(){return this.path}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3}class ms extends ar{altKey;button;buttons;ctrlKey;metaKey;relatedTarget;shiftKey;client={x:0,y:0};get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}movement={x:0,y:0};get movementX(){return this.movement.x}get movementY(){return this.movement.y}offset={x:0,y:0};get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}global={x:0,y:0};get globalX(){return this.global.x}get globalY(){return this.global.y}screen={x:0,y:0};get screenX(){return this.screen.x}get screenY(){return this.screen.y}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(...t){throw new Error("Method not implemented.")}}class Mo extends ms{width=0;height=0;isPrimary=!1;pointerType;pressure;tangentialPressure;tiltX;tiltY;twist;getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class Ro extends ms{deltaMode;deltaX;deltaY;deltaZ;static DOM_DELTA_PIXEL=0;DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;DOM_DELTA_PAGE=2}const kh={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};class ko extends Ge{target;cursor="default";cursorStyles={default:"inherit",pointer:"pointer"};setuped=!1;event;enableMoveEvent=!0;enableWheelEvent=!0;enableClickEvent=!0;setTarget(t){this.removeEventListeners(),this.target=t,this.addEventListeners()}removeEventListeners(){if(!this.setuped||!this.target)return;const t=this.target.style;globalThis.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):RA&&(t.touchAction=""),RA?(this.target.removeEventListener("pointerdown",this.onPointerDown),this.target.removeEventListener("pointerleave",this.onPointerOver),this.target.removeEventListener("pointerover",this.onPointerOver),this.target.removeEventListener("pointermove",this.onPointerMove),this.target.removeEventListener("pointerup",this.onPointerUp)):(this.target.removeEventListener("mousedown",this.onPointerDown),this.target.removeEventListener("mouseout",this.onPointerOver),this.target.removeEventListener("mouseover",this.onPointerOver),this.target.removeEventListener("mousemove",this.onPointerMove),this.target.removeEventListener("mouseup",this.onPointerUp)),Oe&&(this.target.removeEventListener("touchstart",this.onPointerDown),this.target.removeEventListener("touchmove",this.onPointerMove),this.target.removeEventListener("touchend",this.onPointerUp)),this.target.removeEventListener("wheel",this.onWheel),this.target=void 0,this.setuped=!1}addEventListeners(){if(this.setuped||!this.target)return;const t=this.target.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):RA&&(t.touchAction="none")),RA?(this.target.addEventListener("pointerdown",this.onPointerDown),this.target.addEventListener("pointerleave",this.onPointerOver),this.target.addEventListener("pointerover",this.onPointerOver),this.target.addEventListener("pointermove",this.onPointerMove),this.target.addEventListener("pointerup",this.onPointerUp)):(this.target.addEventListener("mousedown",this.onPointerDown),this.target.addEventListener("mouseout",this.onPointerOver),this.target.addEventListener("mouseover",this.onPointerOver),this.target.addEventListener("mousemove",this.onPointerMove),this.target.addEventListener("mouseup",this.onPointerUp)),Oe&&(this.target.addEventListener("touchstart",this.onPointerDown),this.target.addEventListener("touchmove",this.onPointerMove),this.target.addEventListener("touchend",this.onPointerUp)),this.target.addEventListener("wheel",this.onWheel),this.setuped=!0}normalize(t){const e=[];if(Oe&&t instanceof globalThis.TouchEvent)for(let A=0,i=t.changedTouches.length;A<i;A++){const s=t.changedTouches[A];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=t.touches.length===1&&t.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.type=t.type,e.push(s)}else if(Qo&&t instanceof globalThis.WheelEvent)e.push(t);else if(RA&&t instanceof globalThis.PointerEvent)e.push(t);else{const A=t;typeof A.isPrimary>"u"&&(A.isPrimary=!0),typeof A.width>"u"&&(A.width=1),typeof A.height>"u"&&(A.height=1),typeof A.tiltX>"u"&&(A.tiltX=0),typeof A.tiltY>"u"&&(A.tiltY=0),typeof A.pointerType>"u"&&(A.pointerType="mouse"),typeof A.pointerId>"u"&&(A.pointerId=1),typeof A.pressure>"u"&&(A.pressure=.5),typeof A.twist>"u"&&(A.twist=0),typeof A.tangentialPressure>"u"&&(A.tangentialPressure=0),e.push(A)}return e}cloneWheelEvent(t){const e=new Ro;return this.copyMouseEvent(e,t),e.wheelDeltaY=t.wheelDeltaY,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,e.deltaMode=t.deltaMode,this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.x=e.screen.x,e.global.y=e.screen.y,e.offset.x=e.screen.x,e.offset.y=e.screen.y,e.nativeEvent=t,e.type=t.type,e}clonePointerEvent(t){const e=new Mo;return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,e.isTrusted=t.isTrusted,this.copyMouseEvent(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.x=e.screen.x,e.global.y=e.screen.y,e.offset.x=e.screen.x,e.offset.y=e.screen.y,e.type==="pointerleave"?e.type="pointerout":e.type.startsWith("mouse")?e.type=e.type.replace("mouse","pointer"):e.type.startsWith("touch")&&(e.type=kh[e.type]||e.type),e}copyMouseEvent(t,e){t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.relatedTarget=null,t.shiftKey=e.shiftKey}setCursor(t){if(!this.target||(t=t||"default",this.cursor===t))return;this.cursor=t;const e=!(globalThis.OffscreenCanvas&&this.target instanceof OffscreenCanvas),A=this.cursorStyles[t];if(A)switch(typeof A){case"string":e&&(this.target.style.cursor=A);break;case"function":A(t);break;case"object":e&&Object.assign(this.target.style,A);break}else e&&typeof t=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.target.style.cursor=t)}mapPositionToPoint(t,e,A){if(!this.target)return;const i=Number(this.target.getAttribute("width"))||0,s=Number(this.target.getAttribute("height"))||0,n=Number(this.target.getAttribute("data-pixel-ratio"))||1,o=this.target.isConnected?this.target.getBoundingClientRect():{width:i,height:s,left:0,top:0},a=1/n;t.x=(e-o.left)*(i/o.width)*a,t.y=(A-o.top)*(s/o.height)*a}onPointerDown=t=>{if(Oe&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointerdown",this.event=this.clonePointerEvent(e[A]));this.setCursor(this.cursor)};onPointerOver=t=>{if(!this.enableClickEvent||Oe&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointerover",this.event=this.clonePointerEvent(e[A]))};onPointerMove=t=>{if(!this.enableMoveEvent||Oe&&t.pointerType==="touch")return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("pointermove",this.event=this.clonePointerEvent(e[A]))};onPointerUp=t=>{if(!this.enableClickEvent||Oe&&t.pointerType==="touch")return;let e=t.target;t.composedPath&&t.composedPath().length>0&&(e=t.composedPath()[0]);const A=e!==this.target?"outside":"",i=this.normalize(t);for(let s=0,n=i.length;s<n;s++){const o=this.clonePointerEvent(i[s]);o.type+=A,this.emit("pointerup",this.event=o)}};onWheel=t=>{if(!this.enableWheelEvent)return;const e=this.normalize(t);for(let A=0,i=e.length;A<i;A++)this.emit("wheel",this.event=this.cloneWheelEvent(e[A]))}}let Ph=0;class tA extends Ge{instanceId=++Ph;_customPropertyAccessor;_properties=new Map;_updatedProperties=new Map;_changedProperties=new Set;_updatingPromise=Promise.resolve();_updating=!1;useCustomPropertyAccessor(t){return this._customPropertyAccessor=t,this.getPropertyDeclarations().forEach((e,A)=>{const i=t.get(A,()=>{}),s=this._properties.get(A);i===void 0?s!==void 0&&t.set(A,s):i!==s&&(e.alias&&e.alias!==A?this.setProperty(A,i):this._properties.set(A,i),this._updateProperty(A,i,s,e),this.emit("updateProperty",A,i,s,e))}),this}getter(t,e){return e?.declaration.protected?this[e.internalKey]:this._customPropertyAccessor?this._customPropertyAccessor.get(t,()=>this._properties.get(t)):this._properties.get(t)}setter(t,e,A){A?.declaration.protected?this[A.internalKey]=e:(this._customPropertyAccessor&&this._customPropertyAccessor.set(t,e),this._properties.set(t,e))}equal(t){return!!(t&&this.instanceId===t.instanceId)}async _enqueueUpdate(){this._updating=!0;try{await this._updatingPromise}catch(t){Promise.reject(t)}await us(),this._updating&&(this.update(),this._updating=!1)}update(){this._update(this._updatedProperties),this._updatedProperties=new Map}_update(t){}_updateProperty(t,e,A,i){}isDirty(t){return this._updatedProperties.has(t)}getPropertyDeclarations(){return gs(this.constructor)}getPropertyDeclaration(t){return this.getPropertyDeclarations().get(t)}getProperty(t){return this[t]}setProperty(t,e){return this[t]=e,this}getProperties(t){const e={};for(const[A,i]of this.getPropertyDeclarations())!i.protected&&!i.alias&&(!t||t.includes(A))&&(e[A]=this.getProperty(A));return e}setProperties(t){if(t&&typeof t=="object")for(const[e]of this.getPropertyDeclarations())e in t&&this.setProperty(e,t[e]);return this}resetProperties(){for(const[t,e]of this.getPropertyDeclarations())this.setProperty(t,typeof e.fallback=="function"?e.fallback():e.fallback);return this}onUpdateProperty(t,e,A,i){this.requestUpdate(t,e,A,i)}requestUpdate(t,e,A,i){if(t!==void 0)if(!Object.is(e,A))this._updatedProperties.set(t,A),this._changedProperties.add(t),i??=this.getPropertyDeclaration(t),this._updateProperty(t,e,A,i),this.emit("updateProperty",t,e,A,i);else return;this._updating||(this._updatingPromise=this._enqueueUpdate())}toJSON(){const t={};return this._properties.forEach((e,A)=>{e!==void 0&&(e&&typeof e=="object"?"toJSON"in e&&typeof e.toJSON=="function"?t[A]=e.toJSON():t[A]={...e}:t[A]=e)}),t}clone(){return new this.constructor(this.toJSON())}free(){this.removeAllListeners()}}class Po extends tA{}class He extends Po{}function Uh(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},A={};for(var i in e)A[e[i]]=i;var s={};r.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,l=A[this.toHex()];if(l)return l;if(n?.closest){var c=this.toRgb(),h=1/0,u="black";if(!s.length)for(var d in e)s[d]=new r(e[d]).toRgb();for(var f in e){var B=(o=c,a=s[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));B<h&&(h=B,u=f)}return u}},t.string.push([function(n){var o=n.toLowerCase(),a=o==="transparent"?"#0000":e[o];return a?new r(a).toRgb():null},"name"])}Nc([Uh]);class _e{get value(){return this._value}set value(t){this._colord=cs(t??"none")}get r8(){return this._colord.rgba.r}get g8(){return this._colord.rgba.g}get b8(){return this._colord.rgba.b}get a8(){return this._colord.rgba.a*255&255}get r(){return this.r8/255}get g(){return this.g8/255}get b(){return this.b8/255}get a(){return this._colord.rgba.a}get rgb(){return(this.r8<<16)+(this.g8<<8)+this.b8}get bgr(){return(this.b8<<16)+(this.g8<<8)+this.r8}get abgr(){return(this.a8<<24)+this.bgr}constructor(t=0){this.value=t}toHex(){return this._colord.toHex()}toRgb(){return this._colord.toRgb()}toRgbString(){return this._colord.toRgbString()}toHsl(){return this._colord.toHsl()}toHslString(){return this._colord.toHslString()}toHsv(){return this._colord.toHsv()}toArgb(t=this.a,e=!0){if(t===1)return(255<<24)+this.rgb;if(t===0)return e?0:this.rgb;let A=this.r8,i=this.g8,s=this.b8;return e&&(A=A*t+.5|0,i=i*t+.5|0,s=s*t+.5|0),(t*255<<24)+(A<<16)+(i<<8)+s}toArray(){return[this.r,this.g,this.b,this.a]}}class Ee extends Ge{constructor(t){super(),this.dim=t}_array=[];get length(){return this.dim}_operate(t,e,A){const{dim:i,_array:s}=this;let n;typeof e=="number"?n=Array.from({length:i},()=>e):e instanceof be||e instanceof Ee?n=e.toArray():n=e;let o,a=[];if(A?A instanceof Ee?o=A:a=A:o=this,e instanceof be){const{cols:l}=e;switch(t){case"*":for(let c=0;c<i;c++){let h=0;for(let u=0;u<i;u++)h+=s[c]*n[u*l+c];a[c]=h}break;default:throw new Error(`Not support operator in '${this.toName()} ${t} ${e.toName()}'`)}}else switch(t){case"+":for(let l=0;l<i;l++)a[l]=s[l]+n[l];break;case"-":for(let l=0;l<i;l++)a[l]=s[l]-n[l];break;case"*":for(let l=0;l<i;l++)a[l]=s[l]*n[l];break;case"/":for(let l=0;l<i;l++)a[l]=s[l]/n[l];break;case"rot":{const l=Math.cos(n[0]),c=Math.sin(n[0]);a[0]=s[0]*l-s[1]*c,a[1]=s[1]*l+s[0]*c;break}case"==":{let l=!0;for(let c=0;c<i;c++)l=l&&s[c]===n[c];return l}case"=":for(let l=0;l<i;l++){const c=n[l];c!==void 0&&(s[l]=c)}return this._onUpdate(s),this.emit("update",s),this;default:throw new Error(`Not support operator in '${this.toName()} ${t} Vector'`)}return o?.set(a)??a}add(t,e){return this._operate("+",t,e)}sub(t,e){return this._operate("-",t,e)}multiply(t,e){return this._operate("*",t,e)}divide(t,e){return this._operate("/",t,e)}rotate(t){return this._operate("rot",t)}set(t,...e){return e.length&&typeof t=="number"&&(t=[t,...e]),this._operate("=",t)}equals(t){return this._operate("==",t)}copy(t){return this.set(t)}clone(){const t=new this.constructor;return t.set(this.toArray()),t}_onUpdate(t){}toArray(){return this._array.slice()}toName(){return`Vector${this.dim}`}}class be extends Ge{constructor(t,e,A){super(),this.rows=t,this.cols=e,A?this.set(A):this.identity()}_array=[];dirtyId=0;get length(){return this.cols*this.rows}_operate(t,e,A){const{cols:i,rows:s,length:n,_array:o}=this;let a;typeof e=="number"?a=Array.from({length:n},()=>e):e instanceof Ee||e instanceof be?a=e.toArray():a=e;let l,c=[];if(A?A instanceof Ee||A instanceof be?l=A:c=A:e instanceof Ee?l=new e.constructor:l=this,e instanceof Ee){const{dim:h}=e;switch(t){case"*":for(let u=0;u<h;u++){let d=0;for(let f=0;f<i;f++)f<h&&(d+=o[u*i+f]*(a[f]??0));c[u]=d}break;default:throw new Error(`Not support operator in '${this.toName()} ${t} ${e.toName()}'`)}}else switch(t){case"*":for(let h=0;h<i;h++)for(let u=0;u<s;u++){const d=u*i;let f=0;for(let B=0;B<s;B++){const p=d+B,S=B*i+h;f+=o[p]*(a[S]??0)}c[d+h]=f}break;case"=":for(let h=0;h<n;h++){const u=a[h];u!==void 0&&(o[h]=u)}return this._onUpdate(o),this.emit("update",o),this;default:throw new Error(`Not support operator in '${this.toName()} ${t} Matrix2'`)}return l?.set(c)??c}identity(){const{cols:t,rows:e}=this,A=[];for(let i=0;i<t;i++)for(let s=0;s<e;s++){const n=s*t,o=i+n;A[o]=s+n===o?1:0}return this.set(A)}set(t){return this._operate("=",t)}copy(t){return this.set(t)}clone(){const t=new this.constructor;return t.set(this.toArray()),t}multiply(t,e){return this._operate("*",t,e)}_onUpdate(t){this.dirtyId++}toArray(t=!1){const{cols:e,rows:A,_array:i}=this;if(t){const s=[];for(let n=0;n<A;n++)for(let o=0;o<e;o++)s[n+o*e]=i[o+n*e];return s}return i.slice()}toName(){return`Matrix${this.rows}(${this.rows}x${this.cols})`}toJSON(){return this._array}}class Uo extends be{constructor(t){super(4,4,t)}}const No=or/180,Nh=180/or;function Je(r,t,e){return Math.max(r,Math.min(t,e))}function Dt(r,t,e){return(1-e)*r+e*t}const Fh={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,t=20){if(!this.adaptive||!r||Number.isNaN(r))return t;let e=Math.ceil(r/this.maxLength);return e<this.minSegments?e=this.minSegments:e>this.maxSegments&&(e=this.maxSegments),e}};class Fo extends Ee{constructor(t=0,e=0,A=0,i=0){super(4),this.set([t,e,A,i])}}class ws extends be{constructor(t){super(4,5,t)}hueRotate(t=0){const e=Math.sin(t),A=Math.cos(t),i=.213,s=.715,n=.072;return this.multiply([i+A*(1-i)+e*-i,s+A*-s+e*-s,n+A*-n+e*(1-n),0,0,i+A*-i+e*.143,s+A*(1-s)+e*.14,n+A*-n+e*-.283,0,0,i+A*-i+e*-.787,s+A*-s+e*s,n+A*(1-n)+e*n,0,0,0,0,0,1,0])}saturate(t=1){const e=(t-1)*2/3+1,A=(e-1)*-.5;return this.multiply([e,A,A,0,0,A,e,A,0,0,A,A,e,0,0,0,0,0,1,0])}brightness(t=1){const e=t;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0])}contrast(t=1){const e=t,A=-128*(e-1);return this.multiply([e,0,0,0,A,0,e,0,0,A,0,0,e,0,A,0,0,0,1,0])}invert(t=1){const e=Dt(1,-1,t),A=Dt(0,255,t);return this.multiply([e,0,0,0,A,0,e,0,0,A,0,0,e,0,A,0,0,0,1,0])}sepia(t=1){const e=Je(0,t,1);return this.multiply([Dt(1,.393,e),Dt(0,.7689999,e),Dt(0,.18899999,e),0,0,Dt(0,.349,e),Dt(1,.6859999,e),Dt(0,.16799999,e),0,0,Dt(0,.272,e),Dt(0,.5339999,e),Dt(1,.13099999,e),0,0,0,0,0,1,0])}opacity(t=1){return this.multiply([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,t,0])}grayscale(t=1){const e=Je(0,t,1),A=Dt(1,.3,e),i=Dt(0,.3,e),s=Dt(1,.59,e),n=Dt(0,.59,e),o=Dt(1,.11,e),a=Dt(0,.11,e);return this.multiply([A,n,a,0,0,i,s,a,0,0,i,n,o,0,0,0,0,0,1,0])}multiply(t){const e=t,A=this._array;return this.set([A[0]*e[0]+A[1]*e[5]+A[2]*e[10]+A[3]*e[15],A[0]*e[1]+A[1]*e[6]+A[2]*e[11]+A[3]*e[16],A[0]*e[2]+A[1]*e[7]+A[2]*e[12]+A[3]*e[17],A[0]*e[3]+A[1]*e[8]+A[2]*e[13]+A[3]*e[18],A[0]*e[4]+A[1]*e[9]+A[2]*e[14]+A[3]*e[19]+A[4],A[5]*e[0]+A[6]*e[5]+A[7]*e[10]+A[8]*e[15],A[5]*e[1]+A[6]*e[6]+A[7]*e[11]+A[8]*e[16],A[5]*e[2]+A[6]*e[7]+A[7]*e[12]+A[8]*e[17],A[5]*e[3]+A[6]*e[8]+A[7]*e[13]+A[8]*e[18],A[5]*e[4]+A[6]*e[9]+A[7]*e[14]+A[8]*e[19]+A[9],A[10]*e[0]+A[11]*e[5]+A[12]*e[10]+A[13]*e[15],A[10]*e[1]+A[11]*e[6]+A[12]*e[11]+A[13]*e[16],A[10]*e[2]+A[11]*e[7]+A[12]*e[12]+A[13]*e[17],A[10]*e[3]+A[11]*e[8]+A[12]*e[13]+A[13]*e[18],A[10]*e[4]+A[11]*e[9]+A[12]*e[14]+A[13]*e[19]+A[14],A[15]*e[0]+A[16]*e[5]+A[17]*e[10]+A[18]*e[15],A[15]*e[1]+A[16]*e[6]+A[17]*e[11]+A[18]*e[16],A[15]*e[2]+A[16]*e[7]+A[17]*e[12]+A[18]*e[17],A[15]*e[3]+A[16]*e[8]+A[17]*e[13]+A[18]*e[18],A[15]*e[4]+A[16]*e[9]+A[17]*e[14]+A[18]*e[19]+A[19]])}toMatrix4(){const t=this._array;return new Uo([t[0],t[1],t[2],t[3],t[5],t[6],t[7],t[8],t[10],t[11],t[12],t[13],t[15],t[16],t[17],t[18]])}toVector4(){const t=this._array;return new Fo(t[4]/255,t[9]/255,t[14]/255,t[19]/255)}}class Th extends be{constructor(t){super(2,2,t)}}let vs=class extends be{constructor(t){super(3,3,t)}invert(){const[t,e,A,i,s,n,o,a,l]=this._array,c=l*s-n*a,h=n*o-l*i,u=a*i-s*o,d=t*c+e*h+A*u;if(d===0)return this.set([0,0,0,0,0,0,0,0,0]);const f=1/d;return this.set([c*f,(A*a-l*e)*f,(n*e-A*s)*f,h*f,(l*t-A*o)*f,(A*i-n*t)*f,u*f,(e*o-a*t)*f,(s*t-e*i)*f])}};class To extends vs{constructor(t=0,e=0,A=0,i=0,s=!1){super(),this._x=t,this._y=e,this._width=A,this._height=i,this._flipY=s,this._performUpdateArray()}flipY(t){return this._flipY!==t&&(this._flipY=t,this._performUpdateArray()),this}translate(t,e){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._performUpdateArray()),this}resize(t,e){return(this._width!==t||this._height!==e)&&(this._width=t,this._height=e,this._performUpdateArray()),this}_performUpdateArray(){const t=this._width,e=this._height;if(!t||!e)return;const A=this._x,i=this._y,s=this._flipY?-1:1,n=1/t*2,o=s*(1/e*2),a=-1-A*n,l=-s-i*o;this.set([n,0,a,0,o,l,0,0,1])}}let ae=class is extends Ee{get x(){return this._array[0]}set x(t){const[e,A]=this._array;e!==t&&this.set(t,A)}get y(){return this._array[1]}set y(t){const[e,A]=this._array;A!==t&&this.set(e,t)}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}get left(){return this.x}set left(t){this.x=t}get top(){return this.y}set top(t){this.y=t}constructor(t=0,e){super(2),this.set(typeof t=="number"?[t,e??t]:t)}update(t,e){const[A,i]=this._array;return(A!==t||i!==e)&&this.set(t,e),this}getLength(){const[t,e]=this._array;return Math.sqrt(t*t+e*e)}getAngle(){const[t,e]=this._array;return Math.atan2(-t,-e)+Math.PI}distanceTo(t){return Math.hypot(t.x-this.x,t.y-this.y)}normalize(){const[t,e]=this._array,A=1/(this.getLength()||1);return this.set(t*A,e*A),this}static lerp(t,e,A){return new is(e).clone().sub(new is(t)).multiply(A).add(new is(t))}};class _s{get x(){return this.position.x}get y(){return this.position.y}get left(){return this.position.x}get top(){return this.position.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get width(){return this.size.x}get height(){return this.size.y}end=new ae;position;size;constructor(...t){const e=new ae,A=new ae;switch(t.length){case 0:break;case 1:e.set(t[0].position),A.set(t[0].size);break;case 2:e.set(t[0]),A.set(t[1]);break;default:e.set(t[0],t[1]),A.set(t[2],t[3]);break}this.update=this.update.bind(this),this.position=e.on("update",this.update),this.size=A.on("update",this.update),this.update()}update(){return this.end.set(this.position.x+this.size.x,this.position.y+this.size.y),this}toArray(){return[this.x,this.y,this.width,this.height]}}class Yt extends vs{static _t2d=new Yt;premultiply(t){return t.multiply(this,this)}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skew(t,e){return this.premultiply(Yt._t2d.makeSkew(t,e))}makeSkew(t,e){const A=Math.tan(t),i=Math.tan(e);return this.set([1,i,0,A,1,0,0,0,1]),this}translateX(t){return this.translate(t,0)}translateY(t){return this.translate(0,t)}translateZ(t){return this.translate(0,0,t)}translate3d(t,e,A){return this.translate(t,e,A)}translate(t,e,A=0){return this.premultiply(Yt._t2d.makeTranslation(t,e,A))}makeTranslation(t,e,A=0){return this.set([1,0,t,0,1,e,0,0,1]),this}scaleX(t){return this.scale(t,1)}scaleY(t){return this.scale(1,t)}scale3d(t,e,A=1){return this.scale(t,e,A)}scale(t,e,A=1){return this.premultiply(Yt._t2d.makeScale(t,e,A))}makeScale(t,e,A=1){return this.set([t,0,0,0,e,0,0,0,1]),this}rotateX(t){return this.scaleY(this._rotateToScale(t))}rotateY(t){return this.scaleX(this._rotateToScale(t))}rotateZ(t){return this.rotate(t)}rotate(t){return this.premultiply(Yt._t2d.makeRotation(t))}rotate3d(t,e,A,i){const[s,n,o]=this._rotate3d(t,e,A,i);return s&&this.rotateX(s),n&&this.rotateY(n),o&&this.rotateZ(o),this}_rotateToScale(t){const e=t/oe;return e<=.5?e*-4+1:(e-1)*4+1}_rotate3d(t,e,A,i){if(t===1&&e===0&&A===0)return[i,0,0];if(t===0&&e===1&&A===0)return[0,i,0];if(t===0&&e===0)return[0,0,i];{const s=Math.cos(i),n=Math.sin(i),o=s+t*t*(1-s),a=t*e*(1-s)-A*n,l=t*A*(1-s)+e*n,c=s+e*e*(1-s),h=e*A*(1-s)-t*n,u=s+A*A*(1-s),d=-Math.atan2(-h,c),f=-Math.atan2(l,Math.sqrt(h*h+u*u)),B=-Math.atan2(-a,o);return[d,f,B]}}makeRotation(t){const e=Math.cos(t),A=Math.sin(t);return this.set([e,-A,0,A,e,0,0,0,1]),this}applyToPoint(t,e){const{a:A,c:i,tx:s,b:n,d:o,ty:a}=this.toObject();return[A*t+i*e+s,n*t+o*e+a]}inverse(){return this.clone().invert()}isIdentity(){const{a:t,b:e,c:A,d:i,tx:s,ty:n}=this.toObject();return t===1&&e===0&&A===0&&i===1&&s===0&&n===0}toObject(){const[t,e,A,i,s,n,,,o]=this._array;return{a:t,c:e,tx:A,b:i,d:s,ty:n,tz:o}}}class Lh extends Ee{constructor(){super(3)}}var Gh=Object.defineProperty,Lo=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Gh(t,e,i),i};class lr extends tA{_starting=!1;_nextDeltaTime=0;get starting(){return this._starting}get spf(){return this.fps?Math.floor(1e3/this.fps):0}constructor(){super(),this._onNextTick=this._onNextTick.bind(this)}start(t){this._starting||(this._starting=!0,this.off("process"),this.on("process",t),Kt.on(this._onNextTick,{sort:0}))}stop(){this._starting&&(this._starting=!1,Kt.off(this._onNextTick,{sort:0}))}_onNextTick(){const t=Kt.elapsed*this.speed;if((this._nextDeltaTime-=t)<=0){const A=(this._nextDeltaTime=this.spf)||t;this.emit("process",A)}}free(){super.free(),this.stop()}}Lo([v({fallback:24})],lr.prototype,"fps"),Lo([v({fallback:1})],lr.prototype,"speed");class Go{view;pixelRatio=Cs;screen={x:0,y:0,width:0,height:0};related=new ys;getRelated(t,e){let A=this.related.get(t);return A||(e?(this.related.set(t,A=e()),A):(console.warn("Failed to get related",t),null))}resize(t,e,A=!0){this.view&&(this.view.width=Math.floor(t*this.pixelRatio),this.view.height=Math.floor(e*this.pixelRatio)),this.screen.width=t,this.screen.height=e,A&&this.view&&(this.view.style.width=`${t}px`,this.view.style.height=`${e}px`)}}var kA=(r=>(r.NORMAL="normal",r.ADD="add",r.MULTIPLY="multiply",r.SCREEN="screen",r.NONE="none",r.NORMAL_NPM="normal_npm",r.ADD_NPM="add_npm",r.SCREEN_NPM="screen_npm",r.SRC_IN="src_in",r.SRC_OUT="src_out",r.SRC_ATOP="src_atop",r.DST_OVER="dst_over",r.DST_IN="dst_in",r.DST_OUT="dst_out",r.DST_ATOP="dst_atop",r.XOR="xor",r.SUBTRACT="subtract",r))(kA||{});function Oo(r){return{normal:[r.ONE,r.ONE_MINUS_SRC_ALPHA],add:[r.ONE,r.ONE],multiply:[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],screen:[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],none:[0,0],normal_npm:[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],add_npm:[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],screen_npm:[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],src_in:[r.DST_ALPHA,r.ZERO],src_out:[r.ONE_MINUS_DST_ALPHA,r.ZERO],src_atop:[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],dst_over:[r.ONE_MINUS_DST_ALPHA,r.ONE],dst_in:[r.ZERO,r.SRC_ALPHA],dst_out:[r.ZERO,r.ONE_MINUS_SRC_ALPHA],dst_atop:[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],xor:[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],subtract:[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD]}}class de{get gl(){return this._renderer.gl}install(t){this._renderer=t}onUpdateContext(){}flush(){}reset(){}free(){}}class BA{static _properties=["blend","offsets","culling","depthTest","clockwiseFrontFace","depthMask"];static _init(){this._properties.forEach((t,e)=>{Object.defineProperty(this.prototype,t,{get(){return!!(this.bitmap&1<<e)},set(A){!!(this.bitmap&1<<e)!==A&&(this.bitmap^=1<<e)},enumerable:!0,configurable:!0})})}static for2D(){const t=new BA;return t.depthTest=!1,t.blend=!0,t}_blendMode=kA.NORMAL;_polygonOffset=0;bitmap=0;get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==kA.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}constructor(t){if(t)for(const e in t)this[e]=t[e]}}BA._init();class Ho extends de{install(t){super.install(t),t.state=this}_blendEq=!1;_setters=BA._properties.map(t=>this[`set${t.replace(/^\S/,e=>e.toUpperCase())}`]);boundStateBitmap=0;boundBlendMode;blendModes;defaultState=new BA({blend:!0});onUpdateContext(){super.onUpdateContext(),this.blendModes=Oo(this._renderer.gl)}toggle(t,e){this._renderer.gl[e?"enable":"disable"](t)}setBlend(t){this.toggle(this._renderer.gl.BLEND,t)}setOffsets(t){this.toggle(this._renderer.gl.POLYGON_OFFSET_FILL,t)}setCulling(t){this.toggle(this._renderer.gl.CULL_FACE,t)}setDepthTest(t){this.toggle(this._renderer.gl.DEPTH_TEST,t)}setDepthMask(t){this._renderer.gl.depthMask(t)}setClockwiseFrontFace(t){const e=this._renderer.gl;e.frontFace(e[t?"CW":"CCW"])}setBlendMode(t){if(t===this.boundBlendMode)return;this.boundBlendMode=t;const e=this.blendModes[t],A=this._renderer.gl;e.length===2?A.blendFunc(e[0],e[1]):A.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,A.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,A.blendEquationSeparate(A.FUNC_ADD,A.FUNC_ADD))}setPolygonOffset(t,e){this._renderer.gl.polygonOffset(t,e)}bind(t){if(this.boundStateBitmap!==t.bitmap){let e=this.boundStateBitmap^t.bitmap,A=0;for(;e;)e&1&&this._setters[A]?.call(this,!!(t.bitmap&1<<A)),e=e>>1,A++;this.boundStateBitmap=t.bitmap}t.blend&&this.setBlendMode(t.blendMode),t.offsets&&this.setPolygonOffset(1,t.polygonOffset)}reset(){super.reset();const t=this._renderer.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!1),this.bind(this.defaultState),this._blendEq=!0,this.setBlendMode(kA.NORMAL)}}class Jo extends de{install(t){super.install(t),t.batch2D=this}_state=BA.for2D();_batchSize=4096*4;_drawCallUid=0;_defaultModulate=4294967295;_defaultBackgroundColor=0;_defaultColorMatrixOffset=[0,0,0,0];_defaultColorMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];_batchables=[];_vertexCount=0;_indexCount=0;_attributeBuffer=[];_indexBuffers=[];_shaders=new Map;_attributes={aTextureId:{size:1,normalized:!0,type:"float"},aPosition:{size:2,normalized:!1,type:"float"},aUv:{size:2,normalized:!1,type:"float"},aModulate:{size:4,normalized:!0,type:"unsigned_byte"},aBackgroundColor:{size:4,normalized:!0,type:"unsigned_byte"},aDisableWrapMode:{size:4,normalized:!0,type:"float"},aColorMatrixOffset:{size:4,normalized:!1,type:"float"},aColorMatrix:{size:4,normalized:!1,type:"float"}};_vertexSize=31;_getShader(t){let e=this._shaders.get(t);return e||this._shaders.set(t,e=this._createShader(t)),e}_createShader(t){const e=this._renderer,A=e.program.create({vert:`precision highp float;
|
|
3
3
|
attribute float aTextureId;
|
|
4
4
|
attribute vec2 aPosition;
|
|
5
5
|
attribute vec2 aUv;
|
|
@@ -51,11 +51,11 @@ void main(void) {
|
|
|
51
51
|
if (vTextureId < 0.0)
|
|
52
52
|
{
|
|
53
53
|
color = vec4(0.0, 0.0, 0.0, 0.0);
|
|
54
|
-
}${Array.from({length:t},(l,
|
|
55
|
-
else `),
|
|
56
|
-
if (vTextureId < ${
|
|
54
|
+
}${Array.from({length:t},(l,c)=>{let h=" ";return c>=0&&(h+=`
|
|
55
|
+
else `),c<t-1&&(h+=`
|
|
56
|
+
if (vTextureId < ${c}.5)`),`${h}
|
|
57
57
|
{
|
|
58
|
-
color = texture2D(samplers[${
|
|
58
|
+
color = texture2D(samplers[${c}], vUv);
|
|
59
59
|
}`}).join("")}
|
|
60
60
|
|
|
61
61
|
color += (1.0 - color.a) * vBackgroundColor;
|
|
@@ -65,9 +65,9 @@ void main(void) {
|
|
|
65
65
|
color += vColorMatrixOffset;
|
|
66
66
|
}
|
|
67
67
|
gl_FragColor = color;
|
|
68
|
-
}`}),i=e.buffer.create({target:"array_buffer",data:new Float32Array(1),usage:"dynamic_draw"}),s=e.buffer.create({target:"element_array_buffer",data:new Uint16Array(1),usage:"dynamic_draw"}),n={attributes:Object.fromEntries(Object.entries(this._attributes).map(([l,u])=>[l,{...u,buffer:i}])),elementArrayBuffer:s},o=e.vertexArray.create(A,n),a=new Int32Array(Array.from({length:t},(l,u)=>u));return{update:(l,u)=>{e.vertexArray.bind(o??n),e.buffer.update(i,{target:"array_buffer",data:l}),e.buffer.update(s,{target:"element_array_buffer",data:u})},draw:l=>{const u=this._renderer;u.program.bind(A),u.program.updateUniforms(A,{samplers:a,modulate:[1,1,1,1],translationMatrix:[1,0,0,0,1,0,0,0,1],...u.program.uniforms}),u.vertexArray.bind(o??n),u.draw(l)}}}render(t){const{vertices:e,indices:A}=t,i=e.length/2;this._vertexCount+i>this._batchSize&&this.flush(),this._vertexCount+=i,this._indexCount+=A.length,this._batchables.push(t)}flush(){if(super.flush(),this._vertexCount===0)return;const t=this._vertexCount,e=this._indexCount,A=this._batchables;this._batchables=[],this._vertexCount=0,this._indexCount=0;const i=this._renderer.texture.maxUnits,s=this._getAttributeBuffer(t),n=new Float32Array(s),o=new Uint32Array(s),a=this._getIndexBuffer(e);let l=0,u=0;const c=[];for(let f=A.length,d={id:++this._drawCallUid},B=[],I=new Map,F=0,b=0,y=0;y<f;y++){const _=A[y].texture,Q=y===f-1;if(!_||I.has(_)){if(!Q)continue}else B.push(_),I.set(_,F++);if(Q||F>=i){d.textures=B,d.textureLocationMap=I,F=0,d.first=u;for(let D=b;D<=y;D++){const{indices:S,vertices:M,uvs:V=[],texture:et,modulate:z=this._defaultModulate,backgroundColor:J=this._defaultBackgroundColor,colorMatrix:$=this._defaultColorMatrix,colorMatrixOffset:K=this._defaultColorMatrixOffset,blendMode:L=kA.NORMAL,disableWrapMode:it=!1}=A[D],G=(et?I.get(et):-1)??-1;b<D&&d.blendMode!==L&&(d.count=u-d.first,c.push(d),b=D,d={id:++this._drawCallUid},d.textures=B,d.first=u);const W=l/this._vertexSize;for(let At=M.length,T=0;T<At;T+=2){n[l++]=G,n[l++]=M[T],n[l++]=M[T+1],n[l++]=V[T]??0,n[l++]=V[T+1]??0,o[l++]=z,o[l++]=J,n[l++]=it?1:0,n[l++]=0,n[l++]=0,n[l++]=0;for(let tt=0;tt<4;tt++)n[l++]=K[tt]??0;for(let tt=0;tt<16;tt++)n[l++]=$[tt]??0}for(let At=S.length,T=0;T<At;T++)a[u++]=W+S[T];d.blendMode=L}b=y+1,d.count=u-d.first,c.push(d),d={id:++this._drawCallUid},B=[],I=new Map}}const g=this._getShader(i);g.update(s,a);for(let f=c.length,d=0;d<f;d++){const B=c[d],{first:I=0,textures:F,textureLocationMap:b}=B;for(let y=F.length,_=0;_<y;_++){const Q=F[_],D=b.get(Q);D!==void 0&&this._renderer.texture.bind({target:"texture_2d",location:D,value:Q})}this._state.blendMode=B.blendMode,this._renderer.state.bind(this._state),g.draw({mode:"triangles",count:B.count,first:I,bytesPerElement:2})}}_getAttributeBuffer(t){const e=Fs(Math.ceil(t/8)),A=Ss(e),i=e*8;this._attributeBuffer.length<=A&&(this._indexBuffers.length=A+1);let s=this._attributeBuffer[i];return s||(this._attributeBuffer[i]=s=new ArrayBuffer(i*this._vertexSize*4)),s}_getIndexBuffer(t){const e=Fs(Math.ceil(t/12)),A=Ss(e),i=e*12;this._indexBuffers.length<=A&&(this._indexBuffers.length=A+1);let s=this._indexBuffers[A];return s||(this._indexBuffers[A]=s=new Uint16Array(i)),s}}function Fs(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Ss(r){let t=(r>65535?1:0)<<4;r>>>=t;let e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}class Wo extends de{install(t){super.install(t),t.buffer=this}boundArrayBuffer=null;boundTarget="array_buffer";create(t){const e=this.gl.createBuffer();if(!e)throw new Error("failed to create");return t&&(this.bind({target:t.target,value:e}),this.update(t)),e}getMeta(t){return this._renderer.getRelated(t,()=>({id:Co(t),length:0,byteLength:0,bytesPerElement:0}))}update(...t){if(t.length>1){this.bind({target:t[1].target,value:t[0]}),this.update(t[1]);return}const e=t[0],A=(e.target??this.boundTarget)==="array_buffer"?this.boundArrayBuffer:this._renderer.vertexArray.boundVertexArray.elementArrayBuffer;if(!A)return;const i=this.getMeta(A);Object.assign(i,{target:e.target,usage:e.usage});const s=i.target??this.boundTarget,n=i.usage??"static_draw",o=e.data,a=this.gl;let l;Array.isArray(o)?s==="array_buffer"?l=new Float32Array(o):l=new Uint32Array(o):l=o;const u=this._renderer.getBindPoint(s);l&&l.byteLength<=i.byteLength?a.bufferSubData(u,0,l):(a.bufferData(u,l,this._renderer.getBindPoint(n)),i.length=l?.length??0,i.byteLength=l?.byteLength??0,i.bytesPerElement=i.length?i.byteLength/i.length:0)}bind(t){let{target:e,value:A}=t;if(A){const s=this.getMeta(A);e??=s.target??this.boundTarget,s.target=e}else e??=this.boundTarget;const i=this._renderer.getBindPoint(e);this._renderer.gl.bindBuffer(i,A),e==="array_buffer"?this.boundArrayBuffer=A:this._renderer.vertexArray.boundVertexArray.elementArrayBuffer=A,this.boundTarget=e}unbind(t){return this.bind({target:t,value:null})}reset(){super.reset(),this.boundArrayBuffer=null,this.boundTarget="array_buffer"}}class qo extends de{install(t){super.install(t),t.framebuffer=this}boundFramebuffer=null;_msaaSamples=[];_hasMRT=!0;_writeDepthTexture=!0;onUpdateContext(){if(this._hasMRT=!0,this._writeDepthTexture=!0,this._renderer.version===1){const t=this._renderer.gl,e=this._renderer.extensions.drawBuffers,A=this._renderer.extensions.depthTexture;e?t.drawBuffers=i=>e.drawBuffersWEBGL(i):(this._hasMRT=!1,t.drawBuffers=()=>{}),A||(this._writeDepthTexture=!1)}else{const t=this._renderer.gl;this._msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}}create(t){const e=this._renderer.gl.createFramebuffer();if(!e)throw new Error("Unable to create framebuffer");return t&&(this.bind(e),this.update(t)),e}getMeta(t){return this._renderer.getRelated(t,()=>({width:0,height:0,mipLevel:0,stencil:!1,depth:!1,depthTexture:null,colorTextures:[],multisample:0}))}update(...t){if(t.length>1)return this.bind(t[0]),this.update(t[1]);const e=this.boundFramebuffer;if(!e)return;const A=t[0],i=this.getMeta(e);Object.assign(i,{...A});const s=this._renderer.gl;let n=i.colorTextures.length;"drawBuffers"in s||(n=Math.min(n,1));for(let o=0;o<n;o++){const a=i.colorTextures[o];this._renderer.texture.bind({location:0,target:"texture_2d",value:a,forceUpdateLocation:!0}),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+o,s.TEXTURE_2D,a,i.mipLevel),this._renderer.texture.unbind(a)}if(n>1&&s.drawBuffers(i.colorTextures.map((o,a)=>s.COLOR_ATTACHMENT0+a)),i.depthTexture&&(this._renderer.version>1||this._renderer.extensions.depthTexture)&&(this._renderer.texture.bind({location:0,target:"texture_2d",value:i.depthTexture,forceUpdateLocation:!0}),s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,i.depthTexture,i.mipLevel),this._renderer.texture.unbind(i.depthTexture)),(i.stencilBuffer||i.stencil||i.depth)&&!(i.depthTexture&&this._writeDepthTexture)){i.stencilBuffer??=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,i.stencilBuffer);const{attachment:o,format:a}=this._getAttachmentAndFormat(i);i.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,i.multisample,a,i.width,i.height):s.renderbufferStorage(s.RENDERBUFFER,a,i.width*this._renderer.pixelRatio,i.height*this._renderer.pixelRatio),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,i.stencilBuffer)}else i.stencilBuffer&&(s.deleteRenderbuffer(i.stencilBuffer),i.stencilBuffer=null)}_getAttachmentAndFormat(t){const e=this.gl;let A,i;return this._renderer.version===1?(A=e.DEPTH_STENCIL_ATTACHMENT,i=e.DEPTH_STENCIL):t.depth&&t.stencil?(A=e.DEPTH_STENCIL_ATTACHMENT,i=e.DEPTH24_STENCIL8):t.depth?(A=e.DEPTH_ATTACHMENT,i=e.DEPTH_COMPONENT24):(A=e.STENCIL_ATTACHMENT,i=e.STENCIL_INDEX8),{attachment:A,format:i}}resize(t,e,A){const i=this.gl,s=this.getMeta(t);if(Object.assign(s,{width:e,height:A}),s.stencil){const{format:o}=this._getAttachmentAndFormat(s);i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,o,s.width,s.height):i.renderbufferStorage(i.RENDERBUFFER,o,s.width,s.height)}let n=s.colorTextures.length;i.drawBuffers||(n=Math.min(n,1));for(let o=0;o<n;o++){const a=s.colorTextures[o];this._renderer.texture.update(a,{value:{pixels:null,width:s.width,height:s.height}}),o===0&&s.msaaBuffer&&(i.bindRenderbuffer(i.RENDERBUFFER,s.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,i.RGBA,s.width,s.height))}s.depthTexture&&this._renderer.texture.update(s.depthTexture,{value:{pixels:null,width:s.width,height:s.height}})}bind(t){const e=this._renderer.gl,A=t;if({value:this.boundFramebuffer!==A}.value&&(e.bindFramebuffer(e.FRAMEBUFFER,A),this.boundFramebuffer=A),A){const n=this.getMeta(A);for(let l=0;l<n.colorTextures.length;l++)this._renderer.texture.unbind(n.colorTextures[l]);n.depthTexture&&this._renderer.texture.unbind(n.depthTexture);const o=n.width>>n.mipLevel,a=n.height>>n.mipLevel;this._renderer.viewport.bind({x:0,y:0,width:o*this._renderer.pixelRatio,height:a*this._renderer.pixelRatio})}else this._renderer.viewport.bind({x:0,y:0,width:this._renderer.screen.width*this._renderer.pixelRatio,height:this._renderer.screen.height*this._renderer.pixelRatio})}forceStencil(){const t=this.boundFramebuffer;if(!t)return;const e=this.getMeta(t);if(!e||e.stencilBuffer)return;const A=this._renderer.gl;e.stencilBuffer=A.createRenderbuffer(),A.bindRenderbuffer(A.RENDERBUFFER,e.stencilBuffer);let i,s;this._renderer.version===1?(i=A.DEPTH_STENCIL_ATTACHMENT,s=A.DEPTH_STENCIL):e.depth?(i=A.DEPTH_STENCIL_ATTACHMENT,s=A.DEPTH24_STENCIL8):(i=A.STENCIL_ATTACHMENT,s=A.STENCIL_INDEX8),e.msaaBuffer?A.renderbufferStorageMultisample(A.RENDERBUFFER,e.multisample,s,e.width*this._renderer.pixelRatio,e.height*this._renderer.pixelRatio):A.renderbufferStorage(A.RENDERBUFFER,s,e.width*this._renderer.pixelRatio,e.height*this._renderer.pixelRatio),A.framebufferRenderbuffer(A.FRAMEBUFFER,i,A.RENDERBUFFER,e.stencilBuffer)}reset(){super.reset(),this.boundFramebuffer=null}}class Xo extends de{install(t){super.install(t),t.mask=this}stack=[];get length(){return this.stack.length}get last(){return this.stack[this.length-1]}push(t,e){const A={source:t,mask:e};this.stack.push(A),typeof A.mask=="number"?this.pushColorMask(A):"render"in A.mask?this._renderer.stencil.push(A):this._renderer.scissor.push(A)}pop(t){const e=this.stack.pop();!e||e.source!==t||(typeof e.mask=="number"?this.popColorMask(e):"render"in e.mask?this._renderer.stencil.pop(e):this._renderer.scissor.pop(e))}pushColorMask(t){const e=t.preComputedColor??15,A=t.preComputedColor=e&t.mask;A!==e&&this.useColorMask(A)}popColorMask(t){const e=t.preComputedColor??15,A=this.length>0?this.last.preComputedColor??15:15;A!==e&&this.useColorMask(A)}useColorMask(t){this._renderer.gl.colorMask((t&1)!==0,(t&2)!==0,(t&4)!==0,(t&8)!==0)}}class jo extends de{install(t){super.install(t),t.program=this}boundProgram=null;uniforms={projectionMatrix:[1,0,0,0,1,0,0,0,1]};create(t){const e=this.gl.createProgram();if(!e)throw new Error("Unable to create program");return t&&this.update(e,t),e}getMeta(t){return this._renderer.getRelated(t,()=>({attributes:new Map,uniforms:new Map,boundUniforms:new uo}))}update(...t){if(t.length>1){const a=this.boundProgram;this.boundProgram=t[0],this.update(t[1]),this.boundProgram=a;return}const e=t[0],A=this.boundProgram;if(!A)return;const i=this.gl,s=this.getMeta(A),n=this.createShader(e.vert,"vertex_shader"),o=this.createShader(e.frag,"fragment_shader");if(i.attachShader(A,n),i.attachShader(A,o),i.linkProgram(A),i.deleteShader(n),i.deleteShader(o),!i.getProgramParameter(A,i.LINK_STATUS))throw new Error(`Unable to link program: ${i.getProgramInfoLog(A)}`);s.attributes.clear(),s.uniforms.clear();for(let a=i.getProgramParameter(A,i.ACTIVE_ATTRIBUTES),l=0;l<a;l++){const u=i.getActiveAttrib(A,l);if(!u||u.name.startsWith("gl_"))continue;const c=this._renderer.bindPoints.get(u.type)??String(u.type);s.attributes.set(u.name,{type:c,name:u.name,size:Yc(c),location:i.getAttribLocation(A,u.name)})}for(let a=i.getProgramParameter(A,i.ACTIVE_UNIFORMS),l=0;l<a;l++){const u=i.getActiveUniform(A,l);if(!u)continue;const c=u.name.replace(/\[.*?\]$/,"");let g=i.getUniformLocation(A,c);g||(g=i.getUniformLocation(A,u.name)),s.uniforms.set(c,{name:c,index:l,type:this._renderer.bindPoints.get(u.type)??String(u.type),size:u.size,isArray:c!==u.name,location:g})}}bind(t){const e=this.gl;({value:this.boundProgram!==t}).value&&(e.useProgram(t),this.boundProgram=t)}createShader(t,e){const A=this.gl,i=A.createShader(this._renderer.getBindPoint(e));if(!i)throw new Error("Unable to create shader");if(A.shaderSource(i,t),A.compileShader(i),!A.getShaderParameter(i,A.COMPILE_STATUS))throw new Error(`Unable to compiling shader :
|
|
68
|
+
}`}),i=e.buffer.create({target:"array_buffer",data:new Float32Array(1),usage:"dynamic_draw"}),s=e.buffer.create({target:"element_array_buffer",data:new Uint16Array(1),usage:"dynamic_draw"}),n={attributes:Object.fromEntries(Object.entries(this._attributes).map(([l,c])=>[l,{...c,buffer:i}])),elementArrayBuffer:s},o=e.vertexArray.create(A,n),a=new Int32Array(Array.from({length:t},(l,c)=>c));return{update:(l,c)=>{e.vertexArray.bind(o??n),e.buffer.update(i,{target:"array_buffer",data:l}),e.buffer.update(s,{target:"element_array_buffer",data:c})},draw:l=>{const c=this._renderer;c.program.bind(A),c.program.updateUniforms(A,{samplers:a,modulate:[1,1,1,1],translationMatrix:[1,0,0,0,1,0,0,0,1],...c.program.uniforms}),c.vertexArray.bind(o??n),c.draw(l)}}}render(t){const{vertices:e,indices:A}=t,i=e.length/2;this._vertexCount+i>this._batchSize&&this.flush(),this._vertexCount+=i,this._indexCount+=A.length,this._batchables.push(t)}flush(){if(super.flush(),this._vertexCount===0)return;const t=this._vertexCount,e=this._indexCount,A=this._batchables;this._batchables=[],this._vertexCount=0,this._indexCount=0;const i=this._renderer.texture.maxUnits,s=this._getAttributeBuffer(t),n=new Float32Array(s),o=new Uint32Array(s),a=this._getIndexBuffer(e);let l=0,c=0;const h=[];for(let d=A.length,f={id:++this._drawCallUid},B=[],p=new Map,S=0,R=0,w=0;w<d;w++){const D=A[w].texture,Q=w===d-1;if(!D||p.has(D)){if(!Q)continue}else B.push(D),p.set(D,S++);if(Q||S>=i){f.textures=B,f.textureLocationMap=p,S=0,f.first=c;for(let m=R;m<=w;m++){const{indices:x,vertices:M,uvs:V=[],texture:et,modulate:z=this._defaultModulate,backgroundColor:J=this._defaultBackgroundColor,colorMatrix:$=this._defaultColorMatrix,colorMatrixOffset:K=this._defaultColorMatrixOffset,blendMode:L=kA.NORMAL,disableWrapMode:it=!1}=A[m],G=(et?p.get(et):-1)??-1;R<m&&f.blendMode!==L&&(f.count=c-f.first,h.push(f),R=m,f={id:++this._drawCallUid},f.textures=B,f.first=c);const W=l/this._vertexSize;for(let At=M.length,T=0;T<At;T+=2){n[l++]=G,n[l++]=M[T],n[l++]=M[T+1],n[l++]=V[T]??0,n[l++]=V[T+1]??0,o[l++]=z,o[l++]=J,n[l++]=it?1:0,n[l++]=0,n[l++]=0,n[l++]=0;for(let tt=0;tt<4;tt++)n[l++]=K[tt]??0;for(let tt=0;tt<16;tt++)n[l++]=$[tt]??0}for(let At=x.length,T=0;T<At;T++)a[c++]=W+x[T];f.blendMode=L}R=w+1,f.count=c-f.first,h.push(f),f={id:++this._drawCallUid},B=[],p=new Map}}const u=this._getShader(i);u.update(s,a);for(let d=h.length,f=0;f<d;f++){const B=h[f],{first:p=0,textures:S,textureLocationMap:R}=B;for(let w=S.length,D=0;D<w;D++){const Q=S[D],m=R.get(Q);m!==void 0&&this._renderer.texture.bind({target:"texture_2d",location:m,value:Q})}this._state.blendMode=B.blendMode,this._renderer.state.bind(this._state),u.draw({mode:"triangles",count:B.count,first:p,bytesPerElement:2})}}_getAttributeBuffer(t){const e=bs(Math.ceil(t/8)),A=Ds(e),i=e*8;this._attributeBuffer.length<=A&&(this._indexBuffers.length=A+1);let s=this._attributeBuffer[i];return s||(this._attributeBuffer[i]=s=new ArrayBuffer(i*this._vertexSize*4)),s}_getIndexBuffer(t){const e=bs(Math.ceil(t/12)),A=Ds(e),i=e*12;this._indexBuffers.length<=A&&(this._indexBuffers.length=A+1);let s=this._indexBuffers[A];return s||(this._indexBuffers[A]=s=new Uint16Array(i)),s}}function bs(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Ds(r){let t=(r>65535?1:0)<<4;r>>>=t;let e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}class Ko extends de{install(t){super.install(t),t.buffer=this}boundArrayBuffer=null;boundTarget="array_buffer";create(t){const e=this.gl.createBuffer();if(!e)throw new Error("failed to create");return t&&(this.bind({target:t.target,value:e}),this.update(t)),e}getMeta(t){return this._renderer.getRelated(t,()=>({id:Io(t),length:0,byteLength:0,bytesPerElement:0}))}update(...t){if(t.length>1){this.bind({target:t[1].target,value:t[0]}),this.update(t[1]);return}const e=t[0],A=(e.target??this.boundTarget)==="array_buffer"?this.boundArrayBuffer:this._renderer.vertexArray.boundVertexArray.elementArrayBuffer;if(!A)return;const i=this.getMeta(A);Object.assign(i,{target:e.target,usage:e.usage});const s=i.target??this.boundTarget,n=i.usage??"static_draw",o=e.data,a=this.gl;let l;Array.isArray(o)?s==="array_buffer"?l=new Float32Array(o):l=new Uint32Array(o):l=o;const c=this._renderer.getBindPoint(s);l&&l.byteLength<=i.byteLength?a.bufferSubData(c,0,l):(a.bufferData(c,l,this._renderer.getBindPoint(n)),i.length=l?.length??0,i.byteLength=l?.byteLength??0,i.bytesPerElement=i.length?i.byteLength/i.length:0)}bind(t){let{target:e,value:A}=t;if(A){const s=this.getMeta(A);e??=s.target??this.boundTarget,s.target=e}else e??=this.boundTarget;const i=this._renderer.getBindPoint(e);this._renderer.gl.bindBuffer(i,A),e==="array_buffer"?this.boundArrayBuffer=A:this._renderer.vertexArray.boundVertexArray.elementArrayBuffer=A,this.boundTarget=e}unbind(t){return this.bind({target:t,value:null})}reset(){super.reset(),this.boundArrayBuffer=null,this.boundTarget="array_buffer"}}class Yo extends de{install(t){super.install(t),t.framebuffer=this}boundFramebuffer=null;_msaaSamples=[];_hasMRT=!0;_writeDepthTexture=!0;onUpdateContext(){if(this._hasMRT=!0,this._writeDepthTexture=!0,this._renderer.version===1){const t=this._renderer.gl,e=this._renderer.extensions.drawBuffers,A=this._renderer.extensions.depthTexture;e?t.drawBuffers=i=>e.drawBuffersWEBGL(i):(this._hasMRT=!1,t.drawBuffers=()=>{}),A||(this._writeDepthTexture=!1)}else{const t=this._renderer.gl;this._msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}}create(t){const e=this._renderer.gl.createFramebuffer();if(!e)throw new Error("Unable to create framebuffer");return t&&(this.bind(e),this.update(t)),e}getMeta(t){return this._renderer.getRelated(t,()=>({width:0,height:0,mipLevel:0,stencil:!1,depth:!1,depthTexture:null,colorTextures:[],multisample:0}))}update(...t){if(t.length>1)return this.bind(t[0]),this.update(t[1]);const e=this.boundFramebuffer;if(!e)return;const A=t[0],i=this.getMeta(e);Object.assign(i,{...A});const s=this._renderer.gl;let n=i.colorTextures.length;"drawBuffers"in s||(n=Math.min(n,1));for(let o=0;o<n;o++){const a=i.colorTextures[o];this._renderer.texture.bind({location:0,target:"texture_2d",value:a,forceUpdateLocation:!0}),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+o,s.TEXTURE_2D,a,i.mipLevel),this._renderer.texture.unbind(a)}if(n>1&&s.drawBuffers(i.colorTextures.map((o,a)=>s.COLOR_ATTACHMENT0+a)),i.depthTexture&&(this._renderer.version>1||this._renderer.extensions.depthTexture)&&(this._renderer.texture.bind({location:0,target:"texture_2d",value:i.depthTexture,forceUpdateLocation:!0}),s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,i.depthTexture,i.mipLevel),this._renderer.texture.unbind(i.depthTexture)),(i.stencilBuffer||i.stencil||i.depth)&&!(i.depthTexture&&this._writeDepthTexture)){i.stencilBuffer??=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,i.stencilBuffer);const{attachment:o,format:a}=this._getAttachmentAndFormat(i);i.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,i.multisample,a,i.width,i.height):s.renderbufferStorage(s.RENDERBUFFER,a,i.width*this._renderer.pixelRatio,i.height*this._renderer.pixelRatio),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,i.stencilBuffer)}else i.stencilBuffer&&(s.deleteRenderbuffer(i.stencilBuffer),i.stencilBuffer=null)}_getAttachmentAndFormat(t){const e=this.gl;let A,i;return this._renderer.version===1?(A=e.DEPTH_STENCIL_ATTACHMENT,i=e.DEPTH_STENCIL):t.depth&&t.stencil?(A=e.DEPTH_STENCIL_ATTACHMENT,i=e.DEPTH24_STENCIL8):t.depth?(A=e.DEPTH_ATTACHMENT,i=e.DEPTH_COMPONENT24):(A=e.STENCIL_ATTACHMENT,i=e.STENCIL_INDEX8),{attachment:A,format:i}}resize(t,e,A){const i=this.gl,s=this.getMeta(t);if(Object.assign(s,{width:e,height:A}),s.stencil){const{format:o}=this._getAttachmentAndFormat(s);i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,o,s.width,s.height):i.renderbufferStorage(i.RENDERBUFFER,o,s.width,s.height)}let n=s.colorTextures.length;i.drawBuffers||(n=Math.min(n,1));for(let o=0;o<n;o++){const a=s.colorTextures[o];this._renderer.texture.update(a,{value:{pixels:null,width:s.width,height:s.height}}),o===0&&s.msaaBuffer&&(i.bindRenderbuffer(i.RENDERBUFFER,s.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,i.RGBA,s.width,s.height))}s.depthTexture&&this._renderer.texture.update(s.depthTexture,{value:{pixels:null,width:s.width,height:s.height}})}bind(t){const e=this._renderer.gl,A=t;if({value:this.boundFramebuffer!==A}.value&&(e.bindFramebuffer(e.FRAMEBUFFER,A),this.boundFramebuffer=A),A){const n=this.getMeta(A);for(let l=0;l<n.colorTextures.length;l++)this._renderer.texture.unbind(n.colorTextures[l]);n.depthTexture&&this._renderer.texture.unbind(n.depthTexture);const o=n.width>>n.mipLevel,a=n.height>>n.mipLevel;this._renderer.viewport.bind({x:0,y:0,width:o*this._renderer.pixelRatio,height:a*this._renderer.pixelRatio})}else this._renderer.viewport.bind({x:0,y:0,width:this._renderer.screen.width*this._renderer.pixelRatio,height:this._renderer.screen.height*this._renderer.pixelRatio})}forceStencil(){const t=this.boundFramebuffer;if(!t)return;const e=this.getMeta(t);if(!e||e.stencilBuffer)return;const A=this._renderer.gl;e.stencilBuffer=A.createRenderbuffer(),A.bindRenderbuffer(A.RENDERBUFFER,e.stencilBuffer);let i,s;this._renderer.version===1?(i=A.DEPTH_STENCIL_ATTACHMENT,s=A.DEPTH_STENCIL):e.depth?(i=A.DEPTH_STENCIL_ATTACHMENT,s=A.DEPTH24_STENCIL8):(i=A.STENCIL_ATTACHMENT,s=A.STENCIL_INDEX8),e.msaaBuffer?A.renderbufferStorageMultisample(A.RENDERBUFFER,e.multisample,s,e.width*this._renderer.pixelRatio,e.height*this._renderer.pixelRatio):A.renderbufferStorage(A.RENDERBUFFER,s,e.width*this._renderer.pixelRatio,e.height*this._renderer.pixelRatio),A.framebufferRenderbuffer(A.FRAMEBUFFER,i,A.RENDERBUFFER,e.stencilBuffer)}reset(){super.reset(),this.boundFramebuffer=null}}class Vo extends de{install(t){super.install(t),t.mask=this}stack=[];get length(){return this.stack.length}get last(){return this.stack[this.length-1]}push(t,e){const A={source:t,mask:e};this.stack.push(A),typeof A.mask=="number"?this.pushColorMask(A):"render"in A.mask?this._renderer.stencil.push(A):this._renderer.scissor.push(A)}pop(t){const e=this.stack.pop();!e||e.source!==t||(typeof e.mask=="number"?this.popColorMask(e):"render"in e.mask?this._renderer.stencil.pop(e):this._renderer.scissor.pop(e))}pushColorMask(t){const e=t.preComputedColor??15,A=t.preComputedColor=e&t.mask;A!==e&&this.useColorMask(A)}popColorMask(t){const e=t.preComputedColor??15,A=this.length>0?this.last.preComputedColor??15:15;A!==e&&this.useColorMask(A)}useColorMask(t){this._renderer.gl.colorMask((t&1)!==0,(t&2)!==0,(t&4)!==0,(t&8)!==0)}}class zo extends de{install(t){super.install(t),t.program=this}boundProgram=null;uniforms={projectionMatrix:[1,0,0,0,1,0,0,0,1]};create(t){const e=this.gl.createProgram();if(!e)throw new Error("Unable to create program");return t&&this.update(e,t),e}getMeta(t){return this._renderer.getRelated(t,()=>({attributes:new Map,uniforms:new Map,boundUniforms:new oo}))}update(...t){if(t.length>1){const a=this.boundProgram;this.boundProgram=t[0],this.update(t[1]),this.boundProgram=a;return}const e=t[0],A=this.boundProgram;if(!A)return;const i=this.gl,s=this.getMeta(A),n=this.createShader(e.vert,"vertex_shader"),o=this.createShader(e.frag,"fragment_shader");if(i.attachShader(A,n),i.attachShader(A,o),i.linkProgram(A),i.deleteShader(n),i.deleteShader(o),!i.getProgramParameter(A,i.LINK_STATUS))throw new Error(`Unable to link program: ${i.getProgramInfoLog(A)}`);s.attributes.clear(),s.uniforms.clear();for(let a=i.getProgramParameter(A,i.ACTIVE_ATTRIBUTES),l=0;l<a;l++){const c=i.getActiveAttrib(A,l);if(!c||c.name.startsWith("gl_"))continue;const h=this._renderer.bindPoints.get(c.type)??String(c.type);s.attributes.set(c.name,{type:h,name:c.name,size:Oh(h),location:i.getAttribLocation(A,c.name)})}for(let a=i.getProgramParameter(A,i.ACTIVE_UNIFORMS),l=0;l<a;l++){const c=i.getActiveUniform(A,l);if(!c)continue;const h=c.name.replace(/\[.*?\]$/,"");let u=i.getUniformLocation(A,h);u||(u=i.getUniformLocation(A,c.name)),s.uniforms.set(h,{name:h,index:l,type:this._renderer.bindPoints.get(c.type)??String(c.type),size:c.size,isArray:h!==c.name,location:u})}}bind(t){const e=this.gl;({value:this.boundProgram!==t}).value&&(e.useProgram(t),this.boundProgram=t)}createShader(t,e){const A=this.gl,i=A.createShader(this._renderer.getBindPoint(e));if(!i)throw new Error("Unable to create shader");if(A.shaderSource(i,t),A.compileShader(i),!A.getShaderParameter(i,A.COMPILE_STATUS))throw new Error(`Unable to compiling shader :
|
|
69
69
|
${t}
|
|
70
|
-
${A.getShaderInfoLog(i)}`);return i}updateUniforms(...t){if(t.length>1){this.bind(t[0]),this.updateUniforms(t[1]);return}const e=this.boundProgram;if(!e)return;const A=this.gl,i=t[0],{uniforms:s,boundUniforms:n}=this.getMeta(e);for(const o in i){const a=i[o],l=s.get(o);if(!l)continue;const{type:u,isArray:c,location:g}=l;if(!(!g||n.get(g)===a))switch(n.set(g,a),u){case"float":c?A.uniform1fv(g,a):A.uniform1f(g,a);break;case"unsigned_int":c?A.uniform1uiv(g,a):A.uniform1ui(g,a);break;case"bool":case"int":case"sampler_2d":case"sampler_cube":case"sampler_2d_array":c?A.uniform1iv(g,a):A.uniform1i(g,a);break;case"bool_vec2":case"int_vec2":A.uniform2iv(g,a);break;case"unsigned_int_vec2":A.uniform2uiv(g,a);break;case"float_vec2":A.uniform2fv(g,a);break;case"bool_vec3":case"int_vec3":A.uniform3iv(g,a);break;case"unsigned_int_vec3":A.uniform3uiv(g,a);break;case"float_vec3":A.uniform3fv(g,a);break;case"bool_vec4":case"int_vec4":A.uniform4iv(g,a);break;case"unsigned_int_vec4":A.uniform4uiv(g,a);break;case"float_vec4":A.uniform4fv(g,a);break;case"float_mat2":A.uniformMatrix2fv(g,!1,a);break;case"float_mat3":A.uniformMatrix3fv(g,!1,a);break;case"float_mat4":A.uniformMatrix4fv(g,!1,a);break}}}reset(){super.reset(),this.boundProgram=null,this.uniforms={}}free(){super.free(),this.bind(null)}}function Yc(r){switch(r){case"float":case"int":case"unsigned_int":case"bool":case"sampler_2d":return 1;case"float_vec2":case"int_vec2":case"unsigned_int_vec2":case"bool_vec2":return 2;case"float_vec3":case"int_vec3":case"unsigned_int_vec3":case"bool_vec3":return 3;case"float_vec4":case"int_vec4":case"unsigned_int_vec4":case"bool_vec4":case"float_mat2":return 4;case"float_mat3":return 9;case"float_mat4":return 16;default:return 1}}class Zo extends de{install(t){super.install(t),t.scissor=this}get length(){return this._renderer.mask.last?.scissorCounter??0}push(t){const e=this._renderer.gl;e.enable(e.SCISSOR_TEST),t.scissorCounter??=0,t.scissorCounter++,this.use()}pop(t){if(this.length>0)this.use();else{const e=this._renderer.gl;e.disable(e.SCISSOR_TEST)}}use(){const t=this._renderer,{pixelRatio:e,mask:A,viewport:i,screen:s,gl:n}=t,o=A.last.mask;let a;i.boundViewport?a=i.boundViewport.height-(o.height+o.y)*e:a=(s.height-(o.height+o.y))*e,n.scissor(o.x*e,a,o.width*e,o.height*e)}}class $o extends de{install(t){super.install(t),t.stencil=this}get length(){return this._renderer.mask.last?.stencilCounter??0}push(t){const e=this._renderer.gl,A=t.mask,i=t.stencilCounter??=0;t.stencilCounter===0&&(this._renderer.framebuffer.forceStencil(),e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT),e.enable(e.STENCIL_TEST)),t.stencilCounter++;const s=t.color;s&&(t.color=0,e.colorMask(!1,!1,!1,!1)),e.stencilFunc(e.EQUAL,i,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.INCR),A.render(this._renderer),this._renderer.flush(),s&&(t.color=s,e.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this.use()}pop(t){const e=this._renderer.gl,A=t.mask;if(!this.length)e.disable(e.STENCIL_TEST);else{const i=this._renderer.mask.last,s=i?.color??15;s!==0&&(i.color=0,e.colorMask(!1,!1,!1,!1)),e.stencilOp(e.KEEP,e.KEEP,e.DECR),A.render(this._renderer),this._renderer.flush(),s!==0&&(i.color=s,e.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this.use()}}use(){const t=this._renderer.gl;t.stencilFunc(t.EQUAL,this.length,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}function Vc(r,t){const e=new Set([...Object.keys(r),...Object.keys(t)]),A={};return e.forEach(i=>{A[i]=r[i]!==t[i]}),A}class ta extends de{install(t){super.install(t),t.texture=this}maxUnits=0;boundLocation=0;boundTarget="texture_2d";boundTextures=[];emptyTextures={texture_2d:null,texture_cube_map:null};onUpdateContext(){super.onUpdateContext();const t=this.gl;this.maxUnits=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);for(let i=0;i<this.maxUnits;i++)this.boundTextures[i]={texture_2d:null,texture_cube_map:null};const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4));const A=t.createTexture();t.bindTexture(t.TEXTURE_CUBE_MAP,A);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR),this.emptyTextures={texture_2d:e,texture_cube_map:A};for(let i=this.boundTextures.length,s=0;s<i;s++)this.unbind(s)}create(t){const e=this.gl.createTexture();if(!e)throw new Error("Unable to create texture");return t&&(this.bind({location:t.location,target:t.target,value:e,forceUpdateLocation:!0}),this.update({filterMode:"linear",wrapMode:"repeat",...t})),e}getMeta(t){return this._renderer.getRelated(t,()=>({}))}update(...t){if(t.length>1){this.bind({location:t[1].location,target:t[1].target,value:t[0],forceUpdateLocation:!0}),this.update(t[1]);return}const e=t[0],{value:A,...i}=e,s=this.boundTextures[this.boundLocation][e.target??this.boundTarget];if(!s)return;const n=this.gl,o=this.getMeta(s),a=Vc(o,i);Object.assign(o,i);const l=this._renderer.getBindPoint(o.target??this.boundTarget);if(A!==void 0&&(A===null?n.texImage2D(l,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,null):"pixels"in A?n.texImage2D(l,0,n.RGBA,A.width,A.height,0,n.RGBA,n.UNSIGNED_BYTE,A.pixels):n.texImage2D(l,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,A)),a.wrapMode&&o.wrapMode){const c=this._renderer.getBindPoint(o.wrapMode);n.texParameteri(l,n.TEXTURE_WRAP_S,c),n.texParameteri(l,n.TEXTURE_WRAP_T,c)}const u=o.filterMode;if(a.filterMode&&u){const c=this._renderer.getBindPoint(u.split("_")[0]);u.includes("_")?n.texParameteri(l,n.TEXTURE_MIN_FILTER,this._renderer.getBindPoint(u)):n.texParameteri(l,n.TEXTURE_MIN_FILTER,c),n.texParameteri(l,n.TEXTURE_MAG_FILTER,c)}if(o.anisoLevel&&u==="linear"&&this._renderer.extensions.anisotropicFiltering&&a.anisoLevel){const{MAX_TEXTURE_MAX_ANISOTROPY_EXT:c,TEXTURE_MAX_ANISOTROPY_EXT:g}=this._renderer.extensions.anisotropicFiltering;n.texParameterf(l,g,Math.min(o.anisoLevel,n.getParameter(c)))}}bind(t){const e=this.gl;let A,i,s,n;if(t&&"value"in t?{target:i,value:A,location:s,forceUpdateLocation:n}=t:A=t,A){const f=this.getMeta(A);f.target=i??=f.target??"texture_2d",f.location=s??=f.location??0}else i??="texture_2d",s??=0;let o=this.boundTextures[s];o||(this.boundTextures[s]=o={texture_2d:null,texture_cube_map:null});const a=o[i]??null,l=this.boundLocation,u=A!==a,c={location:s!==l&&(u||n),texture:u},g=this._renderer.getBindPoint(i);c.location&&(e.activeTexture(e.TEXTURE0+s),this.boundLocation=s),c.texture&&(e.bindTexture(g,A??this.emptyTextures[i]),o[i]=A),this.boundTarget=i}unbind(t,e="texture_2d"){const A=this._renderer.gl;if(typeof t=="number")this.bind({value:null,target:e,location:t});else{const i=this.getMeta(t),{target:s=this.boundTarget}=i,n=this._renderer.getBindPoint(s);for(let o=0;o<this.boundTextures.length;o++)this.boundTextures[o][s]===t&&(this.boundLocation!==o&&(A.activeTexture(A.TEXTURE0+o),this.boundLocation=o),A.bindTexture(n,this.emptyTextures[s]),this.boundTextures[o][s]=null)}}reset(){super.reset(),this.boundLocation=0,this.boundTarget="texture_2d",this.boundTextures=[],this.maxUnits=0}}class ea extends de{install(t){super.install(t),t.vertexArray=this}boundVertexArrayNull={attributes:{},elementArrayBuffer:null};boundVertexArrayObject=null;boundVertexArray=this.boundVertexArrayNull;enableVertexAttrib(t,e,A,i=1){const{buffer:s,size:n=0,type:o="float",normalized:a=!1,stride:l=0,offset:u=0,divisor:c}=A,g=this._renderer.gl;this._renderer.buffer.bind({target:"array_buffer",value:s});for(let f=0;f<i;f++)g.enableVertexAttribArray(e+f),g.vertexAttribPointer(e+f,n,this._renderer.getBindPoint(o),a,l,u+(l-u)/i*f);c&&("vertexAttribDivisor"in g?g.vertexAttribDivisor(e,c):console.warn("Failed to active vertex array object, GPU Instancing is not supported on this device")),this.boundVertexArray.attributes[t]={enable:!0,...A}}create(...t){const e=this._renderer.gl;if(!("createVertexArray"in e))return null;const A=e.createVertexArray();if(!A)throw new Error("Unable to create vertex array");return t.length===2?this.update(t[0],A,t[1]):t.length===1&&this.update(A,t[0]),A}getVertexArrayMeta(t){return this._renderer.getRelated(t,()=>({attributes:{},elementArrayBuffer:null}))}update(...t){if(t.length>2){this._renderer.program.bind(t[0]),this.update(t[1],t[2]);return}else if(t.length===2)if(t[0]){const s=t[0],n=t[1],o=this.getVertexArrayMeta(s);this.bind(s),this.update(n),o.attributes=this.boundVertexArray.attributes,o.elementArrayBuffer=this.boundVertexArray.elementArrayBuffer,this.unbind(),this._renderer.buffer.unbind("array_buffer");return}else return this.update(t[1]);const e=this._renderer.program.boundProgram;if(!e)return;const A=t[0];if(A.attributes){const s=this._renderer.program.getMeta(e),n={},o={};for(const l in A.attributes){const u=A.attributes[l],c=s.attributes.get(l);let g;"buffer"in u?g={...u}:g={buffer:u},g.size=g.size||c?.size||0;const f=this._renderer.buffer.getMeta(g.buffer),d=Number(c?.type.match(/mat(\d)/)?.[1]??1);let B;switch(g.type){case"unsigned_byte":B=g.size;break;case"unsigned_short":B=g.size*2;break;case"float":default:B=g.size*4;break}B*=d,n[f.id]??=0,n[f.id]+=B,o[l]={attrib:g,meta:f,info:c,byteLength:B,dimension:d}}const a={};for(const l in o){const{attrib:u,meta:c,info:g,byteLength:f,dimension:d}=o[l];g?.location!==void 0&&(a[c.id]??=0,u.offset??=a[c.id],u.stride??=n[c.id]===f?0:n[c.id],this.enableVertexAttrib(l,g.location,u,d),a[c.id]+=f)}}const i=A.elementArrayBuffer??null;this._renderer.buffer.bind({target:"element_array_buffer",value:i}),this.boundVertexArray.elementArrayBuffer=i}bind(t){const e=this._renderer.gl;if(t&&"attributes"in t)this.update(t);else if("bindVertexArray"in e){const A=this.boundVertexArrayObject;({value:t!==A}).value&&(e.bindVertexArray(t),this.boundVertexArrayObject=t,t?this.boundVertexArray={...this.getVertexArrayMeta(t)}:this.boundVertexArray=this.boundVertexArrayNull)}}unbind(){return this.bind(null)}reset(){super.reset(),this.boundVertexArrayNull={attributes:{},elementArrayBuffer:null},this.boundVertexArray=this.boundVertexArrayNull,this.boundVertexArrayObject=null}}class Aa extends de{install(t){super.install(t),t.viewport=this}boundViewport={x:0,y:0,width:0,height:0};bind(t){const e=this.boundViewport,A=Math.floor(t.x),i=Math.floor(t.y),s=Math.floor(t.width),n=Math.floor(t.height);e.x===A&&e.y===i&&e.width===s&&e.height===n||(this._renderer.gl.viewport(A,i,s,n),e.x=A,e.y=i,e.width=s,e.height=n)}reset(){super.reset(),this.boundViewport={x:0,y:0,width:0,height:0}}}class ia extends Ko{_modules=[new ta,new Wo,new qo,new jo,new ea,new Aa,new Vo,new Xo,new Zo,new $o,new zo];bindPoints=new Map;constructor(t=Mo(),e){if(super(),!t)throw new Error("Failed to createHTMLCanvas");Fo(t)?this._setupContext(t,e):(this.gl=t,this.version=So(this.gl)?2:1),this._setupBindPoints()._setupExtensions()._setupPolyfill(),this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this._modules.forEach(A=>A.install(this)),this._modules.forEach(A=>A.onUpdateContext())}_setupContext(t,e){this.view=t;let A=t.getContext("webgl2",e)||t.getContext("experimental-webgl2",e),i=2;if(A||(A=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),i=1),!A)throw new Error("Unable to getContext");return this.gl=A,this.version=i,this._onContextLost=this._onContextLost.bind(this),this._onContextRestored=this._onContextRestored.bind(this),t.addEventListener("webglcontextlost",this._onContextLost,!1),t.addEventListener("webglcontextrestored",this._onContextRestored,!1),this}_setupExtensions(){const t=this.gl,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tcSRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};return this.version===1?(e.instancedArrays=t.getExtension("ANGLE_instanced_arrays"),e.drawBuffers=t.getExtension("WEBGL_draw_buffers"),e.depthTexture=t.getExtension("WEBGL_depth_texture"),e.vertexArrayObject=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),e.uint32ElementIndex=t.getExtension("OES_element_index_uint"),e.floatTexture=t.getExtension("OES_texture_float"),e.textureHalfFloat=t.getExtension("OES_texture_half_float"),e.textureHalfFloatLinear=t.getExtension("OES_texture_half_float_linear")):this.version===2&&(e.colorBufferFloat=t.getExtension("EXT_color_buffer_float")),this.extensions=e,this}_setupBindPoints(){for(const t in this.gl)if(t===t.toUpperCase()){const e=this.gl[t];typeof e=="number"&&this.bindPoints.set(e,t.toLowerCase())}return this}_setupPolyfill(){if(this.version===1){const{instancedArrays:t,vertexArrayObject:e,drawBuffers:A}=this.extensions,i=this.gl;e&&(i.createVertexArray=()=>e.createVertexArrayOES(),i.bindVertexArray=s=>e.bindVertexArrayOES(s),i.deleteVertexArray=s=>e.deleteVertexArrayOES(s)),t&&(i.vertexAttribDivisor=(s,n)=>t.vertexAttribDivisorANGLE(s,n),i.drawElementsInstanced=(s,n,o,a,l)=>t.drawElementsInstancedANGLE(s,n,o,a,l),i.drawArraysInstanced=(s,n,o,a)=>t.drawArraysInstancedANGLE(s,n,o,a)),A&&(i.drawBuffers=s=>A.drawBuffersWEBGL(s))}return this}_onContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0)}_onContextRestored(){}getBindPoint(t){return this.gl[t.toUpperCase()]}clear(t=this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT){this.gl.clear(t)}draw(t={}){const{mode:e="triangles",first:A=0,instanceCount:i}=t;let{count:s=0,bytesPerElement:n=0}=t;if(!s||!n){const a=this.vertexArray.boundVertexArray.elementArrayBuffer??Object.values(this.vertexArray.boundVertexArray.attributes)[0];if(a){const l=this.buffer.getMeta(a);s||(s=l.length),n||(n=l.bytesPerElement)}}const o=this.getBindPoint(e);if(n)if(n===2||n===4&&this.extensions.uint32ElementIndex){const a=n===2?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT;i&&"drawElementsInstanced"in this.gl?this.gl.drawElementsInstanced(o,s,a,A*n,i):this.gl.drawElements(o,s,a,A*n)}else console.warn("Unsupported index buffer type: uint32");else i&&"drawArraysInstanced"in this.gl?this.gl.drawArraysInstanced(o,A,s,i):this.gl.drawArrays(o,A,s)}reset(){this._modules.forEach(t=>t.reset())}flush(){this._modules.forEach(t=>t.flush())}free(){this._modules.forEach(t=>t.free()),this.view?.removeEventListener("webglcontextlost",this._onContextLost,!1),this.view?.removeEventListener("webglcontextrestored",this._onContextRestored,!1),this.extensions.loseContext?.loseContext()}toPixels(){const t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight,A=t*e*4,i=t*4,s=(e-1)*i,n=new Uint8Array(A),o=new Uint8ClampedArray(A);this.gl.readPixels(0,0,t,e,this.gl.RGBA,this.gl.UNSIGNED_BYTE,n);for(let a=0;a<A;a+=i)o.set(n.subarray(a,a+i),s-a);return o}}class eA{}class ra extends eA{install(t){const e=async A=>{const{parseFont:i}=await Promise.resolve().then(()=>aI);return await t.fetch(A).then(s=>s.arrayBuffer()).then(s=>i(s))};return this.load=A=>t.loadBy(A,()=>e(A)),["woff","ttf","otf"].forEach(A=>{t.register(A,e)}),t.font=this,this}}const sa={brightness:1,contrast:1,grayscale:0,"hue-rotate":0,invert:0,opacity:1,saturate:1,sepia:0};function na(r){const t=new _s;if(r==="none")return t;const e=fi(r).reduce((A,{name:i,args:s})=>(A[i]=s[0].normalizedIntValue,A),{});Object.keys(sa).forEach(A=>{e[A]=e[A]??sa[A]});for(const A in e){const i=e[A];switch(A){case"hue-rotate":t.hueRotate(i*oe);break;case"saturate":t.saturate(i);break;case"brightness":t.brightness(i);break;case"contrast":t.contrast(i);break;case"invert":t.invert(i);break;case"sepia":t.sepia(i);break;case"opacity":t.opacity(i);break;case"grayscale":t.grayscale(i);break}}return t}function oa(r,t,e,A=new Yt){return r=!r||r==="none"?"":r,fi(r,{width:t,height:e}).reverse().forEach(({name:i,args:s})=>{const n=s.map(o=>o.normalizedIntValue);switch(i){case"translate":A.translate(n[0]*t,(n[1]??n[0])*e);break;case"translateX":A.translateX(n[0]*t);break;case"translateY":A.translateY(n[0]*e);break;case"translateZ":A.translateZ(n[0]);break;case"translate3d":A.translate3d(n[0]*t,(n[1]??n[0])*e,n[2]??n[1]??n[0]);break;case"scale":A.scale(n[0],n[1]??n[0]);break;case"scaleX":A.scaleX(n[0]);break;case"scaleY":A.scaleY(n[0]);break;case"scale3d":A.scale3d(n[0],n[1]??n[0],n[2]??n[1]??n[0]);break;case"rotate":A.rotate(n[0]*oe);break;case"rotateX":A.rotateX(n[0]*oe);break;case"rotateY":A.rotateY(n[0]*oe);break;case"rotateZ":A.rotateZ(n[0]*oe);break;case"rotate3d":A.rotate3d(n[0]*oe,(n[1]??n[0])*oe,(n[2]??n[1]??n[0])*oe,(n[3]??n[2]??n[1]??n[0])*oe);break;case"skew":A.skew(n[0],n[0]??n[1]);break;case"skewX":A.skewX(n[0]);break;case"skewY":A.skewY(n[0]);break;case"matrix":A.set(n);break}}),A}function aa(r){const[t,e=t]=r.split(" ");return[t,e].map(A=>{switch(A=A.trim(),A){case"left":case"top":return 0;case"center":return .5;case"right":case"bottom":return 1;default:return Number(A)}})}class gr extends Je{vertexAttributes;indexBuffer;instanceCount;mode;_materialWeakMap=new ws;constructor(t={}){super(),this.vertexAttributes=new Map(Object.entries(t?.vertexAttributes??{})),this.indexBuffer=t?.indexBuffer,this.instanceCount=t?.instanceCount,this.mode=t?.mode??"triangles"}_glVertexArray(t){return{attributes:Object.fromEntries(Array.from(this.vertexAttributes).map(([e,A])=>[e,{buffer:A.buffer._glBuffer(t),size:A.size,type:A.type,normalized:A.normalized,stride:A.stride,offset:A.offset,divisor:A.divisor}])),elementArrayBuffer:this.indexBuffer?._glBuffer(t)}}_glVertexArrayObject(t,e){let A=this._materialWeakMap.get(e);return A||(A={material:e.instanceId,geometry:this.instanceId},this._materialWeakMap.set(e,A)),t.getRelated(A,()=>t.vertexArray.create(e._glProgram(t),this._glVertexArray(t)))}draw(t,e,A){t.flush(),e.activate(t,A);const i=this._glVertexArrayObject(t,e);let s=!1,n;this.vertexAttributes.forEach(o=>{n?.instanceId!==o.buffer.instanceId&&(n=o.buffer,n.upload(t)&&(s=!0)),o.upload()&&(s=!0)}),this.indexBuffer?.upload(t)&&(s=!0),s&&i&&t.vertexArray.update(e._glProgram(t),i,this._glVertexArray(t)),t.vertexArray.bind(i??this._glVertexArray(t)),t.draw({mode:this.mode,instanceCount:this.instanceCount}),t.vertexArray.unbind()}}var zc=Object.defineProperty,la=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&zc(t,e,i),i};class UA extends Je{needsUpload=!1;constructor(t){super(),this.setProperties(t)}_glBufferOptions(){return{target:"element_array_buffer",data:this.data,usage:this.dynamic?"dynamic_draw":"static_draw"}}_glBuffer(t){return t.getRelated(this,()=>t.buffer.create(this._glBufferOptions()))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"data":case"dynamic":this.needsUpload=!0;break}}upload(t){const e=this.needsUpload;return e&&(this.needsUpload=!1,t.buffer.update(this._glBuffer(t),this._glBufferOptions())),e}}la([w({protected:!0,default:null})],UA.prototype,"data"),la([w({protected:!0,fallback:!1})],UA.prototype,"dynamic");var Wc=Object.defineProperty,ua=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Wc(t,e,i),i};class Ye extends Je{needsUpload=!1;constructor(t){super(),this.setProperties(t)}_glBufferOptions(){return{target:"array_buffer",data:this.data,usage:this.dynamic?"dynamic_draw":"static_draw"}}_glBuffer(t){return t.getRelated(this,()=>t.buffer.create(this._glBufferOptions()))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"data":case"dynamic":this.needsUpload=!0;break}}upload(t){const e=this.needsUpload;return e&&(this.needsUpload=!1,t.buffer.update(this._glBuffer(t),this._glBufferOptions())),e}}ua([w({protected:!0,default:null})],Ye.prototype,"data"),ua([w({protected:!0,fallback:!1})],Ye.prototype,"dynamic");var qc=Object.defineProperty,CA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&qc(t,e,i),i};class le extends Je{needsUpload=!1;constructor(t){super(),this.setProperties({buffer:new Ye,...t})}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"buffer":case"size":case"normalized":case"type":case"stride":case"offset":case"divisor":this.needsUpload=!0;break}}upload(){const t=this.needsUpload;return t&&(this.needsUpload=!1),t}}CA([w({protected:!0})],le.prototype,"buffer"),CA([w({fallback:0})],le.prototype,"size"),CA([w({fallback:!1})],le.prototype,"normalized"),CA([w({fallback:"float"})],le.prototype,"type"),CA([w()],le.prototype,"stride"),CA([w()],le.prototype,"offset"),CA([w()],le.prototype,"divisor");class Xc extends gr{constructor(){super({vertexAttributes:{position:new le({buffer:new Ye({data:new Float32Array([0,0,1,0,1,1,0,1]),dynamic:!1}),size:2,normalized:!1,type:"float"})},indexBuffer:new UA({data:new Uint16Array([0,1,3,2]),dynamic:!1}),mode:"triangle_strip"})}}class Ct extends Je{static instance=new this;vert;frag;uniforms;constructor(t={}){super(),this.vert=t.vert??`precision highp float;
|
|
70
|
+
${A.getShaderInfoLog(i)}`);return i}updateUniforms(...t){if(t.length>1){this.bind(t[0]),this.updateUniforms(t[1]);return}const e=this.boundProgram;if(!e)return;const A=this.gl,i=t[0],{uniforms:s,boundUniforms:n}=this.getMeta(e);for(const o in i){const a=i[o],l=s.get(o);if(!l)continue;const{type:c,isArray:h,location:u}=l;if(!(!u||n.get(u)===a))switch(n.set(u,a),c){case"float":h?A.uniform1fv(u,a):A.uniform1f(u,a);break;case"unsigned_int":h?A.uniform1uiv(u,a):A.uniform1ui(u,a);break;case"bool":case"int":case"sampler_2d":case"sampler_cube":case"sampler_2d_array":h?A.uniform1iv(u,a):A.uniform1i(u,a);break;case"bool_vec2":case"int_vec2":A.uniform2iv(u,a);break;case"unsigned_int_vec2":A.uniform2uiv(u,a);break;case"float_vec2":A.uniform2fv(u,a);break;case"bool_vec3":case"int_vec3":A.uniform3iv(u,a);break;case"unsigned_int_vec3":A.uniform3uiv(u,a);break;case"float_vec3":A.uniform3fv(u,a);break;case"bool_vec4":case"int_vec4":A.uniform4iv(u,a);break;case"unsigned_int_vec4":A.uniform4uiv(u,a);break;case"float_vec4":A.uniform4fv(u,a);break;case"float_mat2":A.uniformMatrix2fv(u,!1,a);break;case"float_mat3":A.uniformMatrix3fv(u,!1,a);break;case"float_mat4":A.uniformMatrix4fv(u,!1,a);break}}}reset(){super.reset(),this.boundProgram=null,this.uniforms={}}free(){super.free(),this.bind(null)}}function Oh(r){switch(r){case"float":case"int":case"unsigned_int":case"bool":case"sampler_2d":return 1;case"float_vec2":case"int_vec2":case"unsigned_int_vec2":case"bool_vec2":return 2;case"float_vec3":case"int_vec3":case"unsigned_int_vec3":case"bool_vec3":return 3;case"float_vec4":case"int_vec4":case"unsigned_int_vec4":case"bool_vec4":case"float_mat2":return 4;case"float_mat3":return 9;case"float_mat4":return 16;default:return 1}}class Wo extends de{install(t){super.install(t),t.scissor=this}get length(){return this._renderer.mask.last?.scissorCounter??0}push(t){const e=this._renderer.gl;e.enable(e.SCISSOR_TEST),t.scissorCounter??=0,t.scissorCounter++,this.use()}pop(t){if(this.length>0)this.use();else{const e=this._renderer.gl;e.disable(e.SCISSOR_TEST)}}use(){const t=this._renderer,{pixelRatio:e,mask:A,viewport:i,screen:s,gl:n}=t,o=A.last.mask;let a;i.boundViewport?a=i.boundViewport.height-(o.height+o.y)*e:a=(s.height-(o.height+o.y))*e,n.scissor(o.x*e,a,o.width*e,o.height*e)}}class qo extends de{install(t){super.install(t),t.stencil=this}get length(){return this._renderer.mask.last?.stencilCounter??0}push(t){const e=this._renderer.gl,A=t.mask,i=t.stencilCounter??=0;t.stencilCounter===0&&(this._renderer.framebuffer.forceStencil(),e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT),e.enable(e.STENCIL_TEST)),t.stencilCounter++;const s=t.color;s&&(t.color=0,e.colorMask(!1,!1,!1,!1)),e.stencilFunc(e.EQUAL,i,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.INCR),A.render(this._renderer),this._renderer.flush(),s&&(t.color=s,e.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this.use()}pop(t){const e=this._renderer.gl,A=t.mask;if(!this.length)e.disable(e.STENCIL_TEST);else{const i=this._renderer.mask.last,s=i?.color??15;s!==0&&(i.color=0,e.colorMask(!1,!1,!1,!1)),e.stencilOp(e.KEEP,e.KEEP,e.DECR),A.render(this._renderer),this._renderer.flush(),s!==0&&(i.color=s,e.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this.use()}}use(){const t=this._renderer.gl;t.stencilFunc(t.EQUAL,this.length,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}function Hh(r,t){const e=new Set([...Object.keys(r),...Object.keys(t)]),A={};return e.forEach(i=>{A[i]=r[i]!==t[i]}),A}class Xo extends de{install(t){super.install(t),t.texture=this}maxUnits=0;boundLocation=0;boundTarget="texture_2d";boundTextures=[];emptyTextures={texture_2d:null,texture_cube_map:null};onUpdateContext(){super.onUpdateContext();const t=this.gl;this.maxUnits=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);for(let i=0;i<this.maxUnits;i++)this.boundTextures[i]={texture_2d:null,texture_cube_map:null};const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4));const A=t.createTexture();t.bindTexture(t.TEXTURE_CUBE_MAP,A);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR),this.emptyTextures={texture_2d:e,texture_cube_map:A};for(let i=this.boundTextures.length,s=0;s<i;s++)this.unbind(s)}create(t){const e=this.gl.createTexture();if(!e)throw new Error("Unable to create texture");return t&&(this.bind({location:t.location,target:t.target,value:e,forceUpdateLocation:!0}),this.update({filterMode:"linear",wrapMode:"repeat",...t})),e}getMeta(t){return this._renderer.getRelated(t,()=>({}))}update(...t){if(t.length>1){this.bind({location:t[1].location,target:t[1].target,value:t[0],forceUpdateLocation:!0}),this.update(t[1]);return}const e=t[0],{value:A,...i}=e,s=this.boundTextures[this.boundLocation][e.target??this.boundTarget];if(!s)return;const n=this.gl,o=this.getMeta(s),a=Hh(o,i);Object.assign(o,i);const l=this._renderer.getBindPoint(o.target??this.boundTarget);if(A!==void 0&&(A===null?n.texImage2D(l,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,null):"pixels"in A?n.texImage2D(l,0,n.RGBA,A.width,A.height,0,n.RGBA,n.UNSIGNED_BYTE,A.pixels):n.texImage2D(l,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,A)),a.wrapMode&&o.wrapMode){const h=this._renderer.getBindPoint(o.wrapMode);n.texParameteri(l,n.TEXTURE_WRAP_S,h),n.texParameteri(l,n.TEXTURE_WRAP_T,h)}const c=o.filterMode;if(a.filterMode&&c){const h=this._renderer.getBindPoint(c.split("_")[0]);c.includes("_")?n.texParameteri(l,n.TEXTURE_MIN_FILTER,this._renderer.getBindPoint(c)):n.texParameteri(l,n.TEXTURE_MIN_FILTER,h),n.texParameteri(l,n.TEXTURE_MAG_FILTER,h)}if(o.anisoLevel&&c==="linear"&&this._renderer.extensions.anisotropicFiltering&&a.anisoLevel){const{MAX_TEXTURE_MAX_ANISOTROPY_EXT:h,TEXTURE_MAX_ANISOTROPY_EXT:u}=this._renderer.extensions.anisotropicFiltering;n.texParameterf(l,u,Math.min(o.anisoLevel,n.getParameter(h)))}}bind(t){const e=this.gl;let A,i,s,n;if(t&&"value"in t?{target:i,value:A,location:s,forceUpdateLocation:n}=t:A=t,A){const d=this.getMeta(A);d.target=i??=d.target??"texture_2d",d.location=s??=d.location??0}else i??="texture_2d",s??=0;let o=this.boundTextures[s];o||(this.boundTextures[s]=o={texture_2d:null,texture_cube_map:null});const a=o[i]??null,l=this.boundLocation,c=A!==a,h={location:s!==l&&(c||n),texture:c},u=this._renderer.getBindPoint(i);h.location&&(e.activeTexture(e.TEXTURE0+s),this.boundLocation=s),h.texture&&(e.bindTexture(u,A??this.emptyTextures[i]),o[i]=A),this.boundTarget=i}unbind(t,e="texture_2d"){const A=this._renderer.gl;if(typeof t=="number")this.bind({value:null,target:e,location:t});else{const i=this.getMeta(t),{target:s=this.boundTarget}=i,n=this._renderer.getBindPoint(s);for(let o=0;o<this.boundTextures.length;o++)this.boundTextures[o][s]===t&&(this.boundLocation!==o&&(A.activeTexture(A.TEXTURE0+o),this.boundLocation=o),A.bindTexture(n,this.emptyTextures[s]),this.boundTextures[o][s]=null)}}reset(){super.reset(),this.boundLocation=0,this.boundTarget="texture_2d",this.boundTextures=[],this.maxUnits=0}}class jo extends de{install(t){super.install(t),t.vertexArray=this}boundVertexArrayNull={attributes:{},elementArrayBuffer:null};boundVertexArrayObject=null;boundVertexArray=this.boundVertexArrayNull;enableVertexAttrib(t,e,A,i=1){const{buffer:s,size:n=0,type:o="float",normalized:a=!1,stride:l=0,offset:c=0,divisor:h}=A,u=this._renderer.gl;this._renderer.buffer.bind({target:"array_buffer",value:s});for(let d=0;d<i;d++)u.enableVertexAttribArray(e+d),u.vertexAttribPointer(e+d,n,this._renderer.getBindPoint(o),a,l,c+(l-c)/i*d);h&&("vertexAttribDivisor"in u?u.vertexAttribDivisor(e,h):console.warn("Failed to active vertex array object, GPU Instancing is not supported on this device")),this.boundVertexArray.attributes[t]={enable:!0,...A}}create(...t){const e=this._renderer.gl;if(!("createVertexArray"in e))return null;const A=e.createVertexArray();if(!A)throw new Error("Unable to create vertex array");return t.length===2?this.update(t[0],A,t[1]):t.length===1&&this.update(A,t[0]),A}getVertexArrayMeta(t){return this._renderer.getRelated(t,()=>({attributes:{},elementArrayBuffer:null}))}update(...t){if(t.length>2){this._renderer.program.bind(t[0]),this.update(t[1],t[2]);return}else if(t.length===2)if(t[0]){const s=t[0],n=t[1],o=this.getVertexArrayMeta(s);this.bind(s),this.update(n),o.attributes=this.boundVertexArray.attributes,o.elementArrayBuffer=this.boundVertexArray.elementArrayBuffer,this.unbind(),this._renderer.buffer.unbind("array_buffer");return}else return this.update(t[1]);const e=this._renderer.program.boundProgram;if(!e)return;const A=t[0];if(A.attributes){const s=this._renderer.program.getMeta(e),n={},o={};for(const l in A.attributes){const c=A.attributes[l],h=s.attributes.get(l);let u;"buffer"in c?u={...c}:u={buffer:c},u.size=u.size||h?.size||0;const d=this._renderer.buffer.getMeta(u.buffer),f=Number(h?.type.match(/mat(\d)/)?.[1]??1);let B;switch(u.type){case"unsigned_byte":B=u.size;break;case"unsigned_short":B=u.size*2;break;case"float":default:B=u.size*4;break}B*=f,n[d.id]??=0,n[d.id]+=B,o[l]={attrib:u,meta:d,info:h,byteLength:B,dimension:f}}const a={};for(const l in o){const{attrib:c,meta:h,info:u,byteLength:d,dimension:f}=o[l];u?.location!==void 0&&(a[h.id]??=0,c.offset??=a[h.id],c.stride??=n[h.id]===d?0:n[h.id],this.enableVertexAttrib(l,u.location,c,f),a[h.id]+=d)}}const i=A.elementArrayBuffer??null;this._renderer.buffer.bind({target:"element_array_buffer",value:i}),this.boundVertexArray.elementArrayBuffer=i}bind(t){const e=this._renderer.gl;if(t&&"attributes"in t)this.update(t);else if("bindVertexArray"in e){const A=this.boundVertexArrayObject;({value:t!==A}).value&&(e.bindVertexArray(t),this.boundVertexArrayObject=t,t?this.boundVertexArray={...this.getVertexArrayMeta(t)}:this.boundVertexArray=this.boundVertexArrayNull)}}unbind(){return this.bind(null)}reset(){super.reset(),this.boundVertexArrayNull={attributes:{},elementArrayBuffer:null},this.boundVertexArray=this.boundVertexArrayNull,this.boundVertexArrayObject=null}}class Zo extends de{install(t){super.install(t),t.viewport=this}boundViewport={x:0,y:0,width:0,height:0};bind(t){const e=this.boundViewport,A=Math.floor(t.x),i=Math.floor(t.y),s=Math.floor(t.width),n=Math.floor(t.height);e.x===A&&e.y===i&&e.width===s&&e.height===n||(this._renderer.gl.viewport(A,i,s,n),e.x=A,e.y=i,e.width=s,e.height=n)}reset(){super.reset(),this.boundViewport={x:0,y:0,width:0,height:0}}}class $o extends Go{_modules=[new Xo,new Ko,new Yo,new zo,new jo,new Zo,new Ho,new Vo,new Wo,new qo,new Jo];bindPoints=new Map;constructor(t=Do(),e){if(super(),!t)throw new Error("Failed to createHTMLCanvas");_o(t)?this._setupContext(t,e):(this.gl=t,this.version=bo(this.gl)?2:1),this._setupBindPoints()._setupExtensions()._setupPolyfill(),this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this._modules.forEach(A=>A.install(this)),this._modules.forEach(A=>A.onUpdateContext())}_setupContext(t,e){this.view=t;let A=t.getContext("webgl2",e)||t.getContext("experimental-webgl2",e),i=2;if(A||(A=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),i=1),!A)throw new Error("Unable to getContext");return this.gl=A,this.version=i,this._onContextLost=this._onContextLost.bind(this),this._onContextRestored=this._onContextRestored.bind(this),t.addEventListener("webglcontextlost",this._onContextLost,!1),t.addEventListener("webglcontextrestored",this._onContextRestored,!1),this}_setupExtensions(){const t=this.gl,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tcSRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};return this.version===1?(e.instancedArrays=t.getExtension("ANGLE_instanced_arrays"),e.drawBuffers=t.getExtension("WEBGL_draw_buffers"),e.depthTexture=t.getExtension("WEBGL_depth_texture"),e.vertexArrayObject=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),e.uint32ElementIndex=t.getExtension("OES_element_index_uint"),e.floatTexture=t.getExtension("OES_texture_float"),e.textureHalfFloat=t.getExtension("OES_texture_half_float"),e.textureHalfFloatLinear=t.getExtension("OES_texture_half_float_linear")):this.version===2&&(e.colorBufferFloat=t.getExtension("EXT_color_buffer_float")),this.extensions=e,this}_setupBindPoints(){for(const t in this.gl)if(t===t.toUpperCase()){const e=this.gl[t];typeof e=="number"&&this.bindPoints.set(e,t.toLowerCase())}return this}_setupPolyfill(){if(this.version===1){const{instancedArrays:t,vertexArrayObject:e,drawBuffers:A}=this.extensions,i=this.gl;e&&(i.createVertexArray=()=>e.createVertexArrayOES(),i.bindVertexArray=s=>e.bindVertexArrayOES(s),i.deleteVertexArray=s=>e.deleteVertexArrayOES(s)),t&&(i.vertexAttribDivisor=(s,n)=>t.vertexAttribDivisorANGLE(s,n),i.drawElementsInstanced=(s,n,o,a,l)=>t.drawElementsInstancedANGLE(s,n,o,a,l),i.drawArraysInstanced=(s,n,o,a)=>t.drawArraysInstancedANGLE(s,n,o,a)),A&&(i.drawBuffers=s=>A.drawBuffersWEBGL(s))}return this}_onContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0)}_onContextRestored(){}getBindPoint(t){return this.gl[t.toUpperCase()]}clear(t=this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT){this.gl.clear(t)}draw(t={}){const{mode:e="triangles",first:A=0,instanceCount:i}=t;let{count:s=0,bytesPerElement:n=0}=t;if(!s||!n){const a=this.vertexArray.boundVertexArray.elementArrayBuffer??Object.values(this.vertexArray.boundVertexArray.attributes)[0];if(a){const l=this.buffer.getMeta(a);s||(s=l.length),n||(n=l.bytesPerElement)}}const o=this.getBindPoint(e);if(n)if(n===2||n===4&&this.extensions.uint32ElementIndex){const a=n===2?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT;i&&"drawElementsInstanced"in this.gl?this.gl.drawElementsInstanced(o,s,a,A*n,i):this.gl.drawElements(o,s,a,A*n)}else console.warn("Unsupported index buffer type: uint32");else i&&"drawArraysInstanced"in this.gl?this.gl.drawArraysInstanced(o,A,s,i):this.gl.drawArrays(o,A,s)}reset(){this._modules.forEach(t=>t.reset())}flush(){this._modules.forEach(t=>t.flush())}free(){this._modules.forEach(t=>t.free()),this.view?.removeEventListener("webglcontextlost",this._onContextLost,!1),this.view?.removeEventListener("webglcontextrestored",this._onContextRestored,!1),this.extensions.loseContext?.loseContext()}toPixels(){const t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight,A=t*e*4,i=t*4,s=(e-1)*i,n=new Uint8Array(A),o=new Uint8ClampedArray(A);this.gl.readPixels(0,0,t,e,this.gl.RGBA,this.gl.UNSIGNED_BYTE,n);for(let a=0;a<A;a+=i)o.set(n.subarray(a,a+i),s-a);return o}}class eA{}class ta extends eA{install(t){const e=async A=>{const{parseFont:i}=await Promise.resolve().then(()=>rI);return await t.fetch(A).then(s=>s.arrayBuffer()).then(s=>i(s))};return this.load=A=>t.loadBy(A,()=>e(A)),["woff","ttf","otf"].forEach(A=>{t.register(A,e)}),t.font=this,this}}const ea={brightness:1,contrast:1,grayscale:0,"hue-rotate":0,invert:0,opacity:1,saturate:1,sepia:0};function Aa(r){const t=new ws;if(r==="none")return t;const e=hi(r).reduce((A,{name:i,args:s})=>(A[i]=s[0].normalizedIntValue,A),{});Object.keys(ea).forEach(A=>{e[A]=e[A]??ea[A]});for(const A in e){const i=e[A];switch(A){case"hue-rotate":t.hueRotate(i*oe);break;case"saturate":t.saturate(i);break;case"brightness":t.brightness(i);break;case"contrast":t.contrast(i);break;case"invert":t.invert(i);break;case"sepia":t.sepia(i);break;case"opacity":t.opacity(i);break;case"grayscale":t.grayscale(i);break}}return t}function ia(r,t,e,A=new Yt){return r=!r||r==="none"?"":r,hi(r,{width:t,height:e}).reverse().forEach(({name:i,args:s})=>{const n=s.map(o=>o.normalizedIntValue);switch(i){case"translate":A.translate(n[0]*t,(n[1]??n[0])*e);break;case"translateX":A.translateX(n[0]*t);break;case"translateY":A.translateY(n[0]*e);break;case"translateZ":A.translateZ(n[0]);break;case"translate3d":A.translate3d(n[0]*t,(n[1]??n[0])*e,n[2]??n[1]??n[0]);break;case"scale":A.scale(n[0],n[1]??n[0]);break;case"scaleX":A.scaleX(n[0]);break;case"scaleY":A.scaleY(n[0]);break;case"scale3d":A.scale3d(n[0],n[1]??n[0],n[2]??n[1]??n[0]);break;case"rotate":A.rotate(n[0]*oe);break;case"rotateX":A.rotateX(n[0]*oe);break;case"rotateY":A.rotateY(n[0]*oe);break;case"rotateZ":A.rotateZ(n[0]*oe);break;case"rotate3d":A.rotate3d(n[0]*oe,(n[1]??n[0])*oe,(n[2]??n[1]??n[0])*oe,(n[3]??n[2]??n[1]??n[0])*oe);break;case"skew":A.skew(n[0],n[0]??n[1]);break;case"skewX":A.skewX(n[0]);break;case"skewY":A.skewY(n[0]);break;case"matrix":A.set(n);break}}),A}function ra(r){const[t,e=t]=r.split(" ");return[t,e].map(A=>{switch(A=A.trim(),A){case"left":case"top":return 0;case"center":return .5;case"right":case"bottom":return 1;default:return Number(A)}})}class cr extends He{vertexAttributes;indexBuffer;instanceCount;mode;_materialWeakMap=new ys;constructor(t={}){super(),this.vertexAttributes=new Map(Object.entries(t?.vertexAttributes??{})),this.indexBuffer=t?.indexBuffer,this.instanceCount=t?.instanceCount,this.mode=t?.mode??"triangles"}_glVertexArray(t){return{attributes:Object.fromEntries(Array.from(this.vertexAttributes).map(([e,A])=>[e,{buffer:A.buffer._glBuffer(t),size:A.size,type:A.type,normalized:A.normalized,stride:A.stride,offset:A.offset,divisor:A.divisor}])),elementArrayBuffer:this.indexBuffer?._glBuffer(t)}}_glVertexArrayObject(t,e){let A=this._materialWeakMap.get(e);return A||(A={material:e.instanceId,geometry:this.instanceId},this._materialWeakMap.set(e,A)),t.getRelated(A,()=>t.vertexArray.create(e._glProgram(t),this._glVertexArray(t)))}draw(t,e,A){t.flush(),e.activate(t,A);const i=this._glVertexArrayObject(t,e);let s=!1,n;this.vertexAttributes.forEach(o=>{n?.instanceId!==o.buffer.instanceId&&(n=o.buffer,n.upload(t)&&(s=!0)),o.upload()&&(s=!0)}),this.indexBuffer?.upload(t)&&(s=!0),s&&i&&t.vertexArray.update(e._glProgram(t),i,this._glVertexArray(t)),t.vertexArray.bind(i??this._glVertexArray(t)),t.draw({mode:this.mode,instanceCount:this.instanceCount}),t.vertexArray.unbind()}}var Jh=Object.defineProperty,sa=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Jh(t,e,i),i};class PA extends He{needsUpload=!1;constructor(t){super(),this.setProperties(t)}_glBufferOptions(){return{target:"element_array_buffer",data:this.data,usage:this.dynamic?"dynamic_draw":"static_draw"}}_glBuffer(t){return t.getRelated(this,()=>t.buffer.create(this._glBufferOptions()))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"data":case"dynamic":this.needsUpload=!0;break}}upload(t){const e=this.needsUpload;return e&&(this.needsUpload=!1,t.buffer.update(this._glBuffer(t),this._glBufferOptions())),e}}sa([v({protected:!0,default:null})],PA.prototype,"data"),sa([v({protected:!0,fallback:!1})],PA.prototype,"dynamic");var Kh=Object.defineProperty,na=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Kh(t,e,i),i};class Ke extends He{needsUpload=!1;constructor(t){super(),this.setProperties(t)}_glBufferOptions(){return{target:"array_buffer",data:this.data,usage:this.dynamic?"dynamic_draw":"static_draw"}}_glBuffer(t){return t.getRelated(this,()=>t.buffer.create(this._glBufferOptions()))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"data":case"dynamic":this.needsUpload=!0;break}}upload(t){const e=this.needsUpload;return e&&(this.needsUpload=!1,t.buffer.update(this._glBuffer(t),this._glBufferOptions())),e}}na([v({protected:!0,default:null})],Ke.prototype,"data"),na([v({protected:!0,fallback:!1})],Ke.prototype,"dynamic");var Yh=Object.defineProperty,CA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Yh(t,e,i),i};class le extends He{needsUpload=!1;constructor(t){super(),this.setProperties({buffer:new Ke,...t})}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"buffer":case"size":case"normalized":case"type":case"stride":case"offset":case"divisor":this.needsUpload=!0;break}}upload(){const t=this.needsUpload;return t&&(this.needsUpload=!1),t}}CA([v({protected:!0})],le.prototype,"buffer"),CA([v({fallback:0})],le.prototype,"size"),CA([v({fallback:!1})],le.prototype,"normalized"),CA([v({fallback:"float"})],le.prototype,"type"),CA([v()],le.prototype,"stride"),CA([v()],le.prototype,"offset"),CA([v()],le.prototype,"divisor");class Vh extends cr{constructor(){super({vertexAttributes:{position:new le({buffer:new Ke({data:new Float32Array([0,0,1,0,1,1,0,1]),dynamic:!1}),size:2,normalized:!1,type:"float"})},indexBuffer:new PA({data:new Uint16Array([0,1,3,2]),dynamic:!1}),mode:"triangle_strip"})}}class Ct extends He{static instance=new this;vert;frag;uniforms;constructor(t={}){super(),this.vert=t.vert??`precision highp float;
|
|
71
71
|
attribute vec2 position;
|
|
72
72
|
uniform mat3 projectionMatrix;
|
|
73
73
|
uniform mat3 modelViewMatrix;
|
|
@@ -78,13 +78,13 @@ void main(void) {
|
|
|
78
78
|
gl_FragColor = tint;
|
|
79
79
|
}`,this.uniforms=new Map(Object.entries(t.uniforms??{projectionMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),modelViewMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),tint:new Float32Array([1,1,1,1])}))}_glProgram(t){return t.getRelated(this,()=>{let e=this.vert,A=this.frag;return A.includes("precision")||(A=`precision mediump float;
|
|
80
80
|
${A}`),e.includes("precision")||(e=`precision mediump float;
|
|
81
|
-
${e}`),t.program.create({vert:e,frag:A})})}activate(t,e){t.program.bind(this._glProgram(t)),(e||this.uniforms.size>0)&&t.program.updateUniforms({...Object.fromEntries(this.uniforms.entries()),...e})}}const
|
|
81
|
+
${e}`),t.program.create({vert:e,frag:A})})}activate(t,e){t.program.bind(this._glProgram(t)),(e||this.uniforms.size>0)&&t.program.updateUniforms({...Object.fromEntries(this.uniforms.entries()),...e})}}const zh=/^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm,Wh=/vec(\d)\((.*)\)/;function qh(r){r=r.trim();const t=r.match(Wh);if(t){const e=Array.from({length:Number(t[1])},()=>0);return t[2].split(",").forEach((A,i)=>{e[i]=Number(A.trim())}),e}return Number(r)}class ui extends Ct{vert=`attribute vec2 position;
|
|
82
82
|
attribute vec2 uv;
|
|
83
83
|
varying vec2 vUv;
|
|
84
84
|
void main() {
|
|
85
85
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
86
86
|
vUv = uv;
|
|
87
|
-
}`;uniforms=new Map([["ratio",0],["from",0],["to",1],["progress",0]]);static RE={getColor:/\sgetColor\s*\(/,getFromColor:/\sgetFromColor\s*\(/,getToColor:/\sgetToColor\s*\(/,transform:/\stransform\s*\(/,transition:/\stransition\s*\(/};has={getColor:!1,getFromColor:!1,getToColor:!1,transform:!1,transition:!1};constructor(t){super();const e=this.has;for(const i in
|
|
87
|
+
}`;uniforms=new Map([["ratio",0],["from",0],["to",1],["progress",0]]);static RE={getColor:/\sgetColor\s*\(/,getFromColor:/\sgetFromColor\s*\(/,getToColor:/\sgetToColor\s*\(/,transform:/\stransform\s*\(/,transition:/\stransition\s*\(/};has={getColor:!1,getFromColor:!1,getToColor:!1,transform:!1,transition:!1};constructor(t){super();const e=this.has;for(const i in ui.RE)e[i]=ui.RE[i].test(t);this.frag=`precision highp float;
|
|
88
88
|
varying vec2 vUv;
|
|
89
89
|
uniform float ratio;
|
|
90
90
|
uniform float progress;
|
|
@@ -97,7 +97,7 @@ vec4 getFromColor(vec2 uv) { return texture2D(from, uv); }
|
|
|
97
97
|
vec4 getToColor(vec2 uv) { return texture2D(to, uv); }`:""}
|
|
98
98
|
${t}${e.transform?`
|
|
99
99
|
void main(void) { gl_FragColor = transform(vUv); }`:e.transition?`
|
|
100
|
-
void main(void) { gl_FragColor = transition(vUv); }`:""}`;const A=t.matchAll(
|
|
100
|
+
void main(void) { gl_FragColor = transition(vUv); }`:""}`;const A=t.matchAll(zh);for(const i of A)i[1]&&i[2]&&i[1].split(",").forEach(s=>{this.uniforms.set(s.trim(),qh(i[2]))})}}class fi extends Ct{static _instance;static get instance(){return this._instance??=new this}constructor(){super({vert:`precision highp float;
|
|
101
101
|
attribute vec2 position;
|
|
102
102
|
attribute vec2 uv;
|
|
103
103
|
uniform mat3 projectionMatrix;
|
|
@@ -111,7 +111,7 @@ uniform sampler2D sampler;
|
|
|
111
111
|
uniform vec4 tint;
|
|
112
112
|
void main(void) {
|
|
113
113
|
gl_FragColor = texture2D(sampler, vUv) * tint;
|
|
114
|
-
}`,uniforms:{sampler:0,projectionMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),modelViewMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),tint:new Float32Array([1,1,1,1])}})}}class gt extends gr{static _instance;static get instance(){return this._instance??=new this}static draw(t,e=pi.instance,A){this.instance.draw(t,e,A)}constructor(){super({vertexAttributes:{position:new le({buffer:new Ye({data:new Float32Array([-1,-1,1,-1,1,1,-1,1]),dynamic:!1}),size:2,normalized:!1,type:"float"}),uv:new le({buffer:new Ye({data:new Float32Array([0,0,1,0,1,1,0,1]),dynamic:!1}),size:2,normalized:!1,type:"float"})},indexBuffer:new UA({data:new Uint16Array([0,1,2,0,2,3]),dynamic:!1})})}}class th extends gr{positionBuffer;uvBuffer;constructor(){const t=new Ye({data:new Float32Array,dynamic:!0}),e=new Ye({data:new Float32Array,dynamic:!0});super({vertexAttributes:{position:new le({buffer:t,size:2,normalized:!1,type:"float"}),uv:new le({buffer:e,size:2,normalized:!1,type:"float"})},indexBuffer:new UA({data:new Uint16Array,dynamic:!0})}),this.positionBuffer=t,this.uvBuffer=e}}var eh=Object.defineProperty,NA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&eh(t,e,i),i};class Dt extends Je{static get EMPTY(){return new this({width:1,height:1,pixels:null})}static get WHITE(){return new this({width:1,height:1,pixels:new Uint8Array([255,255,255,255])})}static get BLACK(){return new this({width:1,height:1,pixels:new Uint8Array([0,0,0,255])})}static get RED(){return new this({width:1,height:1,pixels:new Uint8Array([255,0,0,255])})}static get GREEN(){return new this({width:1,height:1,pixels:new Uint8Array([0,255,0,255])})}static get BLUE(){return new this({width:1,height:1,pixels:new Uint8Array([0,0,255,255])})}_isPowerOfTwo=!1;_needsUpload=!1;get valid(){return!!(this.width&&this.height)}get realWidth(){return Math.round(this.width*this.pixelRatio)}get realHeight(){return Math.round(this.height*this.pixelRatio)}constructor(t){super(),this.source=t,this._updateSize()}_glTextureOptions(t,e){let A=this.wrapMode;return t.version===1&&!this._isPowerOfTwo&&(A="clamp_to_edge"),{value:this.source,target:"texture_2d",location:0,filterMode:this.filterMode,wrapMode:A,...e}}_glTexture(t,e){return t.getRelated(this,()=>t.texture.create(this._glTextureOptions(t,e)))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"width":case"height":this._updatePOT();break;case"source":this._updateSize();break;case"filterMode":case"wrapMode":case"pixelRatio":this.requestUpload();break}}_updatePOT(){this._isPowerOfTwo=ps(this.realWidth)&&ps(this.realHeight),this.requestUpload()}_updateSize(){const t=this.source;"pixels"in t?(this.width=t.width/this.pixelRatio,this.height=t.height/this.pixelRatio):(this.width=Number(t.naturalWidth||t.videoWidth||t.width||0)/this.pixelRatio,this.height=Number(t.naturalHeight||t.videoHeight||t.height||0)/this.pixelRatio),this.requestUpload()}requestUpload(){this._needsUpload=!0}upload(t,e){return this._needsUpload&&this.valid?(this._needsUpload=!1,t.texture.update(this._glTexture(t,e),this._glTextureOptions(t,e)),!0):!1}activate(t,e=0){return this.valid?(t.texture.bind({target:"texture_2d",value:this._glTexture(t,{location:e}),location:e}),this.upload(t,{location:e}),!0):!1}inactivate(t){t.texture.unbind(this._glTexture(t))}free(){Do&&this.source instanceof ImageBitmap&&this.source.close()}}NA([w({protected:!0})],Dt.prototype,"source"),NA([w({fallback:0})],Dt.prototype,"width"),NA([w({fallback:0})],Dt.prototype,"height"),NA([w({fallback:"linear"})],Dt.prototype,"filterMode"),NA([w({fallback:"clamp_to_edge"})],Dt.prototype,"wrapMode"),NA([w({fallback:1})],Dt.prototype,"pixelRatio");class fr extends Je{frames;constructor(t){super();let e;if(Array.isArray(t))e=t;else if(t instanceof Dt)e=[{texture:t,duration:0}];else throw new TypeError("Failed new AnimatedTexture");this.frames=e,this.updateDuration()}updateDuration(){return this.duration=this.frames.reduce((t,e)=>e.duration+t,0),this}free(){this.frames.forEach(t=>{t.texture.free()})}}var Ah=Object.defineProperty,ih=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Ah(t,e,i),i};class Ei extends Dt{constructor(t=document.createElement("canvas")){super(t)}_updateProperty(t,e,A,i){switch(t){case"width":this.source.width=Math.max(1,Math.ceil(e*this.pixelRatio));break;case"height":this.source.height=Math.max(1,Math.ceil(e*this.pixelRatio));break}super._updateProperty(t,e,A,i)}}ih([w({fallback:2})],Ei.prototype,"pixelRatio");class ca extends Dt{static _cached=new Map;static get(t){const e=new ve(t),A=e.toHex();let i=this._cached.get(A);return i||(i=new Dt({width:1,height:1,pixels:new Uint8Array([e.r8,e.g8,e.b8,e.a8])}),this._cached.set(A,i)),i}constructor(t){const e=new ve(t);super({width:1,height:1,pixels:new Uint8Array([e.r8,e.g8,e.b8,e.a8])})}}class dr extends Dt{static test(t){return ci(t)}static linearGradient(t,e,A){e=e||1,A=A||1;const i=document.createElement("canvas");i.width=e,i.height=A;const s=i.getContext("2d");if(!s)throw new Error("Failed to parse linear gradient, get canvas context is null.");let{angle:n=0,stops:o}=t;n-=Math.PI/2;const a=e/2,l=A/2,u=Math.sqrt(e*e+A*A)/2,c=a+u*Math.cos(n+Math.PI),g=l+u*Math.sin(n+Math.PI),f=a+u*Math.cos(n),d=l+u*Math.sin(n),B=s.createLinearGradient(c,g,f,d);o.forEach(F=>{B.addColorStop(F.offset,F.color)}),s.fillStyle=B,s.fillRect(0,0,i.width,i.height);const I=s.getImageData(0,0,i.width,i.height);return{width:I.width,height:I.height,pixels:new Uint8Array(I.data.buffer)}}constructor(t,e,A){super(dr.linearGradient(t,e,A))}}function rh(r){return{autoLoad:!!(r?.autoLoad??!0),useBitmap:!!(r?.useBitmap??!0)&&Bs,crossorigin:r?.crossorigin??null}}class sh extends Dt{bitmap;useBitmap;preserveBitmap=!1;_loadSource;_loadBitmap;constructor(t,e){const A=rh(e);super(t);const i=t.src,s=i.includes(".svg")||i.startsWith("data:image/svg+xml");this.useBitmap=A.useBitmap&&!s,A.autoLoad&&this.load()}async load(){return this._loadSource||(this._loadSource=new Promise(t=>{this._loadSource=void 0;const e=this.source,A=()=>{e.onload=null,e.onerror=null},i=()=>{A(),this.requestUpload(),this.useBitmap?this.genBitmap().finally(()=>t(this)):t(this)},s=n=>{A(),console.warn(`Failed to load ImageTexture, src: ${e.src}`,n),this.emit("error",n),t(this)};e.complete&&e.src?i():(e.onload=i,e.onerror=s)})),this._loadSource}genBitmap(){if(this._loadBitmap)return this._loadBitmap;if(this.bitmap||!Bs)return Promise.resolve(this);const t=this.source,e=!t.crossOrigin||t.crossOrigin==="anonymous";return this._loadBitmap=fetch(t.src,{mode:e?"cors":"no-cors"}).then(A=>A.blob()).then(A=>createImageBitmap(A,0,0,t.width,t.height,{premultiplyAlpha:"premultiply"})).then(A=>(this.bitmap=A,this.requestUpload(),this._loadBitmap=void 0,this)).catch(A=>(console.warn("Failed to genBitmap",A),this)),this._loadBitmap}_glTextureOptions(t){return{...super._glTextureOptions(t),value:this.bitmap??this.source}}upload(t){if(this.useBitmap){if(!this.bitmap)return this.genBitmap(),!1}else{const A=this.source;if(di&&A instanceof HTMLImageElement&&(!A.complete||A.naturalWidth===0))return!1}const e=super.upload(t);return this.preserveBitmap&&this.bitmap&&(this.bitmap.close(),this.bitmap=void 0),e}}class Ms extends Dt{constructor(t,e=1,A=1){const i={width:e,height:A,pixels:null};t&&(ArrayBuffer.isView(t)?i.pixels=new Uint8Array(t.buffer):i.pixels=new Uint8Array(t)),super(i)}_updateProperty(t,e,A,i){switch(t){case"width":this.source.width=Math.round(this.width*this.pixelRatio);break;case"height":this.source.height=Math.round(this.height*this.pixelRatio);break;case"pixelRatio":this.source.width=Math.round(this.width*this.pixelRatio),this.source.height=Math.round(this.height*this.pixelRatio);break}super._updateProperty(t,e,A,i)}}var nh=Object.defineProperty,ha=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&nh(t,e,i),i};function oh(r){return{autoLoad:!!(r?.autoLoad??!0),autoPlay:!!(r?.autoPlay??!1),fps:Number(r?.fps??0),crossorigin:r?.crossorigin??null,loop:!!(r?.loop??!1),muted:!!(r?.muted??!1),playsinline:!!(r?.playsinline??!0)}}const Rs=class xu extends Dt{static mimeTypes=new Map(Object.entries({ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"}));get isReady(){return this.source.readyState>2}get isPlaying(){return!this.source.paused&&!this.source.ended&&this.isReady}get duration(){return this.source.duration}get seeking(){return this.source.seeking}get currentTime(){return this.source.currentTime}set currentTime(t){this.source.currentTime=t}_spf=0;_autoPlay=!1;_sourceLoad;_nextTime=0;_connected=!1;_requestId;_resolve;_reject;constructor(t,e){const A=oh(e);if(!xo(t)){typeof t=="string"&&(t=[t]);const i=t[0].src||t[0],s=document.createElement("video");A.autoLoad&&s.setAttribute("preload","auto"),A.playsinline&&(s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline","")),A.muted&&(s.setAttribute("muted",""),s.muted=!0),A.loop&&s.setAttribute("loop",""),A.autoPlay&&s.setAttribute("autoplay",""),Po(s,i,A.crossorigin);for(let n=0;n<t.length;++n){let{src:o,mime:a}=t[n];if(o=o||t[n],o.startsWith("data:"))a=o.slice(5,o.indexOf(";"));else if(!o.startsWith("blob:")){const u=o.split("?").shift().toLowerCase(),c=u.slice(u.lastIndexOf(".")+1);a=a||xu.mimeTypes.get(c)||`video/${c}`}const l=document.createElement("source");l.src=o,a&&(l.type=a),s.appendChild(l)}t=s}super(t),this.fps=A.fps,this._autoPlay=A.autoPlay,A.autoPlay&&this.load(),this._setupAutoUpdate()}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"fps":this._spf=e?Math.floor(1e3/e):0,this._setupAutoUpdate();break;case"autoUpdate":this._setupAutoUpdate();break}}_onPlayStart=()=>{this.valid||this._onCanPlay(),this._setupAutoUpdate()};_onPlayStop=()=>{this._setupAutoUpdate()};_onCanPlay=()=>{const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this._nextTime=0,this._updateSize(),this.requestUpload(),this._nextTime=0,!e&&this._resolve&&(this._resolve(this),this._sourceLoad=void 0,this._resolve=void 0,this._reject=void 0),this.isPlaying?this._onPlayStart():this._autoPlay&&t.play()};_onError=t=>{this.source.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=void 0,this._resolve=void 0)};_onSeeked=()=>{this.autoUpdate&&!this.isPlaying&&(this._nextTime=0,this.requestUpload(),this._nextTime=0)};_setupAutoUpdate(){this.autoUpdate&&this.isPlaying?!this.fps&&this.source.requestVideoFrameCallback?(this._connected&&(Kt.off(this.requestUpload),this._connected=!1,this._nextTime=0),this._requestId===void 0&&(this._requestId=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._requestId!==void 0&&(this.source.cancelVideoFrameCallback(this._requestId),this._requestId=void 0),this._connected||(Kt.on(this.requestUpload),this._connected=!0,this._nextTime=0)):(this._requestId!==void 0&&(this.source.cancelVideoFrameCallback(this._requestId),this._requestId=void 0),this._connected&&(Kt.off(this.requestUpload),this._connected=!1,this._nextTime=0))}_videoFrameRequestCallback=()=>{this.requestUpload(),this._requestId=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)};requestUpload=()=>{const t=Math.floor(Kt.elapsed*this.source.playbackRate);this._nextTime-=t,(!this._spf||this._nextTime<=0)&&(super.requestUpload(),this._nextTime=this._spf||0)};async load(){if(!this._sourceLoad){const t=this.source;(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this.isReady?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._sourceLoad=new Promise((e,A)=>{this.valid?(this._sourceLoad=void 0,e(this)):(this._resolve=e,this._reject=A,t.load())})}return this._sourceLoad}free(){this._setupAutoUpdate();const t=this.source;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load())}};ha([w({protected:!0,fallback:!0})],Rs.prototype,"autoUpdate"),ha([w({protected:!0,fallback:0})],Rs.prototype,"fps");let ga=Rs;class Ps extends Ms{}class fa extends Array{front=[];back=[];get internal(){return[...this.front,...this,...this.back]}constructor(...t){super(),this.set(t)}set(t){return this.front.length=0,this.length=0,this.back.length=0,t.forEach(e=>{switch(e.internalMode){case"front":this.front.push(e);break;case"default":this.push(e);break;case"back":this.back.push(e);break}}),this}getInternal(t){switch(t){case"front":return this.front;case"default":return this;case"back":return this.back;default:throw new Error(`Unknown internal mode: ${t}`)}}toJSON(){return[...this]}}var ah=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,AA=(r,t,e,A)=>{for(var i=A>1?void 0:A?lh(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ah(t,e,i),i};const da={};function uh(r){let t=da[r]??0;return t++,da[r]=t,t}h.Node=class extends tA{meta={};_readyed=!1;constructor(t,e=[]){super(),this._onTreeEnter=this._onTreeEnter.bind(this),this._onTreeExit=this._onTreeExit.bind(this),this._onParented=this._onParented.bind(this),this._onUnparented=this._onUnparented.bind(this),this._onReady=this._onReady.bind(this),this._onProcess=this._onProcess.bind(this),this.setProperties({name:`${this.is}:${uh(this.is)}`,...t}).append(e),this.on("treeEnter",this._onTreeEnter).on("treeExit",this._onTreeExit).on("parented",this._onParented).on("unparented",this._onUnparented).on("ready",this._onReady).on("process",this._onProcess)}setProperties(t){if(t){const{meta:e,...A}=t;if(e)for(const i in e)this.meta[i]=e[i];super.setProperties(A)}return this}getName(){return this.name}setName(t){return this.name=t,this}_tree;get tree(){return this.getTree()}set tree(t){this.setTree(t)}getTree(){return this._tree}getViewport(){return this._tree?.getCurrentViewport()}getWindow(){return this._tree?.root}isInsideTree(){return!!this._tree}setTree(t){const e=this._tree;if(!t?.equal(e)){e&&this.emit("treeExit",e),this._tree=t,t&&this.emit("treeEnter",t);const A=this._children.internal;for(let i=A.length,s=0;s<i;s++){const n=A[s];!t&&this.emit("childExitingTree",n),n.setTree(t),t&&this.emit("childEnteredTree",n)}t&&(this.emit("treePostEnter",t),this._readyed||(this._readyed=!0,this.emit("ready")))}return this}log(...t){this._tree?.log(...t)}_parent;get parent(){return this._parent}set parent(t){this.setParent(t)}hasParent(){return!!this._parent}getParent(){return this._parent}setParent(t){if(!this._parent?.equal(t)){const e=this._parent;e&&this.emit("unparented",e),this._parent=t,t&&this.emit("parented",t),this.setTree(t?._tree)}return this}_children=new fa;get children(){return this._children}set children(t){t instanceof fa?this._children=t:this._children.set(t)}getChild(t=0){return this._children[t]}get siblingIndex(){return this.getIndex()}set siblingIndex(t){this._parent?.moveChild(this,t)}get previousSibling(){return this._parent?.children[this.getIndex()-1]}get nextSibling(){return this._parent?.children[this.getIndex()+1]}get firstSibling(){return this._parent?.children[0]}get lastSibling(){const t=this._parent?.children;return t?t[t.length-1]:void 0}canProcess(){if(!this._tree)return!1;switch(this.processMode){case"inherit":return this._parent?.canProcess()??!0;case"pausable":return!this._tree.processPaused;case"when_paused":return this._tree.processPaused;case"always":return!0;case"disabled":default:return!1}}canRender(){if(!this._tree)return!1;switch(this.renderMode){case"inherit":return this._parent?.canRender()??!0;case"always":return!0;case"disabled":default:return!1}}_update(t){super._update(t)}_updateProperty(t,e,A,i){super._updateProperty(t,e,A,i)}_onTreeEnter(t){this._treeEnter(t),this.emit("treeEntered",t)}_onTreeExit(t){this.emit("treeExiting",t),this._treeExit(t),this.emit("treeExited",t)}_onParented(t){this._parented(t)}_onUnparented(t){this._unparented(t)}_onReady(){this._ready()}_onProcess(t=0){const e=this._tree,A=this.canRender(),i=this.canProcess(),s=[],n=[];this._children.internal.forEach(a=>{switch(a.processSortMode){case"default":n.push(a);break;case"parent_before":s.push(a);break}}),s.forEach(a=>{a.emit("process",t)}),i&&(e?.emit("nodeProcessing",this),this.emit("processing",t),this._process(t));let o;if(A){const a=e.renderStack.push(this);o=e.renderStack.currentCall,e.renderStack.currentCall=a}if(this.mask instanceof h.Node)this.getNode("__$mask")||(this.mask.processMode="disabled",this.appendChild(this.mask,"front"));else{const a=this.getNode("__$mask");a&&this.removeChild(a)}n.forEach(a=>{a.emit("process",t)}),A&&(e.renderStack.currentCall=o),i&&(this.emit("processed",t),e?.emit("nodeProcessed",this))}render(t,e){const A=this.mask;A&&(t.flush(),t.mask.push(this,A)),this._render(t),e?.(),A&&(t.flush(),t.mask.pop(this))}input(t,e){const A=this._children.internal;for(let i=A.length-1;i>=0;i--)A[i].input(t,e);this._input(t,e)}getIndex(){return this._parent?.children.getInternal(this.internalMode).indexOf(this)??0}getNode(t){return this._children.internal.find(e=>e.name===t)}removeNode(t){this.getNode(t)?.remove()}addSibling(t){return this.equal(t)||!this.hasParent()||t.hasParent()?this:(t.internalMode=this.internalMode,this._parent.moveChild(t,this.getIndex()+1),this)}prepend(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this.moveChild(A,0)})}append(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this.appendChild(A)})}before(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this._parent?.moveChild(A,this.getIndex())})}after(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this._parent?.moveChild(A,this.getIndex()+1)})}insertBefore(t,e){return!e.hasParent()||!this.equal(e.parent)||this.moveChild(t,e.getIndex()),t}appendChild(t,e=t.internalMode){if(this.equal(t)||t.hasParent())return t;switch(e){case"front":this._children.front.push(t);break;case"default":this._children.push(t);break;case"back":this._children.back.push(t);break}return t.internalMode!==e&&(t.internalMode=e),t.setParent(this),this.emit("appendChild",t),t}moveChild(t,e,A=t.internalMode){if(this.equal(t)||t.hasParent()&&!this.equal(t.parent))return this;const i=this._children.getInternal(t.internalMode),s=i.indexOf(t),n=this._children.getInternal(A);return(t.internalMode!==A||e!==s)&&(s>-1&&i.splice(s,1),t.setParent(this),e>-1&&e<n.length?n.splice(e,0,t):n.push(t),s>-1?this.emit("moveChild",t,e,s):this.emit("appendChild",t)),t.internalMode!==A&&(t.internalMode=A),this}removeChild(t){const e=t.getIndex();return this.equal(t.parent)&&e>-1&&(this._children.getInternal(t.internalMode).splice(e,1),t.setParent(void 0),this.emit("removeChild",t,e)),t}removeChildren(){this._children.forEach(t=>this.removeChild(t))}remove(){this._parent?.removeChild(this)}forEachChild(t){return this._children.forEach(t),this}forEachDescendant(t){return this._children.forEach(e=>{t(e),e.forEachDescendant(t)}),this}forEachAncestor(t){const e=this.parent;return e&&(t(e),e.forEachAncestor(t)),this}_ready(){}_treeEnter(t){}_treeExit(t){}_parented(t){}_unparented(t){}_process(t){}_input(t,e){}_render(t){}clone(){return new this.constructor(this.toJSON(),this._children.internal)}toJSON(){return ui({...super.toJSON(),is:this.is,children:this._children.length?[...this._children.map(t=>t.toJSON())]:void 0,meta:Object.keys(this.meta).length?{...this.meta}:void 0})}static parse(t){if(Array.isArray(t))return t.map(o=>this.parse(o));const{is:e,props:A,children:i}=t,s=lr.get(e)??h.Node,n=new s(A);return i?.forEach(o=>n.appendChild(this.parse(o))),n}},AA([w({fallback:Io()})],h.Node.prototype,"id",2),AA([w({fallback:Io()})],h.Node.prototype,"name",2),AA([w({fallback:"inherit"})],h.Node.prototype,"processMode",2),AA([w({fallback:"default"})],h.Node.prototype,"processSortMode",2),AA([w({fallback:"inherit"})],h.Node.prototype,"renderMode",2),AA([w({fallback:"default"})],h.Node.prototype,"internalMode",2),AA([w({protected:!0})],h.Node.prototype,"mask",2),h.Node=AA([st("Node")],h.Node);var ch=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Bi=(r,t,e,A)=>{for(var i=A>1?void 0:A?hh(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ch(t,e,i),i};h.TimelineNode=class extends h.Node{constructor(t,e=[]){super(),this.setProperties(t).append(e)}computedDuration=0;_currentTime=0;_startTime=0;get timeline(){return this._tree?.timeline}get timelineCurrentTime(){return this.timeline?.currentTime??0}get parentStartTime(){return this._parent?.startTime??0}get currentTime(){return Ke(0,this._currentTime,this.computedDuration)}get startTime(){return this._startTime}set startTime(t){this.delay=t-this.parentStartTime,this._updateCurrentTime(!0)}get endTime(){return this._startTime+this.computedDuration}get currentTimeProgress(){return this.computedDuration?Ke(0,this._currentTime/this.computedDuration,1):0}isInsideTimeRange(){const t=this._currentTime;return this.computedDuration?t>=0&&t<=this.computedDuration:t>=0}_updateCurrentTime(t=!1){if(t||!this.paused){const e=this._parent;this._startTime=this.delay+this.parentStartTime,this.computedDuration=e?.computedDuration?Math.min(this._startTime+this.duration,e.endTime)-this._startTime:this.duration,this._currentTime=this.timelineCurrentTime-this._startTime,this.emit("updateCurrentTime",this._currentTime),this.insideTimeRange=this.isInsideTimeRange()}}_process(t){super._process(t),this._updateCurrentTime()}},Bi([w({fallback:0})],h.TimelineNode.prototype,"delay",2),Bi([w({fallback:0})],h.TimelineNode.prototype,"duration",2),Bi([w({fallback:!1})],h.TimelineNode.prototype,"paused",2),Bi([w({protected:!0,fallback:!1})],h.TimelineNode.prototype,"insideTimeRange",2),h.TimelineNode=Bi([st("TimelineNode")],h.TimelineNode);var gh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,Ci=(r,t,e,A)=>{for(var i=A>1?void 0:A?fh(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&gh(t,e,i),i};h.Viewport=class extends h.Node{constructor(t=!1){super(),this.flipY=t,this._projection.flipY(t)}_projection=new Ho;_framebufferIndex=0;_framebuffers=[{texture:new Ps,needsUpload:!1},{texture:new Ps,needsUpload:!1}];get valid(){return!!(this.width&&this.height)}get framebuffer(){return this._framebuffers[this._framebufferIndex]}get texture(){return this.framebuffer.texture}_glFramebufferOptions(t){const{width:e,height:A}=this,{pixelRatio:i}=t;return this._framebuffers.forEach(s=>{const n=s.texture;n.width=e,n.height=A,n.pixelRatio=i,n.upload(t)}),{width:e,height:A,colorTextures:[this.texture._glTexture(t)]}}_glFramebuffer(t){return t.getRelated(this.framebuffer,()=>t.framebuffer.create(this._glFramebufferOptions(t)))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"x":case"y":this.requestUpload(),this._projection.translate(this.x,this.y),this.emit("updateRect");break;case"width":case"height":this.requestUpload(),this._projection.resize(this.width,this.height),this.emit("updateRect");break}}requestUpload(){this._framebuffers.forEach(t=>t.needsUpload=!0)}resize(t,e){this.width=t,this.height=e}upload(t){const e=this.framebuffer;return e.needsUpload&&this.valid?(e.needsUpload=!1,t.framebuffer.update(this._glFramebuffer(t),this._glFramebufferOptions(t)),!0):!1}activate(t){return this.valid?(t.flush(),this._tree?.setCurrentViewport(this),this.upload(t),t.framebuffer.bind(this._glFramebuffer(t)),!0):!1}redraw(t,e){if(this.valid){t.flush();const A=this.framebuffer.texture;return this._framebufferIndex=(this._framebufferIndex+1)%this._framebuffers.length,this.activate(t),t.clear(),A.activate(t,0),e(),!0}return!1}activateWithCopy(t,e){this.resize(e.width,e.height),this.activate(t)&&(t.clear(),e.texture.activate(t,0),gt.draw(t,pi.instance,{sampler:0}))}render(t,e){const A=this._tree?.getCurrentViewport();this.activate(t),t.clear(),super.render(t,e),t.flush(),A?A.activate(t):(t.framebuffer.bind(null),this._tree?.setCurrentViewport(void 0))}getRect(){return new xs(this.x,this.y,this.width,this.height)}toProjectionArray(t=!1){return this._projection.toArray(t)}},Ci([w({fallback:0})],h.Viewport.prototype,"x",2),Ci([w({fallback:0})],h.Viewport.prototype,"y",2),Ci([w({fallback:0})],h.Viewport.prototype,"width",2),Ci([w({fallback:0})],h.Viewport.prototype,"height",2),h.Viewport=Ci([st("Viewport")],h.Viewport);var dh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Qi=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ih(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&dh(t,e,i),i};h.Effect=class extends h.TimelineNode{material;get _effectMode(){return this.effectMode??"parent"}viewport1=new h.Viewport;viewport2=new h.Viewport;_renderId=0;_renderViewport;_previousSibling;_nextSibling;constructor(t,e=[]){super(),this._onProcessing=this._onProcessing.bind(this),this._onNodeProcessed=this._onNodeProcessed.bind(this),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"glsl":{const s=new Ii(e);!this.effectMode&&s.has.transition&&(this.effectMode="transition"),this.material=s;break}case"glslSrc":{e?Ne.text.load(e).then(s=>this.glsl=s):this.glsl="";break}}}_treeEnter(t){t.on("processing",this._onProcessing),t.on("nodeProcessed",this._onNodeProcessed),this.viewport1.setTree(t),this.viewport2.setTree(t)}_treeExit(t){t.off("processing",this._onProcessing),t.off("nodeProcessed",this._onNodeProcessed),this.viewport1.setTree(void 0),this.viewport2.setTree(void 0)}_onProcessing(){if(this.canProcess())switch(this._updateCurrentTime(),this._effectMode){case"transition":this._previousSibling=this.previousSibling,this._nextSibling=this.nextSibling;break;default:this._previousSibling=void 0,this._nextSibling=void 0;break}}_onNodeProcessed(t){if(!this.canProcess()||!this.isInsideTimeRange())return;const e=this._tree?.renderStack;if(e)switch(this._effectMode){case"transition":t.equal(this._previousSibling)?(this._previousSibling=void 0,e.push(this)):t.equal(this._nextSibling)&&(this._nextSibling=void 0,e.push(this));break}}_processParent(){const t=this._tree?.renderStack;if(!t)return;const e=t.currentCall?.parentCall;if(!e)return;const A=e.calls;let i,s;A.forEach((n,o)=>{(n.renderable.equal(this._parent)||n.renderable.parent?.equal(this._parent))&&(i=i??o,s=o)}),!(i===void 0||s===void 0)&&(A.splice(s+1,0,t.createCall(this)),A.splice(i,0,t.createCall(this)))}_processChildren(){this._children.length&&(super.emit("process"),this._tree?.renderStack.push(this))}_onProcess(t=0){if(this.canProcess())switch(this._renderId=0,this._effectMode){case"before":super._onProcess(t);break;case"parent":this._processParent();break;case"children":this._processChildren();break}}_renderBefore(t){const e=this._tree?.getCurrentViewport();e&&this.apply(t,e,{redraw:!0})}_renderTransition(t){if(this._renderId%2===0)this._renderViewport=this._tree?.getCurrentViewport(),this._renderViewport&&(this.viewport1.activateWithCopy(t,this._renderViewport),this.viewport2.resize(this._renderViewport.width,this._renderViewport.height)),this.viewport2.activate(t),t.clear();else{const e=this._renderViewport;this._renderViewport=void 0,e&&(e.activate(t),t.clear(),this.viewport1.texture.activate(t,0),this.viewport2.texture.activate(t,1),this.apply(t,e,{from:this.viewport1,to:this.viewport2}),t.texture.unbind(0),t.texture.unbind(1))}}_renderParentOrChildren(t){if(this._renderId%2===0)this._renderViewport=this._tree?.getCurrentViewport(),this._renderViewport&&this.viewport1.resize(this._renderViewport.width,this._renderViewport.height),this.viewport1.activate(t),t.clear();else{const e=this._renderViewport;this._renderViewport=void 0,e&&(this.viewport1.activate(t),this.apply(t,this.viewport1,{redraw:!0,target:this._effectMode==="parent"?this._parent??void 0:void 0,targetArea:this._parseTargetArea()}),e.activate(t),this.viewport1.texture.activate(t,0),gt.draw(t))}}_parseTargetArea(){if(this._effectMode==="parent"&&this._parent&&"getRect"in this._parent){const t=this._parent.getRect();if(t)return[t.left/this.viewport1.width,t.top/this.viewport1.height,t.width/this.viewport1.width,t.height/this.viewport1.height]}}_render(t){switch(this._effectMode){case"before":this._renderBefore(t);break;case"transition":this._renderTransition(t);break;case"parent":case"children":default:this._renderParentOrChildren(t);break}this._renderId++}apply(t,e,A){this.material&&(A?.redraw?e.redraw(t,()=>{gt.draw(t,this.material,{from:0,to:1,progress:this.currentTimeProgress,ratio:e.width/e.height})}):gt.draw(t,this.material,{from:0,to:1,progress:this.currentTimeProgress,ratio:A?.from?A.from.width/A.from.height:0}))}},Qi([w({protected:!0})],h.Effect.prototype,"material",2),Qi([w()],h.Effect.prototype,"effectMode",2),Qi([w()],h.Effect.prototype,"glsl",2),Qi([w()],h.Effect.prototype,"glslSrc",2),h.Effect=Qi([st("Effect")],h.Effect);var Ia=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Eh=(r,t,e)=>t in r?Ia(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ve=(r,t,e,A)=>{for(var i=A>1?void 0:A?ph(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Ia(t,e,i),i},Bh=(r,t,e)=>Eh(r,t+"",e);h.ColorAdjustEffect=class extends h.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){e.redraw(t,()=>{gt.draw(t,h.ColorAdjustEffect.material,{sampler:0,saturation:this.saturation,contrast:this.contrast,brightness:this.brightness,red:this.red,green:this.green,blue:this.blue,alpha:this.alpha,gamma:Math.max(this.gamma??1,1e-4)})})}},Bh(h.ColorAdjustEffect,"material",new Ct({vert:`precision mediump float;
|
|
114
|
+
}`,uniforms:{sampler:0,projectionMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),modelViewMatrix:new Float32Array([1,0,0,0,1,0,0,0,1]),tint:new Float32Array([1,1,1,1])}})}}class ut extends cr{static _instance;static get instance(){return this._instance??=new this}static draw(t,e=fi.instance,A){this.instance.draw(t,e,A)}constructor(){super({vertexAttributes:{position:new le({buffer:new Ke({data:new Float32Array([-1,-1,1,-1,1,1,-1,1]),dynamic:!1}),size:2,normalized:!1,type:"float"}),uv:new le({buffer:new Ke({data:new Float32Array([0,0,1,0,1,1,0,1]),dynamic:!1}),size:2,normalized:!1,type:"float"})},indexBuffer:new PA({data:new Uint16Array([0,1,2,0,2,3]),dynamic:!1})})}}class Xh extends cr{positionBuffer;uvBuffer;constructor(){const t=new Ke({data:new Float32Array,dynamic:!0}),e=new Ke({data:new Float32Array,dynamic:!0});super({vertexAttributes:{position:new le({buffer:t,size:2,normalized:!1,type:"float"}),uv:new le({buffer:e,size:2,normalized:!1,type:"float"})},indexBuffer:new PA({data:new Uint16Array,dynamic:!0})}),this.positionBuffer=t,this.uvBuffer=e}}var jh=Object.defineProperty,UA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&jh(t,e,i),i};class mt extends He{static get EMPTY(){return new this({width:1,height:1,pixels:null})}static get WHITE(){return new this({width:1,height:1,pixels:new Uint8Array([255,255,255,255])})}static get BLACK(){return new this({width:1,height:1,pixels:new Uint8Array([0,0,0,255])})}static get RED(){return new this({width:1,height:1,pixels:new Uint8Array([255,0,0,255])})}static get GREEN(){return new this({width:1,height:1,pixels:new Uint8Array([0,255,0,255])})}static get BLUE(){return new this({width:1,height:1,pixels:new Uint8Array([0,0,255,255])})}_isPowerOfTwo=!1;_needsUpload=!1;get valid(){return!!(this.width&&this.height)}get realWidth(){return Math.round(this.width*this.pixelRatio)}get realHeight(){return Math.round(this.height*this.pixelRatio)}constructor(t){super(),this.source=t,this._updateSize()}_glTextureOptions(t,e){let A=this.wrapMode;return t.version===1&&!this._isPowerOfTwo&&(A="clamp_to_edge"),{value:this.source,target:"texture_2d",location:0,filterMode:this.filterMode,wrapMode:A,...e}}_glTexture(t,e){return t.getRelated(this,()=>t.texture.create(this._glTextureOptions(t,e)))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"width":case"height":this._updatePOT();break;case"source":this._updateSize();break;case"filterMode":case"wrapMode":case"pixelRatio":this.requestUpload();break}}_updatePOT(){this._isPowerOfTwo=fs(this.realWidth)&&fs(this.realHeight),this.requestUpload()}_updateSize(){const t=this.source;"pixels"in t?(this.width=t.width/this.pixelRatio,this.height=t.height/this.pixelRatio):(this.width=Number(t.naturalWidth||t.videoWidth||t.width||0)/this.pixelRatio,this.height=Number(t.naturalHeight||t.videoHeight||t.height||0)/this.pixelRatio),this.requestUpload()}requestUpload(){this._needsUpload=!0}upload(t,e){return this._needsUpload&&this.valid?(this._needsUpload=!1,t.texture.update(this._glTexture(t,e),this._glTextureOptions(t,e)),!0):!1}activate(t,e=0){return this.valid?(t.texture.bind({target:"texture_2d",value:this._glTexture(t,{location:e}),location:e}),this.upload(t,{location:e}),!0):!1}inactivate(t){t.texture.unbind(this._glTexture(t))}free(){Bo&&this.source instanceof ImageBitmap&&this.source.close()}}UA([v({protected:!0})],mt.prototype,"source"),UA([v({fallback:0})],mt.prototype,"width"),UA([v({fallback:0})],mt.prototype,"height"),UA([v({fallback:"linear"})],mt.prototype,"filterMode"),UA([v({fallback:"clamp_to_edge"})],mt.prototype,"wrapMode"),UA([v({fallback:1})],mt.prototype,"pixelRatio");class hr extends He{frames;constructor(t){super();let e;if(Array.isArray(t))e=t;else if(t instanceof mt)e=[{texture:t,duration:0}];else throw new TypeError("Failed new AnimatedTexture");this.frames=e,this.updateDuration()}updateDuration(){return this.duration=this.frames.reduce((t,e)=>e.duration+t,0),this}free(){this.frames.forEach(t=>{t.texture.free()})}}var Zh=Object.defineProperty,$h=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Zh(t,e,i),i};class di extends mt{constructor(t=document.createElement("canvas")){super(t)}_updateProperty(t,e,A,i){switch(t){case"width":this.source.width=Math.max(1,Math.ceil(e*this.pixelRatio));break;case"height":this.source.height=Math.max(1,Math.ceil(e*this.pixelRatio));break}super._updateProperty(t,e,A,i)}}$h([v({fallback:2})],di.prototype,"pixelRatio");class oa extends mt{static _cached=new Map;static get(t){const e=new _e(t),A=e.toHex();let i=this._cached.get(A);return i||(i=new mt({width:1,height:1,pixels:new Uint8Array([e.r8,e.g8,e.b8,e.a8])}),this._cached.set(A,i)),i}constructor(t){const e=new _e(t);super({width:1,height:1,pixels:new Uint8Array([e.r8,e.g8,e.b8,e.a8])})}}class gr extends mt{static test(t){return li(t)}static linearGradient(t,e,A){e=e||1,A=A||1;const i=document.createElement("canvas");i.width=e,i.height=A;const s=i.getContext("2d");if(!s)throw new Error("Failed to parse linear gradient, get canvas context is null.");let{angle:n=0,stops:o}=t;n-=Math.PI/2;const a=e/2,l=A/2,c=Math.sqrt(e*e+A*A)/2,h=a+c*Math.cos(n+Math.PI),u=l+c*Math.sin(n+Math.PI),d=a+c*Math.cos(n),f=l+c*Math.sin(n),B=s.createLinearGradient(h,u,d,f);o.forEach(S=>{B.addColorStop(S.offset,S.color)}),s.fillStyle=B,s.fillRect(0,0,i.width,i.height);const p=s.getImageData(0,0,i.width,i.height);return{width:p.width,height:p.height,pixels:new Uint8Array(p.data.buffer)}}constructor(t,e,A){super(gr.linearGradient(t,e,A))}}function tg(r){return{autoLoad:!!(r?.autoLoad??!0),useBitmap:!!(r?.useBitmap??!0)&&Is,crossorigin:r?.crossorigin??null}}class eg extends mt{bitmap;useBitmap;preserveBitmap=!1;_loadSource;_loadBitmap;constructor(t,e){const A=tg(e);super(t);const i=t.src,s=i.includes(".svg")||i.startsWith("data:image/svg+xml");this.useBitmap=A.useBitmap&&!s,A.autoLoad&&this.load()}async load(){return this._loadSource||(this._loadSource=new Promise(t=>{this._loadSource=void 0;const e=this.source,A=()=>{e.onload=null,e.onerror=null},i=()=>{A(),this.requestUpload(),this.useBitmap?this.genBitmap().finally(()=>t(this)):t(this)},s=n=>{A(),console.warn(`Failed to load ImageTexture, src: ${e.src}`,n),this.emit("error",n),t(this)};e.complete&&e.src?i():(e.onload=i,e.onerror=s)})),this._loadSource}genBitmap(){if(this._loadBitmap)return this._loadBitmap;if(this.bitmap||!Is)return Promise.resolve(this);const t=this.source,e=!t.crossOrigin||t.crossOrigin==="anonymous";return this._loadBitmap=fetch(t.src,{mode:e?"cors":"no-cors"}).then(A=>A.blob()).then(A=>createImageBitmap(A,0,0,t.width,t.height,{premultiplyAlpha:"premultiply"})).then(A=>(this.bitmap=A,this.requestUpload(),this._loadBitmap=void 0,this)).catch(A=>(console.warn("Failed to genBitmap",A),this)),this._loadBitmap}_glTextureOptions(t){return{...super._glTextureOptions(t),value:this.bitmap??this.source}}upload(t){if(this.useBitmap){if(!this.bitmap)return this.genBitmap(),!1}else{const A=this.source;if(gi&&A instanceof HTMLImageElement&&(!A.complete||A.naturalWidth===0))return!1}const e=super.upload(t);return this.preserveBitmap&&this.bitmap&&(this.bitmap.close(),this.bitmap=void 0),e}}class xs extends mt{constructor(t,e=1,A=1){const i={width:e,height:A,pixels:null};t&&(ArrayBuffer.isView(t)?i.pixels=new Uint8Array(t.buffer):i.pixels=new Uint8Array(t)),super(i)}_updateProperty(t,e,A,i){switch(t){case"width":this.source.width=Math.round(this.width*this.pixelRatio);break;case"height":this.source.height=Math.round(this.height*this.pixelRatio);break;case"pixelRatio":this.source.width=Math.round(this.width*this.pixelRatio),this.source.height=Math.round(this.height*this.pixelRatio);break}super._updateProperty(t,e,A,i)}}var Ag=Object.defineProperty,aa=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Ag(t,e,i),i};function ig(r){return{autoLoad:!!(r?.autoLoad??!0),autoPlay:!!(r?.autoPlay??!1),fps:Number(r?.fps??0),crossorigin:r?.crossorigin??null,loop:!!(r?.loop??!1),muted:!!(r?.muted??!1),playsinline:!!(r?.playsinline??!0)}}const Ss=class wc extends mt{static mimeTypes=new Map(Object.entries({ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"}));get isReady(){return this.source.readyState>2}get isPlaying(){return!this.source.paused&&!this.source.ended&&this.isReady}get duration(){return this.source.duration}get seeking(){return this.source.seeking}get currentTime(){return this.source.currentTime}set currentTime(t){this.source.currentTime=t}_spf=0;_autoPlay=!1;_sourceLoad;_nextTime=0;_connected=!1;_requestId;_resolve;_reject;constructor(t,e){const A=ig(e);if(!vo(t)){typeof t=="string"&&(t=[t]);const i=t[0].src||t[0],s=document.createElement("video");A.autoLoad&&s.setAttribute("preload","auto"),A.playsinline&&(s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline","")),A.muted&&(s.setAttribute("muted",""),s.muted=!0),A.loop&&s.setAttribute("loop",""),A.autoPlay&&s.setAttribute("autoplay",""),So(s,i,A.crossorigin);for(let n=0;n<t.length;++n){let{src:o,mime:a}=t[n];if(o=o||t[n],o.startsWith("data:"))a=o.slice(5,o.indexOf(";"));else if(!o.startsWith("blob:")){const c=o.split("?").shift().toLowerCase(),h=c.slice(c.lastIndexOf(".")+1);a=a||wc.mimeTypes.get(h)||`video/${h}`}const l=document.createElement("source");l.src=o,a&&(l.type=a),s.appendChild(l)}t=s}super(t),this.fps=A.fps,this._autoPlay=A.autoPlay,A.autoPlay&&this.load(),this._setupAutoUpdate()}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"fps":this._spf=e?Math.floor(1e3/e):0,this._setupAutoUpdate();break;case"autoUpdate":this._setupAutoUpdate();break}}_onPlayStart=()=>{this.valid||this._onCanPlay(),this._setupAutoUpdate()};_onPlayStop=()=>{this._setupAutoUpdate()};_onCanPlay=()=>{const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this._nextTime=0,this._updateSize(),this.requestUpload(),this._nextTime=0,!e&&this._resolve&&(this._resolve(this),this._sourceLoad=void 0,this._resolve=void 0,this._reject=void 0),this.isPlaying?this._onPlayStart():this._autoPlay&&t.play()};_onError=t=>{this.source.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=void 0,this._resolve=void 0)};_onSeeked=()=>{this.autoUpdate&&!this.isPlaying&&(this._nextTime=0,this.requestUpload(),this._nextTime=0)};_setupAutoUpdate(){this.autoUpdate&&this.isPlaying?!this.fps&&this.source.requestVideoFrameCallback?(this._connected&&(Kt.off(this.requestUpload),this._connected=!1,this._nextTime=0),this._requestId===void 0&&(this._requestId=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._requestId!==void 0&&(this.source.cancelVideoFrameCallback(this._requestId),this._requestId=void 0),this._connected||(Kt.on(this.requestUpload),this._connected=!0,this._nextTime=0)):(this._requestId!==void 0&&(this.source.cancelVideoFrameCallback(this._requestId),this._requestId=void 0),this._connected&&(Kt.off(this.requestUpload),this._connected=!1,this._nextTime=0))}_videoFrameRequestCallback=()=>{this.requestUpload(),this._requestId=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)};requestUpload=()=>{const t=Math.floor(Kt.elapsed*this.source.playbackRate);this._nextTime-=t,(!this._spf||this._nextTime<=0)&&(super.requestUpload(),this._nextTime=this._spf||0)};async load(){if(!this._sourceLoad){const t=this.source;(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this.isReady?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._sourceLoad=new Promise((e,A)=>{this.valid?(this._sourceLoad=void 0,e(this)):(this._resolve=e,this._reject=A,t.load())})}return this._sourceLoad}free(){this._setupAutoUpdate();const t=this.source;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load())}};aa([v({protected:!0,fallback:!0})],Ss.prototype,"autoUpdate"),aa([v({protected:!0,fallback:0})],Ss.prototype,"fps");let la=Ss;class Ms extends xs{}class ca extends Array{front=[];back=[];get internal(){return[...this.front,...this,...this.back]}constructor(...t){super(),this.set(t)}set(t){return this.front.length=0,this.length=0,this.back.length=0,t.forEach(e=>{switch(e.internalMode){case"front":this.front.push(e);break;case"default":this.push(e);break;case"back":this.back.push(e);break}}),this}getInternal(t){switch(t){case"front":return this.front;case"default":return this;case"back":return this.back;default:throw new Error(`Unknown internal mode: ${t}`)}}toJSON(){return[...this]}}var rg=Object.defineProperty,sg=Object.getOwnPropertyDescriptor,AA=(r,t,e,A)=>{for(var i=A>1?void 0:A?sg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&rg(t,e,i),i};const ha={};function ng(r){let t=ha[r]??0;return t++,ha[r]=t,t}g.Node=class extends tA{meta={};_readyed=!1;constructor(t,e=[]){super(),this._onTreeEnter=this._onTreeEnter.bind(this),this._onTreeExit=this._onTreeExit.bind(this),this._onParented=this._onParented.bind(this),this._onUnparented=this._onUnparented.bind(this),this._onReady=this._onReady.bind(this),this._onProcess=this._onProcess.bind(this),this.setProperties({name:`${this.is}:${ng(this.is)}`,...t}).append(e),this.on("treeEnter",this._onTreeEnter).on("treeExit",this._onTreeExit).on("parented",this._onParented).on("unparented",this._onUnparented).on("ready",this._onReady).on("process",this._onProcess)}setProperties(t){if(t){const{meta:e,...A}=t;if(e)for(const i in e)this.meta[i]=e[i];super.setProperties(A)}return this}getName(){return this.name}setName(t){return this.name=t,this}_tree;get tree(){return this.getTree()}set tree(t){this.setTree(t)}getTree(){return this._tree}getViewport(){return this._tree?.getCurrentViewport()}getWindow(){return this._tree?.root}isInsideTree(){return!!this._tree}setTree(t){const e=this._tree;if(!t?.equal(e)){e&&this.emit("treeExit",e),this._tree=t,t&&this.emit("treeEnter",t);const A=this._children.internal;for(let i=A.length,s=0;s<i;s++){const n=A[s];!t&&this.emit("childExitingTree",n),n.setTree(t),t&&this.emit("childEnteredTree",n)}t&&(this.emit("treePostEnter",t),this._readyed||(this._readyed=!0,this.emit("ready")))}return this}log(...t){this._tree?.log(...t)}_parent;get parent(){return this._parent}set parent(t){this.setParent(t)}hasParent(){return!!this._parent}getParent(){return this._parent}setParent(t){if(!this._parent?.equal(t)){const e=this._parent;e&&this.emit("unparented",e),this._parent=t,t&&this.emit("parented",t),this.setTree(t?._tree)}return this}_children=new ca;get children(){return this._children}set children(t){t instanceof ca?this._children=t:this._children.set(t)}getChild(t=0){return this._children[t]}get siblingIndex(){return this.getIndex()}set siblingIndex(t){this._parent?.moveChild(this,t)}get previousSibling(){return this._parent?.children[this.getIndex()-1]}get nextSibling(){return this._parent?.children[this.getIndex()+1]}get firstSibling(){return this._parent?.children[0]}get lastSibling(){const t=this._parent?.children;return t?t[t.length-1]:void 0}canProcess(){if(!this._tree)return!1;switch(this.processMode){case"inherit":return this._parent?.canProcess()??!0;case"pausable":return!this._tree.processPaused;case"when_paused":return this._tree.processPaused;case"always":return!0;case"disabled":default:return!1}}canRender(){if(!this._tree)return!1;switch(this.renderMode){case"inherit":return this._parent?.canRender()??!0;case"always":return!0;case"disabled":default:return!1}}_updateProperty(t,e,A,i){super._updateProperty(t,e,A,i)}_onTreeEnter(t){this._treeEnter(t),this.emit("treeEntered",t)}_onTreeExit(t){this.emit("treeExiting",t),this._treeExit(t),this.emit("treeExited",t)}_onParented(t){this._parented(t)}_onUnparented(t){this._unparented(t)}_onReady(){this._ready()}_onProcess(t=0){const e=this._tree,A=this.canRender(),i=this.canProcess(),s=[],n=[];this._children.internal.forEach(a=>{switch(a.processSortMode){case"default":n.push(a);break;case"parent_before":s.push(a);break}}),s.forEach(a=>{a.emit("process",t)}),i&&(e?.emit("nodeProcessing",this),this.emit("processing",t),this._process(t));let o;if(A){const a=e.renderStack.push(this);o=e.renderStack.currentCall,e.renderStack.currentCall=a}if(this.mask instanceof g.Node)this.getNode("__$mask")||(this.mask.processMode="disabled",this.appendChild(this.mask,"front"));else{const a=this.getNode("__$mask");a&&this.removeChild(a)}n.forEach(a=>{a.emit("process",t)}),A&&(e.renderStack.currentCall=o),i&&(this.emit("processed",t),e?.emit("nodeProcessed",this))}render(t,e){const A=this.mask;A&&(t.flush(),t.mask.push(this,A)),this._render(t),e?.(),A&&(t.flush(),t.mask.pop(this))}input(t,e){const A=this._children.internal;for(let i=A.length-1;i>=0;i--)A[i].input(t,e);this._input(t,e)}getIndex(){return this._parent?.children.getInternal(this.internalMode).indexOf(this)??0}getNode(t){return this._children.internal.find(e=>e.name===t)}removeNode(t){this.getNode(t)?.remove()}addSibling(t){return this.equal(t)||!this.hasParent()||t.hasParent()?this:(t.internalMode=this.internalMode,this._parent.moveChild(t,this.getIndex()+1),this)}prepend(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this.moveChild(A,0)})}append(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this.appendChild(A)})}before(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this._parent?.moveChild(A,this.getIndex())})}after(...t){let e;Array.isArray(t[0])?e=t[0]:e=t,e.forEach(A=>{this._parent?.moveChild(A,this.getIndex()+1)})}insertBefore(t,e){return!e.hasParent()||!this.equal(e.parent)||this.moveChild(t,e.getIndex()),t}appendChild(t,e=t.internalMode){if(this.equal(t)||t.hasParent())return t;switch(e){case"front":this._children.front.push(t);break;case"default":this._children.push(t);break;case"back":this._children.back.push(t);break}return t.internalMode!==e&&(t.internalMode=e),t.setParent(this),this.emit("appendChild",t),t}moveChild(t,e,A=t.internalMode){if(this.equal(t)||t.hasParent()&&!this.equal(t.parent))return this;const i=this._children.getInternal(t.internalMode),s=i.indexOf(t),n=this._children.getInternal(A);return(t.internalMode!==A||e!==s)&&(s>-1&&i.splice(s,1),t.setParent(this),e>-1&&e<n.length?n.splice(e,0,t):n.push(t),s>-1?this.emit("moveChild",t,e,s):this.emit("appendChild",t)),t.internalMode!==A&&(t.internalMode=A),this}removeChild(t){const e=t.getIndex();return this.equal(t.parent)&&e>-1&&(this._children.getInternal(t.internalMode).splice(e,1),t.setParent(void 0),this.emit("removeChild",t,e)),t}removeChildren(){this._children.forEach(t=>this.removeChild(t))}remove(){this._parent?.removeChild(this)}forEachChild(t){return this._children.forEach(t),this}forEachDescendant(t){return this._children.forEach(e=>{t(e),e.forEachDescendant(t)}),this}forEachAncestor(t){const e=this.parent;return e&&(t(e),e.forEachAncestor(t)),this}_ready(){}_treeEnter(t){}_treeExit(t){}_parented(t){}_unparented(t){}_process(t){}_input(t,e){}_render(t){}clone(){return new this.constructor(this.toJSON(),this._children.internal)}toJSON(){return ai({...super.toJSON(),is:this.is,children:this._children.length?[...this._children.map(t=>t.toJSON())]:void 0,meta:Object.keys(this.meta).length?{...this.meta}:void 0})}static parse(t){if(Array.isArray(t))return t.map(o=>this.parse(o));const{is:e,props:A,children:i}=t,s=nr.get(e)??g.Node,n=new s(A);return i?.forEach(o=>n.appendChild(this.parse(o))),n}},AA([v({fallback:go()})],g.Node.prototype,"id",2),AA([v({fallback:go()})],g.Node.prototype,"name",2),AA([v({fallback:"inherit"})],g.Node.prototype,"processMode",2),AA([v({fallback:"default"})],g.Node.prototype,"processSortMode",2),AA([v({fallback:"inherit"})],g.Node.prototype,"renderMode",2),AA([v({fallback:"default"})],g.Node.prototype,"internalMode",2),AA([v({protected:!0})],g.Node.prototype,"mask",2),g.Node=AA([st("Node")],g.Node);var og=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,Ii=(r,t,e,A)=>{for(var i=A>1?void 0:A?ag(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&og(t,e,i),i};g.TimelineNode=class extends g.Node{constructor(t,e=[]){super(),this.setProperties(t).append(e)}computedDuration=0;_currentTime=0;_startTime=0;get timeline(){return this._tree?.timeline}get timelineCurrentTime(){return this.timeline?.currentTime??0}get parentStartTime(){return this._parent?.startTime??0}get currentTime(){return Je(0,this._currentTime,this.computedDuration)}get startTime(){return this._startTime}set startTime(t){this.delay=t-this.parentStartTime,this._updateCurrentTime(!0)}get endTime(){return this._startTime+this.computedDuration}get currentTimeProgress(){return this.computedDuration?Je(0,this._currentTime/this.computedDuration,1):0}isInsideTimeRange(){const t=this._currentTime;return this.computedDuration?t>=0&&t<=this.computedDuration:t>=0}_updateCurrentTime(t=!1){if(t||!this.paused){const e=this._parent;this._startTime=this.delay+this.parentStartTime,this.computedDuration=e?.computedDuration?Math.min(this._startTime+this.duration,e.endTime)-this._startTime:this.duration,this._currentTime=this.timelineCurrentTime-this._startTime,this.emit("updateCurrentTime",this._currentTime),this.insideTimeRange=this.isInsideTimeRange()}}_process(t){super._process(t),this._updateCurrentTime()}},Ii([v({fallback:0})],g.TimelineNode.prototype,"delay",2),Ii([v({fallback:0})],g.TimelineNode.prototype,"duration",2),Ii([v({fallback:!1})],g.TimelineNode.prototype,"paused",2),Ii([v({protected:!0,fallback:!1})],g.TimelineNode.prototype,"insideTimeRange",2),g.TimelineNode=Ii([st("TimelineNode")],g.TimelineNode);var lg=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,pi=(r,t,e,A)=>{for(var i=A>1?void 0:A?cg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&lg(t,e,i),i};g.Viewport=class extends g.Node{constructor(t=!1){super(),this.flipY=t,this._projection.flipY(t)}_projection=new To;_framebufferIndex=0;_framebuffers=[{texture:new Ms,needsUpload:!1},{texture:new Ms,needsUpload:!1}];get valid(){return!!(this.width&&this.height)}get framebuffer(){return this._framebuffers[this._framebufferIndex]}get texture(){return this.framebuffer.texture}_glFramebufferOptions(t){const{width:e,height:A}=this,{pixelRatio:i}=t;return this._framebuffers.forEach(s=>{const n=s.texture;n.width=e,n.height=A,n.pixelRatio=i,n.upload(t)}),{width:e,height:A,colorTextures:[this.texture._glTexture(t)]}}_glFramebuffer(t){return t.getRelated(this.framebuffer,()=>t.framebuffer.create(this._glFramebufferOptions(t)))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"x":case"y":this.requestUpload(),this._projection.translate(this.x,this.y),this.emit("updateRect");break;case"width":case"height":this.requestUpload(),this._projection.resize(this.width,this.height),this.emit("updateRect");break}}requestUpload(){this._framebuffers.forEach(t=>t.needsUpload=!0)}resize(t,e){this.width=t,this.height=e}upload(t){const e=this.framebuffer;return e.needsUpload&&this.valid?(e.needsUpload=!1,t.framebuffer.update(this._glFramebuffer(t),this._glFramebufferOptions(t)),!0):!1}activate(t){return this.valid?(t.flush(),this._tree?.setCurrentViewport(this),this.upload(t),t.framebuffer.bind(this._glFramebuffer(t)),!0):!1}redraw(t,e){if(this.valid){t.flush();const A=this.framebuffer.texture;return this._framebufferIndex=(this._framebufferIndex+1)%this._framebuffers.length,this.activate(t),t.clear(),A.activate(t,0),e(),!0}return!1}activateWithCopy(t,e){this.resize(e.width,e.height),this.activate(t)&&(t.clear(),e.texture.activate(t,0),ut.draw(t,fi.instance,{sampler:0}))}render(t,e){const A=this._tree?.getCurrentViewport();this.activate(t),t.clear(),super.render(t,e),t.flush(),A?A.activate(t):(t.framebuffer.bind(null),this._tree?.setCurrentViewport(void 0))}getRect(){return new _s(this.x,this.y,this.width,this.height)}toProjectionArray(t=!1){return this._projection.toArray(t)}},pi([v({fallback:0})],g.Viewport.prototype,"x",2),pi([v({fallback:0})],g.Viewport.prototype,"y",2),pi([v({fallback:0})],g.Viewport.prototype,"width",2),pi([v({fallback:0})],g.Viewport.prototype,"height",2),g.Viewport=pi([st("Viewport")],g.Viewport);var hg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,Ei=(r,t,e,A)=>{for(var i=A>1?void 0:A?gg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&hg(t,e,i),i};g.Effect=class extends g.TimelineNode{material;get _effectMode(){return this.effectMode??"parent"}viewport1=new g.Viewport;viewport2=new g.Viewport;_renderId=0;_renderViewport;_previousSibling;_nextSibling;constructor(t,e=[]){super(),this._onProcessing=this._onProcessing.bind(this),this._onNodeProcessed=this._onNodeProcessed.bind(this),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"glsl":{const s=new ui(e);!this.effectMode&&s.has.transition&&(this.effectMode="transition"),this.material=s;break}case"glslSrc":{e?Ne.text.load(e).then(s=>this.glsl=s):this.glsl="";break}}}_treeEnter(t){t.on("processing",this._onProcessing),t.on("nodeProcessed",this._onNodeProcessed),this.viewport1.setTree(t),this.viewport2.setTree(t)}_treeExit(t){t.off("processing",this._onProcessing),t.off("nodeProcessed",this._onNodeProcessed),this.viewport1.setTree(void 0),this.viewport2.setTree(void 0)}_onProcessing(){if(this.canProcess())switch(this._updateCurrentTime(),this._effectMode){case"transition":this._previousSibling=this.previousSibling,this._nextSibling=this.nextSibling;break;default:this._previousSibling=void 0,this._nextSibling=void 0;break}}_onNodeProcessed(t){if(!this.canProcess()||!this.isInsideTimeRange())return;const e=this._tree?.renderStack;if(e)switch(this._effectMode){case"transition":t.equal(this._previousSibling)?(this._previousSibling=void 0,e.push(this)):t.equal(this._nextSibling)&&(this._nextSibling=void 0,e.push(this));break}}_processParent(){const t=this._tree?.renderStack;if(!t)return;const e=t.currentCall?.parentCall;if(!e)return;const A=e.calls;let i,s;A.forEach((n,o)=>{(n.renderable.equal(this._parent)||n.renderable.parent?.equal(this._parent))&&(i=i??o,s=o)}),!(i===void 0||s===void 0)&&(A.splice(s+1,0,t.createCall(this)),A.splice(i,0,t.createCall(this)))}_processChildren(){this._children.length&&(super.emit("process"),this._tree?.renderStack.push(this))}_onProcess(t=0){if(this.canProcess())switch(this._renderId=0,this._effectMode){case"before":super._onProcess(t);break;case"parent":this._processParent();break;case"children":this._processChildren();break}}_renderBefore(t){const e=this._tree?.getCurrentViewport();e&&this.apply(t,e,{redraw:!0})}_renderTransition(t){if(this._renderId%2===0)this._renderViewport=this._tree?.getCurrentViewport(),this._renderViewport&&(this.viewport1.activateWithCopy(t,this._renderViewport),this.viewport2.resize(this._renderViewport.width,this._renderViewport.height)),this.viewport2.activate(t),t.clear();else{const e=this._renderViewport;this._renderViewport=void 0,e&&(e.activate(t),t.clear(),this.viewport1.texture.activate(t,0),this.viewport2.texture.activate(t,1),this.apply(t,e,{from:this.viewport1,to:this.viewport2}),t.texture.unbind(0),t.texture.unbind(1))}}_renderParentOrChildren(t){if(this._renderId%2===0)this._renderViewport=this._tree?.getCurrentViewport(),this._renderViewport&&this.viewport1.resize(this._renderViewport.width,this._renderViewport.height),this.viewport1.activate(t),t.clear();else{const e=this._renderViewport;this._renderViewport=void 0,e&&(this.viewport1.activate(t),this.apply(t,this.viewport1,{redraw:!0,target:this._effectMode==="parent"?this._parent??void 0:void 0,targetArea:this._parseTargetArea()}),e.activate(t),this.viewport1.texture.activate(t,0),ut.draw(t))}}_parseTargetArea(){if(this._effectMode==="parent"&&this._parent&&"getRect"in this._parent){const t=this._parent.getRect();if(t)return[t.left/this.viewport1.width,t.top/this.viewport1.height,t.width/this.viewport1.width,t.height/this.viewport1.height]}}_render(t){switch(this._effectMode){case"before":this._renderBefore(t);break;case"transition":this._renderTransition(t);break;case"parent":case"children":default:this._renderParentOrChildren(t);break}this._renderId++}apply(t,e,A){this.material&&(A?.redraw?e.redraw(t,()=>{ut.draw(t,this.material,{from:0,to:1,progress:this.currentTimeProgress,ratio:e.width/e.height})}):ut.draw(t,this.material,{from:0,to:1,progress:this.currentTimeProgress,ratio:A?.from?A.from.width/A.from.height:0}))}},Ei([v({protected:!0})],g.Effect.prototype,"material",2),Ei([v()],g.Effect.prototype,"effectMode",2),Ei([v()],g.Effect.prototype,"glsl",2),Ei([v()],g.Effect.prototype,"glslSrc",2),g.Effect=Ei([st("Effect")],g.Effect);var ga=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,fg=(r,t,e)=>t in r?ga(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ye=(r,t,e,A)=>{for(var i=A>1?void 0:A?ug(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ga(t,e,i),i},dg=(r,t,e)=>fg(r,t+"",e);g.ColorAdjustEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){e.redraw(t,()=>{ut.draw(t,g.ColorAdjustEffect.material,{sampler:0,saturation:this.saturation,contrast:this.contrast,brightness:this.brightness,red:this.red,green:this.green,blue:this.blue,alpha:this.alpha,gamma:Math.max(this.gamma??1,1e-4)})})}},dg(g.ColorAdjustEffect,"material",new Ct({vert:`precision mediump float;
|
|
115
115
|
attribute vec2 position;
|
|
116
116
|
attribute vec2 uv;
|
|
117
117
|
varying vec2 vUv;
|
|
@@ -142,7 +142,7 @@ void main(void) {
|
|
|
142
142
|
c.rgb *= c.a;
|
|
143
143
|
}
|
|
144
144
|
gl_FragColor = c * alpha;
|
|
145
|
-
}`})),
|
|
145
|
+
}`})),Ye([v()],g.ColorAdjustEffect.prototype,"saturation",2),Ye([v()],g.ColorAdjustEffect.prototype,"contrast",2),Ye([v()],g.ColorAdjustEffect.prototype,"brightness",2),Ye([v()],g.ColorAdjustEffect.prototype,"red",2),Ye([v()],g.ColorAdjustEffect.prototype,"green",2),Ye([v()],g.ColorAdjustEffect.prototype,"blue",2),Ye([v()],g.ColorAdjustEffect.prototype,"alpha",2),Ye([v()],g.ColorAdjustEffect.prototype,"gamma",2),g.ColorAdjustEffect=Ye([st("ColorAdjustEffect")],g.ColorAdjustEffect);var ua=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,pg=(r,t,e)=>t in r?ua(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,fa=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ig(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ua(t,e,i),i},Eg=(r,t,e)=>pg(r,t+"",e);g.ColorFilterEffect=class extends g.Effect{_colorMatrix=new ws;constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){if(!this.filter)return;const A=hi(this.filter),i=this._colorMatrix.identity();A.forEach(({name:s,args:n})=>{const o=n.map(a=>a.normalizedIntValue);switch(s){case"hue-rotate":case"hueRotate":i.hueRotate(o[0]*oe);break;case"saturate":i.saturate(o[0]);break;case"brightness":i.brightness(o[0]);break;case"contrast":i.contrast(o[0]);break;case"invert":i.invert(o[0]);break;case"sepia":i.sepia(o[0]);break;case"opacity":i.opacity(o[0]);break;case"grayscale":i.grayscale(o[0]);break}}),e.redraw(t,()=>{ut.draw(t,g.ColorFilterEffect.material,{sampler:0,m:i.toArray()})})}},Eg(g.ColorFilterEffect,"material",new Ct({vert:`precision mediump float;
|
|
146
146
|
attribute vec2 position;
|
|
147
147
|
attribute vec2 uv;
|
|
148
148
|
varying vec2 vUv;
|
|
@@ -165,7 +165,7 @@ void main(void) {
|
|
|
165
165
|
m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14] / 255.0,
|
|
166
166
|
m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19] / 255.0
|
|
167
167
|
);
|
|
168
|
-
}`})),
|
|
168
|
+
}`})),fa([v()],g.ColorFilterEffect.prototype,"filter",2),g.ColorFilterEffect=fa([st("ColorFilterEffect")],g.ColorFilterEffect);var da=Object.defineProperty,Bg=Object.getOwnPropertyDescriptor,Cg=(r,t,e)=>t in r?da(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Rs=(r,t,e,A)=>{for(var i=A>1?void 0:A?Bg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&da(t,e,i),i},Qg=(r,t,e)=>Cg(r,t+"",e);const Bi=50;g.ColorOverlayEffect=class extends g.Effect{_color=new _e;constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){e.redraw(t,()=>{const A=this.colors.map(i=>{this._color.value=i;const s=this._color.toArray();return s[3]=this.alpha,s});for(;A.length<Bi;)A.push([0,0,0,0]);ut.draw(t,g.ColorOverlayEffect.material,{sampler:0,colors:A.slice(0,Bi).flatMap(i=>i)})})}},Qg(g.ColorOverlayEffect,"material",new Ct({vert:`precision mediump float;
|
|
169
169
|
attribute vec2 position;
|
|
170
170
|
attribute vec2 uv;
|
|
171
171
|
varying vec2 vUv;
|
|
@@ -174,7 +174,7 @@ void main() {
|
|
|
174
174
|
vUv = uv;
|
|
175
175
|
}`,frag:`precision mediump float;
|
|
176
176
|
uniform sampler2D sampler;
|
|
177
|
-
uniform vec4 colors[${
|
|
177
|
+
uniform vec4 colors[${Bi}];
|
|
178
178
|
varying vec2 vUv;
|
|
179
179
|
|
|
180
180
|
float calcWidth() {
|
|
@@ -183,7 +183,7 @@ float calcWidth() {
|
|
|
183
183
|
|
|
184
184
|
int calcCount() {
|
|
185
185
|
int count = 0;
|
|
186
|
-
for (int i = 0; i < ${
|
|
186
|
+
for (int i = 0; i < ${Bi}; i++) {
|
|
187
187
|
if (colors[i] != vec4(0,0,0,0)){
|
|
188
188
|
count++;
|
|
189
189
|
}
|
|
@@ -195,7 +195,7 @@ vec4 calcColor(float x) {
|
|
|
195
195
|
float perUnit = calcWidth() / float(calcCount());
|
|
196
196
|
int index = int(x / perUnit);
|
|
197
197
|
|
|
198
|
-
for(int i=0; i<${
|
|
198
|
+
for(int i=0; i<${Bi}; i++){
|
|
199
199
|
if(i==index){
|
|
200
200
|
return colors[i];
|
|
201
201
|
}
|
|
@@ -208,7 +208,7 @@ void main(void) {
|
|
|
208
208
|
vec4 color = texture2D(sampler, vUv);
|
|
209
209
|
vec4 mask = calcColor(vUv.x);
|
|
210
210
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
211
|
-
}`})),
|
|
211
|
+
}`})),Rs([v()],g.ColorOverlayEffect.prototype,"colors",2),Rs([v()],g.ColorOverlayEffect.prototype,"alpha",2),g.ColorOverlayEffect=Rs([st("ColorOverlayEffect")],g.ColorOverlayEffect);var Ia=Object.defineProperty,yg=Object.getOwnPropertyDescriptor,mg=(r,t,e)=>t in r?Ia(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ks=(r,t,e,A)=>{for(var i=A>1?void 0:A?yg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Ia(t,e,i),i},wg=(r,t,e)=>mg(r,t+"",e);g.ColorRemoveEffect=class extends g.Effect{_color=new _e;constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){const i=new Float32Array(150),s=this.colors.map(n=>(this._color.value=n,this._color.toArray().slice(0,3)));for(;s.length<50;)s.push([-1,0,0]);s.slice(0,50).forEach((n,o)=>{i[o*3]=n[0],i[o*3+1]=n[1],i[o*3+2]=n[2]}),e.redraw(t,()=>{ut.draw(t,g.ColorRemoveEffect.material,{sampler:0,epsilon:this.epsilon,originalColors:i})})}},wg(g.ColorRemoveEffect,"material",new Ct({vert:`precision mediump float;
|
|
212
212
|
attribute vec2 position;
|
|
213
213
|
attribute vec2 uv;
|
|
214
214
|
varying vec2 vUv;
|
|
@@ -237,7 +237,7 @@ void main(void) {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
gl_FragColor = color;
|
|
240
|
-
}`})),
|
|
240
|
+
}`})),ks([v()],g.ColorRemoveEffect.prototype,"colors",2),ks([v()],g.ColorRemoveEffect.prototype,"epsilon",2),g.ColorRemoveEffect=ks([st("ColorRemoveEffect")],g.ColorRemoveEffect);var pa=Object.defineProperty,vg=Object.getOwnPropertyDescriptor,_g=(r,t,e)=>t in r?pa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ps=(r,t,e,A)=>{for(var i=A>1?void 0:A?vg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&pa(t,e,i),i},bg=(r,t,e)=>_g(r,t+"",e);const Ci=50;g.ColorReplaceEffect=class extends g.Effect{_color=new _e;constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){const A=this.colors.map(o=>{this._color.value=o[0];const a=this._color.toArray().slice(0,3);this._color.value=o[1];const l=this._color.toArray().slice(0,3);return[a,l]}),i=this.epsilon,s=new Float32Array(Ci*3),n=new Float32Array(Ci*3);for(;A.length<Ci;)A.push([[-1,0,0],[0,0,0,1]]);A.slice(0,Ci).forEach(([o,a],l)=>{s[l*3]=o[0],s[l*3+1]=o[1],s[l*3+2]=o[2],n[l*3]=a[0],n[l*3+1]=a[1],n[l*3+2]=a[2]}),e.redraw(t,()=>{ut.draw(t,g.ColorReplaceEffect.material,{sampler:0,epsilon:i,originalColors:s,targetColors:n})})}},bg(g.ColorReplaceEffect,"material",new Ct({vert:`precision mediump float;
|
|
241
241
|
attribute vec2 position;
|
|
242
242
|
attribute vec2 uv;
|
|
243
243
|
varying vec2 vUv;
|
|
@@ -247,7 +247,7 @@ void main() {
|
|
|
247
247
|
}`,frag:`varying vec2 vUv;
|
|
248
248
|
uniform sampler2D sampler;
|
|
249
249
|
uniform float epsilon;
|
|
250
|
-
const int MAX_COLORS = ${
|
|
250
|
+
const int MAX_COLORS = ${Ci};
|
|
251
251
|
uniform vec3 originalColors[MAX_COLORS];
|
|
252
252
|
uniform vec3 targetColors[MAX_COLORS];
|
|
253
253
|
|
|
@@ -273,8 +273,8 @@ void main(void) {
|
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
}`})),Ns([w()],h.ColorReplaceEffect.prototype,"colors",2),Ns([w()],h.ColorReplaceEffect.prototype,"epsilon",2),h.ColorReplaceEffect=Ns([st("ColorReplaceEffect")],h.ColorReplaceEffect);function Mh(r,t,e=2){const A=t&&t.length,i=A?t[0]*e:r.length;let s=ya(r,0,i,e,!0);const n=[];if(!s||s.next===s.prev)return n;let o,a,l;if(A&&(s=Nh(r,t,s,e)),r.length>80*e){o=1/0,a=1/0;let u=-1/0,c=-1/0;for(let g=e;g<i;g+=e){const f=r[g],d=r[g+1];f<o&&(o=f),d<a&&(a=d),f>u&&(u=f),d>c&&(c=d)}l=Math.max(u-o,c-a),l=l!==0?32767/l:0}return mi(s,n,e,o,a,l,0),n}function ya(r,t,e,A,i){let s;if(i===Wh(r,t,e,A)>0)for(let n=t;n<e;n+=A)s=va(n/A|0,r[n],r[n+1],s);else for(let n=e-A;n>=t;n-=A)s=va(n/A|0,r[n],r[n+1],s);return s&&TA(s,s.next)&&(_i(s),s=s.next),s}function QA(r,t){if(!r)return r;t||(t=r);let e=r,A;do if(A=!1,!e.steiner&&(TA(e,e.next)||Qt(e.prev,e,e.next)===0)){if(_i(e),e=t=e.prev,e===e.next)break;A=!0}else e=e.next;while(A||e!==t);return t}function mi(r,t,e,A,i,s,n){if(!r)return;!n&&s&&Hh(r,A,i,s);let o=r;for(;r.prev!==r.next;){const a=r.prev,l=r.next;if(s?Ph(r,A,i,s):Rh(r)){t.push(a.i,r.i,l.i),_i(r),r=l.next,o=l.next;continue}if(r=l,r===o){n?n===1?(r=kh(QA(r),t),mi(r,t,e,A,i,s,2)):n===2&&Uh(r,t,e,A,i,s):mi(QA(r),t,e,A,i,s,1);break}}}function Rh(r){const t=r.prev,e=r,A=r.next;if(Qt(t,e,A)>=0)return!1;const i=t.x,s=e.x,n=A.x,o=t.y,a=e.y,l=A.y,u=Math.min(i,s,n),c=Math.min(o,a,l),g=Math.max(i,s,n),f=Math.max(o,a,l);let d=A.next;for(;d!==t;){if(d.x>=u&&d.x<=g&&d.y>=c&&d.y<=f&&wi(i,o,s,a,n,l,d.x,d.y)&&Qt(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Ph(r,t,e,A){const i=r.prev,s=r,n=r.next;if(Qt(i,s,n)>=0)return!1;const o=i.x,a=s.x,l=n.x,u=i.y,c=s.y,g=n.y,f=Math.min(o,a,l),d=Math.min(u,c,g),B=Math.max(o,a,l),I=Math.max(u,c,g),F=Ts(f,d,t,e,A),b=Ts(B,I,t,e,A);let y=r.prevZ,_=r.nextZ;for(;y&&y.z>=F&&_&&_.z<=b;){if(y.x>=f&&y.x<=B&&y.y>=d&&y.y<=I&&y!==i&&y!==n&&wi(o,u,a,c,l,g,y.x,y.y)&&Qt(y.prev,y,y.next)>=0||(y=y.prevZ,_.x>=f&&_.x<=B&&_.y>=d&&_.y<=I&&_!==i&&_!==n&&wi(o,u,a,c,l,g,_.x,_.y)&&Qt(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;y&&y.z>=F;){if(y.x>=f&&y.x<=B&&y.y>=d&&y.y<=I&&y!==i&&y!==n&&wi(o,u,a,c,l,g,y.x,y.y)&&Qt(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;_&&_.z<=b;){if(_.x>=f&&_.x<=B&&_.y>=d&&_.y<=I&&_!==i&&_!==n&&wi(o,u,a,c,l,g,_.x,_.y)&&Qt(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function kh(r,t){let e=r;do{const A=e.prev,i=e.next.next;!TA(A,i)&&ma(A,e,e.next,i)&&vi(A,i)&&vi(i,A)&&(t.push(A.i,e.i,i.i),_i(e),_i(e.next),e=r=i),e=e.next}while(e!==r);return QA(e)}function Uh(r,t,e,A,i,s){let n=r;do{let o=n.next.next;for(;o!==n.prev;){if(n.i!==o.i&&Yh(n,o)){let a=wa(n,o);n=QA(n,n.next),a=QA(a,a.next),mi(n,t,e,A,i,s,0),mi(a,t,e,A,i,s,0);return}o=o.next}n=n.next}while(n!==r)}function Nh(r,t,e,A){const i=[];for(let s=0,n=t.length;s<n;s++){const o=t[s]*A,a=s<n-1?t[s+1]*A:r.length,l=ya(r,o,a,A,!1);l===l.next&&(l.steiner=!0),i.push(Kh(l))}i.sort(Th);for(let s=0;s<i.length;s++)e=Lh(i[s],e);return e}function Th(r,t){let e=r.x-t.x;if(e===0&&(e=r.y-t.y,e===0)){const A=(r.next.y-r.y)/(r.next.x-r.x),i=(t.next.y-t.y)/(t.next.x-t.x);e=A-i}return e}function Lh(r,t){const e=Gh(r,t);if(!e)return t;const A=wa(e,r);return QA(A,A.next),QA(e,e.next)}function Gh(r,t){let e=t;const A=r.x,i=r.y;let s=-1/0,n;if(TA(r,e))return e;do{if(TA(r,e.next))return e.next;if(i<=e.y&&i>=e.next.y&&e.next.y!==e.y){const c=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(c<=A&&c>s&&(s=c,n=e.x<e.next.x?e:e.next,c===A))return n}e=e.next}while(e!==t);if(!n)return null;const o=n,a=n.x,l=n.y;let u=1/0;e=n;do{if(A>=e.x&&e.x>=a&&A!==e.x&&Da(i<l?A:s,i,a,l,i<l?s:A,i,e.x,e.y)){const c=Math.abs(i-e.y)/(A-e.x);vi(e,r)&&(c<u||c===u&&(e.x>n.x||e.x===n.x&&Oh(n,e)))&&(n=e,u=c)}e=e.next}while(e!==o);return n}function Oh(r,t){return Qt(r.prev,r,t.prev)<0&&Qt(t.next,r,r.next)<0}function Hh(r,t,e,A){let i=r;do i.z===0&&(i.z=Ts(i.x,i.y,t,e,A)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,Jh(i)}function Jh(r){let t,e=1;do{let A=r,i;r=null;let s=null;for(t=0;A;){t++;let n=A,o=0;for(let l=0;l<e&&(o++,n=n.nextZ,!!n);l++);let a=e;for(;o>0||a>0&&n;)o!==0&&(a===0||!n||A.z<=n.z)?(i=A,A=A.nextZ,o--):(i=n,n=n.nextZ,a--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;A=n}s.nextZ=null,e*=2}while(t>1);return r}function Ts(r,t,e,A,i){return r=(r-e)*i|0,t=(t-A)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function Kh(r){let t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Da(r,t,e,A,i,s,n,o){return(i-n)*(t-o)>=(r-n)*(s-o)&&(r-n)*(A-o)>=(e-n)*(t-o)&&(e-n)*(s-o)>=(i-n)*(A-o)}function wi(r,t,e,A,i,s,n,o){return!(r===n&&t===o)&&Da(r,t,e,A,i,s,n,o)}function Yh(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!Vh(r,t)&&(vi(r,t)&&vi(t,r)&&zh(r,t)&&(Qt(r.prev,r,t.prev)||Qt(r,t.prev,t))||TA(r,t)&&Qt(r.prev,r,r.next)>0&&Qt(t.prev,t,t.next)>0)}function Qt(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function TA(r,t){return r.x===t.x&&r.y===t.y}function ma(r,t,e,A){const i=pr(Qt(r,t,e)),s=pr(Qt(r,t,A)),n=pr(Qt(e,A,r)),o=pr(Qt(e,A,t));return!!(i!==s&&n!==o||i===0&&Ir(r,e,t)||s===0&&Ir(r,A,t)||n===0&&Ir(e,r,A)||o===0&&Ir(e,t,A))}function Ir(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function pr(r){return r>0?1:r<0?-1:0}function Vh(r,t){let e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&ma(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function vi(r,t){return Qt(r.prev,r,r.next)<0?Qt(r,t,r.next)>=0&&Qt(r,r.prev,t)>=0:Qt(r,t,r.prev)<0||Qt(r,r.next,t)<0}function zh(r,t){let e=r,A=!1;const i=(r.x+t.x)/2,s=(r.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&i<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(A=!A),e=e.next;while(e!==r);return A}function wa(r,t){const e=Ls(r.i,r.x,r.y),A=Ls(t.i,t.x,t.y),i=r.next,s=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,A.next=e,e.prev=A,s.next=A,A.prev=s,A}function va(r,t,e,A){const i=Ls(r,t,e);return A?(i.next=A.next,i.prev=A,A.next.prev=i,A.next=i):(i.prev=i,i.next=i),i}function _i(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Ls(r,t,e){return{i:r,x:t,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Wh(r,t,e,A){let i=0;for(let s=t,n=e-A;s<e;s+=A)i+=(r[n]-r[s])*(r[s+1]+r[n+1]),n=s;return i}function qh(r,t,e,A={}){const{radius:i=1}=A;r.moveTo(t,e),r.arc(t,e,i,0,Math.PI*2)}const Xh={arcs:"bevel",bevel:"bevel",miter:"miter","miter-clip":"miter",round:"round"};function Gs(r,t){const{fill:e="#000",stroke:A="none",strokeWidth:i=A==="none"?0:1,strokeLinecap:s="round",strokeLinejoin:n="miter",strokeMiterlimit:o=0,strokeDasharray:a=[],strokeDashoffset:l=0,shadowOffsetX:u=0,shadowOffsetY:c=0,shadowBlur:g=0,shadowColor:f="rgba(0, 0, 0, 0)"}=t;r.fillStyle=e,r.strokeStyle=A,r.lineWidth=i,r.lineCap=s,r.lineJoin=Xh[n],r.miterLimit=o,r.setLineDash(a),r.lineDashOffset=l,r.shadowOffsetX=u,r.shadowOffsetY=c,r.shadowBlur=g,r.shadowColor=f}class O{constructor(t=0,e=0){this.x=t,this.y=e}static get MAX(){return new O(1/0,1/0)}static get MIN(){return new O(-1/0,-1/0)}get array(){return[this.x,this.y]}finite(){return this.x=Number.isFinite(this.x)?this.x:0,this.y=Number.isFinite(this.y)?this.y:0,this}set(t,e){return this.x=t,this.y=e,this}add(t){return this.x+=t.x,this.y+=t.y,this}sub(t){return this.x-=t.x,this.y-=t.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}divide(t){return this.x/=t.x,this.y/=t.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}rotate(t,e={x:0,y:0}){const A=-t/180*Math.PI,i=this.x-e.x,s=-(this.y-e.y),n=Math.sin(A),o=Math.cos(A);return this.set(e.x+(i*o-s*n),e.y-(i*n+s*o)),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,A=this.y-t.y;return e*e+A*A}lengthSquared(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.lengthSquared())}scale(t,e=t,A={x:0,y:0}){const i=t<0?A.x-this.x+A.x:this.x,s=e<0?A.y-this.y+A.y:this.y;return this.x=i*Math.abs(t),this.y=s*Math.abs(e),this}skew(t,e=0,A={x:0,y:0}){const i=this.x-A.x,s=this.y-A.y;return this.x=A.x+(i+Math.tan(t)*s),this.y=A.y+(s+Math.tan(e)*i),this}min(...t){return this.x=Math.min(this.x,...t.map(e=>e.x)),this.y=Math.min(this.y,...t.map(e=>e.y)),this}max(...t){return this.x=Math.max(this.x,...t.map(e=>e.x)),this.y=Math.max(this.y,...t.map(e=>e.y)),this}normalize(){return this.scale(1/(this.length()||1))}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}divideVectors(t,e){return this.x=t.x/e.x,this.y=t.y/e.y,this}lerpVectors(t,e,A){return this.x=t.x+(e.x-t.x)*A,this.y=t.y+(e.y-t.y)*A,this}equals(t){return this.x===t.x&&this.y===t.y}applyMatrix3(t){const e=this.x,A=this.y,i=t.elements;return this.x=i[0]*e+i[3]*A+i[6],this.y=i[1]*e+i[4]*A+i[7],this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new O(this.x,this.y)}}class ut{constructor(t=0,e=0,A=0,i=0){this.left=t,this.top=e,this.width=A,this.height=i}get x(){return this.left}set x(t){this.left=t}get y(){return this.top}set y(t){this.top=t}get right(){return this.left+this.width}get bottom(){return this.top+this.height}get center(){return new O((this.left+this.right)/2,(this.top+this.bottom)/2)}get array(){return[this.left,this.top,this.width,this.height]}static from(...t){if(t.length===0)return new ut;if(t.length===1)return t[0].clone();const e=t[0],A=t.slice(1).reduce((i,s)=>(i.left=Math.min(i.left,s.left),i.top=Math.min(i.top,s.top),i.right=Math.max(i.right,s.right),i.bottom=Math.max(i.bottom,s.bottom),i),{left:e?.left??0,top:e?.top??0,right:e?.right??0,bottom:e?.bottom??0});return new ut(A.left,A.top,A.right-A.left,A.bottom-A.top)}translate(t,e){return this.left+=t,this.top+=e,this}copy(t){return this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height,this}clone(){return new ut(this.left,this.top,this.width,this.height)}}class Lt{elements=[];constructor(t=1,e=0,A=0,i=0,s=1,n=0,o=0,a=0,l=1){this.set(t,e,A,i,s,n,o,a,l)}set(t,e,A,i,s,n,o,a,l){const u=this.elements;return u[0]=t,u[1]=i,u[2]=o,u[3]=e,u[4]=s,u[5]=a,u[6]=A,u[7]=n,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,A=t.elements;return e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const A=t.elements,i=e.elements,s=this.elements,n=A[0],o=A[3],a=A[6],l=A[1],u=A[4],c=A[7],g=A[2],f=A[5],d=A[8],B=i[0],I=i[3],F=i[6],b=i[1],y=i[4],_=i[7],Q=i[2],D=i[5],S=i[8];return s[0]=n*B+o*b+a*Q,s[3]=n*I+o*y+a*D,s[6]=n*F+o*_+a*S,s[1]=l*B+u*b+c*Q,s[4]=l*I+u*y+c*D,s[7]=l*F+u*_+c*S,s[2]=g*B+f*b+d*Q,s[5]=g*I+f*y+d*D,s[8]=g*F+f*_+d*S,this}invert(){const t=this.elements,e=t[0],A=t[1],i=t[2],s=t[3],n=t[4],o=t[5],a=t[6],l=t[7],u=t[8],c=u*n-o*l,g=o*a-u*s,f=l*s-n*a,d=e*c+A*g+i*f;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);const B=1/d;return t[0]=c*B,t[1]=(i*l-u*A)*B,t[2]=(o*A-i*n)*B,t[3]=g*B,t[4]=(u*e-i*a)*B,t[5]=(i*s-o*e)*B,t[6]=f*B,t[7]=(A*a-l*e)*B,t[8]=(n*e-A*s)*B,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}scale(t,e){return this.premultiply(Os.makeScale(t,e)),this}rotate(t){return this.premultiply(Os.makeRotation(-t)),this}translate(t,e){return this.premultiply(Os.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),A=Math.sin(t);return this.set(e,-A,0,A,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}fromArray(t,e=0){for(let A=0;A<9;A++)this.elements[A]=t[A+e];return this}clone(){return new this.constructor().fromArray(this.elements)}}const Os=new Lt;function _a(r,t,e,A){const i=r*e+t*A,s=Math.sqrt(r*r+t*t)*Math.sqrt(e*e+A*A);let n=Math.acos(Math.max(-1,Math.min(1,i/s)));return r*A-t*e<0&&(n=-n),n}function jh(r,t,e,A,i,s,n,o){if(t===0||e===0){r.lineTo(o.x,o.y);return}A=A*Math.PI/180,t=Math.abs(t),e=Math.abs(e);const a=(n.x-o.x)/2,l=(n.y-o.y)/2,u=Math.cos(A)*a+Math.sin(A)*l,c=-Math.sin(A)*a+Math.cos(A)*l;let g=t*t,f=e*e;const d=u*u,B=c*c,I=d/g+B/f;if(I>1){const et=Math.sqrt(I);t=et*t,e=et*e,g=t*t,f=e*e}const F=g*B+f*d,b=(g*f-F)/F;let y=Math.sqrt(Math.max(0,b));i===s&&(y=-y);const _=y*t*c/e,Q=-y*e*u/t,D=Math.cos(A)*_-Math.sin(A)*Q+(n.x+o.x)/2,S=Math.sin(A)*_+Math.cos(A)*Q+(n.y+o.y)/2,M=_a(1,0,(u-_)/t,(c-Q)/e),V=_a((u-_)/t,(c-Q)/e,(-u-_)/t,(-c-Q)/e)%(Math.PI*2);r.ellipse(D,S,t,e,A,M,M+V,s===0)}const wt={WHITESPACE:/[ \t\r\n]/,DIGIT:/\d/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/};function be(r,t,e=0){let o=0,a=!0,l="",u="";const c=[];function g(I,F,b){const y=new SyntaxError(`Unexpected character "${I}" at index ${F}.`);throw y.partial=b,y}function f(){l!==""&&(u===""?c.push(Number(l)):c.push(Number(l)*10**Number(u))),l="",u=""}let d;const B=r.length;for(let I=0;I<B;I++){if(d=r[I],Array.isArray(t)&&t.includes(c.length%e)&&wt.FLAGS.test(d)){o=1,l=d,f();continue}if(o===0){if(wt.WHITESPACE.test(d))continue;if(wt.DIGIT.test(d)||wt.SIGN.test(d)){o=1,l=d;continue}if(wt.POINT.test(d)){o=2,l=d;continue}wt.COMMA.test(d)&&(a&&g(d,I,c),a=!0)}if(o===1){if(wt.DIGIT.test(d)){l+=d;continue}if(wt.POINT.test(d)){l+=d,o=2;continue}if(wt.EXP.test(d)){o=3;continue}wt.SIGN.test(d)&&l.length===1&&wt.SIGN.test(l[0])&&g(d,I,c)}if(o===2){if(wt.DIGIT.test(d)){l+=d;continue}if(wt.EXP.test(d)){o=3;continue}wt.POINT.test(d)&&l[l.length-1]==="."&&g(d,I,c)}if(o===3){if(wt.DIGIT.test(d)){u+=d;continue}if(wt.SIGN.test(d)){if(u===""){u+=d;continue}u.length===1&&wt.SIGN.test(u)&&g(d,I,c)}}wt.WHITESPACE.test(d)?(f(),o=0,a=!1):wt.COMMA.test(d)?(f(),o=0,a=!0):wt.SIGN.test(d)?(f(),o=1,l=d):wt.POINT.test(d)?(f(),o=2,l=d):g(d,I,c)}return f(),c}function LA(r,t){return r-(t-r)}function ba(r,t){const e=new O,A=new O;for(let i=0,s=r.length;i<s;i++){const n=r[i];if(n.type==="m"||n.type==="M")n.type==="m"?e.add(n):e.copy(n),t.moveTo(e.x,e.y),A.copy(e);else if(n.type==="h"||n.type==="H")n.type==="h"?e.x+=n.x:e.x=n.x,t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="v"||n.type==="V")n.type==="v"?e.y+=n.y:e.y=n.y,t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="l"||n.type==="L")n.type==="l"?e.add(n):e.copy(n),t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="c"||n.type==="C")n.type==="c"?(t.bezierCurveTo(e.x+n.x1,e.y+n.y1,e.x+n.x2,e.y+n.y2,e.x+n.x,e.y+n.y),A.x=e.x+n.x2,A.y=e.y+n.y2,e.add(n)):(t.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y),A.x=n.x2,A.y=n.y2,e.copy(n));else if(n.type==="s"||n.type==="S")n.type==="s"?(t.bezierCurveTo(LA(e.x,A.x),LA(e.y,A.y),e.x+n.x2,e.y+n.y2,e.x+n.x,e.y+n.y),A.x=e.x+n.x2,A.y=e.y+n.y2,e.add(n)):(t.bezierCurveTo(LA(e.x,A.x),LA(e.y,A.y),n.x2,n.y2,n.x,n.y),A.x=n.x2,A.y=n.y2,e.copy(n));else if(n.type==="q"||n.type==="Q")n.type==="q"?(t.quadraticCurveTo(e.x+n.x1,e.y+n.y1,e.x+n.x,e.y+n.y),A.x=e.x+n.x1,A.y=e.y+n.y1,e.add(n)):(t.quadraticCurveTo(n.x1,n.y1,n.x,n.y),A.x=n.x1,A.y=n.y1,e.copy(n));else if(n.type==="t"||n.type==="T"){const o=LA(e.x,A.x),a=LA(e.y,A.y);A.x=o,A.y=a,n.type==="t"?(t.quadraticCurveTo(o,a,e.x+n.x,e.y+n.y),e.add(n)):(t.quadraticCurveTo(o,a,n.x,n.y),e.copy(n))}else if(n.type==="a"||n.type==="A"){const o=e.clone();if(n.type==="a"){if(n.x===0&&n.y===0)continue;e.add(n)}else{if(e.equals(n))continue;e.copy(n)}A.copy(e),jh(t,n.rx,n.ry,n.angle,n.largeArcFlag,n.sweepFlag,o,e)}else n.type==="z"||n.type==="Z"?(t.startPoint&&e.copy(t.startPoint),t.closePath()):console.warn("Unsupported commands",n)}}function Zh(r){let t,e;const A=[];for(let i=0,s=r.length;i<s;i++){const n=r[i];switch(n.type){case"m":case"M":if(n.x.toFixed(4)===e?.x.toFixed(4)&&n.y.toFixed(4)===e?.y.toFixed(4))continue;A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y},t={x:n.x,y:n.y};break;case"h":case"H":A.push(`${n.type} ${n.x}`),e={x:n.x,y:e?.y??0};break;case"v":case"V":A.push(`${n.type} ${n.y}`),e={x:e?.x??0,y:n.y};break;case"l":case"L":A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"c":case"C":A.push(`${n.type} ${n.x1} ${n.y1} ${n.x2} ${n.y2} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"s":case"S":A.push(`${n.type} ${n.x2} ${n.y2} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"q":case"Q":A.push(`${n.type} ${n.x1} ${n.y1} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"t":case"T":A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"a":case"A":A.push(`${n.type} ${n.rx} ${n.ry} ${n.angle} ${n.largeArcFlag} ${n.sweepFlag} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"z":case"Z":A.push(n.type),t&&(e={x:t.x,y:t.y});break}}return A.join(" ")}const $h=/[a-df-z][^a-df-z]*/gi;function xa(r){const t=[],e=r.match($h);if(!e)return t;for(let A=0,i=e.length;A<i;A++){const s=e[A],n=s.charAt(0),o=s.slice(1).trim();let a;switch(n){case"m":case"M":a=be(o);for(let l=0,u=a.length;l<u;l+=2)l===0?t.push({type:n,x:a[l],y:a[l+1]}):t.push({type:n==="m"?"l":"L",x:a[l],y:a[l+1]});break;case"h":case"H":a=be(o);for(let l=0,u=a.length;l<u;l++)t.push({type:n,x:a[l]});break;case"v":case"V":a=be(o);for(let l=0,u=a.length;l<u;l++)t.push({type:n,y:a[l]});break;case"l":case"L":a=be(o);for(let l=0,u=a.length;l<u;l+=2)t.push({type:n,x:a[l],y:a[l+1]});break;case"c":case"C":a=be(o);for(let l=0,u=a.length;l<u;l+=6)t.push({type:n,x1:a[l],y1:a[l+1],x2:a[l+2],y2:a[l+3],x:a[l+4],y:a[l+5]});break;case"s":case"S":a=be(o);for(let l=0,u=a.length;l<u;l+=4)t.push({type:n,x2:a[l],y2:a[l+1],x:a[l+2],y:a[l+3]});break;case"q":case"Q":a=be(o);for(let l=0,u=a.length;l<u;l+=4)t.push({type:n,x1:a[l],y1:a[l+1],x:a[l+2],y:a[l+3]});break;case"t":case"T":a=be(o);for(let l=0,u=a.length;l<u;l+=2)t.push({type:n,x:a[l],y:a[l+1]});break;case"a":case"A":a=be(o,[3,4],7);for(let l=0,u=a.length;l<u;l+=7)t.push({type:n,rx:a[l],ry:a[l+1],angle:a[l+2],largeArcFlag:a[l+3],sweepFlag:a[l+4],x:a[l+5],y:a[l+6]});break;case"z":case"Z":t.push({type:n});break;default:console.warn(s)}}return t}const Fa="data:image/svg+xml;",Sa=`${Fa}base64,`,Ma=`${Fa}charset=utf8,`;function Hs(r){if(typeof r=="string"){let t;r.startsWith(Sa)?(r=r.substring(Sa.length,r.length),t=atob(r)):r.startsWith(Ma)?(r=r.substring(Ma.length,r.length),t=decodeURIComponent(r)):t=r;const e=new DOMParser().parseFromString(t,"text/xml"),A=e.querySelector("parsererror");if(A)throw new Error(`${A.textContent??"parser error"}
|
|
277
|
-
${t}`);return e.documentElement}else return r}const tg="px",eg=90,Ra=["mm","cm","in","pt","pc","px"],Pa={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function pt(r){let t="px";if(typeof r=="string")for(let A=0,i=Ra.length;A<i;A++){const s=Ra[A];if(r.endsWith(s)){t=s,r=r.substring(0,r.length-s.length);break}}let e;return e=Pa[t][tg],e<0&&(e=Pa[t].in*eg),e*Number.parseFloat(r)}const Ag=new Lt,Er=new Lt,ka=new Lt,Ua=new Lt;function ig(r,t,e){if(!(r.hasAttribute("transform")||r.nodeName==="use"&&(r.hasAttribute("x")||r.hasAttribute("y"))))return null;const A=rg(r);return e.length>0&&A.premultiply(e[e.length-1]),t.copy(A),e.push(A),A}function rg(r){const t=new Lt,e=Ag;if(r.nodeName==="use"&&(r.hasAttribute("x")||r.hasAttribute("y"))&&t.translate(pt(r.getAttribute("x")),pt(r.getAttribute("y"))),r.hasAttribute("transform")){const A=r.getAttribute("transform").split(")");for(let i=A.length-1;i>=0;i--){const s=A[i].trim();if(s==="")continue;const n=s.indexOf("("),o=s.length;if(n>0&&n<o){const a=s.slice(0,n),l=be(s.slice(n+1));switch(e.identity(),a){case"translate":if(l.length>=1){const u=l[0];let c=0;l.length>=2&&(c=l[1]),e.translate(u,c)}break;case"rotate":if(l.length>=1){let u=0,c=0,g=0;u=l[0]*Math.PI/180,l.length>=3&&(c=l[1],g=l[2]),Er.makeTranslation(-c,-g),ka.makeRotation(u),Ua.multiplyMatrices(ka,Er),Er.makeTranslation(c,g),e.multiplyMatrices(Er,Ua)}break;case"scale":l.length>=1&&e.scale(l[0],l[1]??l[0]);break;case"skewX":l.length===1&&e.set(1,Math.tan(l[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":l.length===1&&e.set(1,0,0,Math.tan(l[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":l.length===6&&e.set(l[0],l[2],l[4],l[1],l[3],l[5],0,0,1);break}}t.premultiply(e)}}return t}function sg(r){return new Mt().arc(pt(r.getAttribute("cx")||0),pt(r.getAttribute("cy")||0),pt(r.getAttribute("r")||0),0,Math.PI*2)}function ng(r,t){if(!(!r.sheet||!r.sheet.cssRules||!r.sheet.cssRules.length))for(let e=0;e<r.sheet.cssRules.length;e++){const A=r.sheet.cssRules[e];if(A.type!==1)continue;const i=A.selectorText.split(/,/g).filter(Boolean).map(n=>n.trim()),s={};for(let n=A.style.length,o=0;o<n;o++){const a=A.style.item(o);s[a]=A.style.getPropertyValue(a)}for(let n=0;n<i.length;n++)t[i[n]]=Object.assign(t[i[n]]||{},{...s})}}function og(r){return new Mt().ellipse(pt(r.getAttribute("cx")||0),pt(r.getAttribute("cy")||0),pt(r.getAttribute("rx")||0),pt(r.getAttribute("ry")||0),0,0,Math.PI*2)}function ag(r){return new Mt().moveTo(pt(r.getAttribute("x1")||0),pt(r.getAttribute("y1")||0)).lineTo(pt(r.getAttribute("x2")||0),pt(r.getAttribute("y2")||0))}function lg(r){const t=new Mt,e=r.getAttribute("d");return!e||e==="none"?null:(t.addData(e),t)}const ug=/([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g;function cg(r){const t=new Mt;let e=0;return r.getAttribute("points")?.replace(ug,(A,i,s)=>{const n=pt(i),o=pt(s);return e===0?t.moveTo(n,o):t.lineTo(n,o),e++,A}),t.currentCurve.autoClose=!0,t}const hg=/([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g;function gg(r){const t=new Mt;let e=0;return r.getAttribute("points")?.replace(hg,(A,i,s)=>{const n=pt(i),o=pt(s);return e===0?t.moveTo(n,o):t.lineTo(n,o),e++,A}),t.currentCurve.autoClose=!1,t}function fg(r){const t=pt(r.getAttribute("x")||0),e=pt(r.getAttribute("y")||0),A=pt(r.getAttribute("rx")||r.getAttribute("ry")||0),i=pt(r.getAttribute("ry")||r.getAttribute("rx")||0),s=pt(r.getAttribute("width")),n=pt(r.getAttribute("height")),o=1-.551915024494,a=new Mt;return a.moveTo(t+A,e),a.lineTo(t+s-A,e),(A!==0||i!==0)&&a.bezierCurveTo(t+s-A*o,e,t+s,e+i*o,t+s,e+i),a.lineTo(t+s,e+n-i),(A!==0||i!==0)&&a.bezierCurveTo(t+s,e+n-i*o,t+s-A*o,e+n,t+s-A,e+n),a.lineTo(t+A,e+n),(A!==0||i!==0)&&a.bezierCurveTo(t+A*o,e+n,t,e+n-i*o,t,e+n-i),a.lineTo(t,e+i),(A!==0||i!==0)&&a.bezierCurveTo(t,e+i*o,t+A*o,e,t+A,e),a}function xe(r,t,e){t=Object.assign({},t);let A={};if(r.hasAttribute("class")){const l=r.getAttribute("class").split(/\s/).filter(Boolean).map(u=>u.trim());for(let u=0;u<l.length;u++)A=Object.assign(A,e[`.${l[u]}`])}r.hasAttribute("id")&&(A=Object.assign(A,e[`#${r.getAttribute("id")}`]));for(let l=r.style.length,u=0;u<l;u++){const c=r.style.item(u),g=r.style.getPropertyValue(c);t[c]=g,A[c]=g}function i(l,u,c=s){r.hasAttribute(l)&&(t[u]=c(r.getAttribute(l))),A[l]&&(t[u]=c(A[l]))}function s(l){return l.startsWith("url")&&console.warn("url access in attributes is not implemented."),l}function n(l){return Math.max(0,Math.min(1,pt(l)))}function o(l){return Math.max(0,pt(l))}function a(l){return l.split(" ").filter(u=>u!=="").map(u=>pt(u))}return i("fill","fill"),i("fill-opacity","fillOpacity",n),i("fill-rule","fillRule"),i("opacity","opacity",n),i("stroke","stroke"),i("stroke-opacity","strokeOpacity",n),i("stroke-width","strokeWidth",o),i("stroke-linecap","strokeLinecap"),i("stroke-linejoin","strokeLinejoin"),i("stroke-miterlimit","strokeMiterlimit",o),i("stroke-dasharray","strokeDasharray",a),i("stroke-dashoffset","strokeDashoffset",pt),i("visibility","visibility"),t}function Js(r,t,e=[],A={}){if(r.nodeType!==1)return e;let i=!1,s=null,n={...t};switch(r.nodeName){case"svg":n=xe(r,n,A);break;case"style":ng(r,A);break;case"g":n=xe(r,n,A);break;case"path":n=xe(r,n,A),r.hasAttribute("d")&&(s=lg(r));break;case"rect":n=xe(r,n,A),s=fg(r);break;case"polygon":n=xe(r,n,A),s=cg(r);break;case"polyline":n=xe(r,n,A),s=gg(r);break;case"circle":n=xe(r,n,A),s=sg(r);break;case"ellipse":n=xe(r,n,A),s=og(r);break;case"line":n=xe(r,n,A),s=ag(r);break;case"defs":i=!0;break;case"use":{n=xe(r,n,A);const g=(r.getAttributeNS("http://www.w3.org/1999/xlink","href")||r.getAttribute("href")||"").substring(1),f=r.viewportElement?.getElementById(g);f?Js(f,n,e,A):console.warn(`'use node' references non-existent node id: ${g}`);break}default:console.warn(r);break}if(n.display==="none")return e;const o=new Lt,a=[],l=ig(r,o,a);s&&(s.applyTransform(o),e.push(s),s.style={...n});const u=r.childNodes;for(let c=0,g=u.length;c<g;c++){const f=u[c];i&&f.nodeName!=="style"&&f.nodeName!=="defs"||Js(f,n,e,A)}return l&&(a.pop(),a.length>0?o.copy(a[a.length-1]):o.identity()),e}function Ks(r){const t=Hs(r);return new iA(Js(t,{}),t.getAttribute("viewBox")?.trim().split(" ").map(e=>Number(e)))}function Na(r,t,e,A,i){const s=(A-t)*.5,n=(i-e)*.5,o=r*r,a=r*o;return(2*e-2*A+s+n)*a+(-3*e+3*A-2*s-n)*o+s*r+e}function dg(r,t){const e=1-r;return e*e*e*t}function Ig(r,t){const e=1-r;return 3*e*e*r*t}function pg(r,t){return 3*(1-r)*r*r*t}function Eg(r,t){return r*r*r*t}function Ta(r,t,e,A,i){return dg(r,t)+Ig(r,e)+pg(r,A)+Eg(r,i)}function La(r,t={}){let{vertices:e=[],indices:A=[],holes:i=[],verticesStride:s=2,verticesOffset:n=e.length/s,indicesOffset:o=A.length}=t;const a=Mh(r,i,2);if(a.length){for(let u=0;u<a.length;u+=3)A[o++]=a[u]+n,A[o++]=a[u+1]+n,A[o++]=a[u+2]+n;let l=n*s;for(let u=0;u<r.length;u+=2)e[l]=r[u],e[l+1]=r[u+1],l+=s}return{vertices:e,indices:A}}const Bg=8,Br=11920929e-14,Cg=1;function Qg(r,t,e,A,i,s,n,o,a=.5,l=[]){const c=Math.min(.99,Math.max(0,a));let g=(Cg-c)/1;return g*=g,Ys(r,t,e,A,i,s,n,o,l,g,0),l.push(n,o),l}function Ys(r,t,e,A,i,s,n,o,a,l,u){if(u>Bg)return;const c=(r+e)/2,g=(t+A)/2,f=(e+i)/2,d=(A+s)/2,B=(i+n)/2,I=(s+o)/2,F=(c+f)/2,b=(g+d)/2,y=(f+B)/2,_=(d+I)/2,Q=(F+y)/2,D=(b+_)/2;if(u>0){let S=n-r,M=o-t;const V=Math.abs((e-n)*M-(A-o)*S),et=Math.abs((i-n)*M-(s-o)*S);if(V>Br&&et>Br){if((V+et)*(V+et)<=l*(S*S+M*M)){a.push(Q,D);return}}else if(V>Br){if(V*V<=l*(S*S+M*M)){a.push(Q,D);return}}else if(et>Br){if(et*et<=l*(S*S+M*M)){a.push(Q,D);return}}else if(S=Q-(r+n)/2,M=D-(t+o)/2,S*S+M*M<=l){a.push(Q,D);return}}Ys(r,t,c,g,F,b,Q,D,a,l,u+1),Ys(Q,D,y,_,B,I,n,o,a,l,u+1)}const yg=8,Dg=11920929e-14,mg=1;function wg(r,t,e,A,i,s,n=.5,o=[]){const l=Math.min(.99,Math.max(0,n));let u=(mg-l)/1;return u*=u,Vs(o,r,t,e,A,i,s,u,0),o.push(i,s),o}function Vs(r,t,e,A,i,s,n,o,a){if(a>yg)return;const l=(t+A)/2,u=(e+i)/2,c=(A+s)/2,g=(i+n)/2,f=(l+c)/2,d=(u+g)/2;let B=s-t,I=n-e;const F=Math.abs((A-s)*I-(i-n)*B);if(F>Dg){if(F*F<=o*(B*B+I*I)){r.push(f,d);return}}else if(B=f-(t+s)/2,I=d-(e+n)/2,B*B+I*I<=o){r.push(f,d);return}Vs(r,t,e,l,u,f,d,o,a+1),Vs(r,f,d,c,g,s,n,o,a+1)}function vg(r,t){let e=!1;const[A,i]=r,s=t.length/2;for(let n=0,o=s-1;n<s;o=n++){const a=t[n*2],l=t[n*2+1],u=t[o*2],c=t[o*2+1];l>i!=c>i&&A<(u-a)*(i-l)/(c-l)+a&&(e=!e)}return e}function _g(r,t){const e=1-r;return e*e*t}function bg(r,t){return 2*(1-r)*r*t}function xg(r,t){return r*r*t}function Ga(r,t,e,A){return _g(r,t)+bg(r,e)+xg(r,A)}const Fg=1e-4,Oa=1e-4;function Sg(r,t={}){const{vertices:e=[],indices:A=[],lineStyle:i={alignment:.5,cap:"butt",join:"miter",width:1,miterLimit:10},flipAlignment:s=!1,closed:n=!0}=t,o=Fg;if(r.length===0)return{vertices:e,indices:A};const a=i;let l=a.alignment;if(i.alignment!==.5){let T=Mg(r);s&&(T*=-1),l=(l-.5)*T+.5}const u={x:r[0],y:r[1]},c={x:r[r.length-2],y:r[r.length-1]},g=n,f=Math.abs(u.x-c.x)<o&&Math.abs(u.y-c.y)<o;if(g){r=r.slice(),f&&(r.pop(),r.pop(),c.x=r[r.length-2],c.y=r[r.length-1]);const T=(u.x+c.x)*.5,tt=(c.y+u.y)*.5;r.unshift(T,tt),r.push(T,tt)}const d=e,B=r.length/2;let I=r.length;const F=d.length/2,b=a.width/2,y=b*b,_=a.miterLimit*a.miterLimit;let Q=r[0],D=r[1],S=r[2],M=r[3],V=0,et=0,z=-(D-M),J=Q-S,$=0,K=0,L=Math.sqrt(z*z+J*J);z/=L,J/=L,z*=b,J*=b;const it=l,G=(1-it)*2,W=it*2;g||(a.cap==="round"?I+=yA(Q-z*(G-W)*.5,D-J*(G-W)*.5,Q-z*G,D-J*G,Q+z*W,D+J*W,d,!0)+2:a.cap==="square"&&(I+=Ha(Q,D,z,J,G,W,!0,d))),d.push(Q-z*G,D-J*G),d.push(Q+z*W,D+J*W);for(let T=1;T<B-1;++T){Q=r[(T-1)*2],D=r[(T-1)*2+1],S=r[T*2],M=r[T*2+1],V=r[(T+1)*2],et=r[(T+1)*2+1],z=-(D-M),J=Q-S,L=Math.sqrt(z*z+J*J),z/=L,J/=L,z*=b,J*=b,$=-(M-et),K=S-V,L=Math.sqrt($*$+K*K),$/=L,K/=L,$*=b,K*=b;const tt=S-Q,k=D-M,P=S-V,q=et-M,Z=tt*P+k*q,nt=k*P-q*tt,X=nt<0;if(Math.abs(nt)<.001*Math.abs(Z)){d.push(S-z*G,M-J*G),d.push(S+z*W,M+J*W),Z>=0&&(a.join==="round"?I+=yA(S,M,S-z*G,M-J*G,S-$*G,M-K*G,d,!1)+4:I+=2,d.push(S-$*W,M-K*W),d.push(S+$*G,M+K*G));continue}const It=(-z+Q)*(-J+M)-(-z+S)*(-J+D),ie=(-$+V)*(-K+M)-(-$+S)*(-K+et),re=(tt*ie-P*It)/nt,Nt=(q*It-k*ie)/nt,ct=(re-S)*(re-S)+(Nt-M)*(Nt-M),yt=S+(re-S)*G,Tt=M+(Nt-M)*G,Jt=S-(re-S)*W,_t=M-(Nt-M)*W,Zt=Math.min(tt*tt+k*k,P*P+q*q),Le=X?G:W,Xr=Zt+Le*Le*y;ct<=Xr?a.join==="bevel"||ct/y>_?(X?(d.push(yt,Tt),d.push(S+z*W,M+J*W),d.push(yt,Tt),d.push(S+$*W,M+K*W)):(d.push(S-z*G,M-J*G),d.push(Jt,_t),d.push(S-$*G,M-K*G),d.push(Jt,_t)),I+=2):a.join==="round"?X?(d.push(yt,Tt),d.push(S+z*W,M+J*W),I+=yA(S,M,S+z*W,M+J*W,S+$*W,M+K*W,d,!0)+4,d.push(yt,Tt),d.push(S+$*W,M+K*W)):(d.push(S-z*G,M-J*G),d.push(Jt,_t),I+=yA(S,M,S-z*G,M-J*G,S-$*G,M-K*G,d,!1)+4,d.push(S-$*G,M-K*G),d.push(Jt,_t)):(d.push(yt,Tt),d.push(Jt,_t)):(d.push(S-z*G,M-J*G),d.push(S+z*W,M+J*W),a.join==="round"?X?I+=yA(S,M,S+z*W,M+J*W,S+$*W,M+K*W,d,!0)+2:I+=yA(S,M,S-z*G,M-J*G,S-$*G,M-K*G,d,!1)+2:a.join==="miter"&&ct/y<=_&&(X?(d.push(Jt,_t),d.push(Jt,_t)):(d.push(yt,Tt),d.push(yt,Tt)),I+=2),d.push(S-$*G,M-K*G),d.push(S+$*W,M+K*W),I+=2)}Q=r[(B-2)*2],D=r[(B-2)*2+1],S=r[(B-1)*2],M=r[(B-1)*2+1],z=-(D-M),J=Q-S,L=Math.sqrt(z*z+J*J),z/=L,J/=L,z*=b,J*=b,d.push(S-z*G,M-J*G),d.push(S+z*W,M+J*W),g||(a.cap==="round"?I+=yA(S-z*(G-W)*.5,M-J*(G-W)*.5,S-z*G,M-J*G,S+z*W,M+J*W,d,!1)+2:a.cap==="square"&&(I+=Ha(S,M,z,J,G,W,!1,d)));const At=Oa*Oa;for(let T=F;T<I+F-2;++T)Q=d[T*2],D=d[T*2+1],S=d[(T+1)*2],M=d[(T+1)*2+1],V=d[(T+2)*2],et=d[(T+2)*2+1],!(Math.abs(Q*(M-et)+S*(et-D)+V*(D-M))<At)&&A.push(T,T+1,T+2);return{vertices:e,indices:A}}function Mg(r){const t=r.length;if(t<6)return 1;let e=0;for(let A=0,i=r[t-2],s=r[t-1];A<t;A+=2){const n=r[A],o=r[A+1];e+=(n-i)*(o+s),i=n,s=o}return e<0?-1:1}function Ha(r,t,e,A,i,s,n,o){const a=r-e*i,l=t-A*i,u=r+e*s,c=t+A*s;let g,f;n?(g=A,f=-e):(g=-A,f=e);const d=a+g,B=l+f,I=u+g,F=c+f;return o.push(d,B),o.push(I,F),2}function yA(r,t,e,A,i,s,n,o){const a=e-r,l=A-t;let u=Math.atan2(a,l),c=Math.atan2(i-r,s-t);o&&u<c?u+=Math.PI*2:!o&&u>c&&(c+=Math.PI*2);let g=u;const f=c-u,d=Math.abs(f),B=Math.sqrt(a*a+l*l),I=(15*d*Math.sqrt(B)/Math.PI>>0)+1,F=f/I;if(g+=F,o){n.push(r,t),n.push(e,A);for(let b=1,y=g;b<I;b++,y+=F)n.push(r,t),n.push(r+Math.sin(y)*B,t+Math.cos(y)*B);n.push(r,t),n.push(i,s)}else{n.push(e,A),n.push(r,t);for(let b=1,y=g;b<I;b++,y+=F)n.push(r+Math.sin(y)*B,t+Math.cos(y)*B),n.push(r,t);n.push(i,s),n.push(r,t)}return I*2}class GA{arcLengthDivision=200;_arcLengths;getPointAt(t,e=new O){return this.getPoint(this.getUToTMapping(t),e)}isClockwise(){const t=this.getPoint(1),e=this.getPoint(.5),A=this.getPoint(1);return(e.x-t.x)*(A.y-e.y)-(e.y-t.y)*(A.x-e.x)<0}getControlPointRefs(){return[]}applyTransform(t){const e=typeof t=="function";return this.getControlPointRefs().forEach(A=>{e?t(A):A.applyMatrix3(t)}),this}getUnevenVertices(t=5,e=[]){const A=new O;for(let i=0,s=Math.max(1,t)-1;i<=s;i++)this.getPoint(i/s,A),e.push(A.x,A.y);return e}getSpacedVertices(t=5,e=[]){const A=new O;for(let i=0,s=Math.max(1,t)-1;i<=s;i++)this.getPointAt(i/s,A),e.push(A.x,A.y);return e}getAdaptiveVertices(t=[]){return this.getUnevenVertices(5,t)}_verticesToPoints(t,e=[]){for(let A=0,i=t.length;A<i;A+=2){const s=t[A],n=t[A+1];e.push(new O(s,n))}return e}getSpacedPoints(t,e=[]){const A=this.getSpacedVertices(t);return this._verticesToPoints(A,e),e}getUnevenPoints(t,e=[]){const A=this.getUnevenVertices(t);return this._verticesToPoints(A,e),e}getAdaptivePoints(t=[]){const e=this.getAdaptiveVertices();return this._verticesToPoints(e,t),t}getPoints(t,e=[]){let A;return t?A=this.getUnevenVertices(t):A=this.getAdaptiveVertices(),this._verticesToPoints(A,e),e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(){return(!this._arcLengths||this._arcLengths.length!==this.arcLengthDivision+1)&&this.updateLengths(),this._arcLengths}updateLengths(){const t=this.arcLengthDivision,e=[0];for(let A=0,i=this.getPoint(0),s=1;s<=t;s++){const n=this.getPoint(s/t);A+=n.distanceTo(i),e.push(A),i=n}this._arcLengths=e}getUToTMapping(t,e){const A=this.getLengths(),i=A.length,s=e??t*A[i-1];if(i<2)return s/A[0];let n=0,o=0,a=i-1,l;for(;o<=a;)if(n=Math.floor(o+(a-o)/2),l=A[n]-s,l<0)o=n+1;else if(l>0)a=n-1;else{a=n;break}if(n=a,A[n]===s)return n/(i-1);const u=A[n],g=A[n+1]-u,f=(s-u)/g;return(n+f)/(i-1)}getTangent(t,e=new O){const i=Math.max(0,t-1e-4),s=Math.min(1,t+1e-4);return e.copy(this.getPoint(s).sub(this.getPoint(i)).normalize())}getTangentAt(t,e){return this.getTangent(this.getUToTMapping(t),e)}getNormal(t,e=new O){return this.getTangent(t,e),e.set(-e.y,e.x).normalize()}getNormalAt(t,e){return this.getNormal(this.getUToTMapping(t),e)}getTForPoint(t,e=.001){let A=0,i=1,s=(A+i)/2;for(;i-A>e;){s=(A+i)/2;const n=this.getPoint(s);if(n.distanceTo(t)<e)return s;n.x<t.x?A=s:i=s}return s}getMinMax(t=O.MAX,e=O.MIN){const A=this.getPoints();for(let i=0,s=A.length;i<s;i++){const n=A[i];t.min(n),e.max(n)}return{min:t.finite(),max:e.finite()}}getBoundingBox(){const{min:t,max:e}=this.getMinMax();return new ut(t.x,t.y,e.x-t.x,e.y-t.y)}getFillVertices(t){return this.getAdaptiveVertices()}fillTriangulate(t){return La(this.getFillVertices(t),t)}strokeTriangulate(t){return Sg(this.getAdaptiveVertices(),t)}toCommands(){const t=[],e=this.getPoints();for(let A=0,i=e.length;A<i;A++){const s=e[A];A===0?t.push({type:"M",x:s.x,y:s.y}):t.push({type:"L",x:s.x,y:s.y})}return t}toData(){return Zh(this.toCommands())}drawTo(t){return this.toCommands().forEach(e=>{switch(e.type){case"M":t.moveTo(e.x,e.y);break;case"L":t.lineTo(e.x,e.y);break}}),this}copy(t){return this.arcLengthDivision=t.arcLengthDivision,this}clone(){return new this.constructor().copy(this)}}const Rg=new Lt,Ja=new Lt,Ka=new Lt,Cr=new O;class zs extends GA{constructor(t=new O,e=new O,A=new O,i=0,s=0,n=Math.PI*2,o=!1){super(),this._center=t,this._radius=e,this._diff=A,this.rotate=i,this.startAngle=s,this.endAngle=n,this.clockwise=o}get cx(){return this._center.x}set cx(t){this._center.x=t}get cy(){return this._center.y}set cy(t){this._center.y=t}get rx(){return this._radius.x}set rx(t){this._radius.x=t}get ry(){return this._radius.y}set ry(t){this._radius.y=t}get dx(){return this._diff.x}set dx(t){this._diff.x=t}get dy(){return this._diff.y}set dy(t){this._diff.y=t}isClockwise(){return this.clockwise}_getDeltaAngle(){const t=Math.PI*2;let e=this.endAngle-this.startAngle;const A=Math.abs(e)<Number.EPSILON;return e=(e%t+t)%t,A?e=0:this.clockwise||(e=e===0?-t:e-t),e}getPoint(t,e=new O){const A=this._getDeltaAngle(),i=this.startAngle+t*A;let s=this.cx+this.rx*Math.cos(i),n=this.cy+this.ry*Math.sin(i);if(this.rotate!==0){const o=Math.cos(this.rotate),a=Math.sin(this.rotate),l=s-this.cx,u=n-this.cy;s=l*o-u*a+this.cx,n=l*a+u*o+this.cy}return e.set(s,n)}toCommands(){const{cx:t,cy:e,rx:A,ry:i,startAngle:s,endAngle:n,clockwise:o,rotate:a}=this,l=t+A*Math.cos(s)*Math.cos(a)-i*Math.sin(s)*Math.sin(a),u=e+A*Math.cos(s)*Math.sin(a)+i*Math.sin(s)*Math.cos(a),c=Math.abs(s-n),g=c>Math.PI?1:0,f=o?1:0,d=a*180/Math.PI;if(c>=2*Math.PI){const B=s+Math.PI,I=t+A*Math.cos(B)*Math.cos(a)-i*Math.sin(B)*Math.sin(a),F=e+A*Math.cos(B)*Math.sin(a)+i*Math.sin(B)*Math.cos(a);return[{type:"M",x:l,y:u},{type:"A",rx:A,ry:i,angle:d,largeArcFlag:0,sweepFlag:f,x:I,y:F},{type:"A",rx:A,ry:i,angle:d,largeArcFlag:0,sweepFlag:f,x:l,y:u}]}else{const B=t+A*Math.cos(n)*Math.cos(a)-i*Math.sin(n)*Math.sin(a),I=e+A*Math.cos(n)*Math.sin(a)+i*Math.sin(n)*Math.cos(a);return[{type:"M",x:l,y:u},{type:"A",rx:A,ry:i,angle:d,largeArcFlag:g,sweepFlag:f,x:B,y:I}]}}drawTo(t){const{cx:e,cy:A,rx:i,ry:s,rotate:n,startAngle:o,endAngle:a,clockwise:l}=this;return t.ellipse(e,A,i,s,n,o,a,!l),this}applyTransform(t){return Cr.set(this.cx,this.cy),Cr.applyMatrix3(t),this.cx=Cr.x,this.cy=Cr.y,Ug(t)?Pg(this,t):kg(this,t),this}getControlPointRefs(){return[this._center]}_getAdaptiveVerticesByArc(t=[]){const{cx:e,cy:A,rx:i,ry:s,dx:n,dy:o,startAngle:a,endAngle:l,clockwise:u,rotate:c}=this,g=!u;let f=Math.abs(a-l);(!g&&a>l||g&&l>a)&&(f=2*Math.PI-f);const d=Math.max(12,Math.floor(12*i**(1/3)*(f/Math.PI)));let B=f/d,I=a;B*=g?-1:1;const F=Math.cos(g?c:-c),b=Math.sin(g?c:-c);for(let y=0;y<d+1;y++){const _=n+Math.cos(I)*i,Q=o+Math.sin(I)*s,D=_*F-Q*b,S=_*b+Q*F;t.push(e+D,A+S),I+=B}return t}_getAdaptiveVerticesByCircle(t=[]){const{cx:e,cy:A,rx:i,ry:s,dx:n,dy:o,rotate:a,clockwise:l}=this;if(!(i>=0&&s>=0&&n>=0&&o>=0))return t;const u=Math.ceil(2.3*Math.sqrt(i+s)),c=u*8+(n?4:0)+(o?4:0),g=[];if(c===0)return t;{const B=g.length;if(u===0)g[B]=g[B+6]=e+n,g[B+1]=g[B+3]=A+o,g[B+2]=g[B+4]=e-n,g[B+5]=g[B+7]=A-o;else{let I=B,F=B+u*4+(n?2:0)+2,b=F,y=c,_=n+i,Q=o,D=e+_,S=e-_,M=A+Q;if(g[I++]=D,g[I++]=M,g[--F]=M,g[--F]=S,o){const et=A-Q;g[b++]=S,g[b++]=et,g[--y]=et,g[--y]=D}for(let et=1;et<u;et++){const z=Math.PI/2*(et/u),J=n+Math.cos(z)*i,$=o+Math.sin(z)*s,K=e+J,L=e-J,it=A+$,G=A-$;g[I++]=K,g[I++]=it,g[--F]=it,g[--F]=L,g[b++]=L,g[b++]=G,g[--y]=G,g[--y]=K}_=n,Q=o+s,D=e+_,S=e-_,M=A+Q;const V=A-Q;g[I++]=D,g[I++]=M,g[--y]=V,g[--y]=D,n&&(g[I++]=S,g[I++]=M,g[--y]=V,g[--y]=S)}}const f=Math.cos(l?-a:a),d=Math.sin(l?-a:a);for(let B=0;B<g.length;B+=2){const I=g[B],F=g[B+1],b=I-e,y=F-A,_=b*f-y*d,Q=b*d+y*f;t.push(e+_,A+Q)}return t}getAdaptiveVertices(t=[]){return this.startAngle===0&&this.endAngle===Math.PI*2?this._getAdaptiveVerticesByCircle(t):this._getAdaptiveVerticesByArc(t)}copy(t){return super.copy(t),this.cx=t.cx,this.cy=t.cy,this.rx=t.rx,this.ry=t.ry,this.dx=t.dx,this.dy=t.dy,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.clockwise=t.clockwise,this.rotate=t.rotate,this}}function Pg(r,t){const e=r.rx,A=r.ry,i=Math.cos(r.rotate),s=Math.sin(r.rotate),n=new O(e*i,e*s),o=new O(-A*s,A*i),a=n.applyMatrix3(t),l=o.applyMatrix3(t),u=Rg.set(a.x,l.x,0,a.y,l.y,0,0,0,1),c=Ja.copy(u).invert(),d=Ka.copy(c).transpose().multiply(c).elements,B=Ng(d[0],d[1],d[4]),I=Math.sqrt(B.rt1),F=Math.sqrt(B.rt2);if(r.rx=1/I,r.ry=1/F,r.rotate=Math.atan2(B.sn,B.cs),!((r.endAngle-r.startAngle)%(2*Math.PI)<Number.EPSILON)){const y=Ja.set(I,0,0,0,F,0,0,0,1),_=Ka.set(B.cs,B.sn,0,-B.sn,B.cs,0,0,0,1),Q=y.multiply(_).multiply(u),D=S=>{const{x:M,y:V}=new O(Math.cos(S),Math.sin(S)).applyMatrix3(Q);return Math.atan2(V,M)};r.startAngle=D(r.startAngle),r.endAngle=D(r.endAngle),Ya(t)&&(r.clockwise=!r.clockwise)}}function kg(r,t){const e=Va(t),A=za(t);r.rx*=e,r.ry*=A;const i=e>Number.EPSILON?Math.atan2(t.elements[1],t.elements[0]):Math.atan2(-t.elements[3],t.elements[4]);r.rotate+=i,Ya(t)&&(r.startAngle*=-1,r.endAngle*=-1,r.clockwise=!r.clockwise)}function Ya(r){const t=r.elements;return t[0]*t[4]-t[1]*t[3]<0}function Ug(r){const t=r.elements,e=t[0]*t[3]+t[1]*t[4];if(e===0)return!1;const A=Va(r),i=za(r);return Math.abs(e/(A*i))>Number.EPSILON}function Va(r){const t=r.elements;return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function za(r){const t=r.elements;return Math.sqrt(t[3]*t[3]+t[4]*t[4])}function Ng(r,t,e){let A,i,s,n,o;const a=r+e,l=r-e,u=Math.sqrt(l*l+4*t*t);return a>0?(A=.5*(a+u),o=1/A,i=r*o*e-t*o*t):a<0?i=.5*(a-u):(A=.5*u,i=-.5*u),l>0?s=l+u:s=l-u,Math.abs(s)>2*Math.abs(t)?(o=-2*t/s,n=1/Math.sqrt(1+o*o),s=o*n):Math.abs(t)===0?(s=1,n=0):(o=-.5*s/t,s=1/Math.sqrt(1+o*o),n=o*s),l>0&&(o=s,s=-n,n=o),{rt1:A,rt2:i,cs:s,sn:n}}class Tg extends zs{constructor(t=0,e=0,A=1,i=0,s=Math.PI*2,n=!1){super(new O(t,e),new O(A,A),new O,0,i,s,n)}drawTo(t){const{cx:e,cy:A,rx:i,startAngle:s,endAngle:n,clockwise:o}=this;return t.arc(e,A,i,s,n,!o),this}getAdaptiveVertices(t=[]){const{cx:e,cy:A,rx:i,startAngle:s,endAngle:n,clockwise:o}=this;let a=Math.abs(s-n);(!o&&s>n||o&&n>s)&&(a=2*Math.PI-a);let l=Math.max(6,Math.floor(6*i**(1/3)*(a/Math.PI)));l=Math.max(l,3);let u=a/l,c=s;u*=o?1:-1;for(let g=0;g<l+1;g++){const f=Math.cos(c),d=Math.sin(c),B=e+f*i,I=A+d*i;t.push(B,I),c+=u}return t}}class ze extends GA{constructor(t=new O,e=new O){super(),this.p1=t,this.p2=e}static from(t,e,A,i){return new ze(new O(t,e),new O(A,i))}getPoint(t,e=new O){return t===1?e.copy(this.p2):e.copy(this.p2).sub(this.p1).scale(t).add(this.p1),e}getPointAt(t,e=new O){return this.getPoint(t,e)}getTangent(t,e=new O){return e.subVectors(this.p2,this.p1).normalize()}getTangentAt(t,e=new O){return this.getTangent(t,e)}getControlPointRefs(){return[this.p1,this.p2]}getAdaptiveVertices(t=[]){return t.push(this.p1.x,this.p1.y,this.p2.x,this.p2.y),t}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,p2:i}=this;return t.x=Math.min(t.x,A.x,i.x),t.y=Math.min(t.y,A.y,i.y),e.x=Math.max(e.x,A.x,i.x),e.y=Math.max(e.y,A.y,i.y),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,p2:e}=this;return[{type:"M",x:t.x,y:t.y},{type:"L",x:e.x,y:e.y}]}getFillVertices(t={}){const e=Math.min(this.p1.x,this.p2.x),A=Math.max(this.p1.x,this.p2.x),i=Math.min(this.p1.y,this.p2.y),s=Math.max(this.p1.y,this.p2.y),n=e,o=i,a=A-e||t.style?.strokeWidth||0,l=s-i||t.style?.strokeWidth||0;return[n,o,n+a,o,n+a,o+l,n,o+l]}drawTo(t){const{p1:e,p2:A}=this;return t.lineTo(e.x,e.y),t.lineTo(A.x,A.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.p2.copy(t.p2),this}}class bi extends GA{constructor(t=[]){super(),this.curves=t}getFlatCurves(){return this.curves.flatMap(t=>t instanceof bi?t.getFlatCurves():t)}addCurve(t){return this.curves.push(t),this}getPoint(t,e=new O){const A=t*this.getLength(),i=this.getLengths();let s=0;for(;s<i.length;){if(i[s]>=A){const n=i[s]-A,o=this.curves[s],a=o.getLength();return o.getPointAt(a===0?0:1-n/a,e)}s++}return e}updateLengths(){const t=[];for(let e=0,A=0,i=this.curves.length;e<i;e++)A+=this.curves[e].getLength(),t.push(A);this._arcLengths=t}getControlPointRefs(){return this.curves.flatMap(t=>t.getControlPointRefs())}_removeNextPointIfEqualPrevPoint(t,e){const A=[t[e-1],t[e]],i=[t[e+1],t[e+2]];return A[0]===i[0]&&A[1]===i[1]&&t.splice(e+1,2),t}getSpacedVertices(t=5,e=[]){let A;return this.curves.forEach(i=>{i.getSpacedVertices(t,e),A&&this._removeNextPointIfEqualPrevPoint(e,A),A=e.length-1}),e}getAdaptiveVertices(t=[]){let e;return this.curves.forEach(A=>{A.getAdaptiveVertices(t),e&&this._removeNextPointIfEqualPrevPoint(t,e),e=t.length-1}),t}strokeTriangulate(t){return this.curves.length===1?this.curves[0].strokeTriangulate(t):super.strokeTriangulate(t)}getFillVertices(t){if(this.curves.length===1)return this.curves[0].getFillVertices(t);{const e=[];let A;return this.curves.forEach(i=>{let s;i instanceof ze?s=i.getAdaptiveVertices():s=i.getFillVertices(t),e.push(...s),A&&this._removeNextPointIfEqualPrevPoint(e,A),A=e.length-1}),e}}applyTransform(t){return this.curves.forEach(e=>e.applyTransform(t)),this}getMinMax(t=O.MAX,e=O.MIN){return this.curves.forEach(A=>A.getMinMax(t,e)),{min:t.finite(),max:e.finite()}}getBoundingBox(){const{min:t,max:e}=this.getMinMax();return new ut(t.x,t.y,e.x-t.x,e.y-t.y)}toCommands(){return this.curves.flatMap(t=>t.toCommands())}drawTo(t){const e=this.curves[0]?.getPoint(0);return e&&t.moveTo(e.x,e.y),this.curves.forEach(A=>A.drawTo(t)),this}copy(t){return super.copy(t),this.curves=t.curves.map(e=>e.clone()),this}}class Ws extends GA{constructor(t=new O,e=new O,A=new O,i=new O){super(),this.p1=t,this.cp1=e,this.cp2=A,this.p2=i}static from(t,e,A,i,s,n,o,a){return new Ws(new O(t,e),new O(A,i),new O(s,n),new O(o,a))}getPoint(t,e=new O){const{p1:A,cp1:i,cp2:s,p2:n}=this;return e.set(Ta(t,A.x,i.x,s.x,n.x),Ta(t,A.y,i.y,s.y,n.y))}getAdaptiveVertices(t=[]){return Qg(this.p1.x,this.p1.y,this.cp1.x,this.cp1.y,this.cp2.x,this.cp2.y,this.p2.x,this.p2.y,.5,t)}getControlPointRefs(){return[this.p1,this.cp1,this.cp2,this.p2]}_solveQuadratic(t,e,A){const i=e*e-4*t*A;if(i<0)return[];const s=Math.sqrt(i),n=(-e+s)/(2*t),o=(-e-s)/(2*t);return[n,o].filter(a=>a>=0&&a<=1)}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,cp1:i,cp2:s,p2:n}=this,o=this._solveQuadratic(3*(i.x-A.x),6*(s.x-i.x),3*(n.x-s.x)),a=this._solveQuadratic(3*(i.y-A.y),6*(s.y-i.y),3*(n.y-s.y)),l=[0,1,...o,...a];return((c,g)=>{for(const f of c)for(let d=0;d<=g;d++){const B=d/g-.5,I=Math.min(1,Math.max(0,f+B)),F=this.getPoint(I);t.x=Math.min(t.x,F.x),t.y=Math.min(t.y,F.y),e.x=Math.max(e.x,F.x),e.y=Math.max(e.y,F.y)}})(l,10),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,cp1:e,cp2:A,p2:i}=this;return[{type:"M",x:t.x,y:t.y},{type:"C",x1:e.x,y1:e.y,x2:A.x,y2:A.y,x:i.x,y:i.y}]}drawTo(t){const{p1:e,cp1:A,cp2:i,p2:s}=this;return t.lineTo(e.x,e.y),t.bezierCurveTo(A.x,A.y,i.x,i.y,s.x,s.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.cp1.copy(t.cp1),this.cp2.copy(t.cp2),this.p2.copy(t.p2),this}}class Lg extends zs{constructor(t=0,e=0,A=1,i=1,s=0,n=0,o=Math.PI*2,a=!1){super(new O(t,e),new O(A,i),new O,s,n,o,a)}drawTo(t){return t.ellipse(this.cx,this.cy,this.rx,this.ry,this.rotate,this.startAngle,this.endAngle,!this.clockwise),this}}class Gg extends bi{}class qs extends GA{constructor(t=new O,e=new O,A=new O){super(),this.p1=t,this.cp=e,this.p2=A}static from(t,e,A,i,s,n){return new qs(new O(t,e),new O(A,i),new O(s,n))}getPoint(t,e=new O){const{p1:A,cp:i,p2:s}=this;return e.set(Ga(t,A.x,i.x,s.x),Ga(t,A.y,i.y,s.y)),e}getControlPointRefs(){return[this.p1,this.cp,this.p2]}getAdaptiveVertices(t=[]){return wg(this.p1.x,this.p1.y,this.cp.x,this.cp.y,this.p2.x,this.p2.y,.5,t)}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,cp:i,p2:s}=this,n=.5*(A.x+i.x),o=.5*(A.y+i.y),a=.5*(A.x+s.x),l=.5*(A.y+s.y);return t.x=Math.min(t.x,A.x,s.x,n,a),t.y=Math.min(t.y,A.y,s.y,o,l),e.x=Math.max(e.x,A.x,s.x,n,a),e.y=Math.max(e.y,A.y,s.y,o,l),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,cp:e,p2:A}=this;return[{type:"M",x:t.x,y:t.y},{type:"Q",x1:e.x,y1:e.y,x:A.x,y:A.y}]}drawTo(t){const{p1:e,cp:A,p2:i}=this;return t.lineTo(e.x,e.y),t.quadraticCurveTo(A.x,A.y,i.x,i.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.cp.copy(t.cp),this.p2.copy(t.p2),this}}class Og extends Gg{constructor(t=0,e=0,A=0,i=0){super(),this.x=t,this.y=e,this.width=A,this.height=i,this.update()}update(){const{x:t,y:e,width:A,height:i}=this,s=[new O(t,e),new O(t+A,e),new O(t+A,e+i),new O(t,e+i)];return this.curves=[new ze(s[0],s[1]),new ze(s[1],s[2]),new ze(s[2],s[3]),new ze(s[3],s[0])],this}drawTo(t){return t.rect(this.x,this.y,this.width,this.height),this}getFillVertices(t={}){const{x:e,y:A,width:i,height:s}=this;return[e,A,e+i,A,e+i,A+s,e,A+s]}copy(t){return super.copy(t),this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.update(),this}}class Hg extends zs{constructor(t=0,e=0,A=1,i=1,s=1){super(),this.x=t,this.y=e,this.width=A,this.height=i,this.radius=s,this.update()}update(){const{x:t,y:e,width:A,height:i,radius:s}=this,n=A/2,o=i/2,a=t+n,l=e+o,u=Math.max(0,Math.min(s,Math.min(n,o))),c=u;return this._center=new O(a,l),this._radius=new O(u,c),this._diff=new O(n-u,o-c),this}drawTo(t){const{x:e,y:A,width:i,height:s,radius:n}=this;return t.roundRect(e,A,i,s,n),this}copy(t){return super.copy(t),this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.radius=t.radius,this.update(),this}}class Jg extends GA{constructor(t=[]){super(),this.points=t}getPoint(t,e=new O){const{points:A}=this,i=(A.length-1)*t,s=Math.floor(i),n=i-s,o=A[s===0?s:s-1],a=A[s],l=A[s>A.length-2?A.length-1:s+1],u=A[s>A.length-3?A.length-1:s+2];return e.set(Na(n,o.x,a.x,l.x,u.x),Na(n,o.y,a.y,l.y,u.y)),e}getControlPointRefs(){return this.points}copy(t){super.copy(t),this.points=[];for(let e=0,A=t.points.length;e<A;e++)this.points.push(t.points[e].clone());return this}}class Qr extends bi{startPoint;currentPoint;autoClose=!1;constructor(t){super(),t&&this.addPoints(t)}addPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,A=t.length;e<A;e++){const{x:i,y:s}=t[e];this.lineTo(i,s)}return this}addCommands(t){return ba(t,this),this}addData(t){return this.addCommands(xa(t)),this}_closeVertices(t){return this.autoClose&&t.length>=4&&t[0]!==t[t.length-2]&&t[1]!==t[t.length-1]&&t.push(t[0],t[1]),t}getUnevenVertices(t=40,e=[]){return this._closeVertices(super.getUnevenVertices(t,e))}getSpacedVertices(t=40,e=[]){return this._closeVertices(super.getSpacedVertices(t,e))}getAdaptiveVertices(t=[]){return this._closeVertices(super.getAdaptiveVertices(t))}getFillVertices(t){return this._closeVertices(super.getFillVertices(t))}_setCurrentPoint(t){return this.currentPoint=new O(t.x,t.y),this.startPoint||(this.startPoint=this.currentPoint.clone()),this}_connetLineTo(t){if(this.curves.length>0){const e=t.getPoint(0);(!this.currentPoint||!e.equals(this.currentPoint))&&this.lineTo(e.x,e.y)}return this}closePath(){const t=this.startPoint;if(t){const e=this.currentPoint;e&&!t.equals(e)&&(this.curves.push(new ze(e.clone(),t.clone())),e.copy(t)),this.startPoint=void 0}return this}moveTo(t,e){return this.currentPoint=new O(t,e),this.startPoint=this.currentPoint.clone(),this}lineTo(t,e){const A=this.currentPoint;return A?.equals({x:t,y:e})||this.curves.push(ze.from(A?.x??0,A?.y??0,t,e)),this._setCurrentPoint({x:t,y:e}),this}bezierCurveTo(t,e,A,i,s,n){const o=this.currentPoint;return o?.equals({x:s,y:n})||this.curves.push(Ws.from(o?.x??0,o?.y??0,t,e,A,i,s,n)),this._setCurrentPoint({x:s,y:n}),this}quadraticCurveTo(t,e,A,i){const s=this.currentPoint;return s?.equals({x:A,y:i})||this.curves.push(qs.from(s?.x??0,s?.y??0,t,e,A,i)),this._setCurrentPoint({x:A,y:i}),this}arc(t,e,A,i,s,n){const o=new Tg(t,e,A,i,s,!n);return this._connetLineTo(o),this.curves.push(o),this._setCurrentPoint(o.getPoint(1)),this}relativeArc(t,e,A,i,s,n){return t+=this.currentPoint?.x??0,e+=this.currentPoint?.y??0,this.arc(t,e,A,i,s,n),this}arcTo(t,e,A,i,s){return console.warn("Method arcTo not supported yet"),this}ellipse(t,e,A,i,s,n,o,a=!0){const l=new Lg(t,e,A,i,s,n,o,!a);return this._connetLineTo(l),this.curves.push(l),this._setCurrentPoint(l.getPoint(1)),this}relativeEllipse(t,e,A,i,s,n,o,a){return t+=this.currentPoint?.x??0,e+=this.currentPoint?.y??0,this.ellipse(t,e,A,i,s,n,o,a),this}rect(t,e,A,i){const s=new Og(t,e,A,i);return this._connetLineTo(s),this.curves.push(s),this._setCurrentPoint({x:t,y:e}),this}roundRect(t,e,A,i,s){const n=new Hg(t,e,A,i,s);return this._connetLineTo(n),this.curves.push(n),this._setCurrentPoint({x:t,y:e}),this}splineThru(t){const e=this.currentPoint??new O;return this.curves.push(new Jg([e].concat(t))),this._setCurrentPoint(t[t.length-1]),this}drawTo(t){const e=this.curves[0]?.getPoint(0);return e&&t.moveTo(e.x,e.y),this.curves.forEach(A=>A.drawTo(t)),this.autoClose&&t.closePath(),this}copy(t){return super.copy(t),this.autoClose=t.autoClose,this.currentPoint=t.currentPoint?.clone(),this}}function Kg(r){return r.replace(/[^a-z0-9]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase()}function Yg(r,t,e,A){const i=t.clone().sub(r),s=A.clone().sub(e),n=e.clone().sub(r),o=i.cross(s);if(o===0)return new O((r.x+e.x)/2,(r.y+e.y)/2);const a=n.cross(s)/o;return Math.abs(a)>1?new O((r.x+e.x)/2,(r.y+e.y)/2):new O(r.x+a*i.x,r.y+a*i.y)}class Mt extends bi{currentCurve=new Qr;style;get startPoint(){return this.currentCurve.startPoint}get currentPoint(){return this.currentCurve.currentPoint}get strokeWidth(){return this.style.strokeWidth??((this.style.stroke??"none")==="none"?0:1)}constructor(t,e={}){super(),this.curves.push(this.currentCurve),this.style=e,t&&(t instanceof Mt?this.addPath(t):Array.isArray(t)?this.addCommands(t):this.addData(t))}addPath(t){const e=this.curves.findIndex(A=>A===this.currentCurve);return e>-1&&this.curves.splice(e,1),t instanceof Mt?this.curves.push(...t.curves.filter(A=>A.curves.length).map(A=>A.clone())):t.curves.length&&this.curves.push(t),this.curves.push(this.currentCurve),this}closePath(){const t=this.startPoint;return t&&(this.currentCurve.closePath(),this.currentCurve.curves.length&&(this.currentCurve=new Qr().moveTo(t.x,t.y),this.curves.push(this.currentCurve))),this}moveTo(t,e){return this.currentCurve.currentPoint?.equals({x:t,y:e})||(this.currentCurve.curves.length&&(this.currentCurve=new Qr,this.curves.push(this.currentCurve)),this.currentCurve.moveTo(t,e)),this}lineTo(t,e){return this.currentCurve.lineTo(t,e),this}bezierCurveTo(t,e,A,i,s,n){return this.currentCurve.bezierCurveTo(t,e,A,i,s,n),this}quadraticCurveTo(t,e,A,i){return this.currentCurve.quadraticCurveTo(t,e,A,i),this}arc(t,e,A,i,s,n){return this.currentCurve.arc(t,e,A,i,s,n),this}arcTo(t,e,A,i,s){return this.currentCurve.arcTo(t,e,A,i,s),this}ellipse(t,e,A,i,s,n,o,a){return this.currentCurve.ellipse(t,e,A,i,s,n,o,a),this}rect(t,e,A,i){return this.currentCurve.rect(t,e,A,i),this}roundRect(t,e,A,i,s){return this.currentCurve.roundRect(t,e,A,i,s),this}reset(){return this.currentCurve=new Qr,this.curves=[this.currentCurve],this.style={},this}addCommands(t){return ba(t,this),this}addData(t){return this.addCommands(xa(t)),this}splineThru(t){return this.currentCurve.splineThru(t),this}scale(t,e=t,A={x:0,y:0}){return this.getControlPointRefs().forEach(i=>{i.scale(t,e,A)}),this}skew(t,e=0,A={x:0,y:0}){return this.getControlPointRefs().forEach(i=>{i.skew(t,e,A)}),this}rotate(t,e={x:0,y:0}){return this.getControlPointRefs().forEach(A=>{A.rotate(t,e)}),this}bold(t){if(t===0)return this;const e=this.getFlatCurves(),A=[],i=[],s=[];e.forEach((o,a)=>{const l=o.getControlPointRefs(),u=o.isClockwise();s[a]=l,i[a]=u;const c=l[0],g=l[l.length-1]??c;A.push({start:u?g:c,end:u?c:g,index:a})});const n=[];return A.forEach((o,a)=>{n[a]=[],A.forEach((l,u)=>{l.start&&o.end&&u!==a&&l.start?.equals(o.end)&&n[a].push(l.index)})}),e.forEach((o,a)=>{const l=i[a];s[a].forEach(u=>{u.add(o.getNormal(o.getTForPoint(u)).scale(l?t:-t))})}),n.forEach((o,a)=>{const l=s[a];o.forEach(u=>{const c=s[u],g=Yg(l[l.length-1],l[l.length-2]??l[l.length-1],c[0],c[1]??c[0]);g&&(l[l.length-1].copy(g),c[0].copy(g))})}),this}getMinMax(t=O.MAX,e=O.MIN,A=!0){const i=this.strokeWidth;return this.curves.forEach(s=>{if(s.getMinMax(t,e),A&&i>1){const n=i/2,o=s.isClockwise(),a=[];for(let l=0;l<=1;l+=1/s.arcLengthDivision){const u=s.getPoint(l),c=s.getNormal(l),g=c.clone().scale(o?n:-n),f=c.clone().scale(o?-n:n);a.push(u.clone().add(g),u.clone().add(f),u.clone().add({x:n,y:0}),u.clone().add({x:-n,y:0}),u.clone().add({x:0,y:n}),u.clone().add({x:0,y:-n}),u.clone().add({x:n,y:n}),u.clone().add({x:-n,y:-n}))}t.min(...a),e.max(...a)}}),{min:t.finite(),max:e.finite()}}strokeTriangulate(t){const e=t?.indices??[],A=t?.vertices??[];return this.curves.forEach(i=>{i.strokeTriangulate({...t,indices:e,vertices:A,style:{...this.style}})}),{indices:e,vertices:A}}fillTriangulate(t){const e={...t,style:{...this.style,...t?.style}},A=e.indices??[],i=e.vertices??[];if((e.style.fillRule??"nonzero")==="nonzero"){const n=this.curves.map(l=>l.getFillVertices(e)),o=new Map,a=new Set;for(let l=0;l<n.length;l++){const u=[];for(let c=0;c<n.length;c++)l!==c&&vg([n[l][0],n[l][1]],n[c])&&u.push(c);u.length&&(u.forEach(c=>{let g=o.get(c);g||(g=new Set,o.set(c,g)),g.add(l)}),a.add(l))}n.forEach((l,u)=>{if(a.has(u)||!l.length)return;const c=l.slice(),g=[];o.get(u)?.forEach(f=>{g.push(c.length/2),c.push(...n[f])}),La(c,{...t,indices:A,vertices:i,holes:g,style:{...this.style}})})}else this.curves.forEach(n=>{n.fillTriangulate({...t,indices:A,vertices:i,style:{...this.style}})});return{indices:A,vertices:i}}getBoundingBox(t=!0){const{min:e,max:A}=this.getMinMax(void 0,void 0,t);return new ut(e.x,e.y,A.x-e.x,A.y-e.y)}drawTo(t,e={}){e={...this.style,...e};const{fill:A="#000",stroke:i="none"}=e;return t.beginPath(),t.save(),Gs(t,e),this.curves.forEach(s=>{s.drawTo(t)}),A!=="none"&&t.fill(),i!=="none"&&t.stroke(),t.restore(),this}drawControlPointsTo(t,e={}){e={...this.style,...e};const{fill:A="#000",stroke:i="none"}=e;return t.beginPath(),t.save(),Gs(t,e),this.getControlPointRefs().forEach(s=>{qh(t,s.x,s.y,{radius:4})}),A!=="none"&&t.fill(),i!=="none"&&t.stroke(),t.restore(),this}toCommands(){return this.curves.flatMap(t=>t.toCommands())}toData(){return this.curves.filter(t=>t.curves.length).map(t=>t.toData()).join(" ")}toSvgPathString(){const t={...this.style,fill:this.style.fill??"#000",stroke:this.style.stroke??"none"},e={};for(const i in t)t[i]!==void 0&&(e[Kg(i)]=t[i]);Object.assign(e,{"stroke-width":`${this.strokeWidth}px`});let A="";for(const i in e)e[i]!==void 0&&(A+=`${i}:${e[i]};`);return`<path d="${this.toData()}" style="${A}"></path>`}copy(t){return super.copy(t),this.currentCurve=t.currentCurve.clone(),this.style={...t.style},this}}class iA{constructor(t=[],e){this.paths=t,this.viewBox=e}getBoundingBox(t=!0){if(!this.paths.length)return;const e=O.MAX,A=O.MIN;return this.paths.forEach(i=>i.getMinMax(e,A,t)),new ut(e.x,e.y,A.x-e.x,A.y-e.y)}toTriangulatedSvgString(t=this.paths.map(A=>A.fillTriangulate()),e=0){let A="";const i={x:-e,y:-e},s={x:e,y:e};(Array.isArray(t)?t:[t]).forEach(({vertices:a,indices:l})=>{const u=c=>{const g=a[c*2],f=a[c*2+1];return i.x=Math.min(i.x,g+e),s.x=Math.max(s.x,g+e),i.y=Math.min(i.y,f+e),s.y=Math.max(s.y,f+e),[g,f]};for(let c=0,g=l.length;c<g;c+=3){const f=u(l[c]),d=u(l[c+1]),B=u(l[c+2]);A+=`<polygon points="${f.join(",")} ${d.join(",")} ${B.join(",")}" fill="black" />`}});const o=[i.x,i.y,s.x-i.x,s.y-i.y];return`<svg width="${o[2]}" height="${o[3]}" viewBox="${o.join(" ")}" xmlns="http://www.w3.org/2000/svg">${A}</svg>`}toTriangulatedSvg(t,e){return new DOMParser().parseFromString(this.toTriangulatedSvgString(t,e),"image/svg+xml").documentElement}toSvgString(){const{x:t,y:e,width:A,height:i}=this.getBoundingBox(),s=this.paths.map(n=>n.toSvgPathString()).join("");return`<svg viewBox="${t} ${e} ${A} ${i}" width="${A}px" height="${i}px" xmlns="http://www.w3.org/2000/svg">${s}</svg>`}toSvgUrl(){return`data:image/svg+xml;base64,${btoa(this.toSvgString())}`}toSvg(){return new DOMParser().parseFromString(this.toSvgString(),"image/svg+xml").documentElement}toCanvas(t={}){const{pixelRatio:e=2,...A}=t,{left:i,top:s,width:n,height:o}=this.getBoundingBox(),a=document.createElement("canvas");a.width=n*e,a.height=o*e,a.style.width=`${n}px`,a.style.height=`${o}px`;const l=a.getContext("2d");return l&&(l.scale(e,e),l.translate(-i,-s),this.paths.forEach(u=>{u.drawTo(l,A)})),a}}class Wa extends Mt{fillStyle;strokeStyle;lineCap;lineJoin;lineWidth;miterLimit;uvTransform;vertTransform;_defaultStyle=Dt.EMPTY;_draws=[];_toTexture(t){return t instanceof Dt?t:ca.get(t)}stroke(t){const e=new Mt(this);let A=this._defaultStyle;this.strokeStyle&&(A=this._toTexture(this.strokeStyle)),this.curves.length&&(this._draws.push({...t,type:"stroke",path:e,texture:A,uvTransform:this.uvTransform,vertTransform:this.vertTransform,style:{alignment:.5,cap:this.lineCap??"butt",join:this.lineJoin??"miter",width:this.lineWidth??1,miterLimit:this.miterLimit??10}}),super.reset())}fillRect(t,e,A,i){this.rect(t,e,A,i).fill()}strokeRect(t,e,A,i){this.rect(t,e,A,i).stroke()}fill(t){const e=new Mt(this);let A=this._defaultStyle;this.fillStyle&&(A=this._toTexture(this.fillStyle)),this._draws.push({...t,type:"fill",path:e,texture:A,uvTransform:this.uvTransform,vertTransform:this.vertTransform}),super.reset()}copy(t){return super.copy(t),this.strokeStyle=t.strokeStyle,this.fillStyle=t.fillStyle,this.uvTransform=t.uvTransform,this.vertTransform=t.vertTransform,this.lineCap=t.lineCap,this.lineJoin=t.lineJoin,this.lineWidth=t.lineWidth,this.miterLimit=t.miterLimit,this._draws=t._draws.slice(),this}reset(){return super.reset(),this.strokeStyle=void 0,this.fillStyle=void 0,this.uvTransform=void 0,this.vertTransform=void 0,this.lineCap=void 0,this.lineJoin=void 0,this.lineWidth=void 0,this.miterLimit=void 0,this._draws.length=0,this}buildUvs(t,e,A,i,s){if(i){const n=s&&(typeof s=="function"?s:(l,u)=>s.applyToPoint(l,u)),o=i.width,a=i.height;for(let l=e.length,u=t;u<l;u+=2){const c=e[u],g=e[u+1];let f,d;n?[f,d]=n(c,g):[f,d]=[c/o,g/a],A.push(f,d)}}else for(let n=e.length,o=t;o<n;o+=2)A.push(0,0)}toBatchables(){const t=[];for(let e=this._draws.length,A=0;A<e;A++){const i=this._draws[A],s=[],n=[],o=[];i.type==="fill"?i.path.fillTriangulate({vertices:s,indices:n}):i.path.strokeTriangulate({vertices:s,indices:n,lineStyle:i.style,flipAlignment:!1,closed:!0}),this.buildUvs(0,s,o,i.texture,i.uvTransform),t.push({vertices:s,indices:n,uvs:o,texture:i.texture,type:i.type,disableWrapMode:i.disableWrapMode,vertTransform:i.vertTransform})}return t}}var Vg=Object.defineProperty,zg=Object.getOwnPropertyDescriptor,xi=(r,t,e,A)=>{for(var i=A>1?void 0:A?zg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Vg(t,e,i),i};h.CanvasItem=class extends h.TimelineNode{_parentGlobalVisible;_globalVisible;get globalVisible(){return this._globalVisible??!0}_parentGlobalOpacity;_globalOpacity;get globalOpacity(){return this._globalOpacity??1}_modulate=new ve(4294967295);context=new Wa;_resetContext=!0;_redrawing=!0;_relayouting=!1;_repainting=!1;_originalBatchables=[];_layoutedBatchables=[];_batchables=[];constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"modulate":this._modulate.value=e,this.requestRepaint();break;case"blendMode":this.requestRepaint();break;case"opacity":this._updateGlobalOpacity();break;case"visible":case"insideTimeRange":this._updateGlobalVisible();break}}show(){this.visible=!0}hide(){this.visible=!1}isVisibleInTree(){return this.globalOpacity>0&&this.globalVisible}canRender(){return super.canRender()&&this.isVisibleInTree()}requestRedraw(){this._redrawing=!0,this.requestUpdate()}requestRelayout(){this._relayouting=!0,this.requestUpdate()}requestRepaint(){this._repainting=!0,this.requestUpdate()}_updateGlobalVisible(){this._parentGlobalVisible=this.getParent()?.globalVisible,this._globalVisible=(this._parentGlobalVisible??!0)&&this.visible&&this.insideTimeRange}_updateGlobalOpacity(){this._parentGlobalOpacity=this.getParent()?.opacity;const t=Ke(0,this.opacity,1)*(this._parentGlobalOpacity??1);this._globalOpacity!==t&&(this._globalOpacity=t,this.requestRepaint())}_draw(){this.emit("draw")}_redraw(){return this.log(this.name,"drawing"),this._draw(),this.context.toBatchables()}_relayout(t){return this.log(this.name,"layouting"),t}_repaint(t){return this.log(this.name,"painting"),t.map(e=>({...e,modulate:this._modulate.toArgb(this.globalOpacity,!0),blendMode:this.blendMode}))}_process(t){super._process(t);const e=this.getParent();this._parentGlobalVisible!==e?.globalVisible&&this.requestUpdate(),this._parentGlobalOpacity!==e?.globalOpacity&&this.requestUpdate()}_update(t){super._update(t);const e=this.getParent();this._parentGlobalVisible!==e?.globalVisible&&this._updateGlobalVisible(),this._parentGlobalOpacity!==e?.globalOpacity&&this._updateGlobalOpacity();const A=this._redrawing;let i=this._relayouting,s=this._repainting,n;A&&(this._originalBatchables=this._redraw(),i=!0),i&&(this._layoutedBatchables=this._relayout(this._originalBatchables),s=!0),s&&(n=this._repaint(this._layoutedBatchables)),A&&this._resetContext&&this.context.reset(),n&&(this._batchables=n,this._redrawing=!1,this._relayouting=!1,this._repainting=!1)}_render(t){this._batchables.forEach(e=>{e.texture?.upload(t),t.batch2D.render({...e,texture:e.texture?._glTexture(t)})}),super._render(t)}},xi([w()],h.CanvasItem.prototype,"modulate",2),xi([w()],h.CanvasItem.prototype,"blendMode",2),xi([w({protected:!0,fallback:!0})],h.CanvasItem.prototype,"visible",2),xi([w({protected:!0,fallback:1})],h.CanvasItem.prototype,"opacity",2),h.CanvasItem=xi([st("CanvasItem")],h.CanvasItem);class Wg{currentCall;calls=[];createCall(t){return{renderable:t,parentCall:this.currentCall,fn:t.render.bind(t),calls:[]}}push(t){const e=this.createCall(t);return(this.currentCall?.calls??this.calls).push(e),e}render(t){this.calls.forEach(function e(A){A.fn(t,()=>{A.calls.forEach(e)})}),this.calls=[]}}var qg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,Fi=(r,t,e,A)=>{for(var i=A>1?void 0:A?Xg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&qg(t,e,i),i};h.Timeline=class extends h.Node{static from(t,e=!1){const[A,i]=t?Array.isArray(t)?t:[0,t]:[];return new h.Timeline({startTime:A,endTime:i,loop:e})}constructor(t){super(),this.setProperties(t)}_updateProperty(t,e,A){switch(super._updateProperty(t,e,A),t){case"startTime":this.startTime=Math.min(e,this.endTime);break;case"endTime":this.endTime=e||Number.MAX_SAFE_INTEGER;break}}addTime(t){const e=this.startTime,A=this.endTime;let i=this.currentTime;return i=i+t,this.loop&&i>A&&(i=e+i%A),i=Ke(e,i,A),this.currentTime=i,this.emit("updateCurrentTime",i,t),this}_process(t){super._process(t),this.addTime(t)}},Fi([w({fallback:0})],h.Timeline.prototype,"startTime",2),Fi([w({fallback:0})],h.Timeline.prototype,"currentTime",2),Fi([w({fallback:Number.MAX_SAFE_INTEGER})],h.Timeline.prototype,"endTime",2),Fi([w({fallback:!1})],h.Timeline.prototype,"loop",2),h.Timeline=Fi([st("Timeline")],h.Timeline);var jg=Object.defineProperty,Xs=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&jg(t,e,i),i};class Si extends hr{input=new No;renderStack=new Wg;root=new h.Viewport(!0).setTree(this);timeline;nodes=new Map;_backgroundColor=new ve;_currentViewport;getCurrentViewport(){return this._currentViewport}setCurrentViewport(t){this._currentViewport=t}constructor(t=new h.Timeline){super(),this.timeline=t.setTree(this)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"backgroundColor":this._backgroundColor.value=e;break}}log(...t){this.debug&&console.log(`[modern-canvas][${performance.now().toFixed(4)}ms]`,...t)}_process(t=0){this.timeline.emit("process",t),this.emit("processing"),this.root.emit("process",t),this.emit("processed")}_render(t){this.emit("rendering"),t.program.uniforms.projectionMatrix=this.root.toProjectionArray(!0),this.renderStack.render(t),this._renderScreen(t),this.emit("rendered")}_renderScreen(t){t.state.reset(),t.framebuffer.bind(null),t.viewport.bind({x:0,y:0,width:this.root.width*t.pixelRatio,height:this.root.height*t.pixelRatio}),this.backgroundColor&&t.gl.clearColor(...this._backgroundColor.toArray()),t.clear(),this.backgroundColor&&t.gl.clearColor(0,0,0,0);const e=this.root.texture;e.activate(t,0),gt.draw(t),t.texture.unbind(e)}free(){super.free(),this.root.children.internal.forEach(t=>this.root.removeChild(t)),this.input.removeEventListeners()}}Xs([w({fallback:!1})],Si.prototype,"processPaused"),Xs([w()],Si.prototype,"backgroundColor"),Xs([w({protected:!0,fallback:!1})],Si.prototype,"debug");var Zg=Object.getOwnPropertyDescriptor,$g=(r,t,e,A)=>{for(var i=A>1?void 0:A?Zg(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.Transition=class extends h.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},h.Transition=$g([st("Transition",{effectMode:"transition",processMode:"pausable",duration:2e3})],h.Transition);var qa=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,ef=(r,t,e)=>t in r?qa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,js=(r,t,e,A)=>{for(var i=A>1?void 0:A?tf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&qa(t,e,i),i},Xa=(r,t,e)=>ef(r,typeof t!="symbol"?t+"":t,e);const ja=`varying vec2 vUv[9];
|
|
276
|
+
}`})),Ps([v()],g.ColorReplaceEffect.prototype,"colors",2),Ps([v()],g.ColorReplaceEffect.prototype,"epsilon",2),g.ColorReplaceEffect=Ps([st("ColorReplaceEffect")],g.ColorReplaceEffect);function Dg(r,t,e=2){const A=t&&t.length,i=A?t[0]*e:r.length;let s=Ea(r,0,i,e,!0);const n=[];if(!s||s.next===s.prev)return n;let o,a,l;if(A&&(s=kg(r,t,s,e)),r.length>80*e){o=1/0,a=1/0;let c=-1/0,h=-1/0;for(let u=e;u<i;u+=e){const d=r[u],f=r[u+1];d<o&&(o=d),f<a&&(a=f),d>c&&(c=d),f>h&&(h=f)}l=Math.max(c-o,h-a),l=l!==0?32767/l:0}return Qi(s,n,e,o,a,l,0),n}function Ea(r,t,e,A,i){let s;if(i===Kg(r,t,e,A)>0)for(let n=t;n<e;n+=A)s=ya(n/A|0,r[n],r[n+1],s);else for(let n=e-A;n>=t;n-=A)s=ya(n/A|0,r[n],r[n+1],s);return s&&NA(s,s.next)&&(wi(s),s=s.next),s}function QA(r,t){if(!r)return r;t||(t=r);let e=r,A;do if(A=!1,!e.steiner&&(NA(e,e.next)||Qt(e.prev,e,e.next)===0)){if(wi(e),e=t=e.prev,e===e.next)break;A=!0}else e=e.next;while(A||e!==t);return t}function Qi(r,t,e,A,i,s,n){if(!r)return;!n&&s&&Tg(r,A,i,s);let o=r;for(;r.prev!==r.next;){const a=r.prev,l=r.next;if(s?Sg(r,A,i,s):xg(r)){t.push(a.i,r.i,l.i),wi(r),r=l.next,o=l.next;continue}if(r=l,r===o){n?n===1?(r=Mg(QA(r),t),Qi(r,t,e,A,i,s,2)):n===2&&Rg(r,t,e,A,i,s):Qi(QA(r),t,e,A,i,s,1);break}}}function xg(r){const t=r.prev,e=r,A=r.next;if(Qt(t,e,A)>=0)return!1;const i=t.x,s=e.x,n=A.x,o=t.y,a=e.y,l=A.y,c=Math.min(i,s,n),h=Math.min(o,a,l),u=Math.max(i,s,n),d=Math.max(o,a,l);let f=A.next;for(;f!==t;){if(f.x>=c&&f.x<=u&&f.y>=h&&f.y<=d&&yi(i,o,s,a,n,l,f.x,f.y)&&Qt(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Sg(r,t,e,A){const i=r.prev,s=r,n=r.next;if(Qt(i,s,n)>=0)return!1;const o=i.x,a=s.x,l=n.x,c=i.y,h=s.y,u=n.y,d=Math.min(o,a,l),f=Math.min(c,h,u),B=Math.max(o,a,l),p=Math.max(c,h,u),S=Us(d,f,t,e,A),R=Us(B,p,t,e,A);let w=r.prevZ,D=r.nextZ;for(;w&&w.z>=S&&D&&D.z<=R;){if(w.x>=d&&w.x<=B&&w.y>=f&&w.y<=p&&w!==i&&w!==n&&yi(o,c,a,h,l,u,w.x,w.y)&&Qt(w.prev,w,w.next)>=0||(w=w.prevZ,D.x>=d&&D.x<=B&&D.y>=f&&D.y<=p&&D!==i&&D!==n&&yi(o,c,a,h,l,u,D.x,D.y)&&Qt(D.prev,D,D.next)>=0))return!1;D=D.nextZ}for(;w&&w.z>=S;){if(w.x>=d&&w.x<=B&&w.y>=f&&w.y<=p&&w!==i&&w!==n&&yi(o,c,a,h,l,u,w.x,w.y)&&Qt(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;D&&D.z<=R;){if(D.x>=d&&D.x<=B&&D.y>=f&&D.y<=p&&D!==i&&D!==n&&yi(o,c,a,h,l,u,D.x,D.y)&&Qt(D.prev,D,D.next)>=0)return!1;D=D.nextZ}return!0}function Mg(r,t){let e=r;do{const A=e.prev,i=e.next.next;!NA(A,i)&&Ca(A,e,e.next,i)&&mi(A,i)&&mi(i,A)&&(t.push(A.i,e.i,i.i),wi(e),wi(e.next),e=r=i),e=e.next}while(e!==r);return QA(e)}function Rg(r,t,e,A,i,s){let n=r;do{let o=n.next.next;for(;o!==n.prev;){if(n.i!==o.i&&Og(n,o)){let a=Qa(n,o);n=QA(n,n.next),a=QA(a,a.next),Qi(n,t,e,A,i,s,0),Qi(a,t,e,A,i,s,0);return}o=o.next}n=n.next}while(n!==r)}function kg(r,t,e,A){const i=[];for(let s=0,n=t.length;s<n;s++){const o=t[s]*A,a=s<n-1?t[s+1]*A:r.length,l=Ea(r,o,a,A,!1);l===l.next&&(l.steiner=!0),i.push(Gg(l))}i.sort(Pg);for(let s=0;s<i.length;s++)e=Ug(i[s],e);return e}function Pg(r,t){let e=r.x-t.x;if(e===0&&(e=r.y-t.y,e===0)){const A=(r.next.y-r.y)/(r.next.x-r.x),i=(t.next.y-t.y)/(t.next.x-t.x);e=A-i}return e}function Ug(r,t){const e=Ng(r,t);if(!e)return t;const A=Qa(e,r);return QA(A,A.next),QA(e,e.next)}function Ng(r,t){let e=t;const A=r.x,i=r.y;let s=-1/0,n;if(NA(r,e))return e;do{if(NA(r,e.next))return e.next;if(i<=e.y&&i>=e.next.y&&e.next.y!==e.y){const h=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=A&&h>s&&(s=h,n=e.x<e.next.x?e:e.next,h===A))return n}e=e.next}while(e!==t);if(!n)return null;const o=n,a=n.x,l=n.y;let c=1/0;e=n;do{if(A>=e.x&&e.x>=a&&A!==e.x&&Ba(i<l?A:s,i,a,l,i<l?s:A,i,e.x,e.y)){const h=Math.abs(i-e.y)/(A-e.x);mi(e,r)&&(h<c||h===c&&(e.x>n.x||e.x===n.x&&Fg(n,e)))&&(n=e,c=h)}e=e.next}while(e!==o);return n}function Fg(r,t){return Qt(r.prev,r,t.prev)<0&&Qt(t.next,r,r.next)<0}function Tg(r,t,e,A){let i=r;do i.z===0&&(i.z=Us(i.x,i.y,t,e,A)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,Lg(i)}function Lg(r){let t,e=1;do{let A=r,i;r=null;let s=null;for(t=0;A;){t++;let n=A,o=0;for(let l=0;l<e&&(o++,n=n.nextZ,!!n);l++);let a=e;for(;o>0||a>0&&n;)o!==0&&(a===0||!n||A.z<=n.z)?(i=A,A=A.nextZ,o--):(i=n,n=n.nextZ,a--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;A=n}s.nextZ=null,e*=2}while(t>1);return r}function Us(r,t,e,A,i){return r=(r-e)*i|0,t=(t-A)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function Gg(r){let t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Ba(r,t,e,A,i,s,n,o){return(i-n)*(t-o)>=(r-n)*(s-o)&&(r-n)*(A-o)>=(e-n)*(t-o)&&(e-n)*(s-o)>=(i-n)*(A-o)}function yi(r,t,e,A,i,s,n,o){return!(r===n&&t===o)&&Ba(r,t,e,A,i,s,n,o)}function Og(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!Hg(r,t)&&(mi(r,t)&&mi(t,r)&&Jg(r,t)&&(Qt(r.prev,r,t.prev)||Qt(r,t.prev,t))||NA(r,t)&&Qt(r.prev,r,r.next)>0&&Qt(t.prev,t,t.next)>0)}function Qt(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function NA(r,t){return r.x===t.x&&r.y===t.y}function Ca(r,t,e,A){const i=fr(Qt(r,t,e)),s=fr(Qt(r,t,A)),n=fr(Qt(e,A,r)),o=fr(Qt(e,A,t));return!!(i!==s&&n!==o||i===0&&ur(r,e,t)||s===0&&ur(r,A,t)||n===0&&ur(e,r,A)||o===0&&ur(e,t,A))}function ur(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function fr(r){return r>0?1:r<0?-1:0}function Hg(r,t){let e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&Ca(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function mi(r,t){return Qt(r.prev,r,r.next)<0?Qt(r,t,r.next)>=0&&Qt(r,r.prev,t)>=0:Qt(r,t,r.prev)<0||Qt(r,r.next,t)<0}function Jg(r,t){let e=r,A=!1;const i=(r.x+t.x)/2,s=(r.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&i<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(A=!A),e=e.next;while(e!==r);return A}function Qa(r,t){const e=Ns(r.i,r.x,r.y),A=Ns(t.i,t.x,t.y),i=r.next,s=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,A.next=e,e.prev=A,s.next=A,A.prev=s,A}function ya(r,t,e,A){const i=Ns(r,t,e);return A?(i.next=A.next,i.prev=A,A.next.prev=i,A.next=i):(i.prev=i,i.next=i),i}function wi(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Ns(r,t,e){return{i:r,x:t,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Kg(r,t,e,A){let i=0;for(let s=t,n=e-A;s<e;s+=A)i+=(r[n]-r[s])*(r[s+1]+r[n+1]),n=s;return i}function Yg(r,t,e,A={}){const{radius:i=1}=A;r.moveTo(t,e),r.arc(t,e,i,0,Math.PI*2)}const Vg={arcs:"bevel",bevel:"bevel",miter:"miter","miter-clip":"miter",round:"round"};function Fs(r,t){const{fill:e="#000",stroke:A="none",strokeWidth:i=A==="none"?0:1,strokeLinecap:s="round",strokeLinejoin:n="miter",strokeMiterlimit:o=0,strokeDasharray:a=[],strokeDashoffset:l=0,shadowOffsetX:c=0,shadowOffsetY:h=0,shadowBlur:u=0,shadowColor:d="rgba(0, 0, 0, 0)"}=t;r.fillStyle=e,r.strokeStyle=A,r.lineWidth=i,r.lineCap=s,r.lineJoin=Vg[n],r.miterLimit=o,r.setLineDash(a),r.lineDashOffset=l,r.shadowOffsetX=c,r.shadowOffsetY=h,r.shadowBlur=u,r.shadowColor=d}class O{constructor(t=0,e=0){this.x=t,this.y=e}static get MAX(){return new O(1/0,1/0)}static get MIN(){return new O(-1/0,-1/0)}get array(){return[this.x,this.y]}finite(){return this.x=Number.isFinite(this.x)?this.x:0,this.y=Number.isFinite(this.y)?this.y:0,this}set(t,e){return this.x=t,this.y=e,this}add(t){return this.x+=t.x,this.y+=t.y,this}sub(t){return this.x-=t.x,this.y-=t.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}divide(t){return this.x/=t.x,this.y/=t.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}rotate(t,e={x:0,y:0}){const A=-t/180*Math.PI,i=this.x-e.x,s=-(this.y-e.y),n=Math.sin(A),o=Math.cos(A);return this.set(e.x+(i*o-s*n),e.y-(i*n+s*o)),this}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,A=this.y-t.y;return e*e+A*A}lengthSquared(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.lengthSquared())}scale(t,e=t,A={x:0,y:0}){const i=t<0?A.x-this.x+A.x:this.x,s=e<0?A.y-this.y+A.y:this.y;return this.x=i*Math.abs(t),this.y=s*Math.abs(e),this}skew(t,e=0,A={x:0,y:0}){const i=this.x-A.x,s=this.y-A.y;return this.x=A.x+(i+Math.tan(t)*s),this.y=A.y+(s+Math.tan(e)*i),this}min(...t){return this.x=Math.min(this.x,...t.map(e=>e.x)),this.y=Math.min(this.y,...t.map(e=>e.y)),this}max(...t){return this.x=Math.max(this.x,...t.map(e=>e.x)),this.y=Math.max(this.y,...t.map(e=>e.y)),this}normalize(){return this.scale(1/(this.length()||1))}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}divideVectors(t,e){return this.x=t.x/e.x,this.y=t.y/e.y,this}lerpVectors(t,e,A){return this.x=t.x+(e.x-t.x)*A,this.y=t.y+(e.y-t.y)*A,this}equals(t){return this.x===t.x&&this.y===t.y}applyMatrix3(t){const e=this.x,A=this.y,i=t.elements;return this.x=i[0]*e+i[3]*A+i[6],this.y=i[1]*e+i[4]*A+i[7],this}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new O(this.x,this.y)}}class ct{constructor(t=0,e=0,A=0,i=0){this.left=t,this.top=e,this.width=A,this.height=i}get x(){return this.left}set x(t){this.left=t}get y(){return this.top}set y(t){this.top=t}get right(){return this.left+this.width}get bottom(){return this.top+this.height}get center(){return new O((this.left+this.right)/2,(this.top+this.bottom)/2)}get array(){return[this.left,this.top,this.width,this.height]}static from(...t){if(t.length===0)return new ct;if(t.length===1)return t[0].clone();const e=t[0],A=t.slice(1).reduce((i,s)=>(i.left=Math.min(i.left,s.left),i.top=Math.min(i.top,s.top),i.right=Math.max(i.right,s.right),i.bottom=Math.max(i.bottom,s.bottom),i),{left:e?.left??0,top:e?.top??0,right:e?.right??0,bottom:e?.bottom??0});return new ct(A.left,A.top,A.right-A.left,A.bottom-A.top)}translate(t,e){return this.left+=t,this.top+=e,this}copy(t){return this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height,this}clone(){return new ct(this.left,this.top,this.width,this.height)}}class Lt{elements=[];constructor(t=1,e=0,A=0,i=0,s=1,n=0,o=0,a=0,l=1){this.set(t,e,A,i,s,n,o,a,l)}set(t,e,A,i,s,n,o,a,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=o,c[3]=e,c[4]=s,c[5]=a,c[6]=A,c[7]=n,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,A=t.elements;return e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const A=t.elements,i=e.elements,s=this.elements,n=A[0],o=A[3],a=A[6],l=A[1],c=A[4],h=A[7],u=A[2],d=A[5],f=A[8],B=i[0],p=i[3],S=i[6],R=i[1],w=i[4],D=i[7],Q=i[2],m=i[5],x=i[8];return s[0]=n*B+o*R+a*Q,s[3]=n*p+o*w+a*m,s[6]=n*S+o*D+a*x,s[1]=l*B+c*R+h*Q,s[4]=l*p+c*w+h*m,s[7]=l*S+c*D+h*x,s[2]=u*B+d*R+f*Q,s[5]=u*p+d*w+f*m,s[8]=u*S+d*D+f*x,this}invert(){const t=this.elements,e=t[0],A=t[1],i=t[2],s=t[3],n=t[4],o=t[5],a=t[6],l=t[7],c=t[8],h=c*n-o*l,u=o*a-c*s,d=l*s-n*a,f=e*h+A*u+i*d;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);const B=1/f;return t[0]=h*B,t[1]=(i*l-c*A)*B,t[2]=(o*A-i*n)*B,t[3]=u*B,t[4]=(c*e-i*a)*B,t[5]=(i*s-o*e)*B,t[6]=d*B,t[7]=(A*a-l*e)*B,t[8]=(n*e-A*s)*B,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}scale(t,e){return this.premultiply(Ts.makeScale(t,e)),this}rotate(t){return this.premultiply(Ts.makeRotation(-t)),this}translate(t,e){return this.premultiply(Ts.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),A=Math.sin(t);return this.set(e,-A,0,A,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}fromArray(t,e=0){for(let A=0;A<9;A++)this.elements[A]=t[A+e];return this}clone(){return new this.constructor().fromArray(this.elements)}}const Ts=new Lt;function ma(r,t,e,A){const i=r*e+t*A,s=Math.sqrt(r*r+t*t)*Math.sqrt(e*e+A*A);let n=Math.acos(Math.max(-1,Math.min(1,i/s)));return r*A-t*e<0&&(n=-n),n}function zg(r,t,e,A,i,s,n,o){if(t===0||e===0){r.lineTo(o.x,o.y);return}A=A*Math.PI/180,t=Math.abs(t),e=Math.abs(e);const a=(n.x-o.x)/2,l=(n.y-o.y)/2,c=Math.cos(A)*a+Math.sin(A)*l,h=-Math.sin(A)*a+Math.cos(A)*l;let u=t*t,d=e*e;const f=c*c,B=h*h,p=f/u+B/d;if(p>1){const et=Math.sqrt(p);t=et*t,e=et*e,u=t*t,d=e*e}const S=u*B+d*f,R=(u*d-S)/S;let w=Math.sqrt(Math.max(0,R));i===s&&(w=-w);const D=w*t*h/e,Q=-w*e*c/t,m=Math.cos(A)*D-Math.sin(A)*Q+(n.x+o.x)/2,x=Math.sin(A)*D+Math.cos(A)*Q+(n.y+o.y)/2,M=ma(1,0,(c-D)/t,(h-Q)/e),V=ma((c-D)/t,(h-Q)/e,(-c-D)/t,(-h-Q)/e)%(Math.PI*2);r.ellipse(m,x,t,e,A,M,M+V,s===0)}const vt={WHITESPACE:/[ \t\r\n]/,DIGIT:/\d/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/};function De(r,t,e=0){let o=0,a=!0,l="",c="";const h=[];function u(p,S,R){const w=new SyntaxError(`Unexpected character "${p}" at index ${S}.`);throw w.partial=R,w}function d(){l!==""&&(c===""?h.push(Number(l)):h.push(Number(l)*10**Number(c))),l="",c=""}let f;const B=r.length;for(let p=0;p<B;p++){if(f=r[p],Array.isArray(t)&&t.includes(h.length%e)&&vt.FLAGS.test(f)){o=1,l=f,d();continue}if(o===0){if(vt.WHITESPACE.test(f))continue;if(vt.DIGIT.test(f)||vt.SIGN.test(f)){o=1,l=f;continue}if(vt.POINT.test(f)){o=2,l=f;continue}vt.COMMA.test(f)&&(a&&u(f,p,h),a=!0)}if(o===1){if(vt.DIGIT.test(f)){l+=f;continue}if(vt.POINT.test(f)){l+=f,o=2;continue}if(vt.EXP.test(f)){o=3;continue}vt.SIGN.test(f)&&l.length===1&&vt.SIGN.test(l[0])&&u(f,p,h)}if(o===2){if(vt.DIGIT.test(f)){l+=f;continue}if(vt.EXP.test(f)){o=3;continue}vt.POINT.test(f)&&l[l.length-1]==="."&&u(f,p,h)}if(o===3){if(vt.DIGIT.test(f)){c+=f;continue}if(vt.SIGN.test(f)){if(c===""){c+=f;continue}c.length===1&&vt.SIGN.test(c)&&u(f,p,h)}}vt.WHITESPACE.test(f)?(d(),o=0,a=!1):vt.COMMA.test(f)?(d(),o=0,a=!0):vt.SIGN.test(f)?(d(),o=1,l=f):vt.POINT.test(f)?(d(),o=2,l=f):u(f,p,h)}return d(),h}function FA(r,t){return r-(t-r)}function wa(r,t){const e=new O,A=new O;for(let i=0,s=r.length;i<s;i++){const n=r[i];if(n.type==="m"||n.type==="M")n.type==="m"?e.add(n):e.copy(n),t.moveTo(e.x,e.y),A.copy(e);else if(n.type==="h"||n.type==="H")n.type==="h"?e.x+=n.x:e.x=n.x,t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="v"||n.type==="V")n.type==="v"?e.y+=n.y:e.y=n.y,t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="l"||n.type==="L")n.type==="l"?e.add(n):e.copy(n),t.lineTo(e.x,e.y),A.copy(e);else if(n.type==="c"||n.type==="C")n.type==="c"?(t.bezierCurveTo(e.x+n.x1,e.y+n.y1,e.x+n.x2,e.y+n.y2,e.x+n.x,e.y+n.y),A.x=e.x+n.x2,A.y=e.y+n.y2,e.add(n)):(t.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y),A.x=n.x2,A.y=n.y2,e.copy(n));else if(n.type==="s"||n.type==="S")n.type==="s"?(t.bezierCurveTo(FA(e.x,A.x),FA(e.y,A.y),e.x+n.x2,e.y+n.y2,e.x+n.x,e.y+n.y),A.x=e.x+n.x2,A.y=e.y+n.y2,e.add(n)):(t.bezierCurveTo(FA(e.x,A.x),FA(e.y,A.y),n.x2,n.y2,n.x,n.y),A.x=n.x2,A.y=n.y2,e.copy(n));else if(n.type==="q"||n.type==="Q")n.type==="q"?(t.quadraticCurveTo(e.x+n.x1,e.y+n.y1,e.x+n.x,e.y+n.y),A.x=e.x+n.x1,A.y=e.y+n.y1,e.add(n)):(t.quadraticCurveTo(n.x1,n.y1,n.x,n.y),A.x=n.x1,A.y=n.y1,e.copy(n));else if(n.type==="t"||n.type==="T"){const o=FA(e.x,A.x),a=FA(e.y,A.y);A.x=o,A.y=a,n.type==="t"?(t.quadraticCurveTo(o,a,e.x+n.x,e.y+n.y),e.add(n)):(t.quadraticCurveTo(o,a,n.x,n.y),e.copy(n))}else if(n.type==="a"||n.type==="A"){const o=e.clone();if(n.type==="a"){if(n.x===0&&n.y===0)continue;e.add(n)}else{if(e.equals(n))continue;e.copy(n)}A.copy(e),zg(t,n.rx,n.ry,n.angle,n.largeArcFlag,n.sweepFlag,o,e)}else n.type==="z"||n.type==="Z"?(t.startPoint&&e.copy(t.startPoint),t.closePath()):console.warn("Unsupported commands",n)}}function Wg(r){let t,e;const A=[];for(let i=0,s=r.length;i<s;i++){const n=r[i];switch(n.type){case"m":case"M":if(n.x.toFixed(4)===e?.x.toFixed(4)&&n.y.toFixed(4)===e?.y.toFixed(4))continue;A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y},t={x:n.x,y:n.y};break;case"h":case"H":A.push(`${n.type} ${n.x}`),e={x:n.x,y:e?.y??0};break;case"v":case"V":A.push(`${n.type} ${n.y}`),e={x:e?.x??0,y:n.y};break;case"l":case"L":A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"c":case"C":A.push(`${n.type} ${n.x1} ${n.y1} ${n.x2} ${n.y2} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"s":case"S":A.push(`${n.type} ${n.x2} ${n.y2} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"q":case"Q":A.push(`${n.type} ${n.x1} ${n.y1} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"t":case"T":A.push(`${n.type} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"a":case"A":A.push(`${n.type} ${n.rx} ${n.ry} ${n.angle} ${n.largeArcFlag} ${n.sweepFlag} ${n.x} ${n.y}`),e={x:n.x,y:n.y};break;case"z":case"Z":A.push(n.type),t&&(e={x:t.x,y:t.y});break}}return A.join(" ")}const qg=/[a-df-z][^a-df-z]*/gi;function va(r){const t=[],e=r.match(qg);if(!e)return t;for(let A=0,i=e.length;A<i;A++){const s=e[A],n=s.charAt(0),o=s.slice(1).trim();let a;switch(n){case"m":case"M":a=De(o);for(let l=0,c=a.length;l<c;l+=2)l===0?t.push({type:n,x:a[l],y:a[l+1]}):t.push({type:n==="m"?"l":"L",x:a[l],y:a[l+1]});break;case"h":case"H":a=De(o);for(let l=0,c=a.length;l<c;l++)t.push({type:n,x:a[l]});break;case"v":case"V":a=De(o);for(let l=0,c=a.length;l<c;l++)t.push({type:n,y:a[l]});break;case"l":case"L":a=De(o);for(let l=0,c=a.length;l<c;l+=2)t.push({type:n,x:a[l],y:a[l+1]});break;case"c":case"C":a=De(o);for(let l=0,c=a.length;l<c;l+=6)t.push({type:n,x1:a[l],y1:a[l+1],x2:a[l+2],y2:a[l+3],x:a[l+4],y:a[l+5]});break;case"s":case"S":a=De(o);for(let l=0,c=a.length;l<c;l+=4)t.push({type:n,x2:a[l],y2:a[l+1],x:a[l+2],y:a[l+3]});break;case"q":case"Q":a=De(o);for(let l=0,c=a.length;l<c;l+=4)t.push({type:n,x1:a[l],y1:a[l+1],x:a[l+2],y:a[l+3]});break;case"t":case"T":a=De(o);for(let l=0,c=a.length;l<c;l+=2)t.push({type:n,x:a[l],y:a[l+1]});break;case"a":case"A":a=De(o,[3,4],7);for(let l=0,c=a.length;l<c;l+=7)t.push({type:n,rx:a[l],ry:a[l+1],angle:a[l+2],largeArcFlag:a[l+3],sweepFlag:a[l+4],x:a[l+5],y:a[l+6]});break;case"z":case"Z":t.push({type:n});break;default:console.warn(s)}}return t}const _a="data:image/svg+xml;",ba=`${_a}base64,`,Da=`${_a}charset=utf8,`;function Ls(r){if(typeof r=="string"){let t;r.startsWith(ba)?(r=r.substring(ba.length,r.length),t=atob(r)):r.startsWith(Da)?(r=r.substring(Da.length,r.length),t=decodeURIComponent(r)):t=r;const e=new DOMParser().parseFromString(t,"text/xml"),A=e.querySelector("parsererror");if(A)throw new Error(`${A.textContent??"parser error"}
|
|
277
|
+
${t}`);return e.documentElement}else return r}const Xg="px",jg=90,xa=["mm","cm","in","pt","pc","px"],Sa={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function pt(r){let t="px";if(typeof r=="string")for(let A=0,i=xa.length;A<i;A++){const s=xa[A];if(r.endsWith(s)){t=s,r=r.substring(0,r.length-s.length);break}}let e;return e=Sa[t][Xg],e<0&&(e=Sa[t].in*jg),e*Number.parseFloat(r)}const Zg=new Lt,dr=new Lt,Ma=new Lt,Ra=new Lt;function $g(r,t,e){if(!(r.hasAttribute("transform")||r.nodeName==="use"&&(r.hasAttribute("x")||r.hasAttribute("y"))))return null;const A=tu(r);return e.length>0&&A.premultiply(e[e.length-1]),t.copy(A),e.push(A),A}function tu(r){const t=new Lt,e=Zg;if(r.nodeName==="use"&&(r.hasAttribute("x")||r.hasAttribute("y"))&&t.translate(pt(r.getAttribute("x")),pt(r.getAttribute("y"))),r.hasAttribute("transform")){const A=r.getAttribute("transform").split(")");for(let i=A.length-1;i>=0;i--){const s=A[i].trim();if(s==="")continue;const n=s.indexOf("("),o=s.length;if(n>0&&n<o){const a=s.slice(0,n),l=De(s.slice(n+1));switch(e.identity(),a){case"translate":if(l.length>=1){const c=l[0];let h=0;l.length>=2&&(h=l[1]),e.translate(c,h)}break;case"rotate":if(l.length>=1){let c=0,h=0,u=0;c=l[0]*Math.PI/180,l.length>=3&&(h=l[1],u=l[2]),dr.makeTranslation(-h,-u),Ma.makeRotation(c),Ra.multiplyMatrices(Ma,dr),dr.makeTranslation(h,u),e.multiplyMatrices(dr,Ra)}break;case"scale":l.length>=1&&e.scale(l[0],l[1]??l[0]);break;case"skewX":l.length===1&&e.set(1,Math.tan(l[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":l.length===1&&e.set(1,0,0,Math.tan(l[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":l.length===6&&e.set(l[0],l[2],l[4],l[1],l[3],l[5],0,0,1);break}}t.premultiply(e)}}return t}function eu(r){return new Rt().arc(pt(r.getAttribute("cx")||0),pt(r.getAttribute("cy")||0),pt(r.getAttribute("r")||0),0,Math.PI*2)}function Au(r,t){if(!(!r.sheet||!r.sheet.cssRules||!r.sheet.cssRules.length))for(let e=0;e<r.sheet.cssRules.length;e++){const A=r.sheet.cssRules[e];if(A.type!==1)continue;const i=A.selectorText.split(/,/g).filter(Boolean).map(n=>n.trim()),s={};for(let n=A.style.length,o=0;o<n;o++){const a=A.style.item(o);s[a]=A.style.getPropertyValue(a)}for(let n=0;n<i.length;n++)t[i[n]]=Object.assign(t[i[n]]||{},{...s})}}function iu(r){return new Rt().ellipse(pt(r.getAttribute("cx")||0),pt(r.getAttribute("cy")||0),pt(r.getAttribute("rx")||0),pt(r.getAttribute("ry")||0),0,0,Math.PI*2)}function ru(r){return new Rt().moveTo(pt(r.getAttribute("x1")||0),pt(r.getAttribute("y1")||0)).lineTo(pt(r.getAttribute("x2")||0),pt(r.getAttribute("y2")||0))}function su(r){const t=new Rt,e=r.getAttribute("d");return!e||e==="none"?null:(t.addData(e),t)}const nu=/([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g;function ou(r){const t=new Rt;let e=0;return r.getAttribute("points")?.replace(nu,(A,i,s)=>{const n=pt(i),o=pt(s);return e===0?t.moveTo(n,o):t.lineTo(n,o),e++,A}),t.currentCurve.autoClose=!0,t}const au=/([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g;function lu(r){const t=new Rt;let e=0;return r.getAttribute("points")?.replace(au,(A,i,s)=>{const n=pt(i),o=pt(s);return e===0?t.moveTo(n,o):t.lineTo(n,o),e++,A}),t.currentCurve.autoClose=!1,t}function cu(r){const t=pt(r.getAttribute("x")||0),e=pt(r.getAttribute("y")||0),A=pt(r.getAttribute("rx")||r.getAttribute("ry")||0),i=pt(r.getAttribute("ry")||r.getAttribute("rx")||0),s=pt(r.getAttribute("width")),n=pt(r.getAttribute("height")),o=1-.551915024494,a=new Rt;return a.moveTo(t+A,e),a.lineTo(t+s-A,e),(A!==0||i!==0)&&a.bezierCurveTo(t+s-A*o,e,t+s,e+i*o,t+s,e+i),a.lineTo(t+s,e+n-i),(A!==0||i!==0)&&a.bezierCurveTo(t+s,e+n-i*o,t+s-A*o,e+n,t+s-A,e+n),a.lineTo(t+A,e+n),(A!==0||i!==0)&&a.bezierCurveTo(t+A*o,e+n,t,e+n-i*o,t,e+n-i),a.lineTo(t,e+i),(A!==0||i!==0)&&a.bezierCurveTo(t,e+i*o,t+A*o,e,t+A,e),a}function xe(r,t,e){t=Object.assign({},t);let A={};if(r.hasAttribute("class")){const l=r.getAttribute("class").split(/\s/).filter(Boolean).map(c=>c.trim());for(let c=0;c<l.length;c++)A=Object.assign(A,e[`.${l[c]}`])}r.hasAttribute("id")&&(A=Object.assign(A,e[`#${r.getAttribute("id")}`]));for(let l=r.style.length,c=0;c<l;c++){const h=r.style.item(c),u=r.style.getPropertyValue(h);t[h]=u,A[h]=u}function i(l,c,h=s){r.hasAttribute(l)&&(t[c]=h(r.getAttribute(l))),A[l]&&(t[c]=h(A[l]))}function s(l){return l.startsWith("url")&&console.warn("url access in attributes is not implemented."),l}function n(l){return Math.max(0,Math.min(1,pt(l)))}function o(l){return Math.max(0,pt(l))}function a(l){return l.split(" ").filter(c=>c!=="").map(c=>pt(c))}return i("fill","fill"),i("fill-opacity","fillOpacity",n),i("fill-rule","fillRule"),i("opacity","opacity",n),i("stroke","stroke"),i("stroke-opacity","strokeOpacity",n),i("stroke-width","strokeWidth",o),i("stroke-linecap","strokeLinecap"),i("stroke-linejoin","strokeLinejoin"),i("stroke-miterlimit","strokeMiterlimit",o),i("stroke-dasharray","strokeDasharray",a),i("stroke-dashoffset","strokeDashoffset",pt),i("visibility","visibility"),t}function Gs(r,t,e=[],A={}){if(r.nodeType!==1)return e;let i=!1,s=null,n={...t};switch(r.nodeName){case"svg":n=xe(r,n,A);break;case"style":Au(r,A);break;case"g":n=xe(r,n,A);break;case"path":n=xe(r,n,A),r.hasAttribute("d")&&(s=su(r));break;case"rect":n=xe(r,n,A),s=cu(r);break;case"polygon":n=xe(r,n,A),s=ou(r);break;case"polyline":n=xe(r,n,A),s=lu(r);break;case"circle":n=xe(r,n,A),s=eu(r);break;case"ellipse":n=xe(r,n,A),s=iu(r);break;case"line":n=xe(r,n,A),s=ru(r);break;case"defs":i=!0;break;case"use":{n=xe(r,n,A);const u=(r.getAttributeNS("http://www.w3.org/1999/xlink","href")||r.getAttribute("href")||"").substring(1),d=r.viewportElement?.getElementById(u);d?Gs(d,n,e,A):console.warn(`'use node' references non-existent node id: ${u}`);break}default:console.warn(r);break}if(n.display==="none")return e;const o=new Lt,a=[],l=$g(r,o,a);s&&(s.applyTransform(o),e.push(s),s.style={...n});const c=r.childNodes;for(let h=0,u=c.length;h<u;h++){const d=c[h];i&&d.nodeName!=="style"&&d.nodeName!=="defs"||Gs(d,n,e,A)}return l&&(a.pop(),a.length>0?o.copy(a[a.length-1]):o.identity()),e}function Os(r){const t=Ls(r);return new ze(Gs(t,{}),t.getAttribute("viewBox")?.trim().split(" ").map(e=>Number(e)))}function ka(r,t,e,A,i){const s=(A-t)*.5,n=(i-e)*.5,o=r*r,a=r*o;return(2*e-2*A+s+n)*a+(-3*e+3*A-2*s-n)*o+s*r+e}function hu(r,t){const e=1-r;return e*e*e*t}function gu(r,t){const e=1-r;return 3*e*e*r*t}function uu(r,t){return 3*(1-r)*r*r*t}function fu(r,t){return r*r*r*t}function Pa(r,t,e,A,i){return hu(r,t)+gu(r,e)+uu(r,A)+fu(r,i)}function Ua(r,t={}){let{vertices:e=[],indices:A=[],holes:i=[],verticesStride:s=2,verticesOffset:n=e.length/s,indicesOffset:o=A.length}=t;const a=Dg(r,i,2);if(a.length){for(let c=0;c<a.length;c+=3)A[o++]=a[c]+n,A[o++]=a[c+1]+n,A[o++]=a[c+2]+n;let l=n*s;for(let c=0;c<r.length;c+=2)e[l]=r[c],e[l+1]=r[c+1],l+=s}return{vertices:e,indices:A}}const du=8,Ir=11920929e-14,Iu=1;function pu(r,t,e,A,i,s,n,o,a=.5,l=[]){const h=Math.min(.99,Math.max(0,a));let u=(Iu-h)/1;return u*=u,Hs(r,t,e,A,i,s,n,o,l,u,0),l.push(n,o),l}function Hs(r,t,e,A,i,s,n,o,a,l,c){if(c>du)return;const h=(r+e)/2,u=(t+A)/2,d=(e+i)/2,f=(A+s)/2,B=(i+n)/2,p=(s+o)/2,S=(h+d)/2,R=(u+f)/2,w=(d+B)/2,D=(f+p)/2,Q=(S+w)/2,m=(R+D)/2;if(c>0){let x=n-r,M=o-t;const V=Math.abs((e-n)*M-(A-o)*x),et=Math.abs((i-n)*M-(s-o)*x);if(V>Ir&&et>Ir){if((V+et)*(V+et)<=l*(x*x+M*M)){a.push(Q,m);return}}else if(V>Ir){if(V*V<=l*(x*x+M*M)){a.push(Q,m);return}}else if(et>Ir){if(et*et<=l*(x*x+M*M)){a.push(Q,m);return}}else if(x=Q-(r+n)/2,M=m-(t+o)/2,x*x+M*M<=l){a.push(Q,m);return}}Hs(r,t,h,u,S,R,Q,m,a,l,c+1),Hs(Q,m,w,D,B,p,n,o,a,l,c+1)}const Eu=8,Bu=11920929e-14,Cu=1;function Qu(r,t,e,A,i,s,n=.5,o=[]){const l=Math.min(.99,Math.max(0,n));let c=(Cu-l)/1;return c*=c,Js(o,r,t,e,A,i,s,c,0),o.push(i,s),o}function Js(r,t,e,A,i,s,n,o,a){if(a>Eu)return;const l=(t+A)/2,c=(e+i)/2,h=(A+s)/2,u=(i+n)/2,d=(l+h)/2,f=(c+u)/2;let B=s-t,p=n-e;const S=Math.abs((A-s)*p-(i-n)*B);if(S>Bu){if(S*S<=o*(B*B+p*p)){r.push(d,f);return}}else if(B=d-(t+s)/2,p=f-(e+n)/2,B*B+p*p<=o){r.push(d,f);return}Js(r,t,e,l,c,d,f,o,a+1),Js(r,d,f,h,u,s,n,o,a+1)}function yu(r,t){const[e,A]=r,i=t.length/2;let s=0;for(let n=0,o=i-1;n<i;o=n++){const a=t[n*2],l=t[n*2+1],c=t[o*2],h=t[o*2+1];l<=A?h>A&&Na([c,h],[a,l],[e,A])>0&&s++:h<=A&&Na([c,h],[a,l],[e,A])<0&&s--}return s!==0}function Na(r,t,e){return(t[0]-r[0])*(e[1]-r[1])-(e[0]-r[0])*(t[1]-r[1])}function mu(r,t){const e=1-r;return e*e*t}function wu(r,t){return 2*(1-r)*r*t}function vu(r,t){return r*r*t}function Fa(r,t,e,A){return mu(r,t)+wu(r,e)+vu(r,A)}const _u=1e-4,Ta=1e-4;function bu(r,t={}){const{vertices:e=[],indices:A=[],lineStyle:i={alignment:.5,cap:"butt",join:"miter",width:1,miterLimit:10},flipAlignment:s=!1,closed:n=!0}=t,o=_u;if(r.length===0)return{vertices:e,indices:A};const a=i;let l=a.alignment;if(i.alignment!==.5){let T=Du(r);s&&(T*=-1),l=(l-.5)*T+.5}const c={x:r[0],y:r[1]},h={x:r[r.length-2],y:r[r.length-1]},u=n,d=Math.abs(c.x-h.x)<o&&Math.abs(c.y-h.y)<o;if(u){r=r.slice(),d&&(r.pop(),r.pop(),h.x=r[r.length-2],h.y=r[r.length-1]);const T=(c.x+h.x)*.5,tt=(h.y+c.y)*.5;r.unshift(T,tt),r.push(T,tt)}const f=e,B=r.length/2;let p=r.length;const S=f.length/2,R=a.width/2,w=R*R,D=a.miterLimit*a.miterLimit;let Q=r[0],m=r[1],x=r[2],M=r[3],V=0,et=0,z=-(m-M),J=Q-x,$=0,K=0,L=Math.sqrt(z*z+J*J);z/=L,J/=L,z*=R,J*=R;const it=l,G=(1-it)*2,W=it*2;u||(a.cap==="round"?p+=yA(Q-z*(G-W)*.5,m-J*(G-W)*.5,Q-z*G,m-J*G,Q+z*W,m+J*W,f,!0)+2:a.cap==="square"&&(p+=La(Q,m,z,J,G,W,!0,f))),f.push(Q-z*G,m-J*G),f.push(Q+z*W,m+J*W);for(let T=1;T<B-1;++T){Q=r[(T-1)*2],m=r[(T-1)*2+1],x=r[T*2],M=r[T*2+1],V=r[(T+1)*2],et=r[(T+1)*2+1],z=-(m-M),J=Q-x,L=Math.sqrt(z*z+J*J),z/=L,J/=L,z*=R,J*=R,$=-(M-et),K=x-V,L=Math.sqrt($*$+K*K),$/=L,K/=L,$*=R,K*=R;const tt=x-Q,U=m-M,P=x-V,q=et-M,Z=tt*P+U*q,nt=U*P-q*tt,X=nt<0;if(Math.abs(nt)<.001*Math.abs(Z)){f.push(x-z*G,M-J*G),f.push(x+z*W,M+J*W),Z>=0&&(a.join==="round"?p+=yA(x,M,x-z*G,M-J*G,x-$*G,M-K*G,f,!1)+4:p+=2,f.push(x-$*W,M-K*W),f.push(x+$*G,M+K*G));continue}const It=(-z+Q)*(-J+M)-(-z+x)*(-J+m),ie=(-$+V)*(-K+M)-(-$+x)*(-K+et),re=(tt*ie-P*It)/nt,Ft=(q*It-U*ie)/nt,ht=(re-x)*(re-x)+(Ft-M)*(Ft-M),yt=x+(re-x)*G,Tt=M+(Ft-M)*G,Jt=x-(re-x)*W,bt=M-(Ft-M)*W,Zt=Math.min(tt*tt+U*U,P*P+q*q),Te=X?G:W,zr=Zt+Te*Te*w;ht<=zr?a.join==="bevel"||ht/w>D?(X?(f.push(yt,Tt),f.push(x+z*W,M+J*W),f.push(yt,Tt),f.push(x+$*W,M+K*W)):(f.push(x-z*G,M-J*G),f.push(Jt,bt),f.push(x-$*G,M-K*G),f.push(Jt,bt)),p+=2):a.join==="round"?X?(f.push(yt,Tt),f.push(x+z*W,M+J*W),p+=yA(x,M,x+z*W,M+J*W,x+$*W,M+K*W,f,!0)+4,f.push(yt,Tt),f.push(x+$*W,M+K*W)):(f.push(x-z*G,M-J*G),f.push(Jt,bt),p+=yA(x,M,x-z*G,M-J*G,x-$*G,M-K*G,f,!1)+4,f.push(x-$*G,M-K*G),f.push(Jt,bt)):(f.push(yt,Tt),f.push(Jt,bt)):(f.push(x-z*G,M-J*G),f.push(x+z*W,M+J*W),a.join==="round"?X?p+=yA(x,M,x+z*W,M+J*W,x+$*W,M+K*W,f,!0)+2:p+=yA(x,M,x-z*G,M-J*G,x-$*G,M-K*G,f,!1)+2:a.join==="miter"&&ht/w<=D&&(X?(f.push(Jt,bt),f.push(Jt,bt)):(f.push(yt,Tt),f.push(yt,Tt)),p+=2),f.push(x-$*G,M-K*G),f.push(x+$*W,M+K*W),p+=2)}Q=r[(B-2)*2],m=r[(B-2)*2+1],x=r[(B-1)*2],M=r[(B-1)*2+1],z=-(m-M),J=Q-x,L=Math.sqrt(z*z+J*J),z/=L,J/=L,z*=R,J*=R,f.push(x-z*G,M-J*G),f.push(x+z*W,M+J*W),u||(a.cap==="round"?p+=yA(x-z*(G-W)*.5,M-J*(G-W)*.5,x-z*G,M-J*G,x+z*W,M+J*W,f,!1)+2:a.cap==="square"&&(p+=La(x,M,z,J,G,W,!1,f)));const At=Ta*Ta;for(let T=S;T<p+S-2;++T)Q=f[T*2],m=f[T*2+1],x=f[(T+1)*2],M=f[(T+1)*2+1],V=f[(T+2)*2],et=f[(T+2)*2+1],!(Math.abs(Q*(M-et)+x*(et-m)+V*(m-M))<At)&&A.push(T,T+1,T+2);return{vertices:e,indices:A}}function Du(r){const t=r.length;if(t<6)return 1;let e=0;for(let A=0,i=r[t-2],s=r[t-1];A<t;A+=2){const n=r[A],o=r[A+1];e+=(n-i)*(o+s),i=n,s=o}return e<0?-1:1}function La(r,t,e,A,i,s,n,o){const a=r-e*i,l=t-A*i,c=r+e*s,h=t+A*s;let u,d;n?(u=A,d=-e):(u=-A,d=e);const f=a+u,B=l+d,p=c+u,S=h+d;return o.push(f,B),o.push(p,S),2}function yA(r,t,e,A,i,s,n,o){const a=e-r,l=A-t;let c=Math.atan2(a,l),h=Math.atan2(i-r,s-t);o&&c<h?c+=Math.PI*2:!o&&c>h&&(h+=Math.PI*2);let u=c;const d=h-c,f=Math.abs(d),B=Math.sqrt(a*a+l*l),p=(15*f*Math.sqrt(B)/Math.PI>>0)+1,S=d/p;if(u+=S,o){n.push(r,t),n.push(e,A);for(let R=1,w=u;R<p;R++,w+=S)n.push(r,t),n.push(r+Math.sin(w)*B,t+Math.cos(w)*B);n.push(r,t),n.push(i,s)}else{n.push(e,A),n.push(r,t);for(let R=1,w=u;R<p;R++,w+=S)n.push(r+Math.sin(w)*B,t+Math.cos(w)*B),n.push(r,t);n.push(i,s),n.push(r,t)}return p*2}class TA{arcLengthDivision=200;_arcLengths;getPointAt(t,e=new O){return this.getPoint(this.getUToTMapping(t),e)}isClockwise(){return!1}getControlPointRefs(){return[]}applyTransform(t){const e=typeof t=="function";return this.getControlPointRefs().forEach(A=>{e?t(A):A.applyMatrix3(t)}),this}getUnevenVertices(t=5,e=[]){const A=new O;for(let i=0,s=Math.max(1,t)-1;i<=s;i++)this.getPoint(i/s,A),e.push(A.x,A.y);return e}getSpacedVertices(t=5,e=[]){const A=new O;for(let i=0,s=Math.max(1,t)-1;i<=s;i++)this.getPointAt(i/s,A),e.push(A.x,A.y);return e}getAdaptiveVertices(t=[]){return this.getUnevenVertices(5,t)}_verticesToPoints(t,e=[]){for(let A=0,i=t.length;A<i;A+=2){const s=t[A],n=t[A+1];e.push(new O(s,n))}return e}getSpacedPoints(t,e=[]){const A=this.getSpacedVertices(t);return this._verticesToPoints(A,e),e}getUnevenPoints(t,e=[]){const A=this.getUnevenVertices(t);return this._verticesToPoints(A,e),e}getAdaptivePoints(t=[]){const e=this.getAdaptiveVertices();return this._verticesToPoints(e,t),t}getPoints(t,e=[]){let A;return t?A=this.getUnevenVertices(t):A=this.getAdaptiveVertices(),this._verticesToPoints(A,e),e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(){return(!this._arcLengths||this._arcLengths.length!==this.arcLengthDivision+1)&&this.updateLengths(),this._arcLengths}updateLengths(){const t=this.arcLengthDivision,e=[0];for(let A=0,i=this.getPoint(0),s=1;s<=t;s++){const n=this.getPoint(s/t);A+=n.distanceTo(i),e.push(A),i=n}this._arcLengths=e}getUToTMapping(t,e){const A=this.getLengths(),i=A.length,s=e??t*A[i-1];if(i<2)return s/A[0];let n=0,o=0,a=i-1,l;for(;o<=a;)if(n=Math.floor(o+(a-o)/2),l=A[n]-s,l<0)o=n+1;else if(l>0)a=n-1;else{a=n;break}if(n=a,A[n]===s)return n/(i-1);const c=A[n],u=A[n+1]-c,d=(s-c)/u;return(n+d)/(i-1)}getTangent(t,e=new O){const i=Math.max(0,t-1e-4),s=Math.min(1,t+1e-4);return e.copy(this.getPoint(s).sub(this.getPoint(i)).normalize())}getTangentAt(t,e){return this.getTangent(this.getUToTMapping(t),e)}getNormal(t,e=new O){return this.getTangent(t,e),e.set(-e.y,e.x).normalize()}getNormalAt(t,e){return this.getNormal(this.getUToTMapping(t),e)}getTForPoint(t,e=.001){let A=0,i=1,s=(A+i)/2;for(;i-A>e;){s=(A+i)/2;const n=this.getPoint(s);if(n.distanceTo(t)<e)return s;n.x<t.x?A=s:i=s}return s}getMinMax(t=O.MAX,e=O.MIN){const A=this.getPoints();for(let i=0,s=A.length;i<s;i++){const n=A[i];t.min(n),e.max(n)}return{min:t.finite(),max:e.finite()}}getBoundingBox(){const{min:t,max:e}=this.getMinMax();return new ct(t.x,t.y,e.x-t.x,e.y-t.y)}getFillVertices(t){return this.getAdaptiveVertices()}fillTriangulate(t){return Ua(this.getFillVertices(t),t)}strokeTriangulate(t){return bu(this.getAdaptiveVertices(),t)}toCommands(){const t=[],e=this.getPoints();for(let A=0,i=e.length;A<i;A++){const s=e[A];A===0?t.push({type:"M",x:s.x,y:s.y}):t.push({type:"L",x:s.x,y:s.y})}return t}toData(){return Wg(this.toCommands())}drawTo(t){return this.toCommands().forEach(e=>{switch(e.type){case"M":t.moveTo(e.x,e.y);break;case"L":t.lineTo(e.x,e.y);break}}),this}copy(t){return this.arcLengthDivision=t.arcLengthDivision,this}clone(){return new this.constructor().copy(this)}}const xu=new Lt,Ga=new Lt,Oa=new Lt,pr=new O;class Ks extends TA{constructor(t=new O,e=new O,A=new O,i=0,s=0,n=Math.PI*2,o=!1){super(),this._center=t,this._radius=e,this._diff=A,this.rotate=i,this.startAngle=s,this.endAngle=n,this.clockwise=o}get cx(){return this._center.x}set cx(t){this._center.x=t}get cy(){return this._center.y}set cy(t){this._center.y=t}get rx(){return this._radius.x}set rx(t){this._radius.x=t}get ry(){return this._radius.y}set ry(t){this._radius.y=t}get dx(){return this._diff.x}set dx(t){this._diff.x=t}get dy(){return this._diff.y}set dy(t){this._diff.y=t}isClockwise(){return this.clockwise}_getDeltaAngle(){const t=Math.PI*2;let e=this.endAngle-this.startAngle;const A=Math.abs(e)<Number.EPSILON;return e=(e%t+t)%t,A?e=0:this.clockwise||(e=e===0?-t:e-t),e}getPoint(t,e=new O){const A=this._getDeltaAngle(),i=this.startAngle+t*A;let s=this.cx+this.rx*Math.cos(i),n=this.cy+this.ry*Math.sin(i);if(this.rotate!==0){const o=Math.cos(this.rotate),a=Math.sin(this.rotate),l=s-this.cx,c=n-this.cy;s=l*o-c*a+this.cx,n=l*a+c*o+this.cy}return e.set(s,n)}toCommands(){const{cx:t,cy:e,rx:A,ry:i,startAngle:s,endAngle:n,clockwise:o,rotate:a}=this,l=t+A*Math.cos(s)*Math.cos(a)-i*Math.sin(s)*Math.sin(a),c=e+A*Math.cos(s)*Math.sin(a)+i*Math.sin(s)*Math.cos(a),h=Math.abs(s-n),u=h>Math.PI?1:0,d=o?1:0,f=a*180/Math.PI;if(h>=2*Math.PI){const B=s+Math.PI,p=t+A*Math.cos(B)*Math.cos(a)-i*Math.sin(B)*Math.sin(a),S=e+A*Math.cos(B)*Math.sin(a)+i*Math.sin(B)*Math.cos(a);return[{type:"M",x:l,y:c},{type:"A",rx:A,ry:i,angle:f,largeArcFlag:0,sweepFlag:d,x:p,y:S},{type:"A",rx:A,ry:i,angle:f,largeArcFlag:0,sweepFlag:d,x:l,y:c}]}else{const B=t+A*Math.cos(n)*Math.cos(a)-i*Math.sin(n)*Math.sin(a),p=e+A*Math.cos(n)*Math.sin(a)+i*Math.sin(n)*Math.cos(a);return[{type:"M",x:l,y:c},{type:"A",rx:A,ry:i,angle:f,largeArcFlag:u,sweepFlag:d,x:B,y:p}]}}drawTo(t){const{cx:e,cy:A,rx:i,ry:s,rotate:n,startAngle:o,endAngle:a,clockwise:l}=this;return t.ellipse(e,A,i,s,n,o,a,!l),this}applyTransform(t){return pr.set(this.cx,this.cy),pr.applyMatrix3(t),this.cx=pr.x,this.cy=pr.y,Ru(t)?Su(this,t):Mu(this,t),this}getControlPointRefs(){return[this._center]}_getAdaptiveVerticesByArc(t=[]){const{cx:e,cy:A,rx:i,ry:s,dx:n,dy:o,startAngle:a,endAngle:l,clockwise:c,rotate:h}=this,u=!c;let d=Math.abs(a-l);(!u&&a>l||u&&l>a)&&(d=2*Math.PI-d);const f=Math.max(12,Math.floor(12*i**(1/3)*(d/Math.PI)));let B=d/f,p=a;B*=u?-1:1;const S=Math.cos(u?h:-h),R=Math.sin(u?h:-h);for(let w=0;w<f+1;w++){const D=n+Math.cos(p)*i,Q=o+Math.sin(p)*s,m=D*S-Q*R,x=D*R+Q*S;t.push(e+m,A+x),p+=B}return t}_getAdaptiveVerticesByCircle(t=[]){const{cx:e,cy:A,rx:i,ry:s,dx:n,dy:o,rotate:a,clockwise:l}=this;if(!(i>=0&&s>=0&&n>=0&&o>=0))return t;const c=Math.ceil(2.3*Math.sqrt(i+s)),h=c*8+(n?4:0)+(o?4:0),u=[];if(h===0)return t;{const B=u.length;if(c===0)u[B]=u[B+6]=e+n,u[B+1]=u[B+3]=A+o,u[B+2]=u[B+4]=e-n,u[B+5]=u[B+7]=A-o;else{let p=B,S=B+c*4+(n?2:0)+2,R=S,w=h,D=n+i,Q=o,m=e+D,x=e-D,M=A+Q;if(u[p++]=m,u[p++]=M,u[--S]=M,u[--S]=x,o){const et=A-Q;u[R++]=x,u[R++]=et,u[--w]=et,u[--w]=m}for(let et=1;et<c;et++){const z=Math.PI/2*(et/c),J=n+Math.cos(z)*i,$=o+Math.sin(z)*s,K=e+J,L=e-J,it=A+$,G=A-$;u[p++]=K,u[p++]=it,u[--S]=it,u[--S]=L,u[R++]=L,u[R++]=G,u[--w]=G,u[--w]=K}D=n,Q=o+s,m=e+D,x=e-D,M=A+Q;const V=A-Q;u[p++]=m,u[p++]=M,u[--w]=V,u[--w]=m,n&&(u[p++]=x,u[p++]=M,u[--w]=V,u[--w]=x)}}const d=Math.cos(l?-a:a),f=Math.sin(l?-a:a);for(let B=0;B<u.length;B+=2){const p=u[B],S=u[B+1],R=p-e,w=S-A,D=R*d-w*f,Q=R*f+w*d;t.push(e+D,A+Q)}return t}getAdaptiveVertices(t=[]){return this.startAngle===0&&this.endAngle===Math.PI*2?this._getAdaptiveVerticesByCircle(t):this._getAdaptiveVerticesByArc(t)}copy(t){return super.copy(t),this.cx=t.cx,this.cy=t.cy,this.rx=t.rx,this.ry=t.ry,this.dx=t.dx,this.dy=t.dy,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.clockwise=t.clockwise,this.rotate=t.rotate,this}}function Su(r,t){const e=r.rx,A=r.ry,i=Math.cos(r.rotate),s=Math.sin(r.rotate),n=new O(e*i,e*s),o=new O(-A*s,A*i),a=n.applyMatrix3(t),l=o.applyMatrix3(t),c=xu.set(a.x,l.x,0,a.y,l.y,0,0,0,1),h=Ga.copy(c).invert(),f=Oa.copy(h).transpose().multiply(h).elements,B=ku(f[0],f[1],f[4]),p=Math.sqrt(B.rt1),S=Math.sqrt(B.rt2);if(r.rx=1/p,r.ry=1/S,r.rotate=Math.atan2(B.sn,B.cs),!((r.endAngle-r.startAngle)%(2*Math.PI)<Number.EPSILON)){const w=Ga.set(p,0,0,0,S,0,0,0,1),D=Oa.set(B.cs,B.sn,0,-B.sn,B.cs,0,0,0,1),Q=w.multiply(D).multiply(c),m=x=>{const{x:M,y:V}=new O(Math.cos(x),Math.sin(x)).applyMatrix3(Q);return Math.atan2(V,M)};r.startAngle=m(r.startAngle),r.endAngle=m(r.endAngle),Ha(t)&&(r.clockwise=!r.clockwise)}}function Mu(r,t){const e=Ja(t),A=Ka(t);r.rx*=e,r.ry*=A;const i=e>Number.EPSILON?Math.atan2(t.elements[1],t.elements[0]):Math.atan2(-t.elements[3],t.elements[4]);r.rotate+=i,Ha(t)&&(r.startAngle*=-1,r.endAngle*=-1,r.clockwise=!r.clockwise)}function Ha(r){const t=r.elements;return t[0]*t[4]-t[1]*t[3]<0}function Ru(r){const t=r.elements,e=t[0]*t[3]+t[1]*t[4];if(e===0)return!1;const A=Ja(r),i=Ka(r);return Math.abs(e/(A*i))>Number.EPSILON}function Ja(r){const t=r.elements;return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(r){const t=r.elements;return Math.sqrt(t[3]*t[3]+t[4]*t[4])}function ku(r,t,e){let A,i,s,n,o;const a=r+e,l=r-e,c=Math.sqrt(l*l+4*t*t);return a>0?(A=.5*(a+c),o=1/A,i=r*o*e-t*o*t):a<0?i=.5*(a-c):(A=.5*c,i=-.5*c),l>0?s=l+c:s=l-c,Math.abs(s)>2*Math.abs(t)?(o=-2*t/s,n=1/Math.sqrt(1+o*o),s=o*n):Math.abs(t)===0?(s=1,n=0):(o=-.5*s/t,s=1/Math.sqrt(1+o*o),n=o*s),l>0&&(o=s,s=-n,n=o),{rt1:A,rt2:i,cs:s,sn:n}}class Pu extends Ks{constructor(t=0,e=0,A=1,i=0,s=Math.PI*2,n=!1){super(new O(t,e),new O(A,A),new O,0,i,s,n)}drawTo(t){const{cx:e,cy:A,rx:i,startAngle:s,endAngle:n,clockwise:o}=this;return t.arc(e,A,i,s,n,!o),this}getAdaptiveVertices(t=[]){const{cx:e,cy:A,rx:i,startAngle:s,endAngle:n,clockwise:o}=this;let a=Math.abs(s-n);(!o&&s>n||o&&n>s)&&(a=2*Math.PI-a);let l=Math.max(6,Math.floor(6*i**(1/3)*(a/Math.PI)));l=Math.max(l,3);let c=a/l,h=s;c*=o?1:-1;for(let u=0;u<l+1;u++){const d=Math.cos(h),f=Math.sin(h),B=e+d*i,p=A+f*i;t.push(B,p),h+=c}return t}}class Ve extends TA{constructor(t=new O,e=new O){super(),this.p1=t,this.p2=e}static from(t,e,A,i){return new Ve(new O(t,e),new O(A,i))}getPoint(t,e=new O){return t===1?e.copy(this.p2):e.copy(this.p2).sub(this.p1).scale(t).add(this.p1),e}getPointAt(t,e=new O){return this.getPoint(t,e)}getTangent(t,e=new O){return e.subVectors(this.p2,this.p1).normalize()}getTangentAt(t,e=new O){return this.getTangent(t,e)}getControlPointRefs(){return[this.p1,this.p2]}getAdaptiveVertices(t=[]){return t.push(this.p1.x,this.p1.y,this.p2.x,this.p2.y),t}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,p2:i}=this;return t.x=Math.min(t.x,A.x,i.x),t.y=Math.min(t.y,A.y,i.y),e.x=Math.max(e.x,A.x,i.x),e.y=Math.max(e.y,A.y,i.y),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,p2:e}=this;return[{type:"M",x:t.x,y:t.y},{type:"L",x:e.x,y:e.y}]}getFillVertices(t={}){const e=Math.min(this.p1.x,this.p2.x),A=Math.max(this.p1.x,this.p2.x),i=Math.min(this.p1.y,this.p2.y),s=Math.max(this.p1.y,this.p2.y),n=e,o=i,a=A-e||t.style?.strokeWidth||0,l=s-i||t.style?.strokeWidth||0;return[n,o,n+a,o,n+a,o+l,n,o+l]}drawTo(t){const{p1:e,p2:A}=this;return t.lineTo(e.x,e.y),t.lineTo(A.x,A.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.p2.copy(t.p2),this}}class vi extends TA{constructor(t=[]){super(),this.curves=t}getFlatCurves(){return this.curves.flatMap(t=>t instanceof vi?t.getFlatCurves():t)}addCurve(t){return this.curves.push(t),this}getPoint(t,e=new O){const A=t*this.getLength(),i=this.getLengths();let s=0;for(;s<i.length;){if(i[s]>=A){const n=i[s]-A,o=this.curves[s],a=o.getLength();return o.getPointAt(a===0?0:1-n/a,e)}s++}return e}updateLengths(){const t=[];for(let e=0,A=0,i=this.curves.length;e<i;e++)A+=this.curves[e].getLength(),t.push(A);this._arcLengths=t}getControlPointRefs(){return this.curves.flatMap(t=>t.getControlPointRefs())}_removeNextPointIfEqualPrevPoint(t,e){const A=[t[e-1],t[e]],i=[t[e+1],t[e+2]];return A[0]===i[0]&&A[1]===i[1]&&t.splice(e+1,2),t}getSpacedVertices(t=5,e=[]){let A;return this.curves.forEach(i=>{i.getSpacedVertices(t,e),A&&this._removeNextPointIfEqualPrevPoint(e,A),A=e.length-1}),e}getAdaptiveVertices(t=[]){let e;return this.curves.forEach(A=>{A.getAdaptiveVertices(t),e&&this._removeNextPointIfEqualPrevPoint(t,e),e=t.length-1}),t}strokeTriangulate(t){return this.curves.length===1?this.curves[0].strokeTriangulate(t):super.strokeTriangulate(t)}getFillVertices(t){if(this.curves.length===1)return this.curves[0].getFillVertices(t);{const e=[];let A;return this.curves.forEach(i=>{let s;i instanceof Ve?s=i.getAdaptiveVertices():s=i.getFillVertices(t),e.push(...s),A&&this._removeNextPointIfEqualPrevPoint(e,A),A=e.length-1}),e}}applyTransform(t){return this.curves.forEach(e=>e.applyTransform(t)),this}getMinMax(t=O.MAX,e=O.MIN){return this.curves.forEach(A=>A.getMinMax(t,e)),{min:t.finite(),max:e.finite()}}getBoundingBox(){const{min:t,max:e}=this.getMinMax();return new ct(t.x,t.y,e.x-t.x,e.y-t.y)}toCommands(){return this.curves.flatMap(t=>t.toCommands())}drawTo(t){const e=this.curves[0]?.getPoint(0);return e&&t.moveTo(e.x,e.y),this.curves.forEach(A=>A.drawTo(t)),this}copy(t){return super.copy(t),this.curves=t.curves.map(e=>e.clone()),this}}class Ys extends TA{constructor(t=new O,e=new O,A=new O,i=new O){super(),this.p1=t,this.cp1=e,this.cp2=A,this.p2=i}static from(t,e,A,i,s,n,o,a){return new Ys(new O(t,e),new O(A,i),new O(s,n),new O(o,a))}getPoint(t,e=new O){const{p1:A,cp1:i,cp2:s,p2:n}=this;return e.set(Pa(t,A.x,i.x,s.x,n.x),Pa(t,A.y,i.y,s.y,n.y))}getAdaptiveVertices(t=[]){return pu(this.p1.x,this.p1.y,this.cp1.x,this.cp1.y,this.cp2.x,this.cp2.y,this.p2.x,this.p2.y,.5,t)}getControlPointRefs(){return[this.p1,this.cp1,this.cp2,this.p2]}_solveQuadratic(t,e,A){const i=e*e-4*t*A;if(i<0)return[];const s=Math.sqrt(i),n=(-e+s)/(2*t),o=(-e-s)/(2*t);return[n,o].filter(a=>a>=0&&a<=1)}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,cp1:i,cp2:s,p2:n}=this,o=this._solveQuadratic(3*(i.x-A.x),6*(s.x-i.x),3*(n.x-s.x)),a=this._solveQuadratic(3*(i.y-A.y),6*(s.y-i.y),3*(n.y-s.y)),l=[0,1,...o,...a];return((h,u)=>{for(const d of h)for(let f=0;f<=u;f++){const B=f/u-.5,p=Math.min(1,Math.max(0,d+B)),S=this.getPoint(p);t.x=Math.min(t.x,S.x),t.y=Math.min(t.y,S.y),e.x=Math.max(e.x,S.x),e.y=Math.max(e.y,S.y)}})(l,10),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,cp1:e,cp2:A,p2:i}=this;return[{type:"M",x:t.x,y:t.y},{type:"C",x1:e.x,y1:e.y,x2:A.x,y2:A.y,x:i.x,y:i.y}]}drawTo(t){const{p1:e,cp1:A,cp2:i,p2:s}=this;return t.lineTo(e.x,e.y),t.bezierCurveTo(A.x,A.y,i.x,i.y,s.x,s.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.cp1.copy(t.cp1),this.cp2.copy(t.cp2),this.p2.copy(t.p2),this}}class Uu extends Ks{constructor(t=0,e=0,A=1,i=1,s=0,n=0,o=Math.PI*2,a=!1){super(new O(t,e),new O(A,i),new O,s,n,o,a)}drawTo(t){return t.ellipse(this.cx,this.cy,this.rx,this.ry,this.rotate,this.startAngle,this.endAngle,!this.clockwise),this}}class Nu extends vi{}class Vs extends TA{constructor(t=new O,e=new O,A=new O){super(),this.p1=t,this.cp=e,this.p2=A}static from(t,e,A,i,s,n){return new Vs(new O(t,e),new O(A,i),new O(s,n))}getPoint(t,e=new O){const{p1:A,cp:i,p2:s}=this;return e.set(Fa(t,A.x,i.x,s.x),Fa(t,A.y,i.y,s.y)),e}getControlPointRefs(){return[this.p1,this.cp,this.p2]}getAdaptiveVertices(t=[]){return Qu(this.p1.x,this.p1.y,this.cp.x,this.cp.y,this.p2.x,this.p2.y,.5,t)}getMinMax(t=O.MAX,e=O.MIN){const{p1:A,cp:i,p2:s}=this,n=.5*(A.x+i.x),o=.5*(A.y+i.y),a=.5*(A.x+s.x),l=.5*(A.y+s.y);return t.x=Math.min(t.x,A.x,s.x,n,a),t.y=Math.min(t.y,A.y,s.y,o,l),e.x=Math.max(e.x,A.x,s.x,n,a),e.y=Math.max(e.y,A.y,s.y,o,l),{min:t.finite(),max:e.finite()}}toCommands(){const{p1:t,cp:e,p2:A}=this;return[{type:"M",x:t.x,y:t.y},{type:"Q",x1:e.x,y1:e.y,x:A.x,y:A.y}]}drawTo(t){const{p1:e,cp:A,p2:i}=this;return t.lineTo(e.x,e.y),t.quadraticCurveTo(A.x,A.y,i.x,i.y),this}copy(t){return super.copy(t),this.p1.copy(t.p1),this.cp.copy(t.cp),this.p2.copy(t.p2),this}}class Fu extends Nu{constructor(t=0,e=0,A=0,i=0){super(),this.x=t,this.y=e,this.width=A,this.height=i,this.update()}update(){const{x:t,y:e,width:A,height:i}=this,s=[new O(t,e),new O(t+A,e),new O(t+A,e+i),new O(t,e+i)];return this.curves=[new Ve(s[0],s[1]),new Ve(s[1],s[2]),new Ve(s[2],s[3]),new Ve(s[3],s[0])],this}drawTo(t){return t.rect(this.x,this.y,this.width,this.height),this}getFillVertices(t={}){const{x:e,y:A,width:i,height:s}=this;return[e,A,e+i,A,e+i,A+s,e,A+s]}copy(t){return super.copy(t),this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.update(),this}}class Tu extends Ks{constructor(t=0,e=0,A=1,i=1,s=1){super(),this.x=t,this.y=e,this.width=A,this.height=i,this.radius=s,this.update()}update(){const{x:t,y:e,width:A,height:i,radius:s}=this,n=A/2,o=i/2,a=t+n,l=e+o,c=Math.max(0,Math.min(s,Math.min(n,o))),h=c;return this._center=new O(a,l),this._radius=new O(c,h),this._diff=new O(n-c,o-h),this}drawTo(t){const{x:e,y:A,width:i,height:s,radius:n}=this;return t.roundRect(e,A,i,s,n),this}copy(t){return super.copy(t),this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.radius=t.radius,this.update(),this}}class Lu extends TA{constructor(t=[]){super(),this.points=t}getPoint(t,e=new O){const{points:A}=this,i=(A.length-1)*t,s=Math.floor(i),n=i-s,o=A[s===0?s:s-1],a=A[s],l=A[s>A.length-2?A.length-1:s+1],c=A[s>A.length-3?A.length-1:s+2];return e.set(ka(n,o.x,a.x,l.x,c.x),ka(n,o.y,a.y,l.y,c.y)),e}getControlPointRefs(){return this.points}copy(t){super.copy(t),this.points=[];for(let e=0,A=t.points.length;e<A;e++)this.points.push(t.points[e].clone());return this}}class Er extends vi{startPoint;currentPoint;autoClose=!1;constructor(t){super(),t&&this.addPoints(t)}addPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,A=t.length;e<A;e++){const{x:i,y:s}=t[e];this.lineTo(i,s)}return this}addCommands(t){return wa(t,this),this}addData(t){return this.addCommands(va(t)),this}_closeVertices(t){return this.autoClose&&t.length>=4&&t[0]!==t[t.length-2]&&t[1]!==t[t.length-1]&&t.push(t[0],t[1]),t}getUnevenVertices(t=40,e=[]){return this._closeVertices(super.getUnevenVertices(t,e))}getSpacedVertices(t=40,e=[]){return this._closeVertices(super.getSpacedVertices(t,e))}getAdaptiveVertices(t=[]){return this._closeVertices(super.getAdaptiveVertices(t))}getFillVertices(t){return this._closeVertices(super.getFillVertices(t))}_setCurrentPoint(t){return this.currentPoint=new O(t.x,t.y),this.startPoint||(this.startPoint=this.currentPoint.clone()),this}_connetLineTo(t){if(this.curves.length>0){const e=t.getPoint(0);(!this.currentPoint||!e.equals(this.currentPoint))&&this.lineTo(e.x,e.y)}return this}closePath(){const t=this.startPoint;if(t){const e=this.currentPoint;e&&!t.equals(e)&&(this.curves.push(new Ve(e.clone(),t.clone())),e.copy(t)),this.startPoint=void 0}return this}moveTo(t,e){return this.currentPoint=new O(t,e),this.startPoint=this.currentPoint.clone(),this}lineTo(t,e){const A=this.currentPoint;return A?.equals({x:t,y:e})||this.curves.push(Ve.from(A?.x??0,A?.y??0,t,e)),this._setCurrentPoint({x:t,y:e}),this}bezierCurveTo(t,e,A,i,s,n){const o=this.currentPoint;return o?.equals({x:s,y:n})||this.curves.push(Ys.from(o?.x??0,o?.y??0,t,e,A,i,s,n)),this._setCurrentPoint({x:s,y:n}),this}quadraticCurveTo(t,e,A,i){const s=this.currentPoint;return s?.equals({x:A,y:i})||this.curves.push(Vs.from(s?.x??0,s?.y??0,t,e,A,i)),this._setCurrentPoint({x:A,y:i}),this}arc(t,e,A,i,s,n){const o=new Pu(t,e,A,i,s,!n);return this._connetLineTo(o),this.curves.push(o),this._setCurrentPoint(o.getPoint(1)),this}relativeArc(t,e,A,i,s,n){return t+=this.currentPoint?.x??0,e+=this.currentPoint?.y??0,this.arc(t,e,A,i,s,n),this}arcTo(t,e,A,i,s){return console.warn("Method arcTo not supported yet"),this}ellipse(t,e,A,i,s,n,o,a=!0){const l=new Uu(t,e,A,i,s,n,o,!a);return this._connetLineTo(l),this.curves.push(l),this._setCurrentPoint(l.getPoint(1)),this}relativeEllipse(t,e,A,i,s,n,o,a){return t+=this.currentPoint?.x??0,e+=this.currentPoint?.y??0,this.ellipse(t,e,A,i,s,n,o,a),this}rect(t,e,A,i){const s=new Fu(t,e,A,i);return this._connetLineTo(s),this.curves.push(s),this._setCurrentPoint({x:t,y:e}),this}roundRect(t,e,A,i,s){const n=new Tu(t,e,A,i,s);return this._connetLineTo(n),this.curves.push(n),this._setCurrentPoint({x:t,y:e}),this}splineThru(t){const e=this.currentPoint??new O;return this.curves.push(new Lu([e].concat(t))),this._setCurrentPoint(t[t.length-1]),this}drawTo(t){const e=this.curves[0]?.getPoint(0);return e&&t.moveTo(e.x,e.y),this.curves.forEach(A=>A.drawTo(t)),this.autoClose&&t.closePath(),this}copy(t){return super.copy(t),this.autoClose=t.autoClose,this.currentPoint=t.currentPoint?.clone(),this}}function Gu(r){return r.replace(/[^a-z0-9]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase()}function Ou(r,t,e,A){const i=t.clone().sub(r),s=A.clone().sub(e),n=e.clone().sub(r),o=i.cross(s);if(o===0)return new O((r.x+e.x)/2,(r.y+e.y)/2);const a=n.cross(s)/o;return Math.abs(a)>1?new O((r.x+e.x)/2,(r.y+e.y)/2):new O(r.x+a*i.x,r.y+a*i.y)}class Rt extends vi{currentCurve=new Er;style;get startPoint(){return this.currentCurve.startPoint}get currentPoint(){return this.currentCurve.currentPoint}get strokeWidth(){return this.style.strokeWidth??((this.style.stroke??"none")==="none"?0:1)}constructor(t,e={}){super(),this.curves.push(this.currentCurve),this.style=e,t&&(t instanceof Rt?this.addPath(t):Array.isArray(t)?this.addCommands(t):this.addData(t))}addPath(t){const e=this.curves.findIndex(A=>A===this.currentCurve);return e>-1&&this.curves.splice(e,1),t instanceof Rt?this.curves.push(...t.curves.filter(A=>A.curves.length).map(A=>A.clone())):t.curves.length&&this.curves.push(t),this.curves.push(this.currentCurve),this}closePath(){const t=this.startPoint;return t&&(this.currentCurve.closePath(),this.currentCurve.curves.length&&(this.currentCurve=new Er().moveTo(t.x,t.y),this.curves.push(this.currentCurve))),this}moveTo(t,e){return this.currentCurve.currentPoint?.equals({x:t,y:e})||(this.currentCurve.curves.length&&(this.currentCurve=new Er,this.curves.push(this.currentCurve)),this.currentCurve.moveTo(t,e)),this}lineTo(t,e){return this.currentCurve.lineTo(t,e),this}bezierCurveTo(t,e,A,i,s,n){return this.currentCurve.bezierCurveTo(t,e,A,i,s,n),this}quadraticCurveTo(t,e,A,i){return this.currentCurve.quadraticCurveTo(t,e,A,i),this}arc(t,e,A,i,s,n){return this.currentCurve.arc(t,e,A,i,s,n),this}arcTo(t,e,A,i,s){return this.currentCurve.arcTo(t,e,A,i,s),this}ellipse(t,e,A,i,s,n,o,a){return this.currentCurve.ellipse(t,e,A,i,s,n,o,a),this}rect(t,e,A,i){return this.currentCurve.rect(t,e,A,i),this}roundRect(t,e,A,i,s){return this.currentCurve.roundRect(t,e,A,i,s),this}reset(){return this.currentCurve=new Er,this.curves=[this.currentCurve],this.style={},this}addCommands(t){return wa(t,this),this}addData(t){return this.addCommands(va(t)),this}splineThru(t){return this.currentCurve.splineThru(t),this}scale(t,e=t,A={x:0,y:0}){return this.getControlPointRefs().forEach(i=>{i.scale(t,e,A)}),this}skew(t,e=0,A={x:0,y:0}){return this.getControlPointRefs().forEach(i=>{i.skew(t,e,A)}),this}rotate(t,e={x:0,y:0}){return this.getControlPointRefs().forEach(A=>{A.rotate(t,e)}),this}bold(t){if(t===0)return this;const e=this.getFlatCurves(),A=[],i=[],s=[];e.forEach((o,a)=>{const l=o.getControlPointRefs(),c=o.isClockwise();s[a]=l,i[a]=c;const h=l[0],u=l[l.length-1]??h;A.push({start:c?u:h,end:c?h:u,index:a})});const n=[];return A.forEach((o,a)=>{n[a]=[],A.forEach((l,c)=>{l.start&&o.end&&c!==a&&l.start?.equals(o.end)&&n[a].push(l.index)})}),e.forEach((o,a)=>{const l=i[a];s[a].forEach(c=>{c.add(o.getNormal(o.getTForPoint(c)).scale(l?t:-t))})}),n.forEach((o,a)=>{const l=s[a];o.forEach(c=>{const h=s[c],u=Ou(l[l.length-1],l[l.length-2]??l[l.length-1],h[0],h[1]??h[0]);u&&(l[l.length-1].copy(u),h[0].copy(u))})}),this}getMinMax(t=O.MAX,e=O.MIN,A=!0){const i=this.strokeWidth;return this.curves.forEach(s=>{if(s.getMinMax(t,e),A&&i>1){const n=i/2,o=s.isClockwise(),a=[];for(let l=0;l<=1;l+=1/s.arcLengthDivision){const c=s.getPoint(l),h=s.getNormal(l),u=h.clone().scale(o?n:-n),d=h.clone().scale(o?-n:n);a.push(c.clone().add(u),c.clone().add(d),c.clone().add({x:n,y:0}),c.clone().add({x:-n,y:0}),c.clone().add({x:0,y:n}),c.clone().add({x:0,y:-n}),c.clone().add({x:n,y:n}),c.clone().add({x:-n,y:-n}))}t.min(...a),e.max(...a)}}),{min:t.finite(),max:e.finite()}}strokeTriangulate(t){const e=t?.indices??[],A=t?.vertices??[];return this.curves.forEach(i=>{i.strokeTriangulate({...t,indices:e,vertices:A,style:{...this.style}})}),{indices:e,vertices:A}}fillTriangulate(t){const e={...t,style:{...this.style,...t?.style}};function A(a){let l=0;const c=a.length/2;for(let h=0;h<c;h++){const u=a[2*h],d=a[2*h+1],f=(h+1)%c,B=a[2*f],p=a[2*f+1];l+=(B-u)*(p+d)}return l}function i(a){return A(a)>0}const s=e.indices??[],n=e.vertices??[];if((e.style.fillRule??"nonzero")==="nonzero"){const a=this.curves.map(h=>h.getFillVertices(e)),l=new Map,c=new Set;for(let h=0;h<a.length;h++){if(!i(a[h]))continue;const u=[];for(let d=0;d<a.length;d++){if(h===d||i(a[d]))continue;let f=!1;for(let B=0;B<a[h].length&&(f=f||yu([a[h][B],a[h][B+1]],a[d]),!f);B+=2);f&&u.push(d)}u.length&&(u.forEach(d=>{let f=l.get(d);f||(f=new Set,l.set(d,f)),f.add(h)}),c.add(h))}a.forEach((h,u)=>{if(c.has(u)||!h.length)return;const d=h.slice(),f=[];l.get(u)?.forEach(B=>{f.push(d.length/2),d.push(...a[B])}),Ua(d,{...t,indices:s,vertices:n,holes:f,style:{...this.style}})})}else this.curves.forEach(a=>{a.fillTriangulate({...t,indices:s,vertices:n,style:{...this.style}})});return{indices:s,vertices:n}}getBoundingBox(t=!0){const{min:e,max:A}=this.getMinMax(void 0,void 0,t);return new ct(e.x,e.y,A.x-e.x,A.y-e.y)}drawTo(t,e={}){e={...this.style,...e};const{fill:A="#000",stroke:i="none"}=e;return t.beginPath(),t.save(),Fs(t,e),this.curves.forEach(s=>{s.drawTo(t)}),A!=="none"&&t.fill(),i!=="none"&&t.stroke(),t.restore(),this}drawControlPointsTo(t,e={}){e={...this.style,...e};const{fill:A="#000",stroke:i="none"}=e;return t.beginPath(),t.save(),Fs(t,e),this.getControlPointRefs().forEach(s=>{Yg(t,s.x,s.y,{radius:4})}),A!=="none"&&t.fill(),i!=="none"&&t.stroke(),t.restore(),this}toCommands(){return this.curves.flatMap(t=>t.toCommands())}toData(){return this.curves.filter(t=>t.curves.length).map(t=>t.toData()).join(" ")}toSvgPathString(){const t={...this.style,fill:this.style.fill??"#000",stroke:this.style.stroke??"none"},e={};for(const i in t)t[i]!==void 0&&(e[Gu(i)]=t[i]);Object.assign(e,{"stroke-width":`${this.strokeWidth}px`});let A="";for(const i in e)e[i]!==void 0&&(A+=`${i}:${e[i]};`);return`<path d="${this.toData()}" style="${A}"></path>`}copy(t){return super.copy(t),this.currentCurve=t.currentCurve.clone(),this.style={...t.style},this}}class ze{constructor(t=[],e){this.paths=t,this.viewBox=e}getBoundingBox(t=!0){if(!this.paths.length)return;const e=O.MAX,A=O.MIN;return this.paths.forEach(i=>i.getMinMax(e,A,t)),new ct(e.x,e.y,A.x-e.x,A.y-e.y)}toTriangulatedSvgString(t=this.paths.map(A=>A.fillTriangulate()),e=0){let A="";const i={x:-e,y:-e},s={x:e,y:e};(Array.isArray(t)?t:[t]).forEach(({vertices:a,indices:l})=>{const c=h=>{const u=a[h*2],d=a[h*2+1];return i.x=Math.min(i.x,u+e),s.x=Math.max(s.x,u+e),i.y=Math.min(i.y,d+e),s.y=Math.max(s.y,d+e),[u,d]};for(let h=0,u=l.length;h<u;h+=3){const d=c(l[h]),f=c(l[h+1]),B=c(l[h+2]);A+=`<polygon points="${d.join(",")} ${f.join(",")} ${B.join(",")}" fill="black" />`}});const o=[i.x,i.y,s.x-i.x,s.y-i.y];return`<svg width="${o[2]}" height="${o[3]}" viewBox="${o.join(" ")}" xmlns="http://www.w3.org/2000/svg">${A}</svg>`}toTriangulatedSvg(t,e){return new DOMParser().parseFromString(this.toTriangulatedSvgString(t,e),"image/svg+xml").documentElement}toSvgString(){const{x:t,y:e,width:A,height:i}=this.getBoundingBox(),s=this.paths.map(n=>n.toSvgPathString()).join("");return`<svg viewBox="${t} ${e} ${A} ${i}" width="${A}px" height="${i}px" xmlns="http://www.w3.org/2000/svg">${s}</svg>`}toSvgUrl(){return`data:image/svg+xml;base64,${btoa(this.toSvgString())}`}toSvg(){return new DOMParser().parseFromString(this.toSvgString(),"image/svg+xml").documentElement}toCanvas(t={}){const{pixelRatio:e=2,...A}=t,{left:i,top:s,width:n,height:o}=this.getBoundingBox(),a=document.createElement("canvas");a.width=n*e,a.height=o*e,a.style.width=`${n}px`,a.style.height=`${o}px`;const l=a.getContext("2d");return l&&(l.scale(e,e),l.translate(-i,-s),this.paths.forEach(c=>{c.drawTo(l,A)})),a}}class Ya extends Rt{fillStyle;strokeStyle;lineCap;lineJoin;lineWidth;miterLimit;uvTransform;vertTransform;_defaultStyle=mt.EMPTY;_draws=[];_toTexture(t){return t instanceof mt?t:oa.get(t)}stroke(t){if(!this.curves.length)return;const e=this.strokeStyle??(typeof this.style.stroke=="string"?this.style.stroke:void 0);this._draws.push({...t,type:"stroke",path:new Rt(this),texture:e?this._toTexture(e):this._defaultStyle,uvTransform:this.uvTransform,vertTransform:this.vertTransform,style:{alignment:.5,cap:this.lineCap??"butt",join:this.lineJoin??"miter",width:this.lineWidth??1,miterLimit:this.miterLimit??10}}),super.reset()}fillRect(t,e,A,i){this.rect(t,e,A,i).fill()}strokeRect(t,e,A,i){this.rect(t,e,A,i).stroke()}fill(t){if(!this.curves.length)return;const e=this.fillStyle??(typeof this.style.fill=="string"?this.style.fill:void 0);this._draws.push({...t,type:"fill",path:new Rt(this),texture:e?this._toTexture(e):this._defaultStyle,uvTransform:this.uvTransform,vertTransform:this.vertTransform}),super.reset()}copy(t){return super.copy(t),this.strokeStyle=t.strokeStyle,this.fillStyle=t.fillStyle,this.uvTransform=t.uvTransform,this.vertTransform=t.vertTransform,this.lineCap=t.lineCap,this.lineJoin=t.lineJoin,this.lineWidth=t.lineWidth,this.miterLimit=t.miterLimit,this._draws=t._draws.slice(),this}reset(){return super.reset(),this.strokeStyle=void 0,this.fillStyle=void 0,this.uvTransform=void 0,this.vertTransform=void 0,this.lineCap=void 0,this.lineJoin=void 0,this.lineWidth=void 0,this.miterLimit=void 0,this._draws.length=0,this}buildUvs(t,e,A,i,s){if(i){const n=s&&(typeof s=="function"?s:(l,c)=>s.applyToPoint(l,c)),o=i.width,a=i.height;for(let l=e.length,c=t;c<l;c+=2){const h=e[c],u=e[c+1];let d,f;n?[d,f]=n(h,u):[d,f]=[h/o,u/a],A.push(d,f)}}else for(let n=e.length,o=t;o<n;o+=2)A.push(0,0)}toBatchables(){const t=[];for(let e=this._draws.length,A=0;A<e;A++){const i=this._draws[A],s=[],n=[],o=[];i.type==="fill"?i.path.fillTriangulate({vertices:s,indices:n}):i.path.strokeTriangulate({vertices:s,indices:n,lineStyle:i.style,flipAlignment:!1,closed:!0}),this.buildUvs(0,s,o,i.texture,i.uvTransform),t.push({vertices:s,indices:n,uvs:o,texture:i.texture,type:i.type,disableWrapMode:i.disableWrapMode,vertTransform:i.vertTransform})}return t}}var Hu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,_i=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ju(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Hu(t,e,i),i};g.CanvasItem=class extends g.TimelineNode{_parentGlobalVisible;_globalVisible;get globalVisible(){return this._globalVisible??!0}_parentGlobalOpacity;_globalOpacity;get globalOpacity(){return this._globalOpacity??1}_modulate=new _e(4294967295);context=new Ya;_resetContext=!0;_redrawing=!0;_relayouting=!1;_repainting=!1;_originalBatchables=[];_layoutedBatchables=[];_batchables=[];constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"modulate":this._modulate.value=e,this.requestRepaint();break;case"blendMode":this.requestRepaint();break;case"opacity":this._updateGlobalOpacity();break;case"visible":case"insideTimeRange":this._updateGlobalVisible();break}}show(){this.visible=!0}hide(){this.visible=!1}isVisibleInTree(){return this.globalOpacity>0&&this.globalVisible}canRender(){return super.canRender()&&this.isVisibleInTree()}requestRedraw(){this._redrawing=!0}requestRelayout(){this._relayouting=!0}requestRepaint(){this._repainting=!0}_updateGlobalVisible(){this._parentGlobalVisible=this.getParent()?.globalVisible,this._globalVisible=(this._parentGlobalVisible??!0)&&this.visible&&this.insideTimeRange}_updateGlobalOpacity(){this._parentGlobalOpacity=this.getParent()?.opacity;const t=Je(0,this.opacity,1)*(this._parentGlobalOpacity??1);this._globalOpacity!==t&&(this._globalOpacity=t,this.requestRepaint())}_draw(){this.emit("draw")}_redraw(){return this.log(this.name,"drawing"),this._draw(),this.context.toBatchables()}_relayout(t){return this.log(this.name,"layouting"),t}_repaint(t){return this.log(this.name,"painting"),t.map(e=>({...e,modulate:this._modulate.toArgb(this.globalOpacity,!0),blendMode:this.blendMode}))}_process(t){super._process(t);const e=this.getParent();this._parentGlobalVisible!==e?.globalVisible&&this._updateGlobalVisible(),this._parentGlobalOpacity!==e?.globalOpacity&&this._updateGlobalOpacity()}_updateBatchables(){const t=this._redrawing;let e=this._relayouting,A=this._repainting,i;t&&(this._originalBatchables=this._redraw(),e=!0),e&&(this._layoutedBatchables=this._relayout(this._originalBatchables),A=!0),A&&(i=this._repaint(this._layoutedBatchables)),t&&this._resetContext&&this.context.reset(),i&&(this._batchables=i,this._redrawing=!1,this._relayouting=!1,this._repainting=!1)}_render(t){this._updateBatchables(),this._batchables.forEach(e=>{e.texture?.upload(t),t.batch2D.render({...e,texture:e.texture?._glTexture(t)})}),super._render(t)}},_i([v()],g.CanvasItem.prototype,"modulate",2),_i([v()],g.CanvasItem.prototype,"blendMode",2),_i([v({protected:!0,fallback:!0})],g.CanvasItem.prototype,"visible",2),_i([v({protected:!0,fallback:1})],g.CanvasItem.prototype,"opacity",2),g.CanvasItem=_i([st("CanvasItem")],g.CanvasItem);class Ku{currentCall;calls=[];createCall(t){return{renderable:t,parentCall:this.currentCall,fn:t.render.bind(t),calls:[]}}push(t){const e=this.createCall(t);return(this.currentCall?.calls??this.calls).push(e),e}render(t){this.calls.forEach(function e(A){A.fn(t,()=>{A.calls.forEach(e)})}),this.calls=[]}}var Yu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,bi=(r,t,e,A)=>{for(var i=A>1?void 0:A?Vu(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Yu(t,e,i),i};g.Timeline=class extends g.Node{static from(t,e=!1){const[A,i]=t?Array.isArray(t)?t:[0,t]:[];return new g.Timeline({startTime:A,endTime:i,loop:e})}constructor(t){super(),this.setProperties(t)}_updateProperty(t,e,A){switch(super._updateProperty(t,e,A),t){case"startTime":this.startTime=Math.min(e,this.endTime);break;case"endTime":this.endTime=e||Number.MAX_SAFE_INTEGER;break}}addTime(t){const e=this.startTime,A=this.endTime;let i=this.currentTime;return i=i+t,this.loop&&i>A&&(i=e+i%A),i=Je(e,i,A),this.currentTime=i,this.emit("updateCurrentTime",i,t),this}_process(t){super._process(t),this.addTime(t)}},bi([v({fallback:0})],g.Timeline.prototype,"startTime",2),bi([v({fallback:0})],g.Timeline.prototype,"currentTime",2),bi([v({fallback:Number.MAX_SAFE_INTEGER})],g.Timeline.prototype,"endTime",2),bi([v({fallback:!1})],g.Timeline.prototype,"loop",2),g.Timeline=bi([st("Timeline")],g.Timeline);var zu=Object.defineProperty,zs=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&zu(t,e,i),i};class Di extends lr{input=new ko;renderStack=new Ku;root=new g.Viewport(!0).setTree(this);timeline;nodes=new Map;_backgroundColor=new _e;_currentViewport;getCurrentViewport(){return this._currentViewport}setCurrentViewport(t){this._currentViewport=t}constructor(t=new g.Timeline){super(),this.timeline=t.setTree(this)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"backgroundColor":this._backgroundColor.value=e;break}}log(...t){this.debug&&console.log(`[modern-canvas][${performance.now().toFixed(4)}ms]`,...t)}_process(t=0){this.timeline.emit("process",t),this.emit("processing"),this.root.emit("process",t),this.emit("processed")}_render(t){this.emit("rendering"),t.program.uniforms.projectionMatrix=this.root.toProjectionArray(!0),this.renderStack.render(t),this._renderScreen(t),this.emit("rendered")}_renderScreen(t){t.state.reset(),t.framebuffer.bind(null),t.viewport.bind({x:0,y:0,width:this.root.width*t.pixelRatio,height:this.root.height*t.pixelRatio}),this.backgroundColor&&t.gl.clearColor(...this._backgroundColor.toArray()),t.clear(),this.backgroundColor&&t.gl.clearColor(0,0,0,0);const e=this.root.texture;e.activate(t,0),ut.draw(t),t.texture.unbind(e)}free(){super.free(),this.root.children.internal.forEach(t=>this.root.removeChild(t)),this.input.removeEventListeners()}}zs([v({fallback:!1})],Di.prototype,"processPaused"),zs([v()],Di.prototype,"backgroundColor"),zs([v({protected:!0,fallback:!1})],Di.prototype,"debug");var Wu=Object.getOwnPropertyDescriptor,qu=(r,t,e,A)=>{for(var i=A>1?void 0:A?Wu(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.Transition=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},g.Transition=qu([st("Transition",{effectMode:"transition",processMode:"pausable",duration:2e3})],g.Transition);var Va=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,ju=(r,t,e)=>t in r?Va(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ws=(r,t,e,A)=>{for(var i=A>1?void 0:A?Xu(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Va(t,e,i),i},za=(r,t,e)=>ju(r,typeof t!="symbol"?t+"":t,e);const Wa=`varying vec2 vUv[9];
|
|
278
278
|
uniform sampler2D sampler;
|
|
279
279
|
|
|
280
280
|
void main(void) {
|
|
@@ -308,7 +308,7 @@ void main(void) {
|
|
|
308
308
|
gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;
|
|
309
309
|
gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
|
|
310
310
|
}
|
|
311
|
-
}`;
|
|
311
|
+
}`;g.GaussianBlurEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){const A=1/e.width,i=1/e.height,s=Math.max(this.quality,1);for(let n=0;n<s;n++)e.redraw(t,()=>{ut.draw(t,g.GaussianBlurEffect.materialX,{sampler:0,uStrength:A*(this.strength/s)})});for(let n=0;n<s;n++)e.redraw(t,()=>{ut.draw(t,g.GaussianBlurEffect.materialY,{sampler:0,uStrength:i*(this.strength/s)})})}},za(g.GaussianBlurEffect,"materialX",new Ct({vert:`attribute vec2 position;
|
|
312
312
|
attribute vec2 uv;
|
|
313
313
|
uniform float uStrength;
|
|
314
314
|
varying vec2 vUv[9];
|
|
@@ -324,7 +324,7 @@ void main(void) {
|
|
|
324
324
|
vUv[6] = uv + vec2(2.0 * uStrength, 0.0);
|
|
325
325
|
vUv[7] = uv + vec2(3.0 * uStrength, 0.0);
|
|
326
326
|
vUv[8] = uv + vec2(4.0 * uStrength, 0.0);
|
|
327
|
-
}`,frag:
|
|
327
|
+
}`,frag:Wa})),za(g.GaussianBlurEffect,"materialY",new Ct({vert:`attribute vec2 position;
|
|
328
328
|
attribute vec2 uv;
|
|
329
329
|
uniform float uStrength;
|
|
330
330
|
varying vec2 vUv[9];
|
|
@@ -340,7 +340,7 @@ void main(void) {
|
|
|
340
340
|
vUv[6] = uv + vec2(0.0, 2.0 * uStrength);
|
|
341
341
|
vUv[7] = uv + vec2(0.0, 3.0 * uStrength);
|
|
342
342
|
vUv[8] = uv + vec2(0.0, 4.0 * uStrength);
|
|
343
|
-
}`,frag:
|
|
343
|
+
}`,frag:Wa})),Ws([v({default:4})],g.GaussianBlurEffect.prototype,"strength",2),Ws([v({default:3})],g.GaussianBlurEffect.prototype,"quality",2),g.GaussianBlurEffect=Ws([st("GaussianBlurEffect")],g.GaussianBlurEffect);var qa=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,$u=(r,t,e)=>t in r?qa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,LA=(r,t,e,A)=>{for(var i=A>1?void 0:A?Zu(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&qa(t,e,i),i},tf=(r,t,e)=>$u(r,t+"",e);g.DropShadowEffect=class extends g.Effect{blurEffect=new g.GaussianBlurEffect;viewport3=new g.Viewport;_color=new _e;constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){this.viewport3.activateWithCopy(t,e),this.viewport3.redraw(t,()=>{this._color.value=this.color,ut.draw(t,g.DropShadowEffect.material,{sampler:0,uAlpha:this._color.a,uColor:this._color.toArray().slice(0,3),uOffset:[-this.offsetX,this.offsetY],uInputSize:[e.width,e.height,1/e.width,1/e.height]})}),this.blurEffect.strength=this.blur,this.blurEffect.apply(t,this.viewport3),e.redraw(t,()=>{this.viewport3.texture.activate(t,1),ut.draw(t,fi.instance,{sampler:1}),this.shadowOnly||ut.draw(t,fi.instance,{sampler:0}),t.texture.unbind(1)})}},tf(g.DropShadowEffect,"material",new Ct({vert:`precision mediump float;
|
|
344
344
|
attribute vec2 position;
|
|
345
345
|
attribute vec2 uv;
|
|
346
346
|
varying vec2 vUv;
|
|
@@ -360,7 +360,7 @@ void main(void) {
|
|
|
360
360
|
sample.rgb = uColor.rgb * sample.a;
|
|
361
361
|
sample *= uAlpha;
|
|
362
362
|
gl_FragColor = sample;
|
|
363
|
-
}`})),
|
|
363
|
+
}`})),LA([v()],g.DropShadowEffect.prototype,"color",2),LA([v()],g.DropShadowEffect.prototype,"blur",2),LA([v()],g.DropShadowEffect.prototype,"offsetX",2),LA([v()],g.DropShadowEffect.prototype,"offsetY",2),LA([v()],g.DropShadowEffect.prototype,"shadowOnly",2),g.DropShadowEffect=LA([st("DropShadowEffect")],g.DropShadowEffect);var Xa=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,Af=(r,t,e)=>t in r?Xa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ja=(r,t,e,A)=>{for(var i=A>1?void 0:A?ef(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Xa(t,e,i),i},rf=(r,t,e)=>Af(r,t+"",e);g.EmbossEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){e.redraw(t,()=>{ut.draw(t,g.EmbossEffect.material,{sampler:0,strength:this.strength,inputSize:[e.width,e.height,1/e.width,1/e.height]})})}},rf(g.EmbossEffect,"material",new Ct({vert:`precision mediump float;
|
|
364
364
|
attribute vec2 position;
|
|
365
365
|
attribute vec2 uv;
|
|
366
366
|
varying vec2 vUv;
|
|
@@ -382,7 +382,7 @@ void main(void) {
|
|
|
382
382
|
color.rgb = vec3((color.r + color.g + color.b) / 3.0);
|
|
383
383
|
float alpha = texture2D(sampler, vUv).a;
|
|
384
384
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
385
|
-
}`})),
|
|
385
|
+
}`})),ja([v()],g.EmbossEffect.prototype,"strength",2),g.EmbossEffect=ja([st("EmbossEffect")],g.EmbossEffect);var Za=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,nf=(r,t,e)=>t in r?Za(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Se=(r,t,e,A)=>{for(var i=A>1?void 0:A?sf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Za(t,e,i),i},of=(r,t,e)=>nf(r,t+"",e);g.GlitchEffect=class extends g.Effect{_canvas;_texture;_sizes;_offsets;_needsRedraw=!1;constructor(t,e=[]){super(),this.setProperties(t).append(e),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this._texture=new mt(this._canvas),this._sizes=new Float32Array(this.slices),this._offsets=new Float32Array(this.slices)}redraw(){const t=this.sampleSize,e=this._texture,A=this._canvas.getContext("2d");A.clearRect(0,0,8,t);let i,s=0;for(let n=0;n<this.slices;n++){i=Math.floor(this._offsets[n]*256);const o=this._sizes[n]*t,a=i>0?i:0,l=i<0?-i:0;A.fillStyle=`rgba(${a}, ${l}, 0, 1)`,A.fillRect(0,s>>0,t,o+1>>0),s+=o}e.requestUpload()}apply(t,e){this._needsRedraw||(this._needsRedraw=!0,this.redraw());const A=e.width,i=e.height,s=this.direction*(Math.PI/180),n=Math.sin(s),o=Math.cos(s);e.redraw(t,()=>{this._texture.activate(t,1),ut.draw(t,g.GlitchEffect.material,{sampler:0,filterClamp:[0,0,1,1],filterArea:[A,i,0,0],dimensions:[A,i],aspect:i/A,displacementMap:1,offset:this.offset,sinDir:n,cosDir:o,fillMode:this.fillMode,seed:this.seed,red:this.red,green:this.green,blue:this.blue})})}},of(g.GlitchEffect,"material",new Ct({vert:`precision mediump float;
|
|
386
386
|
attribute vec2 position;
|
|
387
387
|
attribute vec2 uv;
|
|
388
388
|
varying vec2 vUv;
|
|
@@ -483,7 +483,7 @@ void main(void) {
|
|
|
483
483
|
gl_FragColor.g = texture2D(sampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;
|
|
484
484
|
gl_FragColor.b = texture2D(sampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
|
|
485
485
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
486
|
-
}`})),
|
|
486
|
+
}`})),Se([v()],g.GlitchEffect.prototype,"slices",2),Se([v()],g.GlitchEffect.prototype,"sampleSize",2),Se([v()],g.GlitchEffect.prototype,"offset",2),Se([v()],g.GlitchEffect.prototype,"direction",2),Se([v()],g.GlitchEffect.prototype,"fillMode",2),Se([v()],g.GlitchEffect.prototype,"seed",2),Se([v()],g.GlitchEffect.prototype,"red",2),Se([v()],g.GlitchEffect.prototype,"green",2),Se([v()],g.GlitchEffect.prototype,"blue",2),g.GlitchEffect=Se([st("GlitchEffect")],g.GlitchEffect);var $a=Object.defineProperty,af=Object.getOwnPropertyDescriptor,lf=(r,t,e)=>t in r?$a(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,iA=(r,t,e,A)=>{for(var i=A>1?void 0:A?af(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&$a(t,e,i),i},cf=(r,t,e)=>lf(r,t+"",e);const hf=`vec3 mod289(vec3 x)
|
|
487
487
|
{
|
|
488
488
|
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
489
489
|
}
|
|
@@ -577,7 +577,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
|
|
|
577
577
|
totalgain *= gain;
|
|
578
578
|
}
|
|
579
579
|
return abs(sum);
|
|
580
|
-
}`;
|
|
580
|
+
}`;g.GodrayEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){const A=this.angle*(Math.PI/180),i=this.parallel?[Math.cos(A),Math.sin(A)]:this.center;e.redraw(t,()=>{ut.draw(t,g.GodrayEffect.material,{sampler:0,uDimensions:[e.width,e.height],uParallel:this.parallel?1:0,uLight:i,uAspect:e.height/e.width,uTime:this.time,uRay:[this.gain,this.lacunarity,this.alpha],uInputSize:[e.width,e.height,0,0]})})}},cf(g.GodrayEffect,"material",new Ct({vert:`precision mediump float;
|
|
581
581
|
attribute vec2 position;
|
|
582
582
|
attribute vec2 uv;
|
|
583
583
|
varying vec2 vUv;
|
|
@@ -595,7 +595,7 @@ uniform float uTime;
|
|
|
595
595
|
uniform vec3 uRay;
|
|
596
596
|
uniform vec4 uInputSize;
|
|
597
597
|
|
|
598
|
-
${
|
|
598
|
+
${hf}
|
|
599
599
|
|
|
600
600
|
void main(void) {
|
|
601
601
|
bool uParallel = uParallel > 0.5;
|
|
@@ -626,7 +626,7 @@ void main(void) {
|
|
|
626
626
|
|
|
627
627
|
vec4 color = texture2D(sampler, vUv);
|
|
628
628
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
629
|
-
}`})),
|
|
629
|
+
}`})),iA([v()],g.GodrayEffect.prototype,"time",2),iA([v()],g.GodrayEffect.prototype,"angle",2),iA([v()],g.GodrayEffect.prototype,"gain",2),iA([v()],g.GodrayEffect.prototype,"lacunarity",2),iA([v()],g.GodrayEffect.prototype,"parallel",2),iA([v()],g.GodrayEffect.prototype,"center",2),iA([v()],g.GodrayEffect.prototype,"alpha",2),g.GodrayEffect=iA([st("GodrayEffect")],g.GodrayEffect);var gf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,Br=(r,t,e,A)=>{for(var i=A>1?void 0:A?uf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&gf(t,e,i),i};const tl=`varying vec2 vUv;
|
|
630
630
|
uniform sampler2D sampler;
|
|
631
631
|
uniform vec2 uOffset;
|
|
632
632
|
|
|
@@ -638,7 +638,7 @@ void main(void) {
|
|
|
638
638
|
color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));
|
|
639
639
|
color *= 0.25;
|
|
640
640
|
gl_FragColor = color;
|
|
641
|
-
}`,
|
|
641
|
+
}`,el=`precision highp float;
|
|
642
642
|
varying vec2 vUv;
|
|
643
643
|
uniform sampler2D sampler;
|
|
644
644
|
uniform vec2 uOffset;
|
|
@@ -651,14 +651,14 @@ void main(void) {
|
|
|
651
651
|
color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
|
|
652
652
|
color *= 0.25;
|
|
653
653
|
gl_FragColor = color;
|
|
654
|
-
}`;
|
|
654
|
+
}`;g.KawaseBlurEffect=class extends g.Effect{_kernels=[0];constructor(t,e=[]){super(),this.material=new Ct({vert:`precision mediump float;
|
|
655
655
|
attribute vec2 position;
|
|
656
656
|
attribute vec2 uv;
|
|
657
657
|
varying vec2 vUv;
|
|
658
658
|
void main() {
|
|
659
659
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
660
660
|
vUv = uv;
|
|
661
|
-
}`,frag:t?.clamp?
|
|
661
|
+
}`,frag:t?.clamp?el:tl}),this.setProperties(t).append(e),this._generateKernels()}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"quality":case"strength":this._generateKernels();break}}_generateKernels(){const t=Math.max(1,Math.round(this.strength)),e=Math.max(1,Math.round(this.quality)),A=[t];if(t>0){let i=t;const s=t/e;for(let n=1;n<e;n++)i-=s,A.push(i)}this._kernels=A}apply(t,e){const A=this.pixelSize[0]/e.width,i=this.pixelSize[1]/e.height;this._kernels.forEach(s=>{const n=s+.5;e.redraw(t,()=>{ut.draw(t,this.material,{sampler:0,uOffset:[n*A,n*i],uInputClamp:[0,0,1,1]})})})}},Br([v()],g.KawaseBlurEffect.prototype,"strength",2),Br([v()],g.KawaseBlurEffect.prototype,"quality",2),Br([v()],g.KawaseBlurEffect.prototype,"pixelSize",2),g.KawaseBlurEffect=Br([st("KawaseBlurEffect")],g.KawaseBlurEffect);var Al=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,df=(r,t,e)=>t in r?Al(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,qs=(r,t,e,A)=>{for(var i=A>1?void 0:A?ff(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Al(t,e,i),i},If=(r,t,e)=>df(r,t+"",e);g.MaskEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}async load(){this.texture=void 0,this.src&&(this.texture=await Ne.texture.load(this.src))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this.load();break;case"texture":A?.free?.();break}}apply(t,e,A){this.texture&&A.targetArea&&e.redraw(t,()=>{this.texture.activate(t,1),ut.draw(t,g.MaskEffect.material,{sampler:0,mask:1,area:A.targetArea,rotation:A.target?.globalRotation??0}),t.texture.unbind(1)})}},If(g.MaskEffect,"material",new Ct({vert:`precision mediump float;
|
|
662
662
|
attribute vec2 position;
|
|
663
663
|
attribute vec2 uv;
|
|
664
664
|
varying vec2 vUv;
|
|
@@ -701,7 +701,7 @@ void main(void) {
|
|
|
701
701
|
} else {
|
|
702
702
|
gl_FragColor = vec4(0.);
|
|
703
703
|
}
|
|
704
|
-
}`})),
|
|
704
|
+
}`})),qs([v({protected:!0})],g.MaskEffect.prototype,"texture",2),qs([v({default:""})],g.MaskEffect.prototype,"src",2),g.MaskEffect=qs([st("MaskEffect")],g.MaskEffect);var il=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Ef=(r,t,e)=>t in r?il(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,rA=(r,t,e,A)=>{for(var i=A>1?void 0:A?pf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&il(t,e,i),i},rl=(r,t,e)=>Ef(r,typeof t!="symbol"?t+"":t,e);const Bf=`precision highp float;
|
|
705
705
|
varying vec2 vUv;
|
|
706
706
|
uniform sampler2D sampler;
|
|
707
707
|
uniform vec2 uThickness;
|
|
@@ -735,14 +735,14 @@ void main(void) {
|
|
|
735
735
|
float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);
|
|
736
736
|
vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
|
|
737
737
|
gl_FragColor = contentColor + outlineColor;
|
|
738
|
-
}`;
|
|
738
|
+
}`;g.OutlineEffect=class extends g.Effect{static getAngleStep(t){return Number.parseFloat((Math.PI*2/Math.max(t*g.OutlineEffect.MAX_SAMPLES,g.OutlineEffect.MIN_SAMPLES)).toFixed(7))}_color=new _e;constructor(t,e=[]){super(),this.setProperties(t).append(e),this.material=new Ct({vert:`precision mediump float;
|
|
739
739
|
attribute vec2 position;
|
|
740
740
|
attribute vec2 uv;
|
|
741
741
|
varying vec2 vUv;
|
|
742
742
|
void main() {
|
|
743
743
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
744
744
|
vUv = uv;
|
|
745
|
-
}`,frag:
|
|
745
|
+
}`,frag:Bf.replace(/\{ANGLE_STEP\}/,g.OutlineEffect.getAngleStep(this.quality).toFixed(7))})}apply(t,e){e.redraw(t,()=>{this._color.value=this.color,ut.draw(t,this.material,{sampler:0,uThickness:[this.width/e.width,this.width/e.height],uColor:this._color.toArray().slice(0,3),uAlpha:this.opacity!==1?this.opacity:this._color.a,uAngleStep:g.OutlineEffect.getAngleStep(this.quality),uKnockout:this.knockout?1:0,uInputClamp:[0,0,1,1]})})}},rl(g.OutlineEffect,"MIN_SAMPLES",1),rl(g.OutlineEffect,"MAX_SAMPLES",100),rA([v()],g.OutlineEffect.prototype,"color",2),rA([v()],g.OutlineEffect.prototype,"width",2),rA([v()],g.OutlineEffect.prototype,"style",2),rA([v()],g.OutlineEffect.prototype,"image",2),rA([v()],g.OutlineEffect.prototype,"opacity",2),rA([v()],g.OutlineEffect.prototype,"quality",2),rA([v()],g.OutlineEffect.prototype,"knockout",2),g.OutlineEffect=rA([st("OutlineEffect")],g.OutlineEffect);var sl=Object.defineProperty,Cf=Object.getOwnPropertyDescriptor,Qf=(r,t,e)=>t in r?sl(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,nl=(r,t,e,A)=>{for(var i=A>1?void 0:A?Cf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&sl(t,e,i),i},yf=(r,t,e)=>Qf(r,t+"",e);g.PixelateEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e){e.redraw(t,()=>{ut.draw(t,g.PixelateEffect.material,{sampler:0,uSize:[this.strength,this.strength],uInputSize:[e.width,e.height,1/e.width,1/e.height]})})}},yf(g.PixelateEffect,"material",new Ct({vert:`precision mediump float;
|
|
746
746
|
attribute vec2 position;
|
|
747
747
|
attribute vec2 uv;
|
|
748
748
|
varying vec2 vUv;
|
|
@@ -775,7 +775,7 @@ void main(void) {
|
|
|
775
775
|
coord = pixelate(coord, uSize);
|
|
776
776
|
coord = unmapCoord(coord);
|
|
777
777
|
gl_FragColor = texture2D(sampler, coord);
|
|
778
|
-
}`})),
|
|
778
|
+
}`})),nl([v()],g.PixelateEffect.prototype,"strength",2),g.PixelateEffect=nl([st("PixelateEffect")],g.PixelateEffect);var ol=Object.defineProperty,mf=Object.getOwnPropertyDescriptor,wf=(r,t,e)=>t in r?ol(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,xi=(r,t,e,A)=>{for(var i=A>1?void 0:A?mf(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ol(t,e,i),i},vf=(r,t,e)=>wf(r,t+"",e);g.ZoomBlurEffect=class extends g.Effect{constructor(t,e=[]){super(),this.setProperties(t).append(e)}apply(t,e,A){let i=this.center;A.targetArea&&(i=[(A.targetArea[0]+A.targetArea[2]/2)*e.width,(A.targetArea[1]+A.targetArea[3]/2)*e.height]),e.redraw(t,()=>{ut.draw(t,g.ZoomBlurEffect.material,{sampler:0,uCenter:i??[e.width/2,e.height/2],uInnerRadius:this.innerRadius,uRadius:this.radius,uStrength:this.strength,uInputSize:[e.width,e.height,1/e.width,1/e.height]})})}},vf(g.ZoomBlurEffect,"material",new Ct({vert:`attribute vec2 position;
|
|
779
779
|
attribute vec2 uv;
|
|
780
780
|
varying vec2 vUv;
|
|
781
781
|
void main() {
|
|
@@ -855,62 +855,13 @@ void main() {
|
|
|
855
855
|
color /= total;
|
|
856
856
|
|
|
857
857
|
gl_FragColor = color;
|
|
858
|
-
}`})),Mi([w()],h.ZoomBlurEffect.prototype,"center",2),Mi([w()],h.ZoomBlurEffect.prototype,"innerRadius",2),Mi([w()],h.ZoomBlurEffect.prototype,"radius",2),Mi([w()],h.ZoomBlurEffect.prototype,"strength",2),h.ZoomBlurEffect=Mi([st("ZoomBlurEffect")],h.ZoomBlurEffect);var Ff=Object.defineProperty,Be=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Ff(t,e,i),i};class Vt extends tA{constructor(t){super(),this.parent=t}_texture;_setProperties(t){return super.setProperties(t)}setProperties(t){return this._setProperties(lt(t)?void 0:EA(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"color":case"cropRect":case"stretchRect":case"dpi":case"rotateWithShape":case"tile":case"opacity":case"enabled":this.parent.requestRedraw();break;case"image":case"linearGradient":case"radialGradient":this._updateTexture();break}}async loadTexture(){return this.linearGradient||this.radialGradient?new dr(this.linearGradient??this.radialGradient,this.parent.size.width,this.parent.size.height):lt(this.image)?void 0:(this.parent.tree?.log(`load image ${this.image}`),await Ne.texture.load(this.image))}async _updateTexture(){this._texture=await this.loadTexture(),this.parent.requestRedraw()}canDraw(){return!!(this.enabled&&(this._texture||this.color))}_getDrawOptions(){let t=!1;const{width:e,height:A}=this.parent.size,i=new Yt().scale(1/e,1/A);if(this.cropRect){const{left:s=0,top:n=0,right:o=0,bottom:a=0}=this.cropRect;i.scale(Math.abs(1-(s+o)),Math.abs(1-(n+a))).translate(s,n),t=!0}if(this.tile){const{translateX:s=0,translateY:n=0,scaleX:o=1,scaleY:a=1}=this.tile;i.translate(-s/e,-n/A).scale(1/o,1/a),t=!0}else if(this.stretchRect){const{left:s=0,top:n=0,right:o=0,bottom:a=0}=this.stretchRect;i.scale(Math.abs(1-(-s+-o)),Math.abs(1-(-n+-a))).translate(-s,-n),t=!0}return{disableWrapMode:t,uvTransform:i}}draw(){const t=this.parent.context,{uvTransform:e,disableWrapMode:A}=this._getDrawOptions();t.uvTransform=e,t.fillStyle=this._texture??this.color,t.fill({disableWrapMode:A})}}Be([w({fallback:!0})],Vt.prototype,"enabled"),Be([w()],Vt.prototype,"color"),Be([w()],Vt.prototype,"image"),Be([w()],Vt.prototype,"linearGradient"),Be([w()],Vt.prototype,"radialGradient"),Be([w()],Vt.prototype,"cropRect"),Be([w()],Vt.prototype,"stretchRect"),Be([w()],Vt.prototype,"dpi"),Be([w()],Vt.prototype,"rotateWithShape"),Be([w()],Vt.prototype,"tile"),Be([w()],Vt.prototype,"opacity");var Sf=Object.defineProperty,Mf=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Sf(t,e,i),i};class $s extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:uc(t))}}Mf([w()],$s.prototype,"fillWithShape");var Rf=Object.defineProperty,Pf=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Rf(t,e,i),i};class tn extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:hc(t))}}Pf([w()],tn.prototype,"fillWithShape");var kf=Object.defineProperty,en=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&kf(t,e,i),i};class Ri extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:gc(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"width":case"style":case"enabled":this.parent.requestRedraw();break}}canDraw(){return!!(this.enabled&&(this.width||this.color||super.canDraw()))}draw(){const t=this.parent.context,{uvTransform:e,disableWrapMode:A}=this._getDrawOptions();t.lineWidth=this.width||1,t.uvTransform=e,t.strokeStyle=this._texture??this.color,t.stroke({disableWrapMode:A})}}en([w({fallback:"#00000000"})],Ri.prototype,"color"),en([w({fallback:0})],Ri.prototype,"width"),en([w({fallback:"solid"})],Ri.prototype,"style");var Uf=Object.defineProperty,Pi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Uf(t,e,i),i};class DA extends tA{constructor(t){super(),this.parent=t}setProperties(t){return super.setProperties(lt(t)?void 0:fc(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"color":case"blur":case"offsetX":case"offsetY":this.updateEffect();break}}updateEffect(){const t="__$shadow";let e=this.parent.getNode(t);this.blur||this.offsetX||this.offsetY?(e||(e=new h.DropShadowEffect({name:t}),this.parent.appendChild(e,"back")),e.setProperties(this.getProperties())):e&&this.parent.removeChild(e)}}Pi([w({fallback:!0})],DA.prototype,"enabled"),Pi([w({fallback:"#000000FF"})],DA.prototype,"color"),Pi([w({fallback:0})],DA.prototype,"blur"),Pi([w({fallback:0})],DA.prototype,"offsetY"),Pi([w({fallback:0})],DA.prototype,"offsetX");var Nf=Object.defineProperty,ki=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Nf(t,e,i),i};class mA extends tA{constructor(t){super(),this.parent=t,this._updatePath2DSet()}_path2DSet=new iA;setProperties(t){return super.setProperties(lt(t)?void 0:Ic(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"svg":case"paths":case"viewBox":case"enabled":this._updatePath2DSet(),this.parent.requestRedraw();break}}_updatePath2DSet(){let t;if(this.svg){const n=Hs(this.svg);this._path2DSet=Ks(n),t=this._path2DSet.viewBox}else this.paths?.forEach((n,o)=>{const{data:a,...l}=n,u=new Mt;u.style=l,u.addData(a),this._path2DSet.paths[o]=u});if(!t){const n=this._path2DSet.getBoundingBox();t=n?[n.x,n.y,n.width,n.height]:[0,0,1,1]}const[e,A,i,s]=t;this._path2DSet.paths.forEach(n=>{n.applyTransform(new Lt().translate(-e,-A).scale(1/i,1/s))})}draw(){if(this.enabled&&this._path2DSet.paths.length){const t=this.parent.context,{width:e,height:A}=this.parent.size;this._path2DSet.paths.forEach(i=>{t.addPath(i.clone().applyTransform(new Lt().scale(e,A)))})}else this.drawRect()}drawRect(){const t=this.parent.context,{width:e,height:A}=this.parent.size,{borderRadius:i}=this.parent.style;e&&A&&(i?t.roundRect(0,0,e,A,i):t.rect(0,0,e,A))}}ki([w({fallback:!0})],mA.prototype,"enabled"),ki([w()],mA.prototype,"preset"),ki([w()],mA.prototype,"svg"),ki([w()],mA.prototype,"viewBox"),ki([w()],mA.prototype,"paths");class Ui extends Je{constructor(t){super(),this.setProperties(t)}}const cl=po();for(const r in cl){const t=cl[r];nr(Ui,r,{fallback:t})}var zt=Uint8Array,ue=Uint16Array,An=Int32Array,Dr=new zt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),mr=new zt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rn=new zt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hl=function(r,t){for(var e=new ue(31),A=0;A<31;++A)e[A]=t+=1<<r[A-1];for(var i=new An(e[30]),A=1;A<30;++A)for(var s=e[A];s<e[A+1];++s)i[s]=s-e[A]<<5|A;return{b:e,r:i}},gl=hl(Dr,2),fl=gl.b,sn=gl.r;fl[28]=258,sn[258]=28;for(var dl=hl(mr,0),Tf=dl.b,Il=dl.r,nn=new ue(32768),Et=0;Et<32768;++Et){var nA=(Et&43690)>>1|(Et&21845)<<1;nA=(nA&52428)>>2|(nA&13107)<<2,nA=(nA&61680)>>4|(nA&3855)<<4,nn[Et]=((nA&65280)>>8|(nA&255)<<8)>>1}for(var Se=function(r,t,e){for(var A=r.length,i=0,s=new ue(t);i<A;++i)r[i]&&++s[r[i]-1];var n=new ue(t);for(i=1;i<t;++i)n[i]=n[i-1]+s[i-1]<<1;var o;if(e){o=new ue(1<<t);var a=15-t;for(i=0;i<A;++i)if(r[i])for(var l=i<<4|r[i],u=t-r[i],c=n[r[i]-1]++<<u,g=c|(1<<u)-1;c<=g;++c)o[nn[c]>>a]=l}else for(o=new ue(A),i=0;i<A;++i)r[i]&&(o[i]=nn[n[r[i]-1]++]>>15-r[i]);return o},oA=new zt(288),Et=0;Et<144;++Et)oA[Et]=8;for(var Et=144;Et<256;++Et)oA[Et]=9;for(var Et=256;Et<280;++Et)oA[Et]=7;for(var Et=280;Et<288;++Et)oA[Et]=8;for(var Ni=new zt(32),Et=0;Et<32;++Et)Ni[Et]=5;var Lf=Se(oA,9,0),Gf=Se(oA,9,1),Of=Se(Ni,5,0),Hf=Se(Ni,5,1),on=function(r){for(var t=r[0],e=1;e<r.length;++e)r[e]>t&&(t=r[e]);return t},Ce=function(r,t,e){var A=t/8|0;return(r[A]|r[A+1]<<8)>>(t&7)&e},an=function(r,t){var e=t/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(t&7)},ln=function(r){return(r+7)/8|0},pl=function(r,t,e){return(e==null||e>r.length)&&(e=r.length),new zt(r.subarray(t,e))},Jf=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Qe=function(r,t,e){var A=new Error(t||Jf[r]);if(A.code=r,Error.captureStackTrace&&Error.captureStackTrace(A,Qe),!e)throw A;return A},Kf=function(r,t,e,A){var i=r.length,s=0;if(!i||t.f&&!t.l)return e||new zt(0);var n=!e,o=n||t.i!=2,a=t.i;n&&(e=new zt(i*3));var l=function(Nt){var ct=e.length;if(Nt>ct){var yt=new zt(Math.max(ct*2,Nt));yt.set(e),e=yt}},u=t.f||0,c=t.p||0,g=t.b||0,f=t.l,d=t.d,B=t.m,I=t.n,F=i*8;do{if(!f){u=Ce(r,c,1);var b=Ce(r,c+1,3);if(c+=3,b)if(b==1)f=Gf,d=Hf,B=9,I=5;else if(b==2){var D=Ce(r,c,31)+257,S=Ce(r,c+10,15)+4,M=D+Ce(r,c+5,31)+1;c+=14;for(var V=new zt(M),et=new zt(19),z=0;z<S;++z)et[rn[z]]=Ce(r,c+z*3,7);c+=S*3;for(var J=on(et),$=(1<<J)-1,K=Se(et,J,1),z=0;z<M;){var L=K[Ce(r,c,$)];c+=L&15;var y=L>>4;if(y<16)V[z++]=y;else{var it=0,G=0;for(y==16?(G=3+Ce(r,c,3),c+=2,it=V[z-1]):y==17?(G=3+Ce(r,c,7),c+=3):y==18&&(G=11+Ce(r,c,127),c+=7);G--;)V[z++]=it}}var W=V.subarray(0,D),At=V.subarray(D);B=on(W),I=on(At),f=Se(W,B,1),d=Se(At,I,1)}else Qe(1);else{var y=ln(c)+4,_=r[y-4]|r[y-3]<<8,Q=y+_;if(Q>i){a&&Qe(0);break}o&&l(g+_),e.set(r.subarray(y,Q),g),t.b=g+=_,t.p=c=Q*8,t.f=u;continue}if(c>F){a&&Qe(0);break}}o&&l(g+131072);for(var T=(1<<B)-1,tt=(1<<I)-1,k=c;;k=c){var it=f[an(r,c)&T],P=it>>4;if(c+=it&15,c>F){a&&Qe(0);break}if(it||Qe(2),P<256)e[g++]=P;else if(P==256){k=c,f=null;break}else{var q=P-254;if(P>264){var z=P-257,Z=Dr[z];q=Ce(r,c,(1<<Z)-1)+fl[z],c+=Z}var nt=d[an(r,c)&tt],X=nt>>4;nt||Qe(3),c+=nt&15;var At=Tf[X];if(X>3){var Z=mr[X];At+=an(r,c)&(1<<Z)-1,c+=Z}if(c>F){a&&Qe(0);break}o&&l(g+131072);var It=g+q;if(g<At){var ie=s-At,re=Math.min(At,It);for(ie+g<0&&Qe(3);g<re;++g)e[g]=A[ie+g]}for(;g<It;++g)e[g]=e[g-At]}}t.l=f,t.p=k,t.b=g,t.f=u,f&&(u=1,t.m=B,t.d=d,t.n=I)}while(!u);return g!=e.length&&n?pl(e,0,g):e.subarray(0,g)},We=function(r,t,e){e<<=t&7;var A=t/8|0;r[A]|=e,r[A+1]|=e>>8},Ti=function(r,t,e){e<<=t&7;var A=t/8|0;r[A]|=e,r[A+1]|=e>>8,r[A+2]|=e>>16},un=function(r,t){for(var e=[],A=0;A<r.length;++A)r[A]&&e.push({s:A,f:r[A]});var i=e.length,s=e.slice();if(!i)return{t:Ql,l:0};if(i==1){var n=new zt(e[0].s+1);return n[e[0].s]=1,{t:n,l:1}}e.sort(function(Q,D){return Q.f-D.f}),e.push({s:-1,f:25001});var o=e[0],a=e[1],l=0,u=1,c=2;for(e[0]={s:-1,f:o.f+a.f,l:o,r:a};u!=i-1;)o=e[e[l].f<e[c].f?l++:c++],a=e[l!=u&&e[l].f<e[c].f?l++:c++],e[u++]={s:-1,f:o.f+a.f,l:o,r:a};for(var g=s[0].s,A=1;A<i;++A)s[A].s>g&&(g=s[A].s);var f=new ue(g+1),d=cn(e[u-1],f,0);if(d>t){var A=0,B=0,I=d-t,F=1<<I;for(s.sort(function(D,S){return f[S.s]-f[D.s]||D.f-S.f});A<i;++A){var b=s[A].s;if(f[b]>t)B+=F-(1<<d-f[b]),f[b]=t;else break}for(B>>=I;B>0;){var y=s[A].s;f[y]<t?B-=1<<t-f[y]++-1:++A}for(;A>=0&&B;--A){var _=s[A].s;f[_]==t&&(--f[_],++B)}d=t}return{t:new zt(f),l:d}},cn=function(r,t,e){return r.s==-1?Math.max(cn(r.l,t,e+1),cn(r.r,t,e+1)):t[r.s]=e},El=function(r){for(var t=r.length;t&&!r[--t];);for(var e=new ue(++t),A=0,i=r[0],s=1,n=function(a){e[A++]=a},o=1;o<=t;++o)if(r[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)n(32754);s>2&&(n(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(n(i),--s;s>6;s-=6)n(8304);s>2&&(n(s-3<<5|8208),s=0)}for(;s--;)n(i);s=1,i=r[o]}return{c:e.subarray(0,A),n:t}},Li=function(r,t){for(var e=0,A=0;A<t.length;++A)e+=r[A]*t[A];return e},Bl=function(r,t,e){var A=e.length,i=ln(t+2);r[i]=A&255,r[i+1]=A>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var s=0;s<A;++s)r[i+s+4]=e[s];return(i+4+A)*8},Cl=function(r,t,e,A,i,s,n,o,a,l,u){We(t,u++,e),++i[256];for(var c=un(i,15),g=c.t,f=c.l,d=un(s,15),B=d.t,I=d.l,F=El(g),b=F.c,y=F.n,_=El(B),Q=_.c,D=_.n,S=new ue(19),M=0;M<b.length;++M)++S[b[M]&31];for(var M=0;M<Q.length;++M)++S[Q[M]&31];for(var V=un(S,7),et=V.t,z=V.l,J=19;J>4&&!et[rn[J-1]];--J);var $=l+5<<3,K=Li(i,oA)+Li(s,Ni)+n,L=Li(i,g)+Li(s,B)+n+14+3*J+Li(S,et)+2*S[16]+3*S[17]+7*S[18];if(a>=0&&$<=K&&$<=L)return Bl(t,u,r.subarray(a,a+l));var it,G,W,At;if(We(t,u,1+(L<K)),u+=2,L<K){it=Se(g,f,0),G=g,W=Se(B,I,0),At=B;var T=Se(et,z,0);We(t,u,y-257),We(t,u+5,D-1),We(t,u+10,J-4),u+=14;for(var M=0;M<J;++M)We(t,u+3*M,et[rn[M]]);u+=3*J;for(var tt=[b,Q],k=0;k<2;++k)for(var P=tt[k],M=0;M<P.length;++M){var q=P[M]&31;We(t,u,T[q]),u+=et[q],q>15&&(We(t,u,P[M]>>5&127),u+=P[M]>>12)}}else it=Lf,G=oA,W=Of,At=Ni;for(var M=0;M<o;++M){var Z=A[M];if(Z>255){var q=Z>>18&31;Ti(t,u,it[q+257]),u+=G[q+257],q>7&&(We(t,u,Z>>23&31),u+=Dr[q]);var nt=Z&31;Ti(t,u,W[nt]),u+=At[nt],nt>3&&(Ti(t,u,Z>>5&8191),u+=mr[nt])}else Ti(t,u,it[Z]),u+=G[Z]}return Ti(t,u,it[256]),u+G[256]},Yf=new An([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ql=new zt(0),Vf=function(r,t,e,A,i,s){var n=s.z||r.length,o=new zt(A+n+5*(1+Math.ceil(n/7e3))+i),a=o.subarray(A,o.length-i),l=s.l,u=(s.r||0)&7;if(t){u&&(a[0]=s.r>>3);for(var c=Yf[t-1],g=c>>13,f=c&8191,d=(1<<e)-1,B=s.p||new ue(32768),I=s.h||new ue(d+1),F=Math.ceil(e/3),b=2*F,y=function(Tt){return(r[Tt]^r[Tt+1]<<F^r[Tt+2]<<b)&d},_=new An(25e3),Q=new ue(288),D=new ue(32),S=0,M=0,V=s.i||0,et=0,z=s.w||0,J=0;V+2<n;++V){var $=y(V),K=V&32767,L=I[$];if(B[K]=L,I[$]=K,z<=V){var it=n-V;if((S>7e3||et>24576)&&(it>423||!l)){u=Cl(r,a,0,_,Q,D,M,et,J,V-J,u),et=S=M=0,J=V;for(var G=0;G<286;++G)Q[G]=0;for(var G=0;G<30;++G)D[G]=0}var W=2,At=0,T=f,tt=K-L&32767;if(it>2&&$==y(V-tt))for(var k=Math.min(g,it)-1,P=Math.min(32767,V),q=Math.min(258,it);tt<=P&&--T&&K!=L;){if(r[V+W]==r[V+W-tt]){for(var Z=0;Z<q&&r[V+Z]==r[V+Z-tt];++Z);if(Z>W){if(W=Z,At=tt,Z>k)break;for(var nt=Math.min(tt,Z-2),X=0,G=0;G<nt;++G){var It=V-tt+G&32767,ie=B[It],re=It-ie&32767;re>X&&(X=re,L=It)}}}K=L,L=B[K],tt+=K-L&32767}if(At){_[et++]=268435456|sn[W]<<18|Il[At];var Nt=sn[W]&31,ct=Il[At]&31;M+=Dr[Nt]+mr[ct],++Q[257+Nt],++D[ct],z=V+W,++S}else _[et++]=r[V],++Q[r[V]]}}for(V=Math.max(V,z);V<n;++V)_[et++]=r[V],++Q[r[V]];u=Cl(r,a,l,_,Q,D,M,et,J,V-J,u),l||(s.r=u&7|a[u/8|0]<<3,u-=7,s.h=I,s.p=B,s.i=V,s.w=z)}else{for(var V=s.w||0;V<n+l;V+=65535){var yt=V+65535;yt>=n&&(a[u/8|0]=l,yt=n),u=Bl(a,u+1,r.subarray(V,yt))}s.i=n}return pl(o,0,A+ln(u)+i)},yl=function(){var r=1,t=0;return{p:function(e){for(var A=r,i=t,s=e.length|0,n=0;n!=s;){for(var o=Math.min(n+2655,s);n<o;++n)i+=A+=e[n];A=(A&65535)+15*(A>>16),i=(i&65535)+15*(i>>16)}r=A,t=i},d:function(){return r%=65521,t%=65521,(r&255)<<24|(r&65280)<<8|(t&255)<<8|t>>8}}},zf=function(r,t,e,A,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),n=new zt(s.length+r.length);n.set(s),n.set(r,s.length),r=n,i.w=s.length}return Vf(r,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+t.mem,e,A,i)},Dl=function(r,t,e){for(;e;++t)r[t]=e,e>>>=8},Wf=function(r,t){var e=t.level,A=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=A<<6|(t.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,t.dictionary){var i=yl();i.p(t.dictionary),Dl(r,2,i.d())}},qf=function(r,t){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Qe(6,"invalid zlib data"),(r[1]>>5&1)==1&&Qe(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Xf(r,t){t||(t={});var e=yl();e.p(r);var A=zf(r,t,t.dictionary?6:2,4);return Wf(A,t),Dl(A,A.length-4,e.d()),A}function jf(r,t){return Kf(r.subarray(qf(r),-4),{i:2},t,t)}var Zf=typeof TextDecoder<"u"&&new TextDecoder,$f=0;try{Zf.decode(Ql,{stream:!0}),$f=1}catch{}const td="modern-font";function Gi(r,t){if(!r)throw new Error(`[${td}] ${t}`)}function ed(r){if("buffer"in r){const t=r.buffer;return r.byteOffset>0||r.byteLength<r.buffer.byteLength?t.slice(r.byteOffset,r.byteOffset+r.byteLength):t}else return r}function HA(r){return"buffer"in r?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(r)}function Ad(r){let t="";for(let e=0,A=r.length,i;e<A;e++)i=r.charCodeAt(e),i!==0&&(t+=String.fromCharCode(i));return t}function wr(r){r=Ad(r);const t=[];for(let e=0,A=r.length,i;e<A;e++)i=r.charCodeAt(e),t.push(i>>8),t.push(i&255);return t}function id(r){let t="";for(let e=0,A=r.length;e<A;e++)r[e]<127?t+=String.fromCharCode(r[e]):t+=`%${(256+r[e]).toString(16).slice(1)}`;return unescape(t)}function rd(r){let t="";for(let e=0,A=r.length;e<A;e+=2)t+=String.fromCharCode((r[e]<<8)+r[e+1]);return t}var sd=Object.defineProperty,Wt=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&sd(t,e,i),i};const Oi={int8:1,int16:2,int32:4,uint8:1,uint16:2,uint32:4,float32:4,float64:8,fixed:4,longDateTime:8,char:1};function qt(){return function(r,t){Object.defineProperty(r.constructor.prototype,t,{get(){if(typeof t=="string"){if(t.startsWith("read"))return(...e)=>this.read(t.substring(4).toLowerCase(),...e);if(t.startsWith("write"))return(...e)=>this.write(t.substring(5).toLowerCase(),...e)}},configurable:!0,enumerable:!0})}}class Rt extends DataView{constructor(t,e,A,i){super(ed(t),e,A),this.littleEndian=i}cursor=0;readColumn(t){if(t.size){const e=Array.from({length:t.size},(A,i)=>this.read(t.type,t.offset+i));switch(t.type){case"char":return e.join("");default:return e}}else return this.read(t.type,t.offset)}writeColumn(t,e){t.size?Array.from({length:t.size},(A,i)=>{this.write(t.type,e[i],t.offset+i)}):this.write(t.type,e,t.offset)}read(t,e=this.cursor,A=this.littleEndian){switch(t){case"char":return this.readChar(e);case"fixed":return this.readFixed(e,A);case"longDateTime":return this.readLongDateTime(e,A)}const i=`get${t.replace(/^\S/,a=>a.toUpperCase())}`,s=this,o=s[i]?.bind(s)?.(e,A);return this.cursor+=Oi[t],o}readUint24(t=this.cursor){const[e,A,i]=this.readBytes(t,3);return(e<<16)+(A<<8)+i}readBytes(t,e){e==null&&(e=t,t=this.cursor);const A=[];for(let i=0;i<e;++i)A.push(this.getUint8(t+i));return this.cursor=t+e,A}readString(t,e){const A=this.readBytes(t,e);let i="";for(let s=0,n=A.length;s<n;s++)i+=String.fromCharCode(A[s]);return i}readFixed(t,e){const A=this.readInt32(t,e)/65536;return Math.ceil(A*1e5)/1e5}readLongDateTime(t=this.cursor,e){const A=this.readUint32(t+4,e),i=new Date;return i.setTime(A*1e3+-20775456e5),i}readChar(t){return this.readString(t,1)}write(t,e,A=this.cursor,i=this.littleEndian){switch(t){case"char":return this.writeChar(e,A);case"fixed":return this.writeFixed(e,A);case"longDateTime":return this.writeLongDateTime(e,A)}const s=`set${t.replace(/^\S/,l=>l.toUpperCase())}`,n=this,a=n[s]?.bind(n)?.(A,e,i);return this.cursor+=Oi[t.toLowerCase()],a}writeString(t="",e=this.cursor){const A=t.replace(/[^\x00-\xFF]/g,"11").length;this.seek(e);for(let i=0,s=t.length,n;i<s;++i)n=t.charCodeAt(i)||0,n>127?this.writeUint16(n):this.writeUint8(n);return this.cursor+=A,this}writeChar(t,e){return this.writeString(t,e)}writeFixed(t,e){return this.writeInt32(Math.round(t*65536),e),this}writeLongDateTime(t,e=this.cursor){typeof t>"u"?t=-20775456e5:typeof t.getTime=="function"?t=t.getTime():/^\d+$/.test(t)?t=+t:t=Date.parse(t);const i=Math.round((t- -20775456e5)/1e3);return this.writeUint32(0,e),this.writeUint32(i,e+4),this}writeBytes(t,e=this.cursor){let A;if(Array.isArray(t)){A=t.length;for(let i=0;i<A;++i)this.setUint8(e+i,t[i])}else{const i=HA(t);A=i.byteLength;for(let s=0;s<A;++s)this.setUint8(e+s,i.getUint8(s))}return this.cursor=e+A,this}seek(t){return this.cursor=t,this}}Wt([qt()],Rt.prototype,"readInt8"),Wt([qt()],Rt.prototype,"readInt16"),Wt([qt()],Rt.prototype,"readInt32"),Wt([qt()],Rt.prototype,"readUint8"),Wt([qt()],Rt.prototype,"readUint16"),Wt([qt()],Rt.prototype,"readUint32"),Wt([qt()],Rt.prototype,"readFloat32"),Wt([qt()],Rt.prototype,"readFloat64"),Wt([qt()],Rt.prototype,"writeInt8"),Wt([qt()],Rt.prototype,"writeInt16"),Wt([qt()],Rt.prototype,"writeInt32"),Wt([qt()],Rt.prototype,"writeUint8"),Wt([qt()],Rt.prototype,"writeUint16"),Wt([qt()],Rt.prototype,"writeUint32"),Wt([qt()],Rt.prototype,"writeFloat32"),Wt([qt()],Rt.prototype,"writeFloat64");const ml=new WeakMap;function m(r){const t=typeof r=="object"?r:{type:r},{size:e=1,type:A}=t;return(i,s)=>{if(typeof s!="string")return;let n=ml.get(i);n||(n={columns:[],byteLength:0},ml.set(i,n));const o={...t,name:s,byteLength:e*Oi[A],offset:t.offset??n.columns.reduce((a,l)=>a+l.byteLength,0)};n.columns.push(o),n.byteLength=n.columns.reduce((a,l)=>a+Oi[l.type]*(l.size??1),0),Object.defineProperty(i.constructor.prototype,s,{get(){return this.view.readColumn(o)},set(a){this.view.writeColumn(o,a)},configurable:!0,enumerable:!0})}}class ce{view;constructor(t,e,A,i){this.view=new Rt(t,e,A,i)}}class vr extends ce{get buffer(){return this.view.buffer}toBuffer(){return this.view.buffer.slice(this.view.byteOffset,this.view.byteOffset+this.view.byteLength)}toBlob(){return new Blob([new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength)],{type:this.mimeType})}toFontFace(t){return new FontFace(t,this.view.buffer)}}var nd=Object.defineProperty,$t=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&nd(t,e,i),i};const te=class Fu extends vr{format="EmbeddedOpenType";mimeType="application/vnd.ms-fontobject";static from(t){const e=t.sfnt,i=e.name.names,s=wr(i.fontFamily||""),n=s.length,o=wr(i.fontStyle||""),a=o.length,l=wr(i.version||""),u=l.length,c=wr(i.fullName||""),g=c.length,f=86+n+4+a+4+u+4+g+2+t.view.byteLength,d=new Fu(new ArrayBuffer(f),0,f,!0);d.EOTSize=d.view.byteLength,d.FontDataSize=t.view.byteLength,d.Version=131073,d.Flags=0,d.Charset=1,d.MagicNumber=20556,d.Padding1=0,d.CheckSumAdjustment=e.head.checkSumAdjustment;const B=e.os2;return B&&(d.FontPANOSE=B.fontPANOSE,d.Italic=B.fsSelection,d.Weight=B.usWeightClass,d.fsType=B.fsType,d.UnicodeRange=B.ulUnicodeRange,d.CodePageRange=B.ulCodePageRange),d.view.writeUint16(n),d.view.writeBytes(s),d.view.writeUint16(0),d.view.writeUint16(a),d.view.writeBytes(o),d.view.writeUint16(0),d.view.writeUint16(u),d.view.writeBytes(l),d.view.writeUint16(0),d.view.writeUint16(g),d.view.writeBytes(c),d.view.writeUint16(0),d.view.writeUint16(0),d.view.writeBytes(t.view),d}};$t([m("uint32")],te.prototype,"EOTSize"),$t([m("uint32")],te.prototype,"FontDataSize"),$t([m("uint32")],te.prototype,"Version"),$t([m("uint32")],te.prototype,"Flags"),$t([m({type:"uint8",size:10})],te.prototype,"FontPANOSE"),$t([m("uint8")],te.prototype,"Charset"),$t([m("uint8")],te.prototype,"Italic"),$t([m("uint32")],te.prototype,"Weight"),$t([m("uint16")],te.prototype,"fsType"),$t([m("uint16")],te.prototype,"MagicNumber"),$t([m({type:"uint8",size:16})],te.prototype,"UnicodeRange"),$t([m({type:"uint8",size:8})],te.prototype,"CodePageRange"),$t([m("uint32")],te.prototype,"CheckSumAdjustment"),$t([m({type:"uint8",size:16})],te.prototype,"Reserved"),$t([m("uint16")],te.prototype,"Padding1");var od=Object.defineProperty,_r=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&od(t,e,i),i};class JA extends ce{constructor(t,e){super(t,e,16)}}_r([m({type:"char",size:4})],JA.prototype,"tag"),_r([m("uint32")],JA.prototype,"checkSum"),_r([m("uint32")],JA.prototype,"offset"),_r([m("uint32")],JA.prototype,"length");const hn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],ad=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];class gn{index;name;isComposite=!1;components=[];pathCommands=[];constructor(t){const e={...t};if(this.index=e.index??0,e.name===".notdef"?e.unicode=void 0:e.name===".null"&&(e.unicode=0),e.unicode===0&&e.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=e.name??null,e.unicode&&(this.unicode=e.unicode),e.unicodes?this.unicodes=e.unicodes:e.unicode&&(this.unicodes=[e.unicode])}getPathCommands(t=0,e=0,A=72,i={},s){const n=1/(s?.unitsPerEm??1e3)*A,{xScale:o=n,yScale:a=n}=i,l=this.pathCommands,u=[];for(let c=0,g=l.length;c<g;c+=1){const f=l[c];f.type==="M"?u.push({type:"M",x:t+f.x*o,y:e+-f.y*a}):f.type==="L"?u.push({type:"L",x:t+f.x*o,y:e+-f.y*a}):f.type==="Q"?u.push({type:"Q",x1:t+f.x1*o,y1:e+-f.y1*a,x:t+f.x*o,y:e+-f.y*a}):f.type==="C"?u.push({type:"C",x1:t+f.x1*o,y1:e+-f.y1*a,x2:t+f.x2*o,y2:e+-f.y2*a,x:t+f.x*o,y:e+-f.y*a}):f.type==="Z"&&u.push({type:"Z"})}return u}}class ld extends gn{parse(t,e,A){const i=this,{nominalWidthX:s,defaultWidthX:n,gsubrsBias:o,subrsBias:a}=t,l=t.topDict.paintType,u=this.index;let c,g,f,d;const B=[],I=[];let F=0,b=!1,y=!1,_=n,Q=0,D=0;function S(K,L){B.push({type:"L",x:K,y:L})}function M(K,L,it,G,W,At){B.push({type:"C",x1:K,y1:L,x2:it,y2:G,x:W,y:At})}function V(K,L){y&&l!==2&&et(),y=!0,B.push({type:"M",x:K,y:L})}function et(){B.push({type:"Z"})}function z(K){B.push(...K)}function J(){I.length%2!==0&&!b&&(_=I.shift()+s),F+=I.length>>1,I.length=0,b=!0}function $(K){let L,it,G,W,At,T,tt,k,P,q,Z,nt,X=0;for(;X<K.length;){let It=K[X++];switch(It){case 1:J();break;case 3:J();break;case 4:I.length>1&&!b&&(_=I.shift()+s,b=!0),D+=I.pop(),V(Q,D);break;case 5:for(;I.length>0;)Q+=I.shift(),D+=I.shift(),S(Q,D);break;case 6:for(;I.length>0&&(Q+=I.shift(),S(Q,D),I.length!==0);)D+=I.shift(),S(Q,D);break;case 7:for(;I.length>0&&(D+=I.shift(),S(Q,D),I.length!==0);)Q+=I.shift(),S(Q,D);break;case 8:for(;I.length>0;)c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d+I.shift(),M(c,g,f,d,Q,D);break;case 10:At=I.pop()+a,T=t.subrs[At],T&&$(T);break;case 11:return;case 12:switch(It=K[X],X+=1,It){case 35:c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),tt=f+I.shift(),k=d+I.shift(),P=tt+I.shift(),q=k+I.shift(),Z=P+I.shift(),nt=q+I.shift(),Q=Z+I.shift(),D=nt+I.shift(),I.shift(),M(c,g,f,d,tt,k),M(P,q,Z,nt,Q,D);break;case 34:c=Q+I.shift(),g=D,f=c+I.shift(),d=g+I.shift(),tt=f+I.shift(),k=d,P=tt+I.shift(),q=d,Z=P+I.shift(),nt=D,Q=Z+I.shift(),M(c,g,f,d,tt,k),M(P,q,Z,nt,Q,D);break;case 36:c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),tt=f+I.shift(),k=d,P=tt+I.shift(),q=d,Z=P+I.shift(),nt=q+I.shift(),Q=Z+I.shift(),M(c,g,f,d,tt,k),M(P,q,Z,nt,Q,D);break;case 37:c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),tt=f+I.shift(),k=d+I.shift(),P=tt+I.shift(),q=k+I.shift(),Z=P+I.shift(),nt=q+I.shift(),Math.abs(Z-Q)>Math.abs(nt-D)?Q=Z+I.shift():D=nt+I.shift(),M(c,g,f,d,tt,k),M(P,q,Z,nt,Q,D);break;default:console.warn(`Glyph ${u}: unknown operator ${1200+It}`),I.length=0}break;case 14:if(I.length>=4){const ie=hn[I.pop()],re=hn[I.pop()],Nt=I.pop(),ct=I.pop();if(ie&&re){i.isComposite=!0,i.components=[];const yt=t.charset.indexOf(ie),Tt=t.charset.indexOf(re);i.components.push({glyphIndex:Tt,dx:0,dy:0}),i.components.push({glyphIndex:yt,dx:ct,dy:Nt}),z(A.get(Tt).pathCommands);const Jt=JSON.parse(JSON.stringify(A.get(yt).pathCommands));for(let _t=0;_t<Jt.length;_t+=1){const Zt=Jt[_t];Zt.type!=="Z"&&(Zt.x+=ct,Zt.y+=Nt),(Zt.type==="Q"||Zt.type==="C")&&(Zt.x1+=ct,Zt.y1+=Nt),Zt.type==="C"&&(Zt.x2+=ct,Zt.y2+=Nt)}z(Jt)}}else I.length>0&&!b&&(_=I.shift()+s,b=!0);y&&l!==2&&(et(),y=!1);break;case 18:J();break;case 19:case 20:J(),X+=F+7>>3;break;case 21:I.length>2&&!b&&(_=I.shift()+s,b=!0),D+=I.pop(),Q+=I.pop(),V(Q,D);break;case 22:I.length>1&&!b&&(_=I.shift()+s,b=!0),Q+=I.pop(),V(Q,D);break;case 23:J();break;case 24:for(;I.length>2;)c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d+I.shift(),M(c,g,f,d,Q,D);Q+=I.shift(),D+=I.shift(),S(Q,D);break;case 25:for(;I.length>6;)Q+=I.shift(),D+=I.shift(),S(Q,D);c=Q+I.shift(),g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d+I.shift(),M(c,g,f,d,Q,D);break;case 26:for(I.length%2&&(Q+=I.shift());I.length>0;)c=Q,g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f,D=d+I.shift(),M(c,g,f,d,Q,D);break;case 27:for(I.length%2&&(D+=I.shift());I.length>0;)c=Q+I.shift(),g=D,f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d,M(c,g,f,d,Q,D);break;case 28:L=K[X],it=K[X+1],I.push((L<<24|it<<16)>>16),X+=2;break;case 29:At=I.pop()+o,T=t.gsubrs[At],T&&$(T);break;case 30:for(;I.length>0&&(c=Q,g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d+(I.length===1?I.shift():0),M(c,g,f,d,Q,D),I.length!==0);)c=Q+I.shift(),g=D,f=c+I.shift(),d=g+I.shift(),D=d+I.shift(),Q=f+(I.length===1?I.shift():0),M(c,g,f,d,Q,D);break;case 31:for(;I.length>0&&(c=Q+I.shift(),g=D,f=c+I.shift(),d=g+I.shift(),D=d+I.shift(),Q=f+(I.length===1?I.shift():0),M(c,g,f,d,Q,D),I.length!==0);)c=Q,g=D+I.shift(),f=c+I.shift(),d=g+I.shift(),Q=f+I.shift(),D=d+(I.length===1?I.shift():0),M(c,g,f,d,Q,D);break;default:It<32?console.warn(`Glyph ${u}: unknown operator ${It}`):It<247?I.push(It-139):It<251?(L=K[X],X+=1,I.push((It-247)*256+L+108)):It<255?(L=K[X],X+=1,I.push(-(It-251)*256-L-108)):(L=K[X],it=K[X+1],G=K[X+2],W=K[X+3],X+=4,I.push((L<<24|it<<16|G<<8|W)/65536))}}}$(e),this.pathCommands=B,b&&(this.advanceWidth=_)}}class fn{constructor(t){this._sfnt=t}_items=[];get(t){const e=this._items[t];let A;if(e)A=e;else{A=this._get(t);const i=this._sfnt.hmtx.metrics[t];i&&(A.advanceWidth=A.advanceWidth||i.advanceWidth,A.leftSideBearing=A.leftSideBearing||i.leftSideBearing);const s=this._sfnt.cmap.glyphIndexToUnicodesMap.get(t);s&&(A.unicode??=s[0],A.unicodes??=s),this._items[t]=A}return A}}class ud extends fn{get length(){return this._sfnt.cff.charStringsIndex.offsets.length-1}_get(t){const e=this._sfnt.cff,A=new ld({index:t});return A.parse(e,e.charStringsIndex.get(t),this),A.name=e.charset[t],A}}var cd=Object.defineProperty,wl=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&cd(t,e,i),i};class br extends ce{_offsets;get offsets(){return this._offsets??=this.readOffsets()}_objects;get objects(){return this._objects??=this.readObjects()}constructor(t,e,A,i){super(t,e,A,i),this._init()}_init(){const t=this.view,e=this.count,A=this.offsetSize;this.objectOffset=(e+1)*A+2,this.endOffset=t.byteOffset+this.objectOffset+this.offsets[e]}readOffsets(){const t=this.view,e=this.count,A=this.offsetSize;t.seek(3);const i=[];for(let s=0,n=e+1;s<n;s++){const o=this.view;let a=0;for(let l=0;l<A;l++)a<<=8,a+=o.readUint8();i.push(a)}return i}readObjects(){const t=[];for(let e=0,A=this.count;e<A;e++)t.push(this.get(e));return t}get(t){const e=this.offsets,A=this.objectOffset,i=A+e[t],n=A+e[t+1]-i;return this._isString?this.view.readString(i,n):this.view.readBytes(i,n)}}wl([m("uint16")],br.prototype,"count"),wl([m("uint8")],br.prototype,"offsetSize");class xr extends br{_isString=!1}class vl extends br{_isString=!0}const hd=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],gd=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],fd=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],dd=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];function Fr(r,t){return t<=390?hd[t]:r[t-391]}function Bt(r,t="number",e){return(A,i)=>{if(typeof i!="string")return;const s={type:t,operator:r,default:e??t==="number"?0:void 0};Object.defineProperty(A.constructor.prototype,i,{get(){return this._getProp(s)},set(n){this._setProp(s,n)},configurable:!0,enumerable:!0})}}class _l extends ce{_dict;get dict(){return this._dict??=this._readDict()}_stringIndex;setStringIndex(t){return this._stringIndex=t,this}_readFloatOperand(){const t=this.view;let e="";const A=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const s=t.readUint8(),n=s>>4,o=s&15;if(n===A||(e+=i[n],o===A))break;e+=i[o]}return Number.parseFloat(e)}_readOperand(t){const e=this.view;let A,i,s,n;if(t===28)return A=e.readUint8(),i=e.readUint8(),A<<8|i;if(t===29)return A=e.readUint8(),i=e.readUint8(),s=e.readUint8(),n=e.readUint8(),A<<24|i<<16|s<<8|n;if(t===30)return this._readFloatOperand();if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return A=e.readUint8(),(t-247)*256+A+108;if(t>=251&&t<=254)return A=e.readUint8(),-(t-251)*256-A-108;throw new Error(`invalid b0 ${t}, at: ${e.cursor}`)}_readDict(){const t=this.view;t.seek(0);let e=[];const A=t.cursor+t.byteLength,i={};for(;t.cursor<A;){let s=t.readUint8();s<=21?(s===12&&(s=1200+t.readUint8()),i[s]=e,e=[]):e.push(this._readOperand(s))}return i}_getProp(t){const e=this.dict[t.operator]??t.default;switch(t.type){case"number":return e[0];case"string":return Fr(this._stringIndex?.objects??[],e[0]);case"number[]":return e}return e}_setProp(t,e){}}var Id=Object.defineProperty,dn=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Id(t,e,i),i};class Sr extends _l{}dn([Bt(19)],Sr.prototype,"subrs"),dn([Bt(20)],Sr.prototype,"defaultWidthX"),dn([Bt(21)],Sr.prototype,"nominalWidthX");var pd=Object.defineProperty,vt=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&pd(t,e,i),i};class mt extends _l{}vt([Bt(0,"string")],mt.prototype,"version"),vt([Bt(1,"string")],mt.prototype,"notice"),vt([Bt(1200,"string")],mt.prototype,"copyright"),vt([Bt(2,"string")],mt.prototype,"fullName"),vt([Bt(3,"string")],mt.prototype,"familyName"),vt([Bt(4,"string")],mt.prototype,"weight"),vt([Bt(1201)],mt.prototype,"isFixedPitch"),vt([Bt(1202)],mt.prototype,"italicAngle"),vt([Bt(1203,"number",-100)],mt.prototype,"underlinePosition"),vt([Bt(1204,"number",50)],mt.prototype,"underlineThickness"),vt([Bt(1205)],mt.prototype,"paintType"),vt([Bt(1206,"number",2)],mt.prototype,"charstringType"),vt([Bt(1207,"number[]",[.001,0,0,.001,0,0])],mt.prototype,"fontMatrix"),vt([Bt(13)],mt.prototype,"uniqueId"),vt([Bt(5,"number[]",[0,0,0,0])],mt.prototype,"fontBBox"),vt([Bt(1208)],mt.prototype,"strokeWidth"),vt([Bt(14)],mt.prototype,"xuid"),vt([Bt(15)],mt.prototype,"charset"),vt([Bt(16)],mt.prototype,"encoding"),vt([Bt(17)],mt.prototype,"charStrings"),vt([Bt(18,"number[]",[0,0])],mt.prototype,"private");function Gt(r,t=r){return e=>{Me.tableDefinitions.set(r,{tag:r,prop:t,class:e}),Object.defineProperty(Me.prototype,t,{get(){return this.get(r)},set(A){return this.set(r,A)},configurable:!0,enumerable:!0})}}class Me{static tableDefinitions=new Map;tables=new Map;tableViews=new Map;get hasGlyf(){return this.tableViews.has("glyf")}get names(){return this.name.names}get unitsPerEm(){return this.head.unitsPerEm}get ascender(){return this.hhea.ascent}get descender(){return this.hhea.descent}get createdTimestamp(){return this.head.created}get modifiedTimestamp(){return this.head.modified}get numGlyphs(){return this.maxp.numGlyphs}get unicodes(){return this.cmap.glyphIndexToUnicodesMap}get glyphs(){return this.hasGlyf?this.glyf.glyphs:this.cff.glyphs}charToGlyphIndex(t){let e=this.cmap.unicodeToGlyphIndexMap.get(t.codePointAt(0));if(e===void 0&&!this.hasGlyf){const{encoding:A,charset:i}=this.cff;e=i.indexOf(A[t.codePointAt(0)])}return e??0}charToGlyph(t){return this.glyphs.get(this.charToGlyphIndex(t))}textToGlyphIndexes(t){const e=[];for(const A of t)e.push(this.charToGlyphIndex(A));return e}textToGlyphs(t){const e=this.glyphs,A=this.textToGlyphIndexes(t),i=A.length,s=Array.from({length:i}),n=e.get(0);for(let o=0;o<i;o+=1)s[o]=e.get(A[o])||n;return s}getPathCommands(t,e,A,i,s){const n=[];return this.forEachGlyph(t,e,A,i,s,(o,a,l,u,c)=>{n.push(...o.getPathCommands(a,l,u,c,this))}),n}getAdvanceWidth(t,e,A){return this.forEachGlyph(t,0,0,e,A,()=>{})}forEachGlyph(t,e=0,A=0,i=72,s={},n){const o=1/this.unitsPerEm*i,a=this.textToGlyphs(t);for(let l=0;l<a.length;l+=1){const u=a[l];n.call(this,u,e,A,i,s),u.advanceWidth&&(e+=u.advanceWidth*o),s.letterSpacing?e+=s.letterSpacing*i:s.tracking&&(e+=s.tracking/1e3*i)}return e}constructor(t){(t instanceof Map?t:new Map(Object.entries(t))).forEach((A,i)=>{this.tableViews.set(i,new DataView(A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)))})}clone(){return new Me(this.tableViews)}delete(t){const e=Me.tableDefinitions.get(t);return e?(this.tableViews.delete(t),this.tables.delete(e.prop),this):this}set(t,e){const A=Me.tableDefinitions.get(t);return A&&this.tables.set(A.prop,e),this.tableViews.set(t,e.view),this}get(t){const e=Me.tableDefinitions.get(t);if(!e)return;let A=this.tables.get(e.prop);if(!A){const i=e.class;if(i){const s=this.tableViews.get(t);if(!s)return;A=new i(s.buffer,s.byteOffset,s.byteLength).setSFNT(this),this.tables.set(e.prop,A)}}return A}}class Xt extends ce{setSFNT(t){return this._sfnt=t,this}getSFNT(){return this._sfnt}}var Ed=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,Hi=(r,t,e,A)=>{for(var i=A>1?void 0:A?Bd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Ed(t,e,i),i};let wA=class extends Xt{_glyphs;get glyphs(){return this._glyphs??=new ud(this._sfnt)}get gsubrs(){return this.globalSubrIndex.objects}get gsubrsBias(){return this._calcSubroutineBias(this.globalSubrIndex.objects)}privateDict;subrsIndex;get defaultWidthX(){return this.privateDict?.defaultWidthX??0}get nominalWidthX(){return this.privateDict?.nominalWidthX??0}get subrs(){return this.subrsIndex?.objects??[]}get subrsBias(){return this._calcSubroutineBias(this.subrs)}constructor(r,t,e,A){super(r,t,e,A),this._init()}_init(){const r=this.view,{buffer:t,byteOffset:e}=r,A=e+4;this.nameIndex=new vl(t,A),this.topDictIndex=new xr(t,this.nameIndex.endOffset),this.stringIndex=new vl(t,this.topDictIndex.endOffset),this.globalSubrIndex=new xr(t,this.stringIndex.endOffset),this.topDict=new mt(new Uint8Array(this.topDictIndex.objects[0]).buffer).setStringIndex(this.stringIndex);const i=this.topDict.private[0],s=this.topDict.private[1];i&&(this.privateDict=new Sr(t,e+s,i).setStringIndex(this.stringIndex),this.privateDict.subrs&&(this.subrsIndex=new xr(t,e+s+this.privateDict.subrs))),this.charStringsIndex=new xr(t,e+this.topDict.charStrings);const n=this.charStringsIndex.offsets.length-1;this.topDict.charset===0?this.charset=gd:this.topDict.charset===1?this.charset=fd:this.topDict.charset===2?this.charset=dd:this.charset=this._readCharset(e+this.topDict.charset,n,this.stringIndex.objects),this.topDict.encoding===0?this.encoding=hn:this.topDict.encoding===1?this.encoding=ad:this.encoding=this._readEncoding(e+this.topDict.encoding)}_readCharset(r,t,e){const A=this.view;A.seek(r);let i,s,n;t-=1;const o=[".notdef"],a=A.readUint8();if(a===0)for(i=0;i<t;i+=1)s=A.readUint16(),o.push(Fr(e,s));else if(a===1)for(;o.length<=t;)for(s=A.readUint16(),n=A.readUint8(),i=0;i<=n;i+=1)o.push(Fr(e,s)),s+=1;else if(a===2)for(;o.length<=t;)for(s=A.readUint16(),n=A.readUint16(),i=0;i<=n;i+=1)o.push(Fr(e,s)),s+=1;else throw new Error(`Unknown charset format ${a}`);return o}_readEncoding(r){const t=this.view;t.seek(r);let e,A;const i={},s=t.readUint8();if(s===0){const n=t.readUint8();for(e=0;e<n;e+=1)A=t.readUint8(),i[A]=e}else if(s===1){const n=t.readUint8();for(A=1,e=0;e<n;e+=1){const o=t.readUint8(),a=t.readUint8();for(let l=o;l<=o+a;l+=1)i[l]=A,A+=1}}else console.warn(`unknown encoding format:${s}`);return i}_calcSubroutineBias(r){let t;return r.length<1240?t=107:r.length<33900?t=1131:t=32768,t}};Hi([m("uint8")],wA.prototype,"majorVersion",2),Hi([m("uint8")],wA.prototype,"minorVersion",2),Hi([m("uint8")],wA.prototype,"headerSize",2),Hi([m("uint8")],wA.prototype,"offsetSize",2),wA=Hi([Gt("CFF ","cff")],wA);var Cd=Object.defineProperty,Mr=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Cd(t,e,i),i};const Ji=class Su extends ce{constructor(t=new ArrayBuffer(262),e){super(t,e,262)}static from(t){const e=new Su;return e.format=0,e.length=e.view.byteLength,e.language=0,t.forEach((A,i)=>{i<256&&A<256&&e.view.writeUint8(A,6+i)}),e}getUnicodeToGlyphIndexMap(){const t=new Map;return this.glyphIndexArray.forEach((e,A)=>{t.set(A,e)}),t}};Mr([m("uint16")],Ji.prototype,"format"),Mr([m("uint16")],Ji.prototype,"length"),Mr([m("uint16")],Ji.prototype,"language"),Mr([m({type:"uint8",size:256})],Ji.prototype,"glyphIndexArray");let In=Ji;var Qd=Object.defineProperty,pn=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Qd(t,e,i),i};class Ki extends ce{get subHeaderKeys(){return this.view.seek(6),Array.from({length:256},()=>this.view.readUint16()/8)}get maxSubHeaderKey(){return this.subHeaderKeys.reduce((t,e)=>Math.max(t,e),0)}get subHeaders(){const t=this.maxSubHeaderKey;return this.view.seek(6+256*2),Array.from({length:t},(e,A)=>({firstCode:this.view.readUint16(),entryCount:this.view.readUint16(),idDelta:this.view.readUint16(),idRangeOffset:(this.view.readUint16()-(t-A)*8-2)/2}))}get glyphIndexArray(){const t=this.maxSubHeaderKey,e=6+256*2+t*8;this.view.seek(e);const A=(this.view.byteLength-e)/2;return Array.from({length:A},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(t){const e=new Map,A=this.subHeaderKeys,i=this.maxSubHeaderKey,s=this.subHeaders,n=this.glyphIndexArray,o=A.findIndex(l=>l===i);let a=0;for(let l=0;l<256;l++)if(A[l]===0)l>=o||l<s[0].firstCode||l>=s[0].firstCode+s[0].entryCount||s[0].idRangeOffset+(l-s[0].firstCode)>=n.length?a=0:(a=n[s[0].idRangeOffset+(l-s[0].firstCode)],a!==0&&(a=a+s[0].idDelta)),a!==0&&a<t&&e.set(l,a);else{const u=A[l];for(let c=0,g=s[u].entryCount;c<g;c++)if(s[u].idRangeOffset+c>=n.length?a=0:(a=n[s[u].idRangeOffset+c],a!==0&&(a=a+s[u].idDelta)),a!==0&&a<t){const f=(l<<8|c+s[u].firstCode)%65535;e.set(f,a)}}return e}}pn([m("uint16")],Ki.prototype,"format"),pn([m("uint16")],Ki.prototype,"length"),pn([m("uint16")],Ki.prototype,"language");function bl(r){return r>32767?r-65536:r<-32767?r+65536:r}function En(r,t){let e;const A=[];let i={};return r.forEach((s,n)=>{t&&n>t||((!e||n!==e.unicode+1||s!==e.glyphIndex+1)&&(e?(i.end=e.unicode,A.push(i),i={start:n,startId:s,delta:bl(s-n)}):(i.start=Number(n),i.startId=s,i.delta=bl(s-n))),e={unicode:n,glyphIndex:s})}),e&&(i.end=e.unicode,A.push(i)),A}var yd=Object.defineProperty,vA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&yd(t,e,i),i};const aA=class Mu extends ce{get endCode(){const t=this.segCountX2;return this.view.seek(14),Array.from({length:t/2},()=>this.view.readUint16())}set endCode(t){this.view.seek(14),t.forEach(e=>this.view.writeUint16(e))}get reservedPad(){return this.view.readUint16(14+this.segCountX2)}set reservedPad(t){this.view.writeUint16(t,14+this.segCountX2)}get startCode(){const t=this.segCountX2;return this.view.seek(14+t+2),Array.from({length:t/2},()=>this.view.readUint16())}set startCode(t){this.view.seek(14+this.segCountX2+2),t.forEach(e=>this.view.writeUint16(e))}get idDelta(){const t=this.segCountX2;return this.view.seek(14+t+2+t),Array.from({length:t/2},()=>this.view.readUint16())}set idDelta(t){const e=this.segCountX2;this.view.seek(14+e+2+e),t.forEach(A=>this.view.writeUint16(A))}get idRangeOffsetCursor(){const t=this.segCountX2;return 14+t+2+t*2}get idRangeOffset(){const t=this.segCountX2;return this.view.seek(this.idRangeOffsetCursor),Array.from({length:t/2},()=>this.view.readUint16())}set idRangeOffset(t){this.view.seek(this.idRangeOffsetCursor),t.forEach(e=>this.view.writeUint16(e))}get glyphIndexArrayCursor(){const t=this.segCountX2;return 14+t+2+t*3}get glyphIndexArray(){const t=this.glyphIndexArrayCursor;this.view.seek(t);const e=(this.view.byteLength-t)/2;return Array.from({length:e},()=>this.view.readUint16())}static from(t){const e=En(t,65535),A=e.length+1,i=Math.floor(Math.log(A)/Math.LN2),s=2*2**i,n=new Mu(new ArrayBuffer(24+e.length*8));return n.format=4,n.length=n.view.byteLength,n.language=0,n.segCountX2=A*2,n.searchRange=s,n.entrySelector=i,n.rangeShift=2*A-s,n.endCode=[...e.map(o=>o.end),65535],n.reservedPad=0,n.startCode=[...e.map(o=>o.start),65535],n.idDelta=[...e.map(o=>o.delta),1],n.idRangeOffset=Array.from({length:A},()=>0),n}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.segCountX2/2,A=(this.glyphIndexArrayCursor-this.idRangeOffsetCursor)/2,i=this.startCode,s=this.endCode,n=this.idRangeOffset,o=this.idDelta,a=this.glyphIndexArray;for(let l=0;l<e;++l)for(let u=i[l],c=s[l];u<=c;++u)if(n[l]===0)t.set(u,(u+o[l])%65536);else{const g=l+n[l]/2+(u-i[l])-A,f=a[g];f!==0?t.set(u,(f+o[l])%65536):t.set(u,0)}return t.delete(65535),t}};vA([m("uint16")],aA.prototype,"format"),vA([m("uint16")],aA.prototype,"length"),vA([m("uint16")],aA.prototype,"language"),vA([m("uint16")],aA.prototype,"segCountX2"),vA([m("uint16")],aA.prototype,"searchRange"),vA([m("uint16")],aA.prototype,"entrySelector"),vA([m("uint16")],aA.prototype,"rangeShift");let Bn=aA;var Dd=Object.defineProperty,Yi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Dd(t,e,i),i};class _A extends ce{get glyphIndexArray(){return this.view.seek(12),Array.from({length:this.entryCount},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(){const t=this.glyphIndexArray,e=new Map;return t.forEach((A,i)=>{e.set(i,A)}),e}}Yi([m("uint16")],_A.prototype,"format"),Yi([m("uint16")],_A.prototype,"length"),Yi([m("uint16")],_A.prototype,"language"),Yi([m("uint16")],_A.prototype,"firstCode"),Yi([m("uint16")],_A.prototype,"entryCount");var md=Object.defineProperty,Vi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&md(t,e,i),i};const KA=class Ru extends ce{get groups(){const t=this.nGroups;return this.view.seek(16),Array.from({length:t},()=>({startCharCode:this.view.readUint32(),endCharCode:this.view.readUint32(),startGlyphCode:this.view.readUint32()}))}static from(t){const e=En(t),A=new Ru(new ArrayBuffer(16+e.length*12));return A.format=12,A.reserved=0,A.length=A.view.byteLength,A.language=0,A.nGroups=e.length,e.forEach(i=>{A.view.writeUint32(i.start),A.view.writeUint32(i.end),A.view.writeUint32(i.startId)}),A}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.groups;for(let A=0,i=e.length;A<i;A++){const s=e[A];let n=s.startGlyphCode,o=s.startCharCode;const a=s.endCharCode;for(;o<=a;)t.set(o++,n++)}return t}};Vi([m("uint16")],KA.prototype,"format"),Vi([m("uint16")],KA.prototype,"reserved"),Vi([m("uint32")],KA.prototype,"length"),Vi([m("uint32")],KA.prototype,"language"),Vi([m("uint32")],KA.prototype,"nGroups");let Cn=KA;var wd=Object.defineProperty,Qn=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&wd(t,e,i),i};class zi extends ce{getVarSelectorRecords(){const t=this.numVarSelectorRecords;return this.view.seek(10),Array.from({length:t},()=>{const e={varSelector:this.view.readUint24(),defaultUVSOffset:this.view.readUint32(),unicodeValueRanges:[],nonDefaultUVSOffset:this.view.readUint32(),uVSMappings:[]};if(e.defaultUVSOffset){this.view.seek(e.defaultUVSOffset);const A=this.view.readUint32();e.unicodeValueRanges=Array.from({length:A},()=>({startUnicodeValue:this.view.readUint24(),additionalCount:this.view.readUint8()}))}if(e.nonDefaultUVSOffset){this.view.seek(e.nonDefaultUVSOffset);const A=this.view.readUint32();e.uVSMappings=Array.from({length:A},()=>({unicodeValue:this.view.readUint24(),glyphID:this.view.readUint16()}))}return e})}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.getVarSelectorRecords();for(let A=0,i=e.length;A<i;A++){const{uVSMappings:s}=e[A];s.forEach(n=>{t.set(n.unicodeValue,n.glyphID)})}return t}}Qn([m("uint16")],zi.prototype,"format"),Qn([m("uint32")],zi.prototype,"length"),Qn([m("uint32")],zi.prototype,"numVarSelectorRecords");var vd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,yn=(r,t,e,A)=>{for(var i=A>1?void 0:A?_d(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&vd(t,e,i),i};let YA=class extends Xt{static from(r){const t=Array.from(r.keys()).some(u=>u>65535),e=Bn.from(r),A=In.from(r),i=t?Cn.from(r):void 0,s=4+(i?32:24),n=s+e.view.byteLength,o=n+A.view.byteLength,a=[{platformID:0,platformSpecificID:3,offset:s},{platformID:1,platformSpecificID:0,offset:n},{platformID:3,platformSpecificID:1,offset:s},i&&{platformID:3,platformSpecificID:10,offset:o}].filter(Boolean),l=new YA(new ArrayBuffer(4+8*a.length+e.view.byteLength+A.view.byteLength+(i?.view.byteLength??0)));return l.numberSubtables=a.length,l.view.seek(4),a.forEach(u=>{l.view.writeUint16(u.platformID),l.view.writeUint16(u.platformSpecificID),l.view.writeUint32(u.offset)}),l.view.writeBytes(e.view,s),l.view.writeBytes(A.view,n),i&&l.view.writeBytes(i.view,o),l}_unicodeToGlyphIndexMap;get unicodeToGlyphIndexMap(){return this._unicodeToGlyphIndexMap??=this.readunicodeToGlyphIndexMap()}_glyphIndexToUnicodesMap;get glyphIndexToUnicodesMap(){if(!this._glyphIndexToUnicodesMap){const r=new Map,t=this.unicodeToGlyphIndexMap,e=Array.from(t.keys());for(let A=0,i=e.length;A<i;A++){const s=e[A],n=t.get(s);r.has(n)?r.get(n).push(s):r.set(n,[s])}this._glyphIndexToUnicodesMap=r}return this._glyphIndexToUnicodesMap}readSubtables(){const r=this.numberSubtables;return this.view.seek(4),Array.from({length:r},()=>({platformID:this.view.readUint16(),platformSpecificID:this.view.readUint16(),offset:this.view.readUint32()})).map(t=>{this.view.seek(t.offset);const e=this.view.readUint16();let A;switch(e){case 0:A=new In(this.view.buffer,t.offset);break;case 2:A=new Ki(this.view.buffer,t.offset,this.view.readUint16());break;case 4:A=new Bn(this.view.buffer,t.offset,this.view.readUint16());break;case 6:A=new _A(this.view.buffer,t.offset,this.view.readUint16());break;case 12:A=new Cn(this.view.buffer,t.offset,this.view.readUint32(t.offset+4));break;case 14:default:A=new zi(this.view.buffer,t.offset,this.view.readUint32());break}return{...t,format:e,view:A}})}readunicodeToGlyphIndexMap(){const r=this.readSubtables(),t=r.find(n=>n.format===0)?.view,e=r.find(n=>n.platformID===3&&n.platformSpecificID===3&&n.format===2)?.view,A=r.find(n=>n.platformID===3&&n.platformSpecificID===1&&n.format===4)?.view,i=r.find(n=>n.platformID===3&&n.platformSpecificID===10&&n.format===12)?.view,s=r.find(n=>n.platformID===0&&n.platformSpecificID===5&&n.format===14)?.view;return new Map([...t?.getUnicodeToGlyphIndexMap()??[],...e?.getUnicodeToGlyphIndexMap(this._sfnt.maxp.numGlyphs)??[],...A?.getUnicodeToGlyphIndexMap()??[],...i?.getUnicodeToGlyphIndexMap()??[],...s?.getUnicodeToGlyphIndexMap()??[]])}};yn([m("uint16")],YA.prototype,"version",2),yn([m("uint16")],YA.prototype,"numberSubtables",2),YA=yn([Gt("cmap")],YA);class bd extends gn{_parseContours(t){const e=[];let A=[];for(let i=0;i<t.length;i+=1){const s=t[i];A.push(s),s.lastPointOfContour&&(e.push(A),A=[])}return Gi(A.length===0,"There are still points left in the current contour."),e}_transformPoints(t,e){const A=[];for(let i=0;i<t.length;i+=1){const s=t[i],n={x:e.xScale*s.x+e.scale10*s.y+e.dx,y:e.scale01*s.x+e.yScale*s.y+e.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};A.push(n)}return A}_parseGlyphCoordinate(t,e,A,i,s){let n;return(e&i)>0?(n=t.view.readUint8(),(e&s)===0&&(n=-n),n=A+n):(e&s)>0?n=A:n=A+t.view.readInt16(),n}parse(t,e,A){t.view.seek(e);const i=this.numberOfContours=t.view.readInt16();if(this.xMin=t.view.readInt16(),this.yMin=t.view.readInt16(),this.xMax=t.view.readInt16(),this.yMax=t.view.readInt16(),i>0){const o=this.endPointIndices=[];for(let B=0;B<i;B++)o.push(t.view.readUint16());const a=this.instructionLength=t.view.readUint16();Gi(a<5e3,`Bad instructionLength:${a}`);const l=this.instructions=[];for(let B=0;B<a;++B)l.push(t.view.readUint8());const u=t.view.byteOffset,c=o[o.length-1]+1;Gi(c<2e4,`Bad numberOfCoordinates:${u}`);const g=[];let f,d=0;for(;d<c;)if(f=t.view.readUint8(),g.push(f),d++,f&8&&d<c){const B=t.view.readUint8();for(let I=0;I<B;I++)g.push(f),d++}if(Gi(g.length===c,`Bad flags length: ${g.length}, numberOfCoordinates: ${c}`),o.length>0){const B=[];let I;if(c>0){for(let y=0;y<c;y+=1)f=g[y],I={},I.onCurve=!!(f&1),I.lastPointOfContour=o.includes(y),B.push(I);let F=0;for(let y=0;y<c;y+=1)f=g[y],I=B[y],I.x=this._parseGlyphCoordinate(t,f,F,2,16),F=I.x;let b=0;for(let y=0;y<c;y+=1)f=g[y],I=B[y],I.y=this._parseGlyphCoordinate(t,f,b,4,32),b=I.y}this.points=B}else this.points=[]}else if(i===0)this.points=[];else{this.isComposite=!0,this.points=[],this.components=[];let o,a=!0;for(;a;){o=t.view.readUint16();const l={glyphIndex:t.view.readUint16(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(o&1)>0?(o&2)>0?(l.dx=t.view.readInt16(),l.dy=t.view.readInt16()):l.matchedPoints=[t.view.readUint16(),t.view.readUint16()]:(o&2)>0?(l.dx=t.view.readInt8(),l.dy=t.view.readInt8()):l.matchedPoints=[t.view.readUint8(),t.view.readUint8()],(o&8)>0?l.xScale=l.yScale=t.view.readInt16()/16384:(o&64)>0?(l.xScale=t.view.readInt16()/16384,l.yScale=t.view.readInt16()/16384):(o&128)>0&&(l.xScale=t.view.readInt16()/16384,l.scale01=t.view.readInt16()/16384,l.scale10=t.view.readInt16()/16384,l.yScale=t.view.readInt16()/16384),this.components.push(l),a=!!(o&32)}if(o&256){this.instructionLength=t.view.readUint16(),this.instructions=[];for(let l=0;l<this.instructionLength;l+=1)this.instructions.push(t.view.readUint8())}}if(this.isComposite)for(let o=0;o<this.components.length;o+=1){const a=this.components[o],l=A.get(a.glyphIndex);if(l.getPathCommands(),l.points){let u;if(a.matchedPoints===void 0)u=this._transformPoints(l.points,a);else{Gi(a.matchedPoints[0]>this.points.length-1||a.matchedPoints[1]>l.points.length-1,`Matched points out of range in ${this.name}`);const c=this.points[a.matchedPoints[0]];let g=l.points[a.matchedPoints[1]];const f={xScale:a.xScale,scale01:a.scale01,scale10:a.scale10,yScale:a.yScale,dx:0,dy:0};g=this._transformPoints([g],f)[0],f.dx=c.x-g.x,f.dy=c.y-g.y,u=this._transformPoints(l.points,f)}this.points=this.points.concat(u)}}const s=[],n=this._parseContours(this.points);for(let o=0,a=n.length;o<a;++o){const l=n[o];let u=l[l.length-1],c=l[0];u.onCurve?s.push({type:"M",x:u.x,y:u.y}):c.onCurve?s.push({type:"M",x:c.x,y:c.y}):s.push({type:"M",x:(u.x+c.x)*.5,y:(u.y+c.y)*.5});for(let g=0,f=l.length;g<f;++g)if(u=c,c=l[(g+1)%f],u.onCurve)s.push({type:"L",x:u.x,y:u.y});else{let d=c;c.onCurve||(d={x:(u.x+c.x)*.5,y:(u.y+c.y)*.5}),s.push({type:"Q",x1:u.x,y1:u.y,x:d.x,y:d.y})}s.push({type:"Z"})}this.pathCommands=s}}class xd extends fn{get length(){return this._sfnt.loca.locations.length}_get(t){const e=this._sfnt.loca.locations,A=e[t],i=new bd({index:t});return A!==e[t+1]&&i.parse(this._sfnt.glyf,A,this),i}}var Fd=Object.getOwnPropertyDescriptor,Sd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Fd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Rr=class extends Xt{static from(r){const t=r.reduce((A,i)=>A+i.byteLength,0),e=new Rr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeBytes(A)}),e}_glyphs;get glyphs(){return this._glyphs??=new xd(this._sfnt)}};Rr=Sd([Gt("glyf")],Rr);var Md=Object.getOwnPropertyDescriptor,Rd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Md(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Dn=class extends Xt{};Dn=Rd([Gt("GPOS","gpos")],Dn);var Pd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,bA=(r,t,e,A)=>{for(var i=A>1?void 0:A?kd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Pd(t,e,i),i};let qe=class extends Xt{};bA([m("uint16")],qe.prototype,"majorVersion",2),bA([m("uint16")],qe.prototype,"minorVersion",2),bA([m("uint16")],qe.prototype,"scriptListOffset",2),bA([m("uint16")],qe.prototype,"featureListOffset",2),bA([m("uint16")],qe.prototype,"lookupListOffset",2),bA([m("uint16")],qe.prototype,"featureVariationsOffset",2),qe=bA([Gt("GSUB","gsub")],qe);var Ud=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,Pt=(r,t,e,A)=>{for(var i=A>1?void 0:A?Nd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Ud(t,e,i),i};let xt=class extends Xt{constructor(r=new ArrayBuffer(54),t){super(r,t,Math.min(54,r.byteLength-(t??0)))}};Pt([m("fixed")],xt.prototype,"version",2),Pt([m("fixed")],xt.prototype,"fontRevision",2),Pt([m("uint32")],xt.prototype,"checkSumAdjustment",2),Pt([m("uint32")],xt.prototype,"magickNumber",2),Pt([m("uint16")],xt.prototype,"flags",2),Pt([m("uint16")],xt.prototype,"unitsPerEm",2),Pt([m({type:"longDateTime"})],xt.prototype,"created",2),Pt([m({type:"longDateTime"})],xt.prototype,"modified",2),Pt([m("int16")],xt.prototype,"xMin",2),Pt([m("int16")],xt.prototype,"yMin",2),Pt([m("int16")],xt.prototype,"xMax",2),Pt([m("int16")],xt.prototype,"yMax",2),Pt([m("uint16")],xt.prototype,"macStyle",2),Pt([m("uint16")],xt.prototype,"lowestRecPPEM",2),Pt([m("int16")],xt.prototype,"fontDirectionHint",2),Pt([m("int16")],xt.prototype,"indexToLocFormat",2),Pt([m("int16")],xt.prototype,"glyphDataFormat",2),xt=Pt([Gt("head")],xt);var Td=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,ee=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ld(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Td(t,e,i),i};let Ot=class extends Xt{constructor(r=new ArrayBuffer(36),t){super(r,t,Math.min(36,r.byteLength-(t??0)))}};ee([m("fixed")],Ot.prototype,"version",2),ee([m("int16")],Ot.prototype,"ascent",2),ee([m("int16")],Ot.prototype,"descent",2),ee([m("int16")],Ot.prototype,"lineGap",2),ee([m("uint16")],Ot.prototype,"advanceWidthMax",2),ee([m("int16")],Ot.prototype,"minLeftSideBearing",2),ee([m("int16")],Ot.prototype,"minRightSideBearing",2),ee([m("int16")],Ot.prototype,"xMaxExtent",2),ee([m("int16")],Ot.prototype,"caretSlopeRise",2),ee([m("int16")],Ot.prototype,"caretSlopeRun",2),ee([m("int16")],Ot.prototype,"caretOffset",2),ee([m({type:"int16",size:4})],Ot.prototype,"reserved",2),ee([m("int16")],Ot.prototype,"metricDataFormat",2),ee([m("uint16")],Ot.prototype,"numOfLongHorMetrics",2),Ot=ee([Gt("hhea")],Ot);var Gd=Object.getOwnPropertyDescriptor,Od=(r,t,e,A)=>{for(var i=A>1?void 0:A?Gd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Pr=class extends Xt{static from(r){const t=r.length*4,e=new Pr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeUint16(A.advanceWidth),e.view.writeUint16(A.leftSideBearing)}),e}_metrics;get metrics(){return this._metrics??=this.readMetrics()}readMetrics(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.hhea.numOfLongHorMetrics;let e=0;const A=this.view;return A.seek(0),Array.from({length:r}).map((i,s)=>(s<t&&(e=A.readUint16()),{advanceWidth:e,leftSideBearing:A.readUint16()}))}};Pr=Od([Gt("hmtx")],Pr);var Hd=Object.getOwnPropertyDescriptor,Jd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Hd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let mn=class extends Xt{};mn=Jd([Gt("kern","kern")],mn);var Kd=Object.getOwnPropertyDescriptor,Yd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Kd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let kr=class extends Xt{static from(r,t=1){const e=r.length*(t?4:2),A=new kr(new ArrayBuffer(e));return r.forEach(i=>{t?A.view.writeUint32(i):A.view.writeUint16(i/2)}),A}_locations;get locations(){return this._locations??=this.readLocations()}readLocations(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.head.indexToLocFormat,e=this.view;return e.seek(0),Array.from({length:r}).map(()=>t?e.readUint32():e.readUint16()*2)}};kr=Yd([Gt("loca")],kr);var Vd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,jt=(r,t,e,A)=>{for(var i=A>1?void 0:A?zd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Vd(t,e,i),i};let kt=class extends Xt{constructor(r=new ArrayBuffer(32),t){super(r,t,Math.min(32,r.byteLength-(t??0)))}};jt([m("fixed")],kt.prototype,"version",2),jt([m("uint16")],kt.prototype,"numGlyphs",2),jt([m("uint16")],kt.prototype,"maxPoints",2),jt([m("uint16")],kt.prototype,"maxContours",2),jt([m("uint16")],kt.prototype,"maxComponentPoints",2),jt([m("uint16")],kt.prototype,"maxComponentContours",2),jt([m("uint16")],kt.prototype,"maxZones",2),jt([m("uint16")],kt.prototype,"maxTwilightPoints",2),jt([m("uint16")],kt.prototype,"maxStorage",2),jt([m("uint16")],kt.prototype,"maxFunctionDefs",2),jt([m("uint16")],kt.prototype,"maxInstructionDefs",2),jt([m("uint16")],kt.prototype,"maxStackElements",2),jt([m("uint16")],kt.prototype,"maxSizeOfInstructions",2),jt([m("uint16")],kt.prototype,"maxComponentElements",2),jt([m("uint16")],kt.prototype,"maxComponentDepth",2),kt=jt([Gt("maxp")],kt);var Wd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,Ur=(r,t,e,A)=>{for(var i=A>1?void 0:A?qd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Wd(t,e,i),i};const xl={0:"copyright",1:"fontFamily",2:"fontSubFamily",3:"uniqueSubFamily",4:"fullName",5:"version",6:"postScriptName",7:"tradeMark",8:"manufacturer",9:"designer",10:"description",11:"urlOfFontVendor",12:"urlOfFontDesigner",13:"licence",14:"urlOfLicence",16:"preferredFamily",17:"preferredSubFamily",18:"compatibleFull",19:"sampleText"},wn={Macintosh:1,Microsoft:3},Xd={Default:0},Fl={UCS2:1};let VA=class extends Xt{_names;get names(){return this._names??=this.readNames()}readNames(){const r=this.count;this.view.seek(6);const t=[];for(let o=0;o<r;++o)t.push({platform:this.view.readUint16(),encoding:this.view.readUint16(),language:this.view.readUint16(),nameId:this.view.readUint16(),length:this.view.readUint16(),offset:this.view.readUint16()});const e=this.stringOffset;for(let o=0;o<r;++o){const a=t[o];a.name=this.view.readBytes(e+a.offset,a.length)}let A=wn.Macintosh,i=Xd.Default,s=0;t.some(o=>o.platform===wn.Microsoft&&o.encoding===Fl.UCS2&&o.language===1033)&&(A=wn.Microsoft,i=Fl.UCS2,s=1033);const n={};for(let o=0;o<r;++o){const a=t[o];a.platform===A&&a.encoding===i&&a.language===s&&xl[a.nameId]&&(n[xl[a.nameId]]=s===0?id(a.name):rd(a.name))}return n}};Ur([m("uint16")],VA.prototype,"format",2),Ur([m("uint16")],VA.prototype,"count",2),Ur([m("uint16")],VA.prototype,"stringOffset",2),VA=Ur([Gt("name")],VA);var jd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,at=(r,t,e,A)=>{for(var i=A>1?void 0:A?Zd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&jd(t,e,i),i};let ot=class extends Xt{get fontPANOSE(){return[this.bFamilyType,this.bSerifStyle,this.bWeight,this.bProportion,this.bContrast,this.bStrokeVariation,this.bArmStyle,this.bLetterform,this.bMidline,this.bXHeight]}};at([m("uint16")],ot.prototype,"version",2),at([m("int16")],ot.prototype,"xAvgCharWidth",2),at([m("uint16")],ot.prototype,"usWeightClass",2),at([m("uint16")],ot.prototype,"usWidthClass",2),at([m("uint16")],ot.prototype,"fsType",2),at([m("uint16")],ot.prototype,"ySubscriptXSize",2),at([m("uint16")],ot.prototype,"ySubscriptYSize",2),at([m("uint16")],ot.prototype,"ySubscriptXOffset",2),at([m("uint16")],ot.prototype,"ySubscriptYOffset",2),at([m("uint16")],ot.prototype,"ySuperscriptXSize",2),at([m("uint16")],ot.prototype,"ySuperscriptYSize",2),at([m("uint16")],ot.prototype,"ySuperscriptXOffset",2),at([m("uint16")],ot.prototype,"ySuperscriptYOffset",2),at([m("uint16")],ot.prototype,"yStrikeoutSize",2),at([m("uint16")],ot.prototype,"yStrikeoutPosition",2),at([m("uint16")],ot.prototype,"sFamilyClass",2),at([m({type:"uint8"})],ot.prototype,"bFamilyType",2),at([m({type:"uint8"})],ot.prototype,"bSerifStyle",2),at([m({type:"uint8"})],ot.prototype,"bWeight",2),at([m({type:"uint8"})],ot.prototype,"bProportion",2),at([m({type:"uint8"})],ot.prototype,"bContrast",2),at([m({type:"uint8"})],ot.prototype,"bStrokeVariation",2),at([m({type:"uint8"})],ot.prototype,"bArmStyle",2),at([m({type:"uint8"})],ot.prototype,"bLetterform",2),at([m({type:"uint8"})],ot.prototype,"bMidline",2),at([m({type:"uint8"})],ot.prototype,"bXHeight",2),at([m({type:"uint8",size:16})],ot.prototype,"ulUnicodeRange",2),at([m({type:"char",size:4})],ot.prototype,"achVendID",2),at([m("uint16")],ot.prototype,"fsSelection",2),at([m("uint16")],ot.prototype,"usFirstCharIndex",2),at([m("uint16")],ot.prototype,"usLastCharIndex",2),at([m("int16")],ot.prototype,"sTypoAscender",2),at([m("int16")],ot.prototype,"sTypoDescender",2),at([m("int16")],ot.prototype,"sTypoLineGap",2),at([m("uint16")],ot.prototype,"usWinAscent",2),at([m("uint16")],ot.prototype,"usWinDescent",2),at([m({offset:72,type:"uint8",size:8})],ot.prototype,"ulCodePageRange",2),at([m({offset:72,type:"int16"})],ot.prototype,"sxHeight",2),at([m("int16")],ot.prototype,"sCapHeight",2),at([m("uint16")],ot.prototype,"usDefaultChar",2),at([m("uint16")],ot.prototype,"usBreakChar",2),at([m("uint16")],ot.prototype,"usMaxContext",2),ot=at([Gt("OS/2","os2")],ot);var $d=Object.defineProperty,tI=Object.getOwnPropertyDescriptor,Re=(r,t,e,A)=>{for(var i=A>1?void 0:A?tI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&$d(t,e,i),i};let Ie=class extends Xt{constructor(r=new ArrayBuffer(32),t,e){super(r,t,e)}};Re([m("fixed")],Ie.prototype,"format",2),Re([m("fixed")],Ie.prototype,"italicAngle",2),Re([m("int16")],Ie.prototype,"underlinePosition",2),Re([m("int16")],Ie.prototype,"underlineThickness",2),Re([m("uint32")],Ie.prototype,"isFixedPitch",2),Re([m("uint32")],Ie.prototype,"minMemType42",2),Re([m("uint32")],Ie.prototype,"maxMemType42",2),Re([m("uint32")],Ie.prototype,"minMemType1",2),Re([m("uint32")],Ie.prototype,"maxMemType1",2),Ie=Re([Gt("post")],Ie);var eI=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ae=(r,t,e,A)=>{for(var i=A>1?void 0:A?AI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&eI(t,e,i),i};let Ht=class extends Xt{constructor(r=new ArrayBuffer(36),t){super(r,t,Math.min(36,r.byteLength-(t??0)))}};Ae([m("fixed")],Ht.prototype,"version",2),Ae([m("int16")],Ht.prototype,"vertTypoAscender",2),Ae([m("int16")],Ht.prototype,"vertTypoDescender",2),Ae([m("int16")],Ht.prototype,"vertTypoLineGap",2),Ae([m("int16")],Ht.prototype,"advanceHeightMax",2),Ae([m("int16")],Ht.prototype,"minTopSideBearing",2),Ae([m("int16")],Ht.prototype,"minBottomSideBearing",2),Ae([m("int16")],Ht.prototype,"yMaxExtent",2),Ae([m("int16")],Ht.prototype,"caretSlopeRise",2),Ae([m("int16")],Ht.prototype,"caretSlopeRun",2),Ae([m("int16")],Ht.prototype,"caretOffset",2),Ae([m({type:"int16",size:4})],Ht.prototype,"reserved",2),Ae([m("int16")],Ht.prototype,"metricDataFormat",2),Ae([m("int16")],Ht.prototype,"numOfLongVerMetrics",2),Ht=Ae([Gt("vhea")],Ht);var iI=Object.getOwnPropertyDescriptor,rI=(r,t,e,A)=>{for(var i=A>1?void 0:A?iI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Nr=class extends Xt{static from(r){const t=r.length*4,e=new Nr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeUint16(A.advanceHeight),e.view.writeInt16(A.topSideBearing)}),e}_metrics;get metrics(){return this._metrics??=this.readMetrics()}readMetrics(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.vhea?.numOfLongVerMetrics??0,e=this.view;e.seek(0);let A=0;return Array.from({length:r}).map((i,s)=>(s<t&&(A=e.readUint16()),{advanceHeight:A,topSideBearing:e.readUint8()}))}};Nr=rI([Gt("vmtx")],Nr);var sI=Object.defineProperty,Wi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&sI(t,e,i),i};class ye extends vr{format="TrueType";mimeType="font/ttf";_sfnt;get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static signature=new Set([65536,1953658213,1954115633]);static is(t){return typeof t=="number"?this.signature.has(t):this.signature.has(HA(t).getUint32(0))}static checksum(t){const e=HA(t);let A=e.byteLength;for(;A%4;)A++;let i=0;for(let s=0,n=A/4;s<n;s+=4)s*4<A-4&&(i+=e.getUint32(s*4,!1));return i&4294967295}static from(t){const e=c=>c+3&-4,A=t.tableViews.size,i=Array.from(t.tableViews.values()).reduce((c,g)=>c+e(g.byteLength),0),s=new this(new ArrayBuffer(12+A*16+i));s.scalerType=65536,s.numTables=A;const n=Math.log(2);s.searchRange=Math.floor(Math.log(A)/n)*16,s.entrySelector=Math.floor(s.searchRange/n),s.rangeShift=A*16-s.searchRange;let o=12+A*16,a=0;const l=s.getDirectories();t.tableViews.forEach((c,g)=>{const f=l[a++];f.tag=g,f.checkSum=this.checksum(c),f.offset=o,f.length=c.byteLength,s.view.writeBytes(c,o),o+=e(f.length)});const u=s.createSFNT().head;return u.checkSumAdjustment=0,u.checkSumAdjustment=2981146554-this.checksum(s.view),s}getDirectories(){let t=this.view.byteOffset+12;return Array.from({length:this.numTables},()=>{const e=new JA(this.view.buffer,t);return t+=e.view.byteLength,e})}createSFNT(){return new Me(this.getDirectories().reduce((t,e)=>(t[e.tag]=new DataView(this.view.buffer,this.view.byteOffset+e.offset,e.length),t),{}))}}Wi([m("uint32")],ye.prototype,"scalerType"),Wi([m("uint16")],ye.prototype,"numTables"),Wi([m("uint16")],ye.prototype,"searchRange"),Wi([m("uint16")],ye.prototype,"entrySelector"),Wi([m("uint16")],ye.prototype,"rangeShift");class vn extends ye{format="OpenType";mimeType="font/otf";static signature=new Set([1330926671]);static from(t){return super.from(t)}}var nI=Object.defineProperty,qi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&nI(t,e,i),i};class xA extends ce{constructor(t,e){super(t,e,20)}}qi([m({type:"char",size:4})],xA.prototype,"tag"),qi([m("uint32")],xA.prototype,"offset"),qi([m("uint32")],xA.prototype,"compLength"),qi([m("uint32")],xA.prototype,"origLength"),qi([m("uint32")],xA.prototype,"origChecksum");var oI=Object.defineProperty,he=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&oI(t,e,i),i};const ne=class $n extends vr{format="WOFF";mimeType="font/woff";get subfontFormat(){return ye.is(this.flavor)?"TrueType":vn.is(this.flavor)?"OpenType":"Open"}_sfnt;get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static signature=new Set([2001684038]);static is(t){return typeof t=="number"?this.signature.has(t):this.signature.has(HA(t).getUint32(0))}static checkSum(t){const e=HA(t),A=e.byteLength,i=Math.floor(A/4);let s=0,n=0;for(;n<i;)s+=e.getUint32(4*n++,!1);let o=A-i*4;if(o){let a=i*4;for(;o>0;)s+=e.getUint8(a)<<o*8,a++,o--}return s%4294967296}static from(t,e=new ArrayBuffer(0)){const A=c=>c+3&-4,i=[];t.tableViews.forEach((c,g)=>{const f=HA(Xf(new Uint8Array(c.buffer,c.byteOffset,c.byteLength)));i.push({tag:g,view:f.byteLength<c.byteLength?f:c,rawView:c})});const s=i.length,n=i.reduce((c,g)=>c+A(g.view.byteLength),0),o=new $n(new ArrayBuffer(44+20*s+n+e.byteLength));o.signature=2001684038,o.flavor=65536,o.length=o.view.byteLength,o.numTables=s,o.totalSFNTSize=12+16*s+i.reduce((c,g)=>c+A(g.rawView.byteLength),0);let a=44+s*20,l=0;const u=o.getDirectories();return i.forEach(c=>{const g=u[l++];g.tag=c.tag,g.offset=a,g.compLength=c.view.byteLength,g.origChecksum=$n.checkSum(c.rawView),g.origLength=c.rawView.byteLength,o.view.writeBytes(c.view,a),a+=A(g.compLength)}),o.view.writeBytes(e),o}getDirectories(){let t=44;return Array.from({length:this.numTables},()=>{const e=new xA(this.view.buffer,t);return t+=e.view.byteLength,e})}createSFNT(){return new Me(this.getDirectories().reduce((t,e)=>{const A=e.tag,i=this.view.byteOffset+e.offset,s=e.compLength,n=e.origLength,o=i+s;return t[A]=s>=n?new DataView(this.view.buffer,i,s):new DataView(jf(new Uint8Array(this.view.buffer.slice(i,o))).buffer),t},{}))}};he([m("uint32")],ne.prototype,"signature"),he([m("uint32")],ne.prototype,"flavor"),he([m("uint32")],ne.prototype,"length"),he([m("uint16")],ne.prototype,"numTables"),he([m("uint16")],ne.prototype,"reserved"),he([m("uint32")],ne.prototype,"totalSFNTSize"),he([m("uint16")],ne.prototype,"majorVersion"),he([m("uint16")],ne.prototype,"minorVersion"),he([m("uint32")],ne.prototype,"metaOffset"),he([m("uint32")],ne.prototype,"metaLength"),he([m("uint32")],ne.prototype,"metaOrigLength"),he([m("uint32")],ne.prototype,"privOffset"),he([m("uint32")],ne.prototype,"privLength");let Tr=ne;function Sl(r,t=!0){if(ye.is(r))return new ye(r);if(vn.is(r))return new vn(r);if(Tr.is(r))return new Tr(r);if(t)throw new Error("Failed to parseFont")}function Ml(r,t=!0){const e=Sl(r,!1);if(e)return e;if(t)throw new Error("Failed to parseFont")}class Lr{static defaultRequestInit={cache:"force-cache"};fallbackFont;loading=new Map;loaded=new Map;familyToUrl=new Map;setFallbackFont(t){this.fallbackFont=t}async loadFallbackFont(t,e={}){this.fallbackFont=await this.load(t,e)}_createRequest(t,e){const A=new AbortController;return{url:t,when:fetch(t,{...Lr.defaultRequestInit,...e,signal:A.signal}).then(i=>i.arrayBuffer()),cancel:()=>A.abort()}}injectFontFace(t,e){return document.fonts.add(new FontFace(t,e)),this}injectStyleTag(t,e){const A=document.createElement("style");return A.appendChild(document.createTextNode(`@font-face {
|
|
858
|
+
}`})),xi([v()],g.ZoomBlurEffect.prototype,"center",2),xi([v()],g.ZoomBlurEffect.prototype,"innerRadius",2),xi([v()],g.ZoomBlurEffect.prototype,"radius",2),xi([v()],g.ZoomBlurEffect.prototype,"strength",2),g.ZoomBlurEffect=xi([st("ZoomBlurEffect")],g.ZoomBlurEffect);var _f=Object.defineProperty,Be=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&_f(t,e,i),i};class Vt extends tA{constructor(t){super(),this.parent=t}_texture;_setProperties(t){return super.setProperties(t)}setProperties(t){return this._setProperties(lt(t)?void 0:EA(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"color":case"cropRect":case"stretchRect":case"dpi":case"rotateWithShape":case"tile":case"opacity":case"enabled":this.parent.requestRedraw();break;case"image":case"linearGradient":case"radialGradient":this._updateTexture();break}}async loadTexture(){return this.linearGradient||this.radialGradient?new gr(this.linearGradient??this.radialGradient,this.parent.size.width,this.parent.size.height):lt(this.image)?void 0:(this.parent.tree?.log(`load image ${this.image}`),await Ne.texture.load(this.image))}async _updateTexture(){this._texture=await this.loadTexture(),this.parent.requestRedraw()}canDraw(){return!!(this.enabled&&(this._texture||this.color))}_getDrawOptions(){let t=!1;const{width:e,height:A}=this.parent.size,i=new Yt().scale(1/e,1/A);if(this.cropRect){const{left:s=0,top:n=0,right:o=0,bottom:a=0}=this.cropRect;i.scale(Math.abs(1-(s+o)),Math.abs(1-(n+a))).translate(s,n),t=!0}if(this.tile){const{translateX:s=0,translateY:n=0,scaleX:o=1,scaleY:a=1}=this.tile;i.translate(-s/e,-n/A).scale(1/o,1/a),t=!0}else if(this.stretchRect){const{left:s=0,top:n=0,right:o=0,bottom:a=0}=this.stretchRect;i.scale(Math.abs(1-(-s+-o)),Math.abs(1-(-n+-a))).translate(-s,-n),t=!0}return{disableWrapMode:t,uvTransform:i}}draw(){const t=this.parent.context,{uvTransform:e,disableWrapMode:A}=this._getDrawOptions();t.uvTransform=e,t.fillStyle=this._texture??this.color,t.fill({disableWrapMode:A})}}Be([v({fallback:!0})],Vt.prototype,"enabled"),Be([v()],Vt.prototype,"color"),Be([v()],Vt.prototype,"image"),Be([v()],Vt.prototype,"linearGradient"),Be([v()],Vt.prototype,"radialGradient"),Be([v()],Vt.prototype,"cropRect"),Be([v()],Vt.prototype,"stretchRect"),Be([v()],Vt.prototype,"dpi"),Be([v()],Vt.prototype,"rotateWithShape"),Be([v()],Vt.prototype,"tile"),Be([v()],Vt.prototype,"opacity");var bf=Object.defineProperty,Df=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&bf(t,e,i),i};class Xs extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:sh(t))}}Df([v()],Xs.prototype,"fillWithShape");var xf=Object.defineProperty,Sf=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&xf(t,e,i),i};class js extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:oh(t))}}Sf([v()],js.prototype,"fillWithShape");var Mf=Object.defineProperty,Zs=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Mf(t,e,i),i};class Si extends Vt{setProperties(t){return super._setProperties(lt(t)?void 0:ah(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"width":case"style":case"enabled":this.parent.requestRedraw();break}}canDraw(){return!!(this.enabled&&(this.width||this.color||super.canDraw()))}draw(){const t=this.parent.context,{uvTransform:e,disableWrapMode:A}=this._getDrawOptions();t.lineWidth=this.width||1,t.uvTransform=e,t.strokeStyle=this._texture??this.color,t.stroke({disableWrapMode:A})}}Zs([v({fallback:"#00000000"})],Si.prototype,"color"),Zs([v({fallback:0})],Si.prototype,"width"),Zs([v({fallback:"solid"})],Si.prototype,"style");var Rf=Object.defineProperty,Mi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Rf(t,e,i),i};class mA extends tA{constructor(t){super(),this.parent=t}setProperties(t){return super.setProperties(lt(t)?void 0:lh(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"color":case"blur":case"offsetX":case"offsetY":this.updateEffect();break}}updateEffect(){const t="__$shadow";let e=this.parent.getNode(t);this.blur||this.offsetX||this.offsetY?(e||(e=new g.DropShadowEffect({name:t}),this.parent.appendChild(e,"back")),e.setProperties(this.getProperties())):e&&this.parent.removeChild(e)}}Mi([v({fallback:!0})],mA.prototype,"enabled"),Mi([v({fallback:"#000000FF"})],mA.prototype,"color"),Mi([v({fallback:0})],mA.prototype,"blur"),Mi([v({fallback:0})],mA.prototype,"offsetY"),Mi([v({fallback:0})],mA.prototype,"offsetX");var kf=Object.defineProperty,Ri=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&kf(t,e,i),i};class wA extends tA{constructor(t){super(),this.parent=t,this._updatePath2DSet()}_path2DSet=new ze;setProperties(t){return super.setProperties(lt(t)?void 0:hh(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"svg":case"paths":case"viewBox":case"enabled":this._updatePath2DSet(),this.parent.requestRedraw();break}}_updatePath2DSet(){let t;if(this.svg){const n=Ls(this.svg);this._path2DSet=Os(n),t=this._path2DSet.viewBox}else this.paths?.forEach((n,o)=>{const{data:a,...l}=n,c=new Rt;c.style=l,c.addData(a),this._path2DSet.paths[o]=c});if(!t){const n=this._path2DSet.getBoundingBox();t=n?[n.x,n.y,n.width,n.height]:[0,0,1,1]}const[e,A,i,s]=t;this._path2DSet.paths.forEach(n=>{n.applyTransform(new Lt().translate(-e,-A).scale(1/i,1/s))})}draw(){if(this.enabled&&this._path2DSet.paths.length){const t=this.parent.context,{width:e,height:A}=this.parent.size;this._path2DSet.paths.forEach(i=>{t.addPath(i.clone().applyTransform(new Lt().scale(e,A)))})}else this.drawRect()}drawRect(){const t=this.parent.context,{width:e,height:A}=this.parent.size,{borderRadius:i}=this.parent.style;e&&A&&(i?t.roundRect(0,0,e,A,i):t.rect(0,0,e,A))}}Ri([v({fallback:!0})],wA.prototype,"enabled"),Ri([v()],wA.prototype,"preset"),Ri([v()],wA.prototype,"svg"),Ri([v()],wA.prototype,"viewBox"),Ri([v()],wA.prototype,"paths");class ki extends He{constructor(t){super(),this.setProperties(t)}}const al=uo();for(const r in al){const t=al[r];ir(ki,r,{fallback:t})}var zt=Uint8Array,ce=Uint16Array,$s=Int32Array,Cr=new zt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Qr=new zt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),tn=new zt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ll=function(r,t){for(var e=new ce(31),A=0;A<31;++A)e[A]=t+=1<<r[A-1];for(var i=new $s(e[30]),A=1;A<30;++A)for(var s=e[A];s<e[A+1];++s)i[s]=s-e[A]<<5|A;return{b:e,r:i}},cl=ll(Cr,2),hl=cl.b,en=cl.r;hl[28]=258,en[258]=28;for(var gl=ll(Qr,0),Pf=gl.b,ul=gl.r,An=new ce(32768),Et=0;Et<32768;++Et){var sA=(Et&43690)>>1|(Et&21845)<<1;sA=(sA&52428)>>2|(sA&13107)<<2,sA=(sA&61680)>>4|(sA&3855)<<4,An[Et]=((sA&65280)>>8|(sA&255)<<8)>>1}for(var Me=function(r,t,e){for(var A=r.length,i=0,s=new ce(t);i<A;++i)r[i]&&++s[r[i]-1];var n=new ce(t);for(i=1;i<t;++i)n[i]=n[i-1]+s[i-1]<<1;var o;if(e){o=new ce(1<<t);var a=15-t;for(i=0;i<A;++i)if(r[i])for(var l=i<<4|r[i],c=t-r[i],h=n[r[i]-1]++<<c,u=h|(1<<c)-1;h<=u;++h)o[An[h]>>a]=l}else for(o=new ce(A),i=0;i<A;++i)r[i]&&(o[i]=An[n[r[i]-1]++]>>15-r[i]);return o},nA=new zt(288),Et=0;Et<144;++Et)nA[Et]=8;for(var Et=144;Et<256;++Et)nA[Et]=9;for(var Et=256;Et<280;++Et)nA[Et]=7;for(var Et=280;Et<288;++Et)nA[Et]=8;for(var Pi=new zt(32),Et=0;Et<32;++Et)Pi[Et]=5;var Uf=Me(nA,9,0),Nf=Me(nA,9,1),Ff=Me(Pi,5,0),Tf=Me(Pi,5,1),rn=function(r){for(var t=r[0],e=1;e<r.length;++e)r[e]>t&&(t=r[e]);return t},Ce=function(r,t,e){var A=t/8|0;return(r[A]|r[A+1]<<8)>>(t&7)&e},sn=function(r,t){var e=t/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(t&7)},nn=function(r){return(r+7)/8|0},fl=function(r,t,e){return(e==null||e>r.length)&&(e=r.length),new zt(r.subarray(t,e))},Lf=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Qe=function(r,t,e){var A=new Error(t||Lf[r]);if(A.code=r,Error.captureStackTrace&&Error.captureStackTrace(A,Qe),!e)throw A;return A},Gf=function(r,t,e,A){var i=r.length,s=0;if(!i||t.f&&!t.l)return e||new zt(0);var n=!e,o=n||t.i!=2,a=t.i;n&&(e=new zt(i*3));var l=function(Ft){var ht=e.length;if(Ft>ht){var yt=new zt(Math.max(ht*2,Ft));yt.set(e),e=yt}},c=t.f||0,h=t.p||0,u=t.b||0,d=t.l,f=t.d,B=t.m,p=t.n,S=i*8;do{if(!d){c=Ce(r,h,1);var R=Ce(r,h+1,3);if(h+=3,R)if(R==1)d=Nf,f=Tf,B=9,p=5;else if(R==2){var m=Ce(r,h,31)+257,x=Ce(r,h+10,15)+4,M=m+Ce(r,h+5,31)+1;h+=14;for(var V=new zt(M),et=new zt(19),z=0;z<x;++z)et[tn[z]]=Ce(r,h+z*3,7);h+=x*3;for(var J=rn(et),$=(1<<J)-1,K=Me(et,J,1),z=0;z<M;){var L=K[Ce(r,h,$)];h+=L&15;var w=L>>4;if(w<16)V[z++]=w;else{var it=0,G=0;for(w==16?(G=3+Ce(r,h,3),h+=2,it=V[z-1]):w==17?(G=3+Ce(r,h,7),h+=3):w==18&&(G=11+Ce(r,h,127),h+=7);G--;)V[z++]=it}}var W=V.subarray(0,m),At=V.subarray(m);B=rn(W),p=rn(At),d=Me(W,B,1),f=Me(At,p,1)}else Qe(1);else{var w=nn(h)+4,D=r[w-4]|r[w-3]<<8,Q=w+D;if(Q>i){a&&Qe(0);break}o&&l(u+D),e.set(r.subarray(w,Q),u),t.b=u+=D,t.p=h=Q*8,t.f=c;continue}if(h>S){a&&Qe(0);break}}o&&l(u+131072);for(var T=(1<<B)-1,tt=(1<<p)-1,U=h;;U=h){var it=d[sn(r,h)&T],P=it>>4;if(h+=it&15,h>S){a&&Qe(0);break}if(it||Qe(2),P<256)e[u++]=P;else if(P==256){U=h,d=null;break}else{var q=P-254;if(P>264){var z=P-257,Z=Cr[z];q=Ce(r,h,(1<<Z)-1)+hl[z],h+=Z}var nt=f[sn(r,h)&tt],X=nt>>4;nt||Qe(3),h+=nt&15;var At=Pf[X];if(X>3){var Z=Qr[X];At+=sn(r,h)&(1<<Z)-1,h+=Z}if(h>S){a&&Qe(0);break}o&&l(u+131072);var It=u+q;if(u<At){var ie=s-At,re=Math.min(At,It);for(ie+u<0&&Qe(3);u<re;++u)e[u]=A[ie+u]}for(;u<It;++u)e[u]=e[u-At]}}t.l=d,t.p=U,t.b=u,t.f=c,d&&(c=1,t.m=B,t.d=f,t.n=p)}while(!c);return u!=e.length&&n?fl(e,0,u):e.subarray(0,u)},We=function(r,t,e){e<<=t&7;var A=t/8|0;r[A]|=e,r[A+1]|=e>>8},Ui=function(r,t,e){e<<=t&7;var A=t/8|0;r[A]|=e,r[A+1]|=e>>8,r[A+2]|=e>>16},on=function(r,t){for(var e=[],A=0;A<r.length;++A)r[A]&&e.push({s:A,f:r[A]});var i=e.length,s=e.slice();if(!i)return{t:El,l:0};if(i==1){var n=new zt(e[0].s+1);return n[e[0].s]=1,{t:n,l:1}}e.sort(function(Q,m){return Q.f-m.f}),e.push({s:-1,f:25001});var o=e[0],a=e[1],l=0,c=1,h=2;for(e[0]={s:-1,f:o.f+a.f,l:o,r:a};c!=i-1;)o=e[e[l].f<e[h].f?l++:h++],a=e[l!=c&&e[l].f<e[h].f?l++:h++],e[c++]={s:-1,f:o.f+a.f,l:o,r:a};for(var u=s[0].s,A=1;A<i;++A)s[A].s>u&&(u=s[A].s);var d=new ce(u+1),f=an(e[c-1],d,0);if(f>t){var A=0,B=0,p=f-t,S=1<<p;for(s.sort(function(m,x){return d[x.s]-d[m.s]||m.f-x.f});A<i;++A){var R=s[A].s;if(d[R]>t)B+=S-(1<<f-d[R]),d[R]=t;else break}for(B>>=p;B>0;){var w=s[A].s;d[w]<t?B-=1<<t-d[w]++-1:++A}for(;A>=0&&B;--A){var D=s[A].s;d[D]==t&&(--d[D],++B)}f=t}return{t:new zt(d),l:f}},an=function(r,t,e){return r.s==-1?Math.max(an(r.l,t,e+1),an(r.r,t,e+1)):t[r.s]=e},dl=function(r){for(var t=r.length;t&&!r[--t];);for(var e=new ce(++t),A=0,i=r[0],s=1,n=function(a){e[A++]=a},o=1;o<=t;++o)if(r[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)n(32754);s>2&&(n(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(n(i),--s;s>6;s-=6)n(8304);s>2&&(n(s-3<<5|8208),s=0)}for(;s--;)n(i);s=1,i=r[o]}return{c:e.subarray(0,A),n:t}},Ni=function(r,t){for(var e=0,A=0;A<t.length;++A)e+=r[A]*t[A];return e},Il=function(r,t,e){var A=e.length,i=nn(t+2);r[i]=A&255,r[i+1]=A>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var s=0;s<A;++s)r[i+s+4]=e[s];return(i+4+A)*8},pl=function(r,t,e,A,i,s,n,o,a,l,c){We(t,c++,e),++i[256];for(var h=on(i,15),u=h.t,d=h.l,f=on(s,15),B=f.t,p=f.l,S=dl(u),R=S.c,w=S.n,D=dl(B),Q=D.c,m=D.n,x=new ce(19),M=0;M<R.length;++M)++x[R[M]&31];for(var M=0;M<Q.length;++M)++x[Q[M]&31];for(var V=on(x,7),et=V.t,z=V.l,J=19;J>4&&!et[tn[J-1]];--J);var $=l+5<<3,K=Ni(i,nA)+Ni(s,Pi)+n,L=Ni(i,u)+Ni(s,B)+n+14+3*J+Ni(x,et)+2*x[16]+3*x[17]+7*x[18];if(a>=0&&$<=K&&$<=L)return Il(t,c,r.subarray(a,a+l));var it,G,W,At;if(We(t,c,1+(L<K)),c+=2,L<K){it=Me(u,d,0),G=u,W=Me(B,p,0),At=B;var T=Me(et,z,0);We(t,c,w-257),We(t,c+5,m-1),We(t,c+10,J-4),c+=14;for(var M=0;M<J;++M)We(t,c+3*M,et[tn[M]]);c+=3*J;for(var tt=[R,Q],U=0;U<2;++U)for(var P=tt[U],M=0;M<P.length;++M){var q=P[M]&31;We(t,c,T[q]),c+=et[q],q>15&&(We(t,c,P[M]>>5&127),c+=P[M]>>12)}}else it=Uf,G=nA,W=Ff,At=Pi;for(var M=0;M<o;++M){var Z=A[M];if(Z>255){var q=Z>>18&31;Ui(t,c,it[q+257]),c+=G[q+257],q>7&&(We(t,c,Z>>23&31),c+=Cr[q]);var nt=Z&31;Ui(t,c,W[nt]),c+=At[nt],nt>3&&(Ui(t,c,Z>>5&8191),c+=Qr[nt])}else Ui(t,c,it[Z]),c+=G[Z]}return Ui(t,c,it[256]),c+G[256]},Of=new $s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),El=new zt(0),Hf=function(r,t,e,A,i,s){var n=s.z||r.length,o=new zt(A+n+5*(1+Math.ceil(n/7e3))+i),a=o.subarray(A,o.length-i),l=s.l,c=(s.r||0)&7;if(t){c&&(a[0]=s.r>>3);for(var h=Of[t-1],u=h>>13,d=h&8191,f=(1<<e)-1,B=s.p||new ce(32768),p=s.h||new ce(f+1),S=Math.ceil(e/3),R=2*S,w=function(Tt){return(r[Tt]^r[Tt+1]<<S^r[Tt+2]<<R)&f},D=new $s(25e3),Q=new ce(288),m=new ce(32),x=0,M=0,V=s.i||0,et=0,z=s.w||0,J=0;V+2<n;++V){var $=w(V),K=V&32767,L=p[$];if(B[K]=L,p[$]=K,z<=V){var it=n-V;if((x>7e3||et>24576)&&(it>423||!l)){c=pl(r,a,0,D,Q,m,M,et,J,V-J,c),et=x=M=0,J=V;for(var G=0;G<286;++G)Q[G]=0;for(var G=0;G<30;++G)m[G]=0}var W=2,At=0,T=d,tt=K-L&32767;if(it>2&&$==w(V-tt))for(var U=Math.min(u,it)-1,P=Math.min(32767,V),q=Math.min(258,it);tt<=P&&--T&&K!=L;){if(r[V+W]==r[V+W-tt]){for(var Z=0;Z<q&&r[V+Z]==r[V+Z-tt];++Z);if(Z>W){if(W=Z,At=tt,Z>U)break;for(var nt=Math.min(tt,Z-2),X=0,G=0;G<nt;++G){var It=V-tt+G&32767,ie=B[It],re=It-ie&32767;re>X&&(X=re,L=It)}}}K=L,L=B[K],tt+=K-L&32767}if(At){D[et++]=268435456|en[W]<<18|ul[At];var Ft=en[W]&31,ht=ul[At]&31;M+=Cr[Ft]+Qr[ht],++Q[257+Ft],++m[ht],z=V+W,++x}else D[et++]=r[V],++Q[r[V]]}}for(V=Math.max(V,z);V<n;++V)D[et++]=r[V],++Q[r[V]];c=pl(r,a,l,D,Q,m,M,et,J,V-J,c),l||(s.r=c&7|a[c/8|0]<<3,c-=7,s.h=p,s.p=B,s.i=V,s.w=z)}else{for(var V=s.w||0;V<n+l;V+=65535){var yt=V+65535;yt>=n&&(a[c/8|0]=l,yt=n),c=Il(a,c+1,r.subarray(V,yt))}s.i=n}return fl(o,0,A+nn(c)+i)},Bl=function(){var r=1,t=0;return{p:function(e){for(var A=r,i=t,s=e.length|0,n=0;n!=s;){for(var o=Math.min(n+2655,s);n<o;++n)i+=A+=e[n];A=(A&65535)+15*(A>>16),i=(i&65535)+15*(i>>16)}r=A,t=i},d:function(){return r%=65521,t%=65521,(r&255)<<24|(r&65280)<<8|(t&255)<<8|t>>8}}},Jf=function(r,t,e,A,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),n=new zt(s.length+r.length);n.set(s),n.set(r,s.length),r=n,i.w=s.length}return Hf(r,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+t.mem,e,A,i)},Cl=function(r,t,e){for(;e;++t)r[t]=e,e>>>=8},Kf=function(r,t){var e=t.level,A=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=A<<6|(t.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,t.dictionary){var i=Bl();i.p(t.dictionary),Cl(r,2,i.d())}},Yf=function(r,t){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Qe(6,"invalid zlib data"),(r[1]>>5&1)==1&&Qe(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Vf(r,t){t||(t={});var e=Bl();e.p(r);var A=Jf(r,t,t.dictionary?6:2,4);return Kf(A,t),Cl(A,A.length-4,e.d()),A}function zf(r,t){return Gf(r.subarray(Yf(r),-4),{i:2},t,t)}var Wf=typeof TextDecoder<"u"&&new TextDecoder,qf=0;try{Wf.decode(El,{stream:!0}),qf=1}catch{}const Xf="modern-font";function Fi(r,t){if(!r)throw new Error(`[${Xf}] ${t}`)}function jf(r){if("buffer"in r){const t=r.buffer;return r.byteOffset>0||r.byteLength<r.buffer.byteLength?t.slice(r.byteOffset,r.byteOffset+r.byteLength):t}else return r}function GA(r){return"buffer"in r?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(r)}function Zf(r){let t="";for(let e=0,A=r.length,i;e<A;e++)i=r.charCodeAt(e),i!==0&&(t+=String.fromCharCode(i));return t}function yr(r){r=Zf(r);const t=[];for(let e=0,A=r.length,i;e<A;e++)i=r.charCodeAt(e),t.push(i>>8),t.push(i&255);return t}function $f(r){let t="";for(let e=0,A=r.length;e<A;e++)r[e]<127?t+=String.fromCharCode(r[e]):t+=`%${(256+r[e]).toString(16).slice(1)}`;return unescape(t)}function td(r){let t="";for(let e=0,A=r.length;e<A;e+=2)t+=String.fromCharCode((r[e]<<8)+r[e+1]);return t}var ed=Object.defineProperty,Wt=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&ed(t,e,i),i};const Ti={int8:1,int16:2,int32:4,uint8:1,uint16:2,uint32:4,float32:4,float64:8,fixed:4,longDateTime:8,char:1};function qt(){return function(r,t){Object.defineProperty(r.constructor.prototype,t,{get(){if(typeof t=="string"){if(t.startsWith("read"))return(...e)=>this.read(t.substring(4).toLowerCase(),...e);if(t.startsWith("write"))return(...e)=>this.write(t.substring(5).toLowerCase(),...e)}},configurable:!0,enumerable:!0})}}class kt extends DataView{constructor(t,e,A,i){super(jf(t),e,A),this.littleEndian=i}cursor=0;readColumn(t){if(t.size){const e=Array.from({length:t.size},(A,i)=>this.read(t.type,t.offset+i));switch(t.type){case"char":return e.join("");default:return e}}else return this.read(t.type,t.offset)}writeColumn(t,e){t.size?Array.from({length:t.size},(A,i)=>{this.write(t.type,e[i],t.offset+i)}):this.write(t.type,e,t.offset)}read(t,e=this.cursor,A=this.littleEndian){switch(t){case"char":return this.readChar(e);case"fixed":return this.readFixed(e,A);case"longDateTime":return this.readLongDateTime(e,A)}const i=`get${t.replace(/^\S/,a=>a.toUpperCase())}`,s=this,o=s[i]?.bind(s)?.(e,A);return this.cursor+=Ti[t],o}readUint24(t=this.cursor){const[e,A,i]=this.readBytes(t,3);return(e<<16)+(A<<8)+i}readBytes(t,e){e==null&&(e=t,t=this.cursor);const A=[];for(let i=0;i<e;++i)A.push(this.getUint8(t+i));return this.cursor=t+e,A}readString(t,e){const A=this.readBytes(t,e);let i="";for(let s=0,n=A.length;s<n;s++)i+=String.fromCharCode(A[s]);return i}readFixed(t,e){const A=this.readInt32(t,e)/65536;return Math.ceil(A*1e5)/1e5}readLongDateTime(t=this.cursor,e){const A=this.readUint32(t+4,e),i=new Date;return i.setTime(A*1e3+-20775456e5),i}readChar(t){return this.readString(t,1)}write(t,e,A=this.cursor,i=this.littleEndian){switch(t){case"char":return this.writeChar(e,A);case"fixed":return this.writeFixed(e,A);case"longDateTime":return this.writeLongDateTime(e,A)}const s=`set${t.replace(/^\S/,l=>l.toUpperCase())}`,n=this,a=n[s]?.bind(n)?.(A,e,i);return this.cursor+=Ti[t.toLowerCase()],a}writeString(t="",e=this.cursor){const A=t.replace(/[^\x00-\xFF]/g,"11").length;this.seek(e);for(let i=0,s=t.length,n;i<s;++i)n=t.charCodeAt(i)||0,n>127?this.writeUint16(n):this.writeUint8(n);return this.cursor+=A,this}writeChar(t,e){return this.writeString(t,e)}writeFixed(t,e){return this.writeInt32(Math.round(t*65536),e),this}writeLongDateTime(t,e=this.cursor){typeof t>"u"?t=-20775456e5:typeof t.getTime=="function"?t=t.getTime():/^\d+$/.test(t)?t=+t:t=Date.parse(t);const i=Math.round((t- -20775456e5)/1e3);return this.writeUint32(0,e),this.writeUint32(i,e+4),this}writeBytes(t,e=this.cursor){let A;if(Array.isArray(t)){A=t.length;for(let i=0;i<A;++i)this.setUint8(e+i,t[i])}else{const i=GA(t);A=i.byteLength;for(let s=0;s<A;++s)this.setUint8(e+s,i.getUint8(s))}return this.cursor=e+A,this}seek(t){return this.cursor=t,this}}Wt([qt()],kt.prototype,"readInt8"),Wt([qt()],kt.prototype,"readInt16"),Wt([qt()],kt.prototype,"readInt32"),Wt([qt()],kt.prototype,"readUint8"),Wt([qt()],kt.prototype,"readUint16"),Wt([qt()],kt.prototype,"readUint32"),Wt([qt()],kt.prototype,"readFloat32"),Wt([qt()],kt.prototype,"readFloat64"),Wt([qt()],kt.prototype,"writeInt8"),Wt([qt()],kt.prototype,"writeInt16"),Wt([qt()],kt.prototype,"writeInt32"),Wt([qt()],kt.prototype,"writeUint8"),Wt([qt()],kt.prototype,"writeUint16"),Wt([qt()],kt.prototype,"writeUint32"),Wt([qt()],kt.prototype,"writeFloat32"),Wt([qt()],kt.prototype,"writeFloat64");const Ql=new WeakMap;function y(r){const t=typeof r=="object"?r:{type:r},{size:e=1,type:A}=t;return(i,s)=>{if(typeof s!="string")return;let n=Ql.get(i);n||(n={columns:[],byteLength:0},Ql.set(i,n));const o={...t,name:s,byteLength:e*Ti[A],offset:t.offset??n.columns.reduce((a,l)=>a+l.byteLength,0)};n.columns.push(o),n.byteLength=n.columns.reduce((a,l)=>a+Ti[l.type]*(l.size??1),0),Object.defineProperty(i.constructor.prototype,s,{get(){return this.view.readColumn(o)},set(a){this.view.writeColumn(o,a)},configurable:!0,enumerable:!0})}}class he{view;constructor(t,e,A,i){this.view=new kt(t,e,A,i)}}class mr extends he{get buffer(){return this.view.buffer}toBuffer(){return this.view.buffer.slice(this.view.byteOffset,this.view.byteOffset+this.view.byteLength)}toBlob(){return new Blob([new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength)],{type:this.mimeType})}toFontFace(t){return new FontFace(t,this.view.buffer)}}var Ad=Object.defineProperty,$t=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Ad(t,e,i),i};const te=class vc extends mr{format="EmbeddedOpenType";mimeType="application/vnd.ms-fontobject";static from(t){const e=t.sfnt,i=e.name.names,s=yr(i.fontFamily||""),n=s.length,o=yr(i.fontStyle||""),a=o.length,l=yr(i.version||""),c=l.length,h=yr(i.fullName||""),u=h.length,d=86+n+4+a+4+c+4+u+2+t.view.byteLength,f=new vc(new ArrayBuffer(d),0,d,!0);f.EOTSize=f.view.byteLength,f.FontDataSize=t.view.byteLength,f.Version=131073,f.Flags=0,f.Charset=1,f.MagicNumber=20556,f.Padding1=0,f.CheckSumAdjustment=e.head.checkSumAdjustment;const B=e.os2;return B&&(f.FontPANOSE=B.fontPANOSE,f.Italic=B.fsSelection,f.Weight=B.usWeightClass,f.fsType=B.fsType,f.UnicodeRange=B.ulUnicodeRange,f.CodePageRange=B.ulCodePageRange),f.view.writeUint16(n),f.view.writeBytes(s),f.view.writeUint16(0),f.view.writeUint16(a),f.view.writeBytes(o),f.view.writeUint16(0),f.view.writeUint16(c),f.view.writeBytes(l),f.view.writeUint16(0),f.view.writeUint16(u),f.view.writeBytes(h),f.view.writeUint16(0),f.view.writeUint16(0),f.view.writeBytes(t.view),f}};$t([y("uint32")],te.prototype,"EOTSize"),$t([y("uint32")],te.prototype,"FontDataSize"),$t([y("uint32")],te.prototype,"Version"),$t([y("uint32")],te.prototype,"Flags"),$t([y({type:"uint8",size:10})],te.prototype,"FontPANOSE"),$t([y("uint8")],te.prototype,"Charset"),$t([y("uint8")],te.prototype,"Italic"),$t([y("uint32")],te.prototype,"Weight"),$t([y("uint16")],te.prototype,"fsType"),$t([y("uint16")],te.prototype,"MagicNumber"),$t([y({type:"uint8",size:16})],te.prototype,"UnicodeRange"),$t([y({type:"uint8",size:8})],te.prototype,"CodePageRange"),$t([y("uint32")],te.prototype,"CheckSumAdjustment"),$t([y({type:"uint8",size:16})],te.prototype,"Reserved"),$t([y("uint16")],te.prototype,"Padding1");var id=Object.defineProperty,wr=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&id(t,e,i),i};class OA extends he{constructor(t,e){super(t,e,16)}}wr([y({type:"char",size:4})],OA.prototype,"tag"),wr([y("uint32")],OA.prototype,"checkSum"),wr([y("uint32")],OA.prototype,"offset"),wr([y("uint32")],OA.prototype,"length");const ln=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],rd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];class cn{index;name;isComposite=!1;components=[];pathCommands=[];constructor(t){const e={...t};if(this.index=e.index??0,e.name===".notdef"?e.unicode=void 0:e.name===".null"&&(e.unicode=0),e.unicode===0&&e.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=e.name??null,e.unicode&&(this.unicode=e.unicode),e.unicodes?this.unicodes=e.unicodes:e.unicode&&(this.unicodes=[e.unicode])}getPathCommands(t=0,e=0,A=72,i={},s){const n=1/(s?.unitsPerEm??1e3)*A,{xScale:o=n,yScale:a=n}=i,l=this.pathCommands,c=[];for(let h=0,u=l.length;h<u;h+=1){const d=l[h];d.type==="M"?c.push({type:"M",x:t+d.x*o,y:e+-d.y*a}):d.type==="L"?c.push({type:"L",x:t+d.x*o,y:e+-d.y*a}):d.type==="Q"?c.push({type:"Q",x1:t+d.x1*o,y1:e+-d.y1*a,x:t+d.x*o,y:e+-d.y*a}):d.type==="C"?c.push({type:"C",x1:t+d.x1*o,y1:e+-d.y1*a,x2:t+d.x2*o,y2:e+-d.y2*a,x:t+d.x*o,y:e+-d.y*a}):d.type==="Z"&&c.push({type:"Z"})}return c}}class sd extends cn{parse(t,e,A){const i=this,{nominalWidthX:s,defaultWidthX:n,gsubrsBias:o,subrsBias:a}=t,l=t.topDict.paintType,c=this.index;let h,u,d,f;const B=[],p=[];let S=0,R=!1,w=!1,D=n,Q=0,m=0;function x(K,L){B.push({type:"L",x:K,y:L})}function M(K,L,it,G,W,At){B.push({type:"C",x1:K,y1:L,x2:it,y2:G,x:W,y:At})}function V(K,L){w&&l!==2&&et(),w=!0,B.push({type:"M",x:K,y:L})}function et(){B.push({type:"Z"})}function z(K){B.push(...K)}function J(){p.length%2!==0&&!R&&(D=p.shift()+s),S+=p.length>>1,p.length=0,R=!0}function $(K){let L,it,G,W,At,T,tt,U,P,q,Z,nt,X=0;for(;X<K.length;){let It=K[X++];switch(It){case 1:J();break;case 3:J();break;case 4:p.length>1&&!R&&(D=p.shift()+s,R=!0),m+=p.pop(),V(Q,m);break;case 5:for(;p.length>0;)Q+=p.shift(),m+=p.shift(),x(Q,m);break;case 6:for(;p.length>0&&(Q+=p.shift(),x(Q,m),p.length!==0);)m+=p.shift(),x(Q,m);break;case 7:for(;p.length>0&&(m+=p.shift(),x(Q,m),p.length!==0);)Q+=p.shift(),x(Q,m);break;case 8:for(;p.length>0;)h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f+p.shift(),M(h,u,d,f,Q,m);break;case 10:At=p.pop()+a,T=t.subrs[At],T&&$(T);break;case 11:return;case 12:switch(It=K[X],X+=1,It){case 35:h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),tt=d+p.shift(),U=f+p.shift(),P=tt+p.shift(),q=U+p.shift(),Z=P+p.shift(),nt=q+p.shift(),Q=Z+p.shift(),m=nt+p.shift(),p.shift(),M(h,u,d,f,tt,U),M(P,q,Z,nt,Q,m);break;case 34:h=Q+p.shift(),u=m,d=h+p.shift(),f=u+p.shift(),tt=d+p.shift(),U=f,P=tt+p.shift(),q=f,Z=P+p.shift(),nt=m,Q=Z+p.shift(),M(h,u,d,f,tt,U),M(P,q,Z,nt,Q,m);break;case 36:h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),tt=d+p.shift(),U=f,P=tt+p.shift(),q=f,Z=P+p.shift(),nt=q+p.shift(),Q=Z+p.shift(),M(h,u,d,f,tt,U),M(P,q,Z,nt,Q,m);break;case 37:h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),tt=d+p.shift(),U=f+p.shift(),P=tt+p.shift(),q=U+p.shift(),Z=P+p.shift(),nt=q+p.shift(),Math.abs(Z-Q)>Math.abs(nt-m)?Q=Z+p.shift():m=nt+p.shift(),M(h,u,d,f,tt,U),M(P,q,Z,nt,Q,m);break;default:console.warn(`Glyph ${c}: unknown operator ${1200+It}`),p.length=0}break;case 14:if(p.length>=4){const ie=ln[p.pop()],re=ln[p.pop()],Ft=p.pop(),ht=p.pop();if(ie&&re){i.isComposite=!0,i.components=[];const yt=t.charset.indexOf(ie),Tt=t.charset.indexOf(re);i.components.push({glyphIndex:Tt,dx:0,dy:0}),i.components.push({glyphIndex:yt,dx:ht,dy:Ft}),z(A.get(Tt).pathCommands);const Jt=JSON.parse(JSON.stringify(A.get(yt).pathCommands));for(let bt=0;bt<Jt.length;bt+=1){const Zt=Jt[bt];Zt.type!=="Z"&&(Zt.x+=ht,Zt.y+=Ft),(Zt.type==="Q"||Zt.type==="C")&&(Zt.x1+=ht,Zt.y1+=Ft),Zt.type==="C"&&(Zt.x2+=ht,Zt.y2+=Ft)}z(Jt)}}else p.length>0&&!R&&(D=p.shift()+s,R=!0);w&&l!==2&&(et(),w=!1);break;case 18:J();break;case 19:case 20:J(),X+=S+7>>3;break;case 21:p.length>2&&!R&&(D=p.shift()+s,R=!0),m+=p.pop(),Q+=p.pop(),V(Q,m);break;case 22:p.length>1&&!R&&(D=p.shift()+s,R=!0),Q+=p.pop(),V(Q,m);break;case 23:J();break;case 24:for(;p.length>2;)h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f+p.shift(),M(h,u,d,f,Q,m);Q+=p.shift(),m+=p.shift(),x(Q,m);break;case 25:for(;p.length>6;)Q+=p.shift(),m+=p.shift(),x(Q,m);h=Q+p.shift(),u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f+p.shift(),M(h,u,d,f,Q,m);break;case 26:for(p.length%2&&(Q+=p.shift());p.length>0;)h=Q,u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d,m=f+p.shift(),M(h,u,d,f,Q,m);break;case 27:for(p.length%2&&(m+=p.shift());p.length>0;)h=Q+p.shift(),u=m,d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f,M(h,u,d,f,Q,m);break;case 28:L=K[X],it=K[X+1],p.push((L<<24|it<<16)>>16),X+=2;break;case 29:At=p.pop()+o,T=t.gsubrs[At],T&&$(T);break;case 30:for(;p.length>0&&(h=Q,u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f+(p.length===1?p.shift():0),M(h,u,d,f,Q,m),p.length!==0);)h=Q+p.shift(),u=m,d=h+p.shift(),f=u+p.shift(),m=f+p.shift(),Q=d+(p.length===1?p.shift():0),M(h,u,d,f,Q,m);break;case 31:for(;p.length>0&&(h=Q+p.shift(),u=m,d=h+p.shift(),f=u+p.shift(),m=f+p.shift(),Q=d+(p.length===1?p.shift():0),M(h,u,d,f,Q,m),p.length!==0);)h=Q,u=m+p.shift(),d=h+p.shift(),f=u+p.shift(),Q=d+p.shift(),m=f+(p.length===1?p.shift():0),M(h,u,d,f,Q,m);break;default:It<32?console.warn(`Glyph ${c}: unknown operator ${It}`):It<247?p.push(It-139):It<251?(L=K[X],X+=1,p.push((It-247)*256+L+108)):It<255?(L=K[X],X+=1,p.push(-(It-251)*256-L-108)):(L=K[X],it=K[X+1],G=K[X+2],W=K[X+3],X+=4,p.push((L<<24|it<<16|G<<8|W)/65536))}}}$(e),this.pathCommands=B,R&&(this.advanceWidth=D)}}class hn{constructor(t){this._sfnt=t}_items=[];get(t){const e=this._items[t];let A;if(e)A=e;else{A=this._get(t);const i=this._sfnt.hmtx.metrics[t];i&&(A.advanceWidth=A.advanceWidth||i.advanceWidth,A.leftSideBearing=A.leftSideBearing||i.leftSideBearing);const s=this._sfnt.cmap.glyphIndexToUnicodesMap.get(t);s&&(A.unicode??=s[0],A.unicodes??=s),this._items[t]=A}return A}}class nd extends hn{get length(){return this._sfnt.cff.charStringsIndex.offsets.length-1}_get(t){const e=this._sfnt.cff,A=new sd({index:t});return A.parse(e,e.charStringsIndex.get(t),this),A.name=e.charset[t],A}}var od=Object.defineProperty,yl=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&od(t,e,i),i};class vr extends he{_offsets;get offsets(){return this._offsets??=this.readOffsets()}_objects;get objects(){return this._objects??=this.readObjects()}constructor(t,e,A,i){super(t,e,A,i),this._init()}_init(){const t=this.view,e=this.count,A=this.offsetSize;this.objectOffset=(e+1)*A+2,this.endOffset=t.byteOffset+this.objectOffset+this.offsets[e]}readOffsets(){const t=this.view,e=this.count,A=this.offsetSize;t.seek(3);const i=[];for(let s=0,n=e+1;s<n;s++){const o=this.view;let a=0;for(let l=0;l<A;l++)a<<=8,a+=o.readUint8();i.push(a)}return i}readObjects(){const t=[];for(let e=0,A=this.count;e<A;e++)t.push(this.get(e));return t}get(t){const e=this.offsets,A=this.objectOffset,i=A+e[t],n=A+e[t+1]-i;return this._isString?this.view.readString(i,n):this.view.readBytes(i,n)}}yl([y("uint16")],vr.prototype,"count"),yl([y("uint8")],vr.prototype,"offsetSize");class _r extends vr{_isString=!1}class ml extends vr{_isString=!0}const ad=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ld=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],cd=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],hd=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];function br(r,t){return t<=390?ad[t]:r[t-391]}function Bt(r,t="number",e){return(A,i)=>{if(typeof i!="string")return;const s={type:t,operator:r,default:e??t==="number"?0:void 0};Object.defineProperty(A.constructor.prototype,i,{get(){return this._getProp(s)},set(n){this._setProp(s,n)},configurable:!0,enumerable:!0})}}class wl extends he{_dict;get dict(){return this._dict??=this._readDict()}_stringIndex;setStringIndex(t){return this._stringIndex=t,this}_readFloatOperand(){const t=this.view;let e="";const A=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const s=t.readUint8(),n=s>>4,o=s&15;if(n===A||(e+=i[n],o===A))break;e+=i[o]}return Number.parseFloat(e)}_readOperand(t){const e=this.view;let A,i,s,n;if(t===28)return A=e.readUint8(),i=e.readUint8(),A<<8|i;if(t===29)return A=e.readUint8(),i=e.readUint8(),s=e.readUint8(),n=e.readUint8(),A<<24|i<<16|s<<8|n;if(t===30)return this._readFloatOperand();if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return A=e.readUint8(),(t-247)*256+A+108;if(t>=251&&t<=254)return A=e.readUint8(),-(t-251)*256-A-108;throw new Error(`invalid b0 ${t}, at: ${e.cursor}`)}_readDict(){const t=this.view;t.seek(0);let e=[];const A=t.cursor+t.byteLength,i={};for(;t.cursor<A;){let s=t.readUint8();s<=21?(s===12&&(s=1200+t.readUint8()),i[s]=e,e=[]):e.push(this._readOperand(s))}return i}_getProp(t){const e=this.dict[t.operator]??t.default;switch(t.type){case"number":return e[0];case"string":return br(this._stringIndex?.objects??[],e[0]);case"number[]":return e}return e}_setProp(t,e){}}var gd=Object.defineProperty,gn=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&gd(t,e,i),i};class Dr extends wl{}gn([Bt(19)],Dr.prototype,"subrs"),gn([Bt(20)],Dr.prototype,"defaultWidthX"),gn([Bt(21)],Dr.prototype,"nominalWidthX");var ud=Object.defineProperty,_t=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&ud(t,e,i),i};class wt extends wl{}_t([Bt(0,"string")],wt.prototype,"version"),_t([Bt(1,"string")],wt.prototype,"notice"),_t([Bt(1200,"string")],wt.prototype,"copyright"),_t([Bt(2,"string")],wt.prototype,"fullName"),_t([Bt(3,"string")],wt.prototype,"familyName"),_t([Bt(4,"string")],wt.prototype,"weight"),_t([Bt(1201)],wt.prototype,"isFixedPitch"),_t([Bt(1202)],wt.prototype,"italicAngle"),_t([Bt(1203,"number",-100)],wt.prototype,"underlinePosition"),_t([Bt(1204,"number",50)],wt.prototype,"underlineThickness"),_t([Bt(1205)],wt.prototype,"paintType"),_t([Bt(1206,"number",2)],wt.prototype,"charstringType"),_t([Bt(1207,"number[]",[.001,0,0,.001,0,0])],wt.prototype,"fontMatrix"),_t([Bt(13)],wt.prototype,"uniqueId"),_t([Bt(5,"number[]",[0,0,0,0])],wt.prototype,"fontBBox"),_t([Bt(1208)],wt.prototype,"strokeWidth"),_t([Bt(14)],wt.prototype,"xuid"),_t([Bt(15)],wt.prototype,"charset"),_t([Bt(16)],wt.prototype,"encoding"),_t([Bt(17)],wt.prototype,"charStrings"),_t([Bt(18,"number[]",[0,0])],wt.prototype,"private");function Gt(r,t=r){return e=>{Re.tableDefinitions.set(r,{tag:r,prop:t,class:e}),Object.defineProperty(Re.prototype,t,{get(){return this.get(r)},set(A){return this.set(r,A)},configurable:!0,enumerable:!0})}}class Re{static tableDefinitions=new Map;tables=new Map;tableViews=new Map;get hasGlyf(){return this.tableViews.has("glyf")}get names(){return this.name.names}get unitsPerEm(){return this.head.unitsPerEm}get ascender(){return this.hhea.ascent}get descender(){return this.hhea.descent}get createdTimestamp(){return this.head.created}get modifiedTimestamp(){return this.head.modified}get numGlyphs(){return this.maxp.numGlyphs}get unicodes(){return this.cmap.glyphIndexToUnicodesMap}get glyphs(){return this.hasGlyf?this.glyf.glyphs:this.cff.glyphs}charToGlyphIndex(t){let e=this.cmap.unicodeToGlyphIndexMap.get(t.codePointAt(0));if(e===void 0&&!this.hasGlyf){const{encoding:A,charset:i}=this.cff;e=i.indexOf(A[t.codePointAt(0)])}return e??0}charToGlyph(t){return this.glyphs.get(this.charToGlyphIndex(t))}textToGlyphIndexes(t){const e=[];for(const A of t)e.push(this.charToGlyphIndex(A));return e}textToGlyphs(t){const e=this.glyphs,A=this.textToGlyphIndexes(t),i=A.length,s=Array.from({length:i}),n=e.get(0);for(let o=0;o<i;o+=1)s[o]=e.get(A[o])||n;return s}getPathCommands(t,e,A,i,s){const n=[];return this.forEachGlyph(t,e,A,i,s,(o,a,l,c,h)=>{n.push(...o.getPathCommands(a,l,c,h,this))}),n}getAdvanceWidth(t,e,A){return this.forEachGlyph(t,0,0,e,A,()=>{})}forEachGlyph(t,e=0,A=0,i=72,s={},n){const o=1/this.unitsPerEm*i,a=this.textToGlyphs(t);for(let l=0;l<a.length;l+=1){const c=a[l];n.call(this,c,e,A,i,s),c.advanceWidth&&(e+=c.advanceWidth*o),s.letterSpacing?e+=s.letterSpacing*i:s.tracking&&(e+=s.tracking/1e3*i)}return e}constructor(t){(t instanceof Map?t:new Map(Object.entries(t))).forEach((A,i)=>{this.tableViews.set(i,new DataView(A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)))})}clone(){return new Re(this.tableViews)}delete(t){const e=Re.tableDefinitions.get(t);return e?(this.tableViews.delete(t),this.tables.delete(e.prop),this):this}set(t,e){const A=Re.tableDefinitions.get(t);return A&&this.tables.set(A.prop,e),this.tableViews.set(t,e.view),this}get(t){const e=Re.tableDefinitions.get(t);if(!e)return;let A=this.tables.get(e.prop);if(!A){const i=e.class;if(i){const s=this.tableViews.get(t);if(!s)return;A=new i(s.buffer,s.byteOffset,s.byteLength).setSFNT(this),this.tables.set(e.prop,A)}}return A}}class Xt extends he{setSFNT(t){return this._sfnt=t,this}getSFNT(){return this._sfnt}}var fd=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,Li=(r,t,e,A)=>{for(var i=A>1?void 0:A?dd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&fd(t,e,i),i};let vA=class extends Xt{_glyphs;get glyphs(){return this._glyphs??=new nd(this._sfnt)}get gsubrs(){return this.globalSubrIndex.objects}get gsubrsBias(){return this._calcSubroutineBias(this.globalSubrIndex.objects)}privateDict;subrsIndex;get defaultWidthX(){return this.privateDict?.defaultWidthX??0}get nominalWidthX(){return this.privateDict?.nominalWidthX??0}get subrs(){return this.subrsIndex?.objects??[]}get subrsBias(){return this._calcSubroutineBias(this.subrs)}constructor(r,t,e,A){super(r,t,e,A),this._init()}_init(){const r=this.view,{buffer:t,byteOffset:e}=r,A=e+4;this.nameIndex=new ml(t,A),this.topDictIndex=new _r(t,this.nameIndex.endOffset),this.stringIndex=new ml(t,this.topDictIndex.endOffset),this.globalSubrIndex=new _r(t,this.stringIndex.endOffset),this.topDict=new wt(new Uint8Array(this.topDictIndex.objects[0]).buffer).setStringIndex(this.stringIndex);const i=this.topDict.private[0],s=this.topDict.private[1];i&&(this.privateDict=new Dr(t,e+s,i).setStringIndex(this.stringIndex),this.privateDict.subrs&&(this.subrsIndex=new _r(t,e+s+this.privateDict.subrs))),this.charStringsIndex=new _r(t,e+this.topDict.charStrings);const n=this.charStringsIndex.offsets.length-1;this.topDict.charset===0?this.charset=ld:this.topDict.charset===1?this.charset=cd:this.topDict.charset===2?this.charset=hd:this.charset=this._readCharset(e+this.topDict.charset,n,this.stringIndex.objects),this.topDict.encoding===0?this.encoding=ln:this.topDict.encoding===1?this.encoding=rd:this.encoding=this._readEncoding(e+this.topDict.encoding)}_readCharset(r,t,e){const A=this.view;A.seek(r);let i,s,n;t-=1;const o=[".notdef"],a=A.readUint8();if(a===0)for(i=0;i<t;i+=1)s=A.readUint16(),o.push(br(e,s));else if(a===1)for(;o.length<=t;)for(s=A.readUint16(),n=A.readUint8(),i=0;i<=n;i+=1)o.push(br(e,s)),s+=1;else if(a===2)for(;o.length<=t;)for(s=A.readUint16(),n=A.readUint16(),i=0;i<=n;i+=1)o.push(br(e,s)),s+=1;else throw new Error(`Unknown charset format ${a}`);return o}_readEncoding(r){const t=this.view;t.seek(r);let e,A;const i={},s=t.readUint8();if(s===0){const n=t.readUint8();for(e=0;e<n;e+=1)A=t.readUint8(),i[A]=e}else if(s===1){const n=t.readUint8();for(A=1,e=0;e<n;e+=1){const o=t.readUint8(),a=t.readUint8();for(let l=o;l<=o+a;l+=1)i[l]=A,A+=1}}else console.warn(`unknown encoding format:${s}`);return i}_calcSubroutineBias(r){let t;return r.length<1240?t=107:r.length<33900?t=1131:t=32768,t}};Li([y("uint8")],vA.prototype,"majorVersion",2),Li([y("uint8")],vA.prototype,"minorVersion",2),Li([y("uint8")],vA.prototype,"headerSize",2),Li([y("uint8")],vA.prototype,"offsetSize",2),vA=Li([Gt("CFF ","cff")],vA);var Id=Object.defineProperty,xr=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Id(t,e,i),i};const Gi=class _c extends he{constructor(t=new ArrayBuffer(262),e){super(t,e,262)}static from(t){const e=new _c;return e.format=0,e.length=e.view.byteLength,e.language=0,t.forEach((A,i)=>{i<256&&A<256&&e.view.writeUint8(A,6+i)}),e}getUnicodeToGlyphIndexMap(){const t=new Map;return this.glyphIndexArray.forEach((e,A)=>{t.set(A,e)}),t}};xr([y("uint16")],Gi.prototype,"format"),xr([y("uint16")],Gi.prototype,"length"),xr([y("uint16")],Gi.prototype,"language"),xr([y({type:"uint8",size:256})],Gi.prototype,"glyphIndexArray");let un=Gi;var pd=Object.defineProperty,fn=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&pd(t,e,i),i};class Oi extends he{get subHeaderKeys(){return this.view.seek(6),Array.from({length:256},()=>this.view.readUint16()/8)}get maxSubHeaderKey(){return this.subHeaderKeys.reduce((t,e)=>Math.max(t,e),0)}get subHeaders(){const t=this.maxSubHeaderKey;return this.view.seek(6+256*2),Array.from({length:t},(e,A)=>({firstCode:this.view.readUint16(),entryCount:this.view.readUint16(),idDelta:this.view.readUint16(),idRangeOffset:(this.view.readUint16()-(t-A)*8-2)/2}))}get glyphIndexArray(){const t=this.maxSubHeaderKey,e=6+256*2+t*8;this.view.seek(e);const A=(this.view.byteLength-e)/2;return Array.from({length:A},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(t){const e=new Map,A=this.subHeaderKeys,i=this.maxSubHeaderKey,s=this.subHeaders,n=this.glyphIndexArray,o=A.findIndex(l=>l===i);let a=0;for(let l=0;l<256;l++)if(A[l]===0)l>=o||l<s[0].firstCode||l>=s[0].firstCode+s[0].entryCount||s[0].idRangeOffset+(l-s[0].firstCode)>=n.length?a=0:(a=n[s[0].idRangeOffset+(l-s[0].firstCode)],a!==0&&(a=a+s[0].idDelta)),a!==0&&a<t&&e.set(l,a);else{const c=A[l];for(let h=0,u=s[c].entryCount;h<u;h++)if(s[c].idRangeOffset+h>=n.length?a=0:(a=n[s[c].idRangeOffset+h],a!==0&&(a=a+s[c].idDelta)),a!==0&&a<t){const d=(l<<8|h+s[c].firstCode)%65535;e.set(d,a)}}return e}}fn([y("uint16")],Oi.prototype,"format"),fn([y("uint16")],Oi.prototype,"length"),fn([y("uint16")],Oi.prototype,"language");function vl(r){return r>32767?r-65536:r<-32767?r+65536:r}function dn(r,t){let e;const A=[];let i={};return r.forEach((s,n)=>{t&&n>t||((!e||n!==e.unicode+1||s!==e.glyphIndex+1)&&(e?(i.end=e.unicode,A.push(i),i={start:n,startId:s,delta:vl(s-n)}):(i.start=Number(n),i.startId=s,i.delta=vl(s-n))),e={unicode:n,glyphIndex:s})}),e&&(i.end=e.unicode,A.push(i)),A}var Ed=Object.defineProperty,_A=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Ed(t,e,i),i};const oA=class bc extends he{get endCode(){const t=this.segCountX2;return this.view.seek(14),Array.from({length:t/2},()=>this.view.readUint16())}set endCode(t){this.view.seek(14),t.forEach(e=>this.view.writeUint16(e))}get reservedPad(){return this.view.readUint16(14+this.segCountX2)}set reservedPad(t){this.view.writeUint16(t,14+this.segCountX2)}get startCode(){const t=this.segCountX2;return this.view.seek(14+t+2),Array.from({length:t/2},()=>this.view.readUint16())}set startCode(t){this.view.seek(14+this.segCountX2+2),t.forEach(e=>this.view.writeUint16(e))}get idDelta(){const t=this.segCountX2;return this.view.seek(14+t+2+t),Array.from({length:t/2},()=>this.view.readUint16())}set idDelta(t){const e=this.segCountX2;this.view.seek(14+e+2+e),t.forEach(A=>this.view.writeUint16(A))}get idRangeOffsetCursor(){const t=this.segCountX2;return 14+t+2+t*2}get idRangeOffset(){const t=this.segCountX2;return this.view.seek(this.idRangeOffsetCursor),Array.from({length:t/2},()=>this.view.readUint16())}set idRangeOffset(t){this.view.seek(this.idRangeOffsetCursor),t.forEach(e=>this.view.writeUint16(e))}get glyphIndexArrayCursor(){const t=this.segCountX2;return 14+t+2+t*3}get glyphIndexArray(){const t=this.glyphIndexArrayCursor;this.view.seek(t);const e=(this.view.byteLength-t)/2;return Array.from({length:e},()=>this.view.readUint16())}static from(t){const e=dn(t,65535),A=e.length+1,i=Math.floor(Math.log(A)/Math.LN2),s=2*2**i,n=new bc(new ArrayBuffer(24+e.length*8));return n.format=4,n.length=n.view.byteLength,n.language=0,n.segCountX2=A*2,n.searchRange=s,n.entrySelector=i,n.rangeShift=2*A-s,n.endCode=[...e.map(o=>o.end),65535],n.reservedPad=0,n.startCode=[...e.map(o=>o.start),65535],n.idDelta=[...e.map(o=>o.delta),1],n.idRangeOffset=Array.from({length:A},()=>0),n}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.segCountX2/2,A=(this.glyphIndexArrayCursor-this.idRangeOffsetCursor)/2,i=this.startCode,s=this.endCode,n=this.idRangeOffset,o=this.idDelta,a=this.glyphIndexArray;for(let l=0;l<e;++l)for(let c=i[l],h=s[l];c<=h;++c)if(n[l]===0)t.set(c,(c+o[l])%65536);else{const u=l+n[l]/2+(c-i[l])-A,d=a[u];d!==0?t.set(c,(d+o[l])%65536):t.set(c,0)}return t.delete(65535),t}};_A([y("uint16")],oA.prototype,"format"),_A([y("uint16")],oA.prototype,"length"),_A([y("uint16")],oA.prototype,"language"),_A([y("uint16")],oA.prototype,"segCountX2"),_A([y("uint16")],oA.prototype,"searchRange"),_A([y("uint16")],oA.prototype,"entrySelector"),_A([y("uint16")],oA.prototype,"rangeShift");let In=oA;var Bd=Object.defineProperty,Hi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Bd(t,e,i),i};class bA extends he{get glyphIndexArray(){return this.view.seek(12),Array.from({length:this.entryCount},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(){const t=this.glyphIndexArray,e=new Map;return t.forEach((A,i)=>{e.set(i,A)}),e}}Hi([y("uint16")],bA.prototype,"format"),Hi([y("uint16")],bA.prototype,"length"),Hi([y("uint16")],bA.prototype,"language"),Hi([y("uint16")],bA.prototype,"firstCode"),Hi([y("uint16")],bA.prototype,"entryCount");var Cd=Object.defineProperty,Ji=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Cd(t,e,i),i};const HA=class Dc extends he{get groups(){const t=this.nGroups;return this.view.seek(16),Array.from({length:t},()=>({startCharCode:this.view.readUint32(),endCharCode:this.view.readUint32(),startGlyphCode:this.view.readUint32()}))}static from(t){const e=dn(t),A=new Dc(new ArrayBuffer(16+e.length*12));return A.format=12,A.reserved=0,A.length=A.view.byteLength,A.language=0,A.nGroups=e.length,e.forEach(i=>{A.view.writeUint32(i.start),A.view.writeUint32(i.end),A.view.writeUint32(i.startId)}),A}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.groups;for(let A=0,i=e.length;A<i;A++){const s=e[A];let n=s.startGlyphCode,o=s.startCharCode;const a=s.endCharCode;for(;o<=a;)t.set(o++,n++)}return t}};Ji([y("uint16")],HA.prototype,"format"),Ji([y("uint16")],HA.prototype,"reserved"),Ji([y("uint32")],HA.prototype,"length"),Ji([y("uint32")],HA.prototype,"language"),Ji([y("uint32")],HA.prototype,"nGroups");let pn=HA;var Qd=Object.defineProperty,En=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&Qd(t,e,i),i};class Ki extends he{getVarSelectorRecords(){const t=this.numVarSelectorRecords;return this.view.seek(10),Array.from({length:t},()=>{const e={varSelector:this.view.readUint24(),defaultUVSOffset:this.view.readUint32(),unicodeValueRanges:[],nonDefaultUVSOffset:this.view.readUint32(),uVSMappings:[]};if(e.defaultUVSOffset){this.view.seek(e.defaultUVSOffset);const A=this.view.readUint32();e.unicodeValueRanges=Array.from({length:A},()=>({startUnicodeValue:this.view.readUint24(),additionalCount:this.view.readUint8()}))}if(e.nonDefaultUVSOffset){this.view.seek(e.nonDefaultUVSOffset);const A=this.view.readUint32();e.uVSMappings=Array.from({length:A},()=>({unicodeValue:this.view.readUint24(),glyphID:this.view.readUint16()}))}return e})}getUnicodeToGlyphIndexMap(){const t=new Map,e=this.getVarSelectorRecords();for(let A=0,i=e.length;A<i;A++){const{uVSMappings:s}=e[A];s.forEach(n=>{t.set(n.unicodeValue,n.glyphID)})}return t}}En([y("uint16")],Ki.prototype,"format"),En([y("uint32")],Ki.prototype,"length"),En([y("uint32")],Ki.prototype,"numVarSelectorRecords");var yd=Object.defineProperty,md=Object.getOwnPropertyDescriptor,Bn=(r,t,e,A)=>{for(var i=A>1?void 0:A?md(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&yd(t,e,i),i};let JA=class extends Xt{static from(r){const t=Array.from(r.keys()).some(c=>c>65535),e=In.from(r),A=un.from(r),i=t?pn.from(r):void 0,s=4+(i?32:24),n=s+e.view.byteLength,o=n+A.view.byteLength,a=[{platformID:0,platformSpecificID:3,offset:s},{platformID:1,platformSpecificID:0,offset:n},{platformID:3,platformSpecificID:1,offset:s},i&&{platformID:3,platformSpecificID:10,offset:o}].filter(Boolean),l=new JA(new ArrayBuffer(4+8*a.length+e.view.byteLength+A.view.byteLength+(i?.view.byteLength??0)));return l.numberSubtables=a.length,l.view.seek(4),a.forEach(c=>{l.view.writeUint16(c.platformID),l.view.writeUint16(c.platformSpecificID),l.view.writeUint32(c.offset)}),l.view.writeBytes(e.view,s),l.view.writeBytes(A.view,n),i&&l.view.writeBytes(i.view,o),l}_unicodeToGlyphIndexMap;get unicodeToGlyphIndexMap(){return this._unicodeToGlyphIndexMap??=this.readunicodeToGlyphIndexMap()}_glyphIndexToUnicodesMap;get glyphIndexToUnicodesMap(){if(!this._glyphIndexToUnicodesMap){const r=new Map,t=this.unicodeToGlyphIndexMap,e=Array.from(t.keys());for(let A=0,i=e.length;A<i;A++){const s=e[A],n=t.get(s);r.has(n)?r.get(n).push(s):r.set(n,[s])}this._glyphIndexToUnicodesMap=r}return this._glyphIndexToUnicodesMap}readSubtables(){const r=this.numberSubtables;return this.view.seek(4),Array.from({length:r},()=>({platformID:this.view.readUint16(),platformSpecificID:this.view.readUint16(),offset:this.view.readUint32()})).map(t=>{this.view.seek(t.offset);const e=this.view.readUint16();let A;switch(e){case 0:A=new un(this.view.buffer,t.offset);break;case 2:A=new Oi(this.view.buffer,t.offset,this.view.readUint16());break;case 4:A=new In(this.view.buffer,t.offset,this.view.readUint16());break;case 6:A=new bA(this.view.buffer,t.offset,this.view.readUint16());break;case 12:A=new pn(this.view.buffer,t.offset,this.view.readUint32(t.offset+4));break;case 14:default:A=new Ki(this.view.buffer,t.offset,this.view.readUint32());break}return{...t,format:e,view:A}})}readunicodeToGlyphIndexMap(){const r=this.readSubtables(),t=r.find(n=>n.format===0)?.view,e=r.find(n=>n.platformID===3&&n.platformSpecificID===3&&n.format===2)?.view,A=r.find(n=>n.platformID===3&&n.platformSpecificID===1&&n.format===4)?.view,i=r.find(n=>n.platformID===3&&n.platformSpecificID===10&&n.format===12)?.view,s=r.find(n=>n.platformID===0&&n.platformSpecificID===5&&n.format===14)?.view;return new Map([...t?.getUnicodeToGlyphIndexMap()??[],...e?.getUnicodeToGlyphIndexMap(this._sfnt.maxp.numGlyphs)??[],...A?.getUnicodeToGlyphIndexMap()??[],...i?.getUnicodeToGlyphIndexMap()??[],...s?.getUnicodeToGlyphIndexMap()??[]])}};Bn([y("uint16")],JA.prototype,"version",2),Bn([y("uint16")],JA.prototype,"numberSubtables",2),JA=Bn([Gt("cmap")],JA);class wd extends cn{_parseContours(t){const e=[];let A=[];for(let i=0;i<t.length;i+=1){const s=t[i];A.push(s),s.lastPointOfContour&&(e.push(A),A=[])}return Fi(A.length===0,"There are still points left in the current contour."),e}_transformPoints(t,e){const A=[];for(let i=0;i<t.length;i+=1){const s=t[i],n={x:e.xScale*s.x+e.scale10*s.y+e.dx,y:e.scale01*s.x+e.yScale*s.y+e.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};A.push(n)}return A}_parseGlyphCoordinate(t,e,A,i,s){let n;return(e&i)>0?(n=t.view.readUint8(),(e&s)===0&&(n=-n),n=A+n):(e&s)>0?n=A:n=A+t.view.readInt16(),n}parse(t,e,A){t.view.seek(e);const i=this.numberOfContours=t.view.readInt16();if(this.xMin=t.view.readInt16(),this.yMin=t.view.readInt16(),this.xMax=t.view.readInt16(),this.yMax=t.view.readInt16(),i>0){const o=this.endPointIndices=[];for(let B=0;B<i;B++)o.push(t.view.readUint16());const a=this.instructionLength=t.view.readUint16();Fi(a<5e3,`Bad instructionLength:${a}`);const l=this.instructions=[];for(let B=0;B<a;++B)l.push(t.view.readUint8());const c=t.view.byteOffset,h=o[o.length-1]+1;Fi(h<2e4,`Bad numberOfCoordinates:${c}`);const u=[];let d,f=0;for(;f<h;)if(d=t.view.readUint8(),u.push(d),f++,d&8&&f<h){const B=t.view.readUint8();for(let p=0;p<B;p++)u.push(d),f++}if(Fi(u.length===h,`Bad flags length: ${u.length}, numberOfCoordinates: ${h}`),o.length>0){const B=[];let p;if(h>0){for(let w=0;w<h;w+=1)d=u[w],p={},p.onCurve=!!(d&1),p.lastPointOfContour=o.includes(w),B.push(p);let S=0;for(let w=0;w<h;w+=1)d=u[w],p=B[w],p.x=this._parseGlyphCoordinate(t,d,S,2,16),S=p.x;let R=0;for(let w=0;w<h;w+=1)d=u[w],p=B[w],p.y=this._parseGlyphCoordinate(t,d,R,4,32),R=p.y}this.points=B}else this.points=[]}else if(i===0)this.points=[];else{this.isComposite=!0,this.points=[],this.components=[];let o,a=!0;for(;a;){o=t.view.readUint16();const l={glyphIndex:t.view.readUint16(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(o&1)>0?(o&2)>0?(l.dx=t.view.readInt16(),l.dy=t.view.readInt16()):l.matchedPoints=[t.view.readUint16(),t.view.readUint16()]:(o&2)>0?(l.dx=t.view.readInt8(),l.dy=t.view.readInt8()):l.matchedPoints=[t.view.readUint8(),t.view.readUint8()],(o&8)>0?l.xScale=l.yScale=t.view.readInt16()/16384:(o&64)>0?(l.xScale=t.view.readInt16()/16384,l.yScale=t.view.readInt16()/16384):(o&128)>0&&(l.xScale=t.view.readInt16()/16384,l.scale01=t.view.readInt16()/16384,l.scale10=t.view.readInt16()/16384,l.yScale=t.view.readInt16()/16384),this.components.push(l),a=!!(o&32)}if(o&256){this.instructionLength=t.view.readUint16(),this.instructions=[];for(let l=0;l<this.instructionLength;l+=1)this.instructions.push(t.view.readUint8())}}if(this.isComposite)for(let o=0;o<this.components.length;o+=1){const a=this.components[o],l=A.get(a.glyphIndex);if(l.getPathCommands(),l.points){let c;if(a.matchedPoints===void 0)c=this._transformPoints(l.points,a);else{Fi(a.matchedPoints[0]>this.points.length-1||a.matchedPoints[1]>l.points.length-1,`Matched points out of range in ${this.name}`);const h=this.points[a.matchedPoints[0]];let u=l.points[a.matchedPoints[1]];const d={xScale:a.xScale,scale01:a.scale01,scale10:a.scale10,yScale:a.yScale,dx:0,dy:0};u=this._transformPoints([u],d)[0],d.dx=h.x-u.x,d.dy=h.y-u.y,c=this._transformPoints(l.points,d)}this.points=this.points.concat(c)}}const s=[],n=this._parseContours(this.points);for(let o=0,a=n.length;o<a;++o){const l=n[o];let c=l[l.length-1],h=l[0];c.onCurve?s.push({type:"M",x:c.x,y:c.y}):h.onCurve?s.push({type:"M",x:h.x,y:h.y}):s.push({type:"M",x:(c.x+h.x)*.5,y:(c.y+h.y)*.5});for(let u=0,d=l.length;u<d;++u)if(c=h,h=l[(u+1)%d],c.onCurve)s.push({type:"L",x:c.x,y:c.y});else{let f=h;h.onCurve||(f={x:(c.x+h.x)*.5,y:(c.y+h.y)*.5}),s.push({type:"Q",x1:c.x,y1:c.y,x:f.x,y:f.y})}s.push({type:"Z"})}this.pathCommands=s}}class vd extends hn{get length(){return this._sfnt.loca.locations.length}_get(t){const e=this._sfnt.loca.locations,A=e[t],i=new wd({index:t});return A!==e[t+1]&&i.parse(this._sfnt.glyf,A,this),i}}var _d=Object.getOwnPropertyDescriptor,bd=(r,t,e,A)=>{for(var i=A>1?void 0:A?_d(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Sr=class extends Xt{static from(r){const t=r.reduce((A,i)=>A+i.byteLength,0),e=new Sr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeBytes(A)}),e}_glyphs;get glyphs(){return this._glyphs??=new vd(this._sfnt)}};Sr=bd([Gt("glyf")],Sr);var Dd=Object.getOwnPropertyDescriptor,xd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Dd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Cn=class extends Xt{};Cn=xd([Gt("GPOS","gpos")],Cn);var Sd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,DA=(r,t,e,A)=>{for(var i=A>1?void 0:A?Md(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Sd(t,e,i),i};let qe=class extends Xt{};DA([y("uint16")],qe.prototype,"majorVersion",2),DA([y("uint16")],qe.prototype,"minorVersion",2),DA([y("uint16")],qe.prototype,"scriptListOffset",2),DA([y("uint16")],qe.prototype,"featureListOffset",2),DA([y("uint16")],qe.prototype,"lookupListOffset",2),DA([y("uint16")],qe.prototype,"featureVariationsOffset",2),qe=DA([Gt("GSUB","gsub")],qe);var Rd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,Pt=(r,t,e,A)=>{for(var i=A>1?void 0:A?kd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Rd(t,e,i),i};let xt=class extends Xt{constructor(r=new ArrayBuffer(54),t){super(r,t,Math.min(54,r.byteLength-(t??0)))}};Pt([y("fixed")],xt.prototype,"version",2),Pt([y("fixed")],xt.prototype,"fontRevision",2),Pt([y("uint32")],xt.prototype,"checkSumAdjustment",2),Pt([y("uint32")],xt.prototype,"magickNumber",2),Pt([y("uint16")],xt.prototype,"flags",2),Pt([y("uint16")],xt.prototype,"unitsPerEm",2),Pt([y({type:"longDateTime"})],xt.prototype,"created",2),Pt([y({type:"longDateTime"})],xt.prototype,"modified",2),Pt([y("int16")],xt.prototype,"xMin",2),Pt([y("int16")],xt.prototype,"yMin",2),Pt([y("int16")],xt.prototype,"xMax",2),Pt([y("int16")],xt.prototype,"yMax",2),Pt([y("uint16")],xt.prototype,"macStyle",2),Pt([y("uint16")],xt.prototype,"lowestRecPPEM",2),Pt([y("int16")],xt.prototype,"fontDirectionHint",2),Pt([y("int16")],xt.prototype,"indexToLocFormat",2),Pt([y("int16")],xt.prototype,"glyphDataFormat",2),xt=Pt([Gt("head")],xt);var Pd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,ee=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ud(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Pd(t,e,i),i};let Ot=class extends Xt{constructor(r=new ArrayBuffer(36),t){super(r,t,Math.min(36,r.byteLength-(t??0)))}};ee([y("fixed")],Ot.prototype,"version",2),ee([y("int16")],Ot.prototype,"ascent",2),ee([y("int16")],Ot.prototype,"descent",2),ee([y("int16")],Ot.prototype,"lineGap",2),ee([y("uint16")],Ot.prototype,"advanceWidthMax",2),ee([y("int16")],Ot.prototype,"minLeftSideBearing",2),ee([y("int16")],Ot.prototype,"minRightSideBearing",2),ee([y("int16")],Ot.prototype,"xMaxExtent",2),ee([y("int16")],Ot.prototype,"caretSlopeRise",2),ee([y("int16")],Ot.prototype,"caretSlopeRun",2),ee([y("int16")],Ot.prototype,"caretOffset",2),ee([y({type:"int16",size:4})],Ot.prototype,"reserved",2),ee([y("int16")],Ot.prototype,"metricDataFormat",2),ee([y("uint16")],Ot.prototype,"numOfLongHorMetrics",2),Ot=ee([Gt("hhea")],Ot);var Nd=Object.getOwnPropertyDescriptor,Fd=(r,t,e,A)=>{for(var i=A>1?void 0:A?Nd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Mr=class extends Xt{static from(r){const t=r.length*4,e=new Mr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeUint16(A.advanceWidth),e.view.writeUint16(A.leftSideBearing)}),e}_metrics;get metrics(){return this._metrics??=this.readMetrics()}readMetrics(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.hhea.numOfLongHorMetrics;let e=0;const A=this.view;return A.seek(0),Array.from({length:r}).map((i,s)=>(s<t&&(e=A.readUint16()),{advanceWidth:e,leftSideBearing:A.readUint16()}))}};Mr=Fd([Gt("hmtx")],Mr);var Td=Object.getOwnPropertyDescriptor,Ld=(r,t,e,A)=>{for(var i=A>1?void 0:A?Td(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Qn=class extends Xt{};Qn=Ld([Gt("kern","kern")],Qn);var Gd=Object.getOwnPropertyDescriptor,Od=(r,t,e,A)=>{for(var i=A>1?void 0:A?Gd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Rr=class extends Xt{static from(r,t=1){const e=r.length*(t?4:2),A=new Rr(new ArrayBuffer(e));return r.forEach(i=>{t?A.view.writeUint32(i):A.view.writeUint16(i/2)}),A}_locations;get locations(){return this._locations??=this.readLocations()}readLocations(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.head.indexToLocFormat,e=this.view;return e.seek(0),Array.from({length:r}).map(()=>t?e.readUint32():e.readUint16()*2)}};Rr=Od([Gt("loca")],Rr);var Hd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,jt=(r,t,e,A)=>{for(var i=A>1?void 0:A?Jd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Hd(t,e,i),i};let Ut=class extends Xt{constructor(r=new ArrayBuffer(32),t){super(r,t,Math.min(32,r.byteLength-(t??0)))}};jt([y("fixed")],Ut.prototype,"version",2),jt([y("uint16")],Ut.prototype,"numGlyphs",2),jt([y("uint16")],Ut.prototype,"maxPoints",2),jt([y("uint16")],Ut.prototype,"maxContours",2),jt([y("uint16")],Ut.prototype,"maxComponentPoints",2),jt([y("uint16")],Ut.prototype,"maxComponentContours",2),jt([y("uint16")],Ut.prototype,"maxZones",2),jt([y("uint16")],Ut.prototype,"maxTwilightPoints",2),jt([y("uint16")],Ut.prototype,"maxStorage",2),jt([y("uint16")],Ut.prototype,"maxFunctionDefs",2),jt([y("uint16")],Ut.prototype,"maxInstructionDefs",2),jt([y("uint16")],Ut.prototype,"maxStackElements",2),jt([y("uint16")],Ut.prototype,"maxSizeOfInstructions",2),jt([y("uint16")],Ut.prototype,"maxComponentElements",2),jt([y("uint16")],Ut.prototype,"maxComponentDepth",2),Ut=jt([Gt("maxp")],Ut);var Kd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,kr=(r,t,e,A)=>{for(var i=A>1?void 0:A?Yd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Kd(t,e,i),i};const _l={0:"copyright",1:"fontFamily",2:"fontSubFamily",3:"uniqueSubFamily",4:"fullName",5:"version",6:"postScriptName",7:"tradeMark",8:"manufacturer",9:"designer",10:"description",11:"urlOfFontVendor",12:"urlOfFontDesigner",13:"licence",14:"urlOfLicence",16:"preferredFamily",17:"preferredSubFamily",18:"compatibleFull",19:"sampleText"},yn={Macintosh:1,Microsoft:3},Vd={Default:0},bl={UCS2:1};let KA=class extends Xt{_names;get names(){return this._names??=this.readNames()}readNames(){const r=this.count;this.view.seek(6);const t=[];for(let o=0;o<r;++o)t.push({platform:this.view.readUint16(),encoding:this.view.readUint16(),language:this.view.readUint16(),nameId:this.view.readUint16(),length:this.view.readUint16(),offset:this.view.readUint16()});const e=this.stringOffset;for(let o=0;o<r;++o){const a=t[o];a.name=this.view.readBytes(e+a.offset,a.length)}let A=yn.Macintosh,i=Vd.Default,s=0;t.some(o=>o.platform===yn.Microsoft&&o.encoding===bl.UCS2&&o.language===1033)&&(A=yn.Microsoft,i=bl.UCS2,s=1033);const n={};for(let o=0;o<r;++o){const a=t[o];a.platform===A&&a.encoding===i&&a.language===s&&_l[a.nameId]&&(n[_l[a.nameId]]=s===0?$f(a.name):td(a.name))}return n}};kr([y("uint16")],KA.prototype,"format",2),kr([y("uint16")],KA.prototype,"count",2),kr([y("uint16")],KA.prototype,"stringOffset",2),KA=kr([Gt("name")],KA);var zd=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,at=(r,t,e,A)=>{for(var i=A>1?void 0:A?Wd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&zd(t,e,i),i};let ot=class extends Xt{get fontPANOSE(){return[this.bFamilyType,this.bSerifStyle,this.bWeight,this.bProportion,this.bContrast,this.bStrokeVariation,this.bArmStyle,this.bLetterform,this.bMidline,this.bXHeight]}};at([y("uint16")],ot.prototype,"version",2),at([y("int16")],ot.prototype,"xAvgCharWidth",2),at([y("uint16")],ot.prototype,"usWeightClass",2),at([y("uint16")],ot.prototype,"usWidthClass",2),at([y("uint16")],ot.prototype,"fsType",2),at([y("uint16")],ot.prototype,"ySubscriptXSize",2),at([y("uint16")],ot.prototype,"ySubscriptYSize",2),at([y("uint16")],ot.prototype,"ySubscriptXOffset",2),at([y("uint16")],ot.prototype,"ySubscriptYOffset",2),at([y("uint16")],ot.prototype,"ySuperscriptXSize",2),at([y("uint16")],ot.prototype,"ySuperscriptYSize",2),at([y("uint16")],ot.prototype,"ySuperscriptXOffset",2),at([y("uint16")],ot.prototype,"ySuperscriptYOffset",2),at([y("uint16")],ot.prototype,"yStrikeoutSize",2),at([y("uint16")],ot.prototype,"yStrikeoutPosition",2),at([y("uint16")],ot.prototype,"sFamilyClass",2),at([y({type:"uint8"})],ot.prototype,"bFamilyType",2),at([y({type:"uint8"})],ot.prototype,"bSerifStyle",2),at([y({type:"uint8"})],ot.prototype,"bWeight",2),at([y({type:"uint8"})],ot.prototype,"bProportion",2),at([y({type:"uint8"})],ot.prototype,"bContrast",2),at([y({type:"uint8"})],ot.prototype,"bStrokeVariation",2),at([y({type:"uint8"})],ot.prototype,"bArmStyle",2),at([y({type:"uint8"})],ot.prototype,"bLetterform",2),at([y({type:"uint8"})],ot.prototype,"bMidline",2),at([y({type:"uint8"})],ot.prototype,"bXHeight",2),at([y({type:"uint8",size:16})],ot.prototype,"ulUnicodeRange",2),at([y({type:"char",size:4})],ot.prototype,"achVendID",2),at([y("uint16")],ot.prototype,"fsSelection",2),at([y("uint16")],ot.prototype,"usFirstCharIndex",2),at([y("uint16")],ot.prototype,"usLastCharIndex",2),at([y("int16")],ot.prototype,"sTypoAscender",2),at([y("int16")],ot.prototype,"sTypoDescender",2),at([y("int16")],ot.prototype,"sTypoLineGap",2),at([y("uint16")],ot.prototype,"usWinAscent",2),at([y("uint16")],ot.prototype,"usWinDescent",2),at([y({offset:72,type:"uint8",size:8})],ot.prototype,"ulCodePageRange",2),at([y({offset:72,type:"int16"})],ot.prototype,"sxHeight",2),at([y("int16")],ot.prototype,"sCapHeight",2),at([y("uint16")],ot.prototype,"usDefaultChar",2),at([y("uint16")],ot.prototype,"usBreakChar",2),at([y("uint16")],ot.prototype,"usMaxContext",2),ot=at([Gt("OS/2","os2")],ot);var qd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,ke=(r,t,e,A)=>{for(var i=A>1?void 0:A?Xd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&qd(t,e,i),i};let Ie=class extends Xt{constructor(r=new ArrayBuffer(32),t,e){super(r,t,e)}};ke([y("fixed")],Ie.prototype,"format",2),ke([y("fixed")],Ie.prototype,"italicAngle",2),ke([y("int16")],Ie.prototype,"underlinePosition",2),ke([y("int16")],Ie.prototype,"underlineThickness",2),ke([y("uint32")],Ie.prototype,"isFixedPitch",2),ke([y("uint32")],Ie.prototype,"minMemType42",2),ke([y("uint32")],Ie.prototype,"maxMemType42",2),ke([y("uint32")],Ie.prototype,"minMemType1",2),ke([y("uint32")],Ie.prototype,"maxMemType1",2),Ie=ke([Gt("post")],Ie);var jd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,Ae=(r,t,e,A)=>{for(var i=A>1?void 0:A?Zd(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&jd(t,e,i),i};let Ht=class extends Xt{constructor(r=new ArrayBuffer(36),t){super(r,t,Math.min(36,r.byteLength-(t??0)))}};Ae([y("fixed")],Ht.prototype,"version",2),Ae([y("int16")],Ht.prototype,"vertTypoAscender",2),Ae([y("int16")],Ht.prototype,"vertTypoDescender",2),Ae([y("int16")],Ht.prototype,"vertTypoLineGap",2),Ae([y("int16")],Ht.prototype,"advanceHeightMax",2),Ae([y("int16")],Ht.prototype,"minTopSideBearing",2),Ae([y("int16")],Ht.prototype,"minBottomSideBearing",2),Ae([y("int16")],Ht.prototype,"yMaxExtent",2),Ae([y("int16")],Ht.prototype,"caretSlopeRise",2),Ae([y("int16")],Ht.prototype,"caretSlopeRun",2),Ae([y("int16")],Ht.prototype,"caretOffset",2),Ae([y({type:"int16",size:4})],Ht.prototype,"reserved",2),Ae([y("int16")],Ht.prototype,"metricDataFormat",2),Ae([y("int16")],Ht.prototype,"numOfLongVerMetrics",2),Ht=Ae([Gt("vhea")],Ht);var $d=Object.getOwnPropertyDescriptor,tI=(r,t,e,A)=>{for(var i=A>1?void 0:A?$d(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Pr=class extends Xt{static from(r){const t=r.length*4,e=new Pr(new ArrayBuffer(t));return r.forEach(A=>{e.view.writeUint16(A.advanceHeight),e.view.writeInt16(A.topSideBearing)}),e}_metrics;get metrics(){return this._metrics??=this.readMetrics()}readMetrics(){const r=this._sfnt.maxp.numGlyphs,t=this._sfnt.vhea?.numOfLongVerMetrics??0,e=this.view;e.seek(0);let A=0;return Array.from({length:r}).map((i,s)=>(s<t&&(A=e.readUint16()),{advanceHeight:A,topSideBearing:e.readUint8()}))}};Pr=tI([Gt("vmtx")],Pr);var eI=Object.defineProperty,Yi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&eI(t,e,i),i};class ye extends mr{format="TrueType";mimeType="font/ttf";_sfnt;get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static signature=new Set([65536,1953658213,1954115633]);static is(t){return typeof t=="number"?this.signature.has(t):this.signature.has(GA(t).getUint32(0))}static checksum(t){const e=GA(t);let A=e.byteLength;for(;A%4;)A++;let i=0;for(let s=0,n=A/4;s<n;s+=4)s*4<A-4&&(i+=e.getUint32(s*4,!1));return i&4294967295}static from(t){const e=h=>h+3&-4,A=t.tableViews.size,i=Array.from(t.tableViews.values()).reduce((h,u)=>h+e(u.byteLength),0),s=new this(new ArrayBuffer(12+A*16+i));s.scalerType=65536,s.numTables=A;const n=Math.log(2);s.searchRange=Math.floor(Math.log(A)/n)*16,s.entrySelector=Math.floor(s.searchRange/n),s.rangeShift=A*16-s.searchRange;let o=12+A*16,a=0;const l=s.getDirectories();t.tableViews.forEach((h,u)=>{const d=l[a++];d.tag=u,d.checkSum=this.checksum(h),d.offset=o,d.length=h.byteLength,s.view.writeBytes(h,o),o+=e(d.length)});const c=s.createSFNT().head;return c.checkSumAdjustment=0,c.checkSumAdjustment=2981146554-this.checksum(s.view),s}getDirectories(){let t=this.view.byteOffset+12;return Array.from({length:this.numTables},()=>{const e=new OA(this.view.buffer,t);return t+=e.view.byteLength,e})}createSFNT(){return new Re(this.getDirectories().reduce((t,e)=>(t[e.tag]=new DataView(this.view.buffer,this.view.byteOffset+e.offset,e.length),t),{}))}}Yi([y("uint32")],ye.prototype,"scalerType"),Yi([y("uint16")],ye.prototype,"numTables"),Yi([y("uint16")],ye.prototype,"searchRange"),Yi([y("uint16")],ye.prototype,"entrySelector"),Yi([y("uint16")],ye.prototype,"rangeShift");class mn extends ye{format="OpenType";mimeType="font/otf";static signature=new Set([1330926671]);static from(t){return super.from(t)}}var AI=Object.defineProperty,Vi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&AI(t,e,i),i};class xA extends he{constructor(t,e){super(t,e,20)}}Vi([y({type:"char",size:4})],xA.prototype,"tag"),Vi([y("uint32")],xA.prototype,"offset"),Vi([y("uint32")],xA.prototype,"compLength"),Vi([y("uint32")],xA.prototype,"origLength"),Vi([y("uint32")],xA.prototype,"origChecksum");var iI=Object.defineProperty,ge=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&iI(t,e,i),i};const ne=class Xn extends mr{format="WOFF";mimeType="font/woff";get subfontFormat(){return ye.is(this.flavor)?"TrueType":mn.is(this.flavor)?"OpenType":"Open"}_sfnt;get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static signature=new Set([2001684038]);static is(t){return typeof t=="number"?this.signature.has(t):this.signature.has(GA(t).getUint32(0))}static checkSum(t){const e=GA(t),A=e.byteLength,i=Math.floor(A/4);let s=0,n=0;for(;n<i;)s+=e.getUint32(4*n++,!1);let o=A-i*4;if(o){let a=i*4;for(;o>0;)s+=e.getUint8(a)<<o*8,a++,o--}return s%4294967296}static from(t,e=new ArrayBuffer(0)){const A=h=>h+3&-4,i=[];t.tableViews.forEach((h,u)=>{const d=GA(Vf(new Uint8Array(h.buffer,h.byteOffset,h.byteLength)));i.push({tag:u,view:d.byteLength<h.byteLength?d:h,rawView:h})});const s=i.length,n=i.reduce((h,u)=>h+A(u.view.byteLength),0),o=new Xn(new ArrayBuffer(44+20*s+n+e.byteLength));o.signature=2001684038,o.flavor=65536,o.length=o.view.byteLength,o.numTables=s,o.totalSFNTSize=12+16*s+i.reduce((h,u)=>h+A(u.rawView.byteLength),0);let a=44+s*20,l=0;const c=o.getDirectories();return i.forEach(h=>{const u=c[l++];u.tag=h.tag,u.offset=a,u.compLength=h.view.byteLength,u.origChecksum=Xn.checkSum(h.rawView),u.origLength=h.rawView.byteLength,o.view.writeBytes(h.view,a),a+=A(u.compLength)}),o.view.writeBytes(e),o}getDirectories(){let t=44;return Array.from({length:this.numTables},()=>{const e=new xA(this.view.buffer,t);return t+=e.view.byteLength,e})}createSFNT(){return new Re(this.getDirectories().reduce((t,e)=>{const A=e.tag,i=this.view.byteOffset+e.offset,s=e.compLength,n=e.origLength,o=i+s;return t[A]=s>=n?new DataView(this.view.buffer,i,s):new DataView(zf(new Uint8Array(this.view.buffer.slice(i,o))).buffer),t},{}))}};ge([y("uint32")],ne.prototype,"signature"),ge([y("uint32")],ne.prototype,"flavor"),ge([y("uint32")],ne.prototype,"length"),ge([y("uint16")],ne.prototype,"numTables"),ge([y("uint16")],ne.prototype,"reserved"),ge([y("uint32")],ne.prototype,"totalSFNTSize"),ge([y("uint16")],ne.prototype,"majorVersion"),ge([y("uint16")],ne.prototype,"minorVersion"),ge([y("uint32")],ne.prototype,"metaOffset"),ge([y("uint32")],ne.prototype,"metaLength"),ge([y("uint32")],ne.prototype,"metaOrigLength"),ge([y("uint32")],ne.prototype,"privOffset"),ge([y("uint32")],ne.prototype,"privLength");let Ur=ne;function Dl(r,t=!0){if(ye.is(r))return new ye(r);if(mn.is(r))return new mn(r);if(Ur.is(r))return new Ur(r);if(t)throw new Error("Failed to parseFont")}function xl(r,t=!0){const e=Dl(r,!1);if(e)return e;if(t)throw new Error("Failed to parseFont")}class Nr{static defaultRequestInit={cache:"force-cache"};fallbackFont;loading=new Map;loaded=new Map;familyToUrl=new Map;setFallbackFont(t){this.fallbackFont=t}async loadFallbackFont(t,e={}){this.fallbackFont=await this.load(t,e)}_createRequest(t,e){const A=new AbortController;return{url:t,when:fetch(t,{...Nr.defaultRequestInit,...e,signal:A.signal}).then(i=>i.arrayBuffer()),cancel:()=>A.abort()}}injectFontFace(t,e){return document.fonts.add(new FontFace(t,e)),this}injectStyleTag(t,e){const A=document.createElement("style");return A.appendChild(document.createTextNode(`@font-face {
|
|
859
859
|
font-family: "${t}";
|
|
860
860
|
src: url(${e});
|
|
861
|
-
}`)),document.head.appendChild(A),this}_parseUrls(t){const e=Array.from(new Set([...t.split(","),t]));return Array.from(new Set(e.map(A=>this.familyToUrl.get(A.trim())??this.familyToUrl.get(A)??A)))}get(t){let e;return t&&(e=this._parseUrls(t).reduce((i,s)=>i||this.loaded.get(s),void 0)),e??this.fallbackFont}set(t,e){return this.familyToUrl.set(t,e.src),this.loaded.set(e.src,e),this}delete(t){return this._parseUrls(t).forEach(e=>{this.familyToUrl.delete(e),this.loaded.delete(e)}),this}clear(){return this.familyToUrl.clear(),this.loading.clear(),this.loaded.clear(),this}async load(t,e={}){const{cancelOther:A,injectFontFace:i=!0,injectStyleTag:s=!0,...n}=e;let o,a;if(typeof t=="string"?o=t:{src:o,family:a}=t,this.loaded.has(o))return A&&(this.loading.forEach(f=>f.cancel()),this.loading.clear()),c(this.loaded.get(o));let l=this.loading.get(o);return l||(l=this._createRequest(o,n),this.loading.set(o,l)),A&&this.loading.forEach((f,d)=>{f!==l&&(f.cancel(),this.loading.delete(d))}),l.when.then(f=>{if(this.loaded.has(o))return c(this.loaded.get(o));{const d=g(f);return e.noAdd||this.loaded.set(o,d),d.familySet.forEach(B=>{this.familyToUrl.set(B,o),typeof document<"u"&&(i&&this.injectFontFace(B,f),s&&this.injectStyleTag(B,o))}),d}}).catch(f=>{if(f instanceof DOMException&&f.message==="The user aborted a request.")return g();throw f}).finally(()=>{this.loading.delete(o)});function u(){return a?Array.isArray(a)?a:[a]:[]}function c(f){return u().forEach(d=>{f.familySet.add(d)}),f}function g(f=new ArrayBuffer(0)){let d;function B(){return d||(d=f.byteLength?Ml(f,!1):void 0),d}function I(){const F=B();if(F instanceof ye||F instanceof Tr)return F.sfnt}return{src:o,family:a,buffer:f,familySet:new Set(u()),getFont:B,getSFNT:I}}}async waitUntilLoad(){await Promise.all(Array.from(this.loading.values()).map(t=>t.when))}}const Rl=new Lr,aI=Object.freeze(Object.defineProperty({__proto__:null,BaseFont:vr,get Cff(){return wA},get Cmap(){return YA},CmapSubtableFormat0:In,CmapSubtableFormat12:Cn,CmapSubtableFormat14:zi,CmapSubtableFormat2:Ki,CmapSubtableFormat4:Bn,CmapSubtableFormat6:_A,FontDataObject:ce,FontDataView:Rt,Fonts:Lr,get Glyf(){return Rr},Glyph:gn,GlyphSet:fn,get Gpos(){return Dn},get Gsub(){return qe},get Head(){return xt},get Hhea(){return Ot},get Hmtx(){return Pr},get Kern(){return mn},get Loca(){return kr},get Maxp(){return kt},get Name(){return VA},get Os2(){return ot},get Post(){return Ie},SFNT:Me,TTF:ye,TableDirectory:JA,get Vhea(){return Ht},get Vmtx(){return Nr},WOFF:Tr,WOFFTableDirectoryEntry:xA,createCmapSegments:En,dataTypeToByteLength:Oi,defineColumn:m,defineSFNTTable:Gt,fonts:Rl,parseFont:Ml,parseSFNTFont:Sl},Symbol.toStringTag,{value:"Module"}));class lI{diff(t,e,A={}){let i;typeof A=="function"?(i=A,A={}):"callback"in A&&(i=A.callback);const s=this.castInput(t,A),n=this.castInput(e,A),o=this.removeEmpty(this.tokenize(s,A)),a=this.removeEmpty(this.tokenize(n,A));return this.diffWithOptionsObj(o,a,A,i)}diffWithOptionsObj(t,e,A,i){var s;const n=b=>{if(b=this.postProcess(b,A),i){setTimeout(function(){i(b)},0);return}else return b},o=e.length,a=t.length;let l=1,u=o+a;A.maxEditLength!=null&&(u=Math.min(u,A.maxEditLength));const c=(s=A.timeout)!==null&&s!==void 0?s:1/0,g=Date.now()+c,f=[{oldPos:-1,lastComponent:void 0}];let d=this.extractCommon(f[0],e,t,0,A);if(f[0].oldPos+1>=a&&d+1>=o)return n(this.buildValues(f[0].lastComponent,e,t));let B=-1/0,I=1/0;const F=()=>{for(let b=Math.max(B,-l);b<=Math.min(I,l);b+=2){let y;const _=f[b-1],Q=f[b+1];_&&(f[b-1]=void 0);let D=!1;if(Q){const M=Q.oldPos-b;D=Q&&0<=M&&M<o}const S=_&&_.oldPos+1<a;if(!D&&!S){f[b]=void 0;continue}if(!S||D&&_.oldPos<Q.oldPos?y=this.addToPath(Q,!0,!1,0,A):y=this.addToPath(_,!1,!0,1,A),d=this.extractCommon(y,e,t,b,A),y.oldPos+1>=a&&d+1>=o)return n(this.buildValues(y.lastComponent,e,t))||!0;f[b]=y,y.oldPos+1>=a&&(I=Math.min(I,b-1)),d+1>=o&&(B=Math.max(B,b+1))}l++};if(i)(function b(){setTimeout(function(){if(l>u||Date.now()>g)return i(void 0);F()||b()},0)})();else for(;l<=u&&Date.now()<=g;){const b=F();if(b)return b}}addToPath(t,e,A,i,s){const n=t.lastComponent;return n&&!s.oneChangePerToken&&n.added===e&&n.removed===A?{oldPos:t.oldPos+i,lastComponent:{count:n.count+1,added:e,removed:A,previousComponent:n.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:e,removed:A,previousComponent:n}}}extractCommon(t,e,A,i,s){const n=e.length,o=A.length;let a=t.oldPos,l=a-i,u=0;for(;l+1<n&&a+1<o&&this.equals(A[a+1],e[l+1],s);)l++,a++,u++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=a,l}equals(t,e,A){return A.comparator?A.comparator(t,e):t===e||!!A.ignoreCase&&t.toLowerCase()===e.toLowerCase()}removeEmpty(t){const e=[];for(let A=0;A<t.length;A++)t[A]&&e.push(t[A]);return e}castInput(t,e){return t}tokenize(t,e){return Array.from(t)}join(t){return t.join("")}postProcess(t,e){return t}get useLongestToken(){return!1}buildValues(t,e,A){const i=[];let s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();const n=i.length;let o=0,a=0,l=0;for(;o<n;o++){const u=i[o];if(u.removed)u.value=this.join(A.slice(l,l+u.count)),l+=u.count;else{if(!u.added&&this.useLongestToken){let c=e.slice(a,a+u.count);c=c.map(function(g,f){const d=A[l+f];return d.length>g.length?d:g}),u.value=this.join(c)}else u.value=this.join(e.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}return i}}class uI extends lI{}const cI=new uI;function hI(r,t,e){return cI.diff(r,t,e)}function _n(r,t,e){if(typeof t=="string"&&t.startsWith("linear-gradient")){const{x0:A,y0:i,x1:s,y1:n,stops:o}=gI(t,e.left,e.top,e.width,e.height),a=r.createLinearGradient(A,i,s,n);return o.forEach(l=>a.addColorStop(l.offset,l.color)),a}return t}function Gr(r,t,e){r?.color&&(r.color=_n(e,r.color,t)),r?.backgroundColor&&(r.backgroundColor=_n(e,r.backgroundColor,t)),r?.textStrokeColor&&(r.textStrokeColor=_n(e,r.textStrokeColor,t))}function gI(r,t,e,A,i){const s=r.match(/linear-gradient\((.+)\)$/)?.[1]??"",n=s.split(",")[0],o=n.includes("deg")?n:"0deg",a=s.replace(o,"").matchAll(/(#|rgba|rgb)(.+?) ([\d.]+%)/gi),u=(Number(o.replace("deg",""))||0)*Math.PI/180,c=A*Math.sin(u),g=i*Math.cos(u);return{x0:t+A/2-c,y0:e+i/2+g,x1:t+A/2+c,y1:e+i/2-g,stops:Array.from(a).map(f=>{let d=f[2];return d.startsWith("(")?d=d.split(",").length>3?`rgba${d}`:`rgb${d}`:d=`#${d}`,{offset:Number(f[3].replace("%",""))/100,color:d}})}}function zA(r){const{ctx:t,path:e,fontSize:A,clipRect:i}=r;t.save(),t.beginPath();const s=e.style,n={...s,fill:r.color??s.fill,stroke:r.textStrokeColor??s.stroke,strokeWidth:r.textStrokeWidth?r.textStrokeWidth*A:s.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",shadowOffsetX:(r.shadowOffsetX??0)*A,shadowOffsetY:(r.shadowOffsetY??0)*A,shadowBlur:(r.shadowBlur??0)*A,shadowColor:r.shadowColor};i&&(t.rect(i.left,i.top,i.width,i.height),t.clip(),t.beginPath()),e.drawTo(t,n),t.restore()}function fI(r,t,e){const{left:A,top:i,width:s,height:n}=e,o=r.canvas;o.dataset.viewBox=`${A} ${i} ${s} ${n}`,o.dataset.pixelRatio=String(t);const a=s,l=n;o.width=Math.max(1,Math.ceil(a*t)),o.height=Math.max(1,Math.ceil(l*t)),o.style.width=`${a}px`,o.style.height=`${l}px`,r.clearRect(0,0,o.width,o.height),r.scale(t,t),r.translate(-A,-i)}function dI(r,t){const{paragraphs:e,computedStyle:A,glyphBox:i}=t;Gr(A,i,r),e.forEach(s=>{Gr(s.computedStyle,s.lineBox,r),s.fragments.forEach(n=>{Gr(n.computedStyle,n.inlineBox,r)})})}const II=new Set(["©","®","÷"]),pI=new Set(["—","…","“","”","﹏","﹋","﹌","‘","’","˜"]),EI={1:"italic",32:"bold"},BI={1:"italic",2:"bold"},Pl={100:-.2,200:-.1,300:0,400:0,normal:0,500:.1,600:.2,700:.3,bold:.3,800:.4,900:.5};class CI{constructor(t,e,A){this.content=t,this.index=e,this.parent=A}path=new Mt;lineBox=new ut;inlineBox=new ut;glyphBox;advanceWidth=0;advanceHeight=0;underlinePosition=0;underlineThickness=0;strikeoutPosition=0;strikeoutSize=0;ascender=0;descender=0;typoAscender=0;typoDescender=0;typoLineGap=0;winAscent=0;winDescent=0;xHeight=0;capHeight=0;baseline=0;centerDiviation=0;fontStyle;get compatibleGlyphBox(){const t=this.computedStyle.fontSize*.8;return this.glyphBox??(this.isVertical?new ut(this.lineBox.left+this.lineBox.width/2-t/2,this.lineBox.top,t,this.lineBox.height):new ut(this.lineBox.left,this.lineBox.top+this.lineBox.height/2-t/2,this.lineBox.width,t))}get center(){return this.compatibleGlyphBox.center}get computedStyle(){return this.parent.computedStyle}get isVertical(){return this.computedStyle.writingMode.includes("vertical")}get fontSize(){return this.computedStyle.fontSize}get fontHeight(){return this.fontSize*this.computedStyle.lineHeight}_getFontSFNT(t){const e=this.computedStyle.fontFamily,A=t??Rl;return(e?A.get(e):A.fallbackFont)?.getSFNT()}updateGlyph(t=this._getFontSFNT()){if(!t)return this;const{hhea:e,os2:A,post:i,head:s}=t,n=s.unitsPerEm,o=e.ascent,a=e.descent,{content:l,computedStyle:u,isVertical:c}=this,{fontSize:g}=u,f=n/g,d=t.getAdvanceWidth(l,g),B=(o+Math.abs(a))/f,I=o/f;return this.advanceWidth=d,this.advanceHeight=B,this.inlineBox.width=c?B:d,this.inlineBox.height=c?d:B,this.underlinePosition=(o-i.underlinePosition)/f,this.underlineThickness=i.underlineThickness/f,this.strikeoutPosition=(o-A.yStrikeoutPosition)/f,this.strikeoutSize=A.yStrikeoutSize/f,this.ascender=o/f,this.descender=a/f,this.typoAscender=A.sTypoAscender/f,this.typoDescender=A.sTypoDescender/f,this.typoLineGap=A.sTypoLineGap/f,this.winAscent=A.usWinAscent/f,this.winDescent=A.usWinDescent/f,this.xHeight=A.sxHeight/f,this.capHeight=A.sCapHeight/f,this.baseline=I,this.centerDiviation=B/2-I,this.fontStyle=EI[A.fsSelection]??BI[s.macStyle],this}update(t){const e=this._getFontSFNT(t);if(!e)return this;this.updateGlyph(e);const{isVertical:A,content:i,computedStyle:s,baseline:n,inlineBox:o,ascender:a,descender:l,typoAscender:u,fontStyle:c,advanceWidth:g,advanceHeight:f}=this,{left:d,top:B}=o,I=s.fontStyle==="italic"&&c!=="italic";let F=d,b=B+n,y;const _=new Mt;if(A&&(F+=(f-g)/2,Math.abs(g-f)>.1&&(b-=(a-u)/(a+Math.abs(l))*f),y=void 0),A&&!II.has(i)&&(i.codePointAt(0)<=256||pI.has(i))){_.addCommands(e.getPathCommands(i,F,B+n-(f-g)/2,s.fontSize));const D={y:B-(f-g)/2+f/2,x:F+g/2};I&&this._italic(_,A?{x:D.x,y:B-(f-g)/2+n}:void 0),_.rotate(90,D)}else y!==void 0?(_.addCommands(e.glyphs.get(y).getPathCommands(F,b,s.fontSize)),I&&this._italic(_,A?{x:F+g/2,y:B+u/(a+Math.abs(l))*f}:void 0)):(_.addCommands(e.getPathCommands(i,F,b,s.fontSize)),I&&this._italic(_,A?{x:F+f/2,y:b}:void 0));const Q=s.fontWeight??400;return Q in Pl&&(Q===700||Q==="bold")&&c!=="bold"&&_.bold(Pl[Q]*s.fontSize*.05),_.style={fill:s.color,stroke:s.textStrokeWidth?s.textStrokeColor:"none",strokeWidth:s.textStrokeWidth?s.textStrokeWidth*s.fontSize*.03:0},this.path=_,this.glyphBox=this.getGlyphBoundingBox(),this}_italic(t,e){t.skew(-.24,0,e||{y:this.inlineBox.top+this.baseline,x:this.inlineBox.left+this.inlineBox.width/2})}getGlyphMinMax(t,e,A){if(this.path.curves[0]?.curves.length)return this.path.getMinMax(t,e,A)}getGlyphBoundingBox(t){const e=this.getGlyphMinMax(void 0,void 0,t);if(!e)return;const{min:A,max:i}=e;return new ut(A.x,A.y,i.x-A.x,i.y-A.y)}drawTo(t,e={}){const A=this.computedStyle,i={ctx:t,path:this.path,fontSize:A.fontSize,color:A.color,...e};if(this.glyphBox)zA(i);else{t.save(),t.beginPath();const s=this.path.style,n={...s,fill:i.color??s.fill,stroke:i.textStrokeColor??s.stroke,strokeWidth:i.textStrokeWidth?i.textStrokeWidth*i.fontSize:s.strokeWidth,shadowOffsetX:(i.shadowOffsetX??0)*i.fontSize,shadowOffsetY:(i.shadowOffsetY??0)*i.fontSize,shadowBlur:(i.shadowBlur??0)*i.fontSize,shadowColor:i.shadowColor};Gs(t,n),t.font=`${i.fontSize}px ${i.fontFamily}`,this.isVertical?(t.textBaseline="middle",t.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.inlineBox.height/2)):(t.textBaseline="alphabetic",t.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.baseline)),t.restore()}}}function kl(){const r=new Map;async function t(A){if(!r.has(A)){r.set(A,A);try{r.set(A,await fetch(A).then(i=>i.text()))}catch(i){console.warn(i),r.delete(A)}}}function e(A){return A.startsWith("http://")||A.startsWith("https://")||A.startsWith("blob://")}return{loaded:r,needsLoad:e,load:t}}function Ul(r){const t=new Map;function e(A){let i=t.get(A);if(!i){const s=Hs(r.needsLoad(A)?r.loaded.get(A)??A:A),n=Ks(s);i={dom:s,pathSet:n},t.set(A,i)}return i}return{parsed:t,parse:e}}function bn(r,t){return typeof r=="number"?r:r.endsWith("%")?(r=r.substring(0,r.length-1),Math.ceil(Number(r)/100*t.total)):r.endsWith("rem")?(r=r.substring(0,r.length-3),Number(r)*t.fontSize):r.endsWith("em")?(r=r.substring(0,r.length-2),Number(r)*t.fontSize):Number(r)}function xn(r){return lt(r)?{}:r}function QI(r,t){const e=Object.keys(r),A=Object.keys(t);return Array.from(new Set([...e,...A])).every(s=>WA(r[s],t[s]))}function WA(r,t){const e=typeof r;return e===typeof t?e==="object"?QI(r,t):r===t:!1}function Fn(r){if(!r)return r;const t={};for(const e in r)r[e]!==""&&r[e]!==void 0&&(t[e]=r[e]);return t}class yI{constructor(t,e={},A){this.content=t,this.style=e,this.parent=A,this.updateComputedStyle().initCharacters()}inlineBox=new ut;get computedContent(){const t=this.computedStyle;return t.textTransform==="uppercase"?this.content.toUpperCase():t.textTransform==="lowercase"?this.content.toLowerCase():this.content}updateComputedStyle(){return this.computedStyle={...this.parent.computedStyle,...Fn(this.style)},this}initCharacters(){const t=[];let e=0;for(const A of this.computedContent)t.push(new CI(A,e++,this));return this.characters=t,this}}class DI{constructor(t,e){this.style=t,this.parentStyle=e,this.updateComputedStyle()}lineBox=new ut;fragments=[];updateComputedStyle(){return this.computedStyle={...Fn(this.parentStyle),...Fn(this.style)},this}addFragment(t,e){const A=new yI(t,e,this);return this.fragments.push(A),A}}function RE(r){return r}class Or{static notZeroStyles=new Set(["width","height"]);static pxStyles=new Set(["width","height","fontSize","letterSpacing","textStrokeWidth","textIndent","shadowOffsetX","shadowOffsetY","shadowBlur","margin","marginLeft","marginTop","marginRight","marginBottom","padding","paddingLeft","paddingTop","paddingRight","paddingBottom"]);_toDOMStyle(t){const e={};for(const A in t){const i=t[A];Or.notZeroStyles.has(A)&&i===0||(typeof i=="number"&&Or.pxStyles.has(A)?e[A]=`${i}px`:e[A]=i)}return e}createDOM(t,e){const A=document.createElement("section"),i={...e},s=e.writingMode.includes("horizontal");switch(e.textAlign){case"start":case"left":i.justifyContent="flex-start";break;case"center":i.justifyContent="center";break;case"end":case"right":i.justifyContent="flex-end";break}switch(e.verticalAlign){case"top":i.alignItems="flex-start";break;case"middle":i.alignItems="center";break;case"bottom":i.alignItems="flex-end";break}const n=!!(i.justifyContent||i.alignItems);Object.assign(A.style,{...this._toDOMStyle({...i,boxSizing:i.boxSizing??"border-box",display:i.display??(n?"inline-flex":void 0),width:i.width??"max-content",height:i.height??"max-content"}),whiteSpace:"pre-wrap",wordBreak:"break-all"});const o=document.createElement("ul");return Object.assign(o.style,{verticalAlign:"inherit",listStyleType:"inherit",padding:"0",margin:"0",width:n&&s?"100%":void 0,height:n&&!s?"100%":void 0}),t.forEach(a=>{const l=document.createElement("li");Object.assign(l.style,{verticalAlign:"inherit",...this._toDOMStyle(a.style)}),a.fragments.forEach(u=>{const c=document.createElement("span");Object.assign(c.style,{verticalAlign:"inherit",...this._toDOMStyle(u.style)}),c.appendChild(document.createTextNode(u.content)),l.appendChild(c)}),o.appendChild(l)}),A.appendChild(o),A}measureDOMText(t){const e=document.createRange();e.selectNodeContents(t);const A=t.data??"";let i=0;return Array.from(A).map(s=>{const n=i+=A.substring(i).indexOf(s),o=n+s.length;i+=s.length,e.setStart(t,Math.max(n,0)),e.setEnd(t,o);const a=e.getClientRects?.()??[e.getBoundingClientRect()];let l=a[a.length-1];a.length>1&&l.width<2&&(l=a[a.length-2]);const u=e.toString();if(u!==""&&l&&l.width+l.height!==0)return{content:u,top:l.top,left:l.left,height:l.height,width:l.width}}).filter(Boolean)}measureDOM(t){const e=[],A=[],i=[];return t.querySelectorAll("li").forEach((s,n)=>{const o=s.getBoundingClientRect();e.push({paragraphIndex:n,left:o.left,top:o.top,width:o.width,height:o.height}),s.querySelectorAll(":scope > *").forEach((a,l)=>{const u=a.getBoundingClientRect();A.push({paragraphIndex:n,fragmentIndex:l,left:u.left,top:u.top,width:u.width,height:u.height});let c=0;!a.children.length&&a.firstChild instanceof window.Text?this.measureDOMText(a.firstChild).forEach(g=>{i.push({...g,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:c++,textWidth:-1,textHeight:-1})}):a.querySelectorAll(":scope > *").forEach(g=>{g.firstChild instanceof window.Text&&this.measureDOMText(g.firstChild).forEach(f=>{i.push({...f,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:c++,textWidth:-1,textHeight:-1})})})})}),{paragraphs:e,fragments:A,characters:i}}measureParagraphDOM(t,e){const A=e.getBoundingClientRect(),i=this.measureDOM(e);i.paragraphs.forEach(o=>{const a=t[o.paragraphIndex];a.lineBox.left=o.left-A.left,a.lineBox.top=o.top-A.top,a.lineBox.width=o.width,a.lineBox.height=o.height}),i.fragments.forEach(o=>{const a=t[o.paragraphIndex].fragments[o.fragmentIndex];a.inlineBox.left=o.left-A.left,a.inlineBox.top=o.top-A.top,a.inlineBox.width=o.width,a.inlineBox.height=o.height});const s=[];let n=0;return i.characters.forEach(o=>{const{paragraphIndex:a,fragmentIndex:l,characterIndex:u}=o;s.push({...o,newParagraphIndex:a,left:o.left-A.left,top:o.top-A.top});const c=t[a].fragments[l].characters[u],{fontHeight:g,isVertical:f}=c,d=s[n];c.inlineBox.left=d.left,c.inlineBox.top=d.top,c.inlineBox.width=d.width,c.inlineBox.height=d.height,f?(c.lineBox.left=d.left+(d.width-g)/2,c.lineBox.top=d.top,c.lineBox.width=g,c.lineBox.height=d.height):(c.lineBox.left=d.left,c.lineBox.top=d.top+(d.height-g)/2,c.lineBox.width=d.width,c.lineBox.height=g),n++}),{paragraphs:t,boundingBox:new ut(0,0,A.width,A.height)}}measure(t,e,A){let i;A||(A=this.createDOM(t,e),Object.assign(A.style,{position:"fixed",visibility:"hidden"}),document.body.appendChild(A),i=()=>A?.parentNode?.removeChild(A));const s=this.measureParagraphDOM(t,A);return i?.(),s}}function mI(){const r=new iA,t=kl(),e=Ul(t);return{name:"background",pathSet:r,load:async A=>{const{backgroundImage:i}=A.style;i&&t.needsLoad(i)&&await t.load(i)},update:A=>{r.paths.length=0;const{style:i,lineBox:s,isVertical:n}=A,{backgroundImage:o,backgroundSize:a,backgroundColormap:l}=i;if(lt(o))return;const{pathSet:u}=e.parse(o),c=u.getBoundingBox(!0);let g,f,d,B;n?{x:f,y:g,width:B,height:d}=s:{x:g,y:f,width:d,height:B}=s;const I=xn(l??"none"),F=u.paths.map(Q=>{const D=Q.clone();return D.style.fill&&D.style.fill in I&&(D.style.fill=I[D.style.fill]),D.style.stroke&&D.style.stroke in I&&(D.style.stroke=I[D.style.stroke]),D});let b,y;if(a==="rigid"){b=Math.max(A.fontSize*5/c.width),y=b;const Q=new O;Q.x=c.width-d/b,Q.y=c.height-B/y,F.forEach(D=>{D.applyTransform(S=>{const M=S.x>c.left+c.width/2,V=S.y>c.top+c.height/2;M&&(S.x-=Q.x),V&&(S.y-=Q.y)})})}else b=d/c.width,y=B/c.height;const _=new Lt;_.translate(-c.x,-c.y),_.scale(b,y),n&&(_.translate(-d/2,-B/2),_.rotate(-Math.PI/2),_.translate(B/2,d/2)),_.translate(g,f),F.forEach(Q=>{Q.applyTransform(D=>{D.applyMatrix3(_)})}),r.paths.push(...F)},renderOrder:-2,render:(A,i)=>{const{boundingBox:s,computedStyle:n}=i;lt(n.backgroundColor)||(A.fillStyle=n.backgroundColor,A.fillRect(...s.array)),r.paths.forEach(o=>{if(zA({ctx:A,path:o,fontSize:n.fontSize}),i.debug){const a=new iA([o]).getBoundingBox();a&&A.strokeRect(a.x,a.y,a.width,a.height)}}),i.paragraphs.forEach(o=>{const{lineBox:a,style:l}=o;lt(l.backgroundColor)||(A.fillStyle=l.backgroundColor,A.fillRect(...a.array)),o.fragments.forEach(u=>{const{inlineBox:c,style:g}=u;lt(g.backgroundColor)||(A.fillStyle=g.backgroundColor,A.fillRect(...c.array))})})}}}function Sn(r){const{highlight:t,highlightImage:e,highlightReferImage:A,highlightColormap:i,highlightLine:s,highlightSize:n,highlightThickness:o}=r;return{image:t?.image??e??"none",referImage:t?.referImage??A??"none",colormap:t?.colormap??i??"none",line:t?.line??s??"none",size:t?.size??n??"cover",thickness:t?.thickness??o??"100%"}}function wI(){const r=new iA,t=[],e=kl(),A=Ul(e);return{name:"highlight",pathSet:r,load:async i=>{const s=new Set;i.forEachCharacter(n=>{const{computedStyle:o}=n,{image:a,referImage:l}=Sn(o);a&&e.needsLoad(a)&&s.add(a),l&&e.needsLoad(l)&&s.add(l)}),await Promise.all(Array.from(s).map(n=>e.load(n)))},update:i=>{t.length=0,r.paths.length=0;let s=[],n,o;i.forEachCharacter(a=>{const{computedStyle:l}=a,u=Sn(l),{image:c,colormap:g,line:f,size:d,thickness:B}=u;if(lt(c))n?.length&&(n=[],s.push(n));else{const{inlineBox:I,isVertical:F}=a,{fontSize:b}=l;(!o||WA(o.image,c)&&WA(o.colormap,g)&&WA(o.line,f)&&WA(o.size,d)&&WA(o.thickness,B))&&n?.length&&(F?n[0].inlineBox.left===I.left:n[0].inlineBox.top===I.top)&&n[0].fontSize===b?n.push(a):(n=[],n.push(a),s.push(n))}o=u}),s=s.filter(a=>a.length);for(let a=0;a<s.length;a++){const l=s[a],u=l[0],c=ut.from(...l.map(T=>T.compatibleGlyphBox));if(!c.height||!c.width)continue;const{computedStyle:g,isVertical:f,inlineBox:d,compatibleGlyphBox:B,strikeoutPosition:I,underlinePosition:F}=u,{fontSize:b}=g,{image:y,referImage:_,colormap:Q,line:D,size:S,thickness:M}=Sn(g),V=bn(M,{fontSize:b,total:c.width})/c.width,et=xn(Q),{pathSet:z,dom:J}=A.parse(y),$=z.getBoundingBox(!0),K=b/$.width*2,L=new ut().copy(c);f&&(L.width=c.height,L.height=c.width,L.left=c.left+c.width);const it=Math.floor(L.width);let G=it;S!=="cover"&&(G=bn(S,{fontSize:b,total:c.width})||it,L.width=G);const W=!lt(_)&<(D);if(W)$.copy(A.parse(_).pathSet.getBoundingBox(!0));else{let T;if(lt(D))if($.width/$.height>4){T="underline";const tt=J.getAttribute("viewBox");if(tt){const[k,P,q,Z]=tt.split(" ").map(X=>Number(X)),nt=P+Z/2;$.y<nt&&$.y+$.height>nt?T="line-through":$.y+$.height<nt?T="overline":T="underline"}}else T="outline";else T=D;switch(T){case"outline":{const tt=L.width*.2,k=L.height*.2;f?(L.x-=k/2,L.y-=tt/2,L.x-=L.height):(L.x-=tt/2,L.y-=k/2),L.width+=tt,L.height+=k;break}case"overline":L.height=$.height*K,f?L.x=d.left+d.width:L.y=d.top;break;case"line-through":L.height=$.height*K,f?L.x=d.left+d.width-I+L.height/2:L.y=d.top+I-L.height/2;break;case"underline":L.height=$.height*K,f?L.x=B.left+B.width-F:L.y=d.top+F;break}}const At=new Lt;if(At.translate(-$.x,-$.y),At.scale(L.width/$.width,L.height/$.height),f){const T=L.width/2,tt=L.height/2;W||At.translate(-T,-tt),At.rotate(-Math.PI/2),W||At.translate(tt,T)}At.translate(L.x,L.y);for(let T=0;T<Math.ceil(it/G);T++){const tt=At.clone();f?tt.translate(0,T*L.width):tt.translate(T*L.width,0),z.paths.forEach(k=>{const P=k.clone().applyTransform(tt);P.style.strokeWidth&&(P.style.strokeWidth*=K*V),P.style.strokeMiterlimit&&(P.style.strokeMiterlimit*=K),P.style.strokeDashoffset&&(P.style.strokeDashoffset*=K),P.style.strokeDasharray&&(P.style.strokeDasharray=P.style.strokeDasharray.map(q=>q*K)),P.style.fill&&P.style.fill in et&&(P.style.fill=et[P.style.fill]),P.style.stroke&&P.style.stroke in et&&(P.style.stroke=et[P.style.stroke]),r.paths.push(P),it!==G&&(f?t[r.paths.length-1]=new ut(c.left-c.width*2,c.top,c.width*4,c.height):t[r.paths.length-1]=new ut(c.left,c.top-c.height*2,c.width,c.height*4))})}}},renderOrder:-1,getBoundingBox:()=>{const i=[];return r.paths.forEach((s,n)=>{const o=t[n];let a=s.getBoundingBox();if(o){const l=Math.max(a.x,o.x),u=Math.max(a.y,o.y),c=Math.min(a.right,o.right),g=Math.min(a.bottom,o.bottom);a=new ut(l,u,c-l,g-u)}i.push(a)}),ut.from(...i)},render:(i,s)=>{r.paths.forEach((n,o)=>{if(zA({ctx:i,path:n,fontSize:s.computedStyle.fontSize,clipRect:t[o]}),s.debug){const a=new iA([n]).getBoundingBox();a&&i.strokeRect(a.x,a.y,a.width,a.height)}})}}}function vI(r,t){return`<svg width="${r*2}" height="${r*2}" xmlns="http://www.w3.org/2000/svg">
|
|
861
|
+
}`)),document.head.appendChild(A),this}_parseUrls(t){const e=Array.from(new Set([...t.split(","),t]));return Array.from(new Set(e.map(A=>this.familyToUrl.get(A.trim())??this.familyToUrl.get(A)??A)))}get(t){let e;return t&&(e=this._parseUrls(t).reduce((i,s)=>i||this.loaded.get(s),void 0)),e??this.fallbackFont}set(t,e){return this.familyToUrl.set(t,e.src),this.loaded.set(e.src,e),this}delete(t){return this._parseUrls(t).forEach(e=>{this.familyToUrl.delete(e),this.loaded.delete(e)}),this}clear(){return this.familyToUrl.clear(),this.loading.clear(),this.loaded.clear(),this}async load(t,e={}){const{cancelOther:A,injectFontFace:i=!0,injectStyleTag:s=!0,...n}=e;let o,a;if(typeof t=="string"?o=t:{src:o,family:a}=t,this.loaded.has(o))return A&&(this.loading.forEach(d=>d.cancel()),this.loading.clear()),h(this.loaded.get(o));let l=this.loading.get(o);return l||(l=this._createRequest(o,n),this.loading.set(o,l)),A&&this.loading.forEach((d,f)=>{d!==l&&(d.cancel(),this.loading.delete(f))}),l.when.then(d=>{if(this.loaded.has(o))return h(this.loaded.get(o));{const f=u(d);return e.noAdd||this.loaded.set(o,f),f.familySet.forEach(B=>{this.familyToUrl.set(B,o),typeof document<"u"&&(i&&this.injectFontFace(B,d),s&&this.injectStyleTag(B,o))}),f}}).catch(d=>{if(d instanceof DOMException&&d.message==="The user aborted a request.")return u();throw d}).finally(()=>{this.loading.delete(o)});function c(){return a?Array.isArray(a)?a:[a]:[]}function h(d){return c().forEach(f=>{d.familySet.add(f)}),d}function u(d=new ArrayBuffer(0)){let f;function B(){return f||(f=d.byteLength?xl(d,!1):void 0),f}function p(){const S=B();if(S instanceof ye||S instanceof Ur)return S.sfnt}return{src:o,family:a,buffer:d,familySet:new Set(c()),getFont:B,getSFNT:p}}}async waitUntilLoad(){await Promise.all(Array.from(this.loading.values()).map(t=>t.when))}}const Sl=new Nr,rI=Object.freeze(Object.defineProperty({__proto__:null,BaseFont:mr,get Cff(){return vA},get Cmap(){return JA},CmapSubtableFormat0:un,CmapSubtableFormat12:pn,CmapSubtableFormat14:Ki,CmapSubtableFormat2:Oi,CmapSubtableFormat4:In,CmapSubtableFormat6:bA,FontDataObject:he,FontDataView:kt,Fonts:Nr,get Glyf(){return Sr},Glyph:cn,GlyphSet:hn,get Gpos(){return Cn},get Gsub(){return qe},get Head(){return xt},get Hhea(){return Ot},get Hmtx(){return Mr},get Kern(){return Qn},get Loca(){return Rr},get Maxp(){return Ut},get Name(){return KA},get Os2(){return ot},get Post(){return Ie},SFNT:Re,TTF:ye,TableDirectory:OA,get Vhea(){return Ht},get Vmtx(){return Pr},WOFF:Ur,WOFFTableDirectoryEntry:xA,createCmapSegments:dn,dataTypeToByteLength:Ti,defineColumn:y,defineSFNTTable:Gt,fonts:Sl,parseFont:xl,parseSFNTFont:Dl},Symbol.toStringTag,{value:"Module"}));function wn(r,t,e){if(typeof t=="string"&&t.startsWith("linear-gradient")){const{x0:A,y0:i,x1:s,y1:n,stops:o}=sI(t,e.left,e.top,e.width,e.height),a=r.createLinearGradient(A,i,s,n);return o.forEach(l=>a.addColorStop(l.offset,l.color)),a}return t}function Fr(r,t,e){r?.color&&(r.color=wn(e,r.color,t)),r?.backgroundColor&&(r.backgroundColor=wn(e,r.backgroundColor,t)),r?.textStrokeColor&&(r.textStrokeColor=wn(e,r.textStrokeColor,t))}function sI(r,t,e,A,i){const s=r.match(/linear-gradient\((.+)\)$/)?.[1]??"",n=s.split(",")[0],o=n.includes("deg")?n:"0deg",a=s.replace(o,"").matchAll(/(#|rgba|rgb)(.+?) ([\d.]+%)/gi),c=(Number(o.replace("deg",""))||0)*Math.PI/180,h=A*Math.sin(c),u=i*Math.cos(c);return{x0:t+A/2-h,y0:e+i/2+u,x1:t+A/2+h,y1:e+i/2-u,stops:Array.from(a).map(d=>{let f=d[2];return f.startsWith("(")?f=f.split(",").length>3?`rgba${f}`:`rgb${f}`:f=`#${f}`,{offset:Number(d[3].replace("%",""))/100,color:f}})}}function YA(r){const{ctx:t,path:e,fontSize:A,clipRect:i}=r;t.save(),t.beginPath();const s=e.style,n={...s,fill:r.color??s.fill,stroke:r.textStrokeColor??s.stroke,strokeWidth:r.textStrokeWidth?r.textStrokeWidth*A:s.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",shadowOffsetX:(r.shadowOffsetX??0)*A,shadowOffsetY:(r.shadowOffsetY??0)*A,shadowBlur:(r.shadowBlur??0)*A,shadowColor:r.shadowColor};i&&(t.rect(i.left,i.top,i.width,i.height),t.clip(),t.beginPath()),e.drawTo(t,n),t.restore()}function nI(r,t,e){const{left:A,top:i,width:s,height:n}=e,o=r.canvas;o.dataset.viewBox=`${A} ${i} ${s} ${n}`,o.dataset.pixelRatio=String(t);const a=s,l=n;o.width=Math.max(1,Math.ceil(a*t)),o.height=Math.max(1,Math.ceil(l*t)),o.style.width=`${a}px`,o.style.height=`${l}px`,r.clearRect(0,0,o.width,o.height),r.scale(t,t),r.translate(-A,-i)}function oI(r,t){const{paragraphs:e,computedStyle:A,glyphBox:i}=t;Fr(A,i,r),e.forEach(s=>{Fr(s.computedStyle,s.lineBox,r),s.fragments.forEach(n=>{Fr(n.computedStyle,n.inlineBox,r)})})}const aI=new Set(["©","®","÷"]),lI=new Set(["—","…","“","”","﹏","﹋","﹌","‘","’","˜"]),cI={1:"italic",32:"bold"},hI={1:"italic",2:"bold"},Ml={100:-.2,200:-.1,300:0,400:0,normal:0,500:.1,600:.2,700:.3,bold:.3,800:.4,900:.5};class gI{constructor(t,e,A){this.content=t,this.index=e,this.parent=A}path=new Rt;lineBox=new ct;inlineBox=new ct;glyphBox;advanceWidth=0;advanceHeight=0;underlinePosition=0;underlineThickness=0;strikeoutPosition=0;strikeoutSize=0;ascender=0;descender=0;typoAscender=0;typoDescender=0;typoLineGap=0;winAscent=0;winDescent=0;xHeight=0;capHeight=0;baseline=0;centerDiviation=0;fontStyle;get compatibleGlyphBox(){const t=this.computedStyle.fontSize*.8;return this.glyphBox??(this.isVertical?new ct(this.lineBox.left+this.lineBox.width/2-t/2,this.lineBox.top,t,this.lineBox.height):new ct(this.lineBox.left,this.lineBox.top+this.lineBox.height/2-t/2,this.lineBox.width,t))}get center(){return this.compatibleGlyphBox.center}get computedStyle(){return this.parent.computedStyle}get isVertical(){return this.computedStyle.writingMode.includes("vertical")}get fontSize(){return this.computedStyle.fontSize}get fontHeight(){return this.fontSize*this.computedStyle.lineHeight}_getFontSFNT(t){const e=this.computedStyle.fontFamily,A=t??Sl;return(e?A.get(e):A.fallbackFont)?.getSFNT()}updateGlyph(t=this._getFontSFNT()){if(!t)return this;const{hhea:e,os2:A,post:i,head:s}=t,n=s.unitsPerEm,o=e.ascent,a=e.descent,{content:l,computedStyle:c,isVertical:h}=this,{fontSize:u}=c,d=n/u,f=t.getAdvanceWidth(l,u),B=(o+Math.abs(a))/d,p=o/d;return this.advanceWidth=f,this.advanceHeight=B,this.inlineBox.width=h?B:f,this.inlineBox.height=h?f:B,this.underlinePosition=(o-i.underlinePosition)/d,this.underlineThickness=i.underlineThickness/d,this.strikeoutPosition=(o-A.yStrikeoutPosition)/d,this.strikeoutSize=A.yStrikeoutSize/d,this.ascender=o/d,this.descender=a/d,this.typoAscender=A.sTypoAscender/d,this.typoDescender=A.sTypoDescender/d,this.typoLineGap=A.sTypoLineGap/d,this.winAscent=A.usWinAscent/d,this.winDescent=A.usWinDescent/d,this.xHeight=A.sxHeight/d,this.capHeight=A.sCapHeight/d,this.baseline=p,this.centerDiviation=B/2-p,this.fontStyle=cI[A.fsSelection]??hI[s.macStyle],this}update(t){const e=this._getFontSFNT(t);if(!e)return this;this.updateGlyph(e);const{isVertical:A,content:i,computedStyle:s,baseline:n,inlineBox:o,ascender:a,descender:l,typoAscender:c,fontStyle:h,advanceWidth:u,advanceHeight:d}=this,{left:f,top:B}=o,p=s.fontStyle==="italic"&&h!=="italic";let S=f,R=B+n,w;const D=new Rt;if(A&&(S+=(d-u)/2,Math.abs(u-d)>.1&&(R-=(a-c)/(a+Math.abs(l))*d),w=void 0),A&&!aI.has(i)&&(i.codePointAt(0)<=256||lI.has(i))){D.addCommands(e.getPathCommands(i,S,B+n-(d-u)/2,s.fontSize));const m={y:B-(d-u)/2+d/2,x:S+u/2};p&&this._italic(D,A?{x:m.x,y:B-(d-u)/2+n}:void 0),D.rotate(90,m)}else w!==void 0?(D.addCommands(e.glyphs.get(w).getPathCommands(S,R,s.fontSize)),p&&this._italic(D,A?{x:S+u/2,y:B+c/(a+Math.abs(l))*d}:void 0)):(D.addCommands(e.getPathCommands(i,S,R,s.fontSize)),p&&this._italic(D,A?{x:S+d/2,y:R}:void 0));const Q=s.fontWeight??400;return Q in Ml&&(Q===700||Q==="bold")&&h!=="bold"&&D.bold(Ml[Q]*s.fontSize*.05),D.style={fill:s.color,fillRule:"nonzero",stroke:s.textStrokeWidth?s.textStrokeColor:"none",strokeWidth:s.textStrokeWidth?s.textStrokeWidth*s.fontSize*.03:0},this.path=D,this.glyphBox=this.getGlyphBoundingBox(),this}_italic(t,e){t.skew(-.24,0,e||{y:this.inlineBox.top+this.baseline,x:this.inlineBox.left+this.inlineBox.width/2})}getGlyphMinMax(t,e,A){if(this.path.curves[0]?.curves.length)return this.path.getMinMax(t,e,A)}getGlyphBoundingBox(t){const e=this.getGlyphMinMax(void 0,void 0,t);if(!e)return;const{min:A,max:i}=e;return new ct(A.x,A.y,i.x-A.x,i.y-A.y)}drawTo(t,e={}){const A=this.computedStyle,i={ctx:t,path:this.path,fontSize:A.fontSize,color:A.color,...e};if(this.glyphBox)YA(i);else{t.save(),t.beginPath();const s=this.path.style,n={...s,fill:i.color??s.fill,stroke:i.textStrokeColor??s.stroke,strokeWidth:i.textStrokeWidth?i.textStrokeWidth*i.fontSize:s.strokeWidth,shadowOffsetX:(i.shadowOffsetX??0)*i.fontSize,shadowOffsetY:(i.shadowOffsetY??0)*i.fontSize,shadowBlur:(i.shadowBlur??0)*i.fontSize,shadowColor:i.shadowColor};Fs(t,n),t.font=`${i.fontSize}px ${i.fontFamily}`,this.isVertical?(t.textBaseline="middle",t.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.inlineBox.height/2)):(t.textBaseline="alphabetic",t.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.baseline)),t.restore()}}}function Rl(){const r=new Map;async function t(A){if(!r.has(A)){r.set(A,A);try{r.set(A,await fetch(A).then(i=>i.text()))}catch(i){console.warn(i),r.delete(A)}}}function e(A){return A.startsWith("http://")||A.startsWith("https://")||A.startsWith("blob://")}return{loaded:r,needsLoad:e,load:t}}function kl(r){const t=new Map;function e(A){let i=t.get(A);if(!i){const s=Ls(r.needsLoad(A)?r.loaded.get(A)??A:A),n=Os(s);i={dom:s,pathSet:n},t.set(A,i)}return i}return{parsed:t,parse:e}}function vn(r,t){return typeof r=="number"?r:r.endsWith("%")?(r=r.substring(0,r.length-1),Math.ceil(Number(r)/100*t.total)):r.endsWith("rem")?(r=r.substring(0,r.length-3),Number(r)*t.fontSize):r.endsWith("em")?(r=r.substring(0,r.length-2),Number(r)*t.fontSize):Number(r)}function _n(r){return lt(r)?{}:r}function uI(r,t){const e=Object.keys(r),A=Object.keys(t);return Array.from(new Set([...e,...A])).every(s=>VA(r[s],t[s]))}function VA(r,t){const e=typeof r;return e===typeof t?e==="object"?uI(r,t):r===t:!1}function bn(r){if(!r)return r;const t={};for(const e in r)r[e]!==""&&r[e]!==void 0&&(t[e]=r[e]);return t}class fI{constructor(t,e={},A){this.content=t,this.style=e,this.parent=A,this.updateComputedStyle().initCharacters()}inlineBox=new ct;get computedContent(){const t=this.computedStyle;return t.textTransform==="uppercase"?this.content.toUpperCase():t.textTransform==="lowercase"?this.content.toLowerCase():this.content}updateComputedStyle(){return this.computedStyle={...this.parent.computedStyle,...bn(this.style)},this}initCharacters(){const t=[];let e=0;for(const A of this.computedContent)t.push(new gI(A,e++,this));return this.characters=t,this}}class dI{constructor(t,e){this.style=t,this.parentStyle=e,this.updateComputedStyle()}lineBox=new ct;fragments=[];updateComputedStyle(){return this.computedStyle={...bn(this.parentStyle),...bn(this.style)},this}addFragment(t,e){const A=new fI(t,e,this);return this.fragments.push(A),A}}function BE(r){return r}class Tr{static notZeroStyles=new Set(["width","height"]);static pxStyles=new Set(["width","height","fontSize","letterSpacing","textStrokeWidth","textIndent","shadowOffsetX","shadowOffsetY","shadowBlur","margin","marginLeft","marginTop","marginRight","marginBottom","padding","paddingLeft","paddingTop","paddingRight","paddingBottom"]);_toDOMStyle(t){const e={};for(const A in t){const i=t[A];Tr.notZeroStyles.has(A)&&i===0||(typeof i=="number"&&Tr.pxStyles.has(A)?e[A]=`${i}px`:e[A]=i)}return e}createDOM(t,e){const A=document.createElement("section"),i={...e},s=e.writingMode.includes("horizontal");switch(e.textAlign){case"start":case"left":i.justifyContent="flex-start";break;case"center":i.justifyContent="center";break;case"end":case"right":i.justifyContent="flex-end";break}switch(e.verticalAlign){case"top":i.alignItems="flex-start";break;case"middle":i.alignItems="center";break;case"bottom":i.alignItems="flex-end";break}const n=!!(i.justifyContent||i.alignItems);Object.assign(A.style,{...this._toDOMStyle({...i,boxSizing:i.boxSizing??"border-box",display:i.display??(n?"inline-flex":void 0),width:i.width??"max-content",height:i.height??"max-content"}),whiteSpace:"pre-wrap",wordBreak:"break-all"});const o=document.createElement("ul");return Object.assign(o.style,{verticalAlign:"inherit",listStyleType:"inherit",padding:"0",margin:"0",width:n&&s?"100%":void 0,height:n&&!s?"100%":void 0}),t.forEach(a=>{const l=document.createElement("li");Object.assign(l.style,{verticalAlign:"inherit",...this._toDOMStyle(a.style)}),a.fragments.forEach(c=>{const h=document.createElement("span");Object.assign(h.style,{verticalAlign:"inherit",...this._toDOMStyle(c.style)}),h.appendChild(document.createTextNode(c.content)),l.appendChild(h)}),o.appendChild(l)}),A.appendChild(o),A}measureDOMText(t){const e=document.createRange();e.selectNodeContents(t);const A=t.data??"";let i=0;return Array.from(A).map(s=>{const n=i+=A.substring(i).indexOf(s),o=n+s.length;i+=s.length,e.setStart(t,Math.max(n,0)),e.setEnd(t,o);const a=e.getClientRects?.()??[e.getBoundingClientRect()];let l=a[a.length-1];a.length>1&&l.width<2&&(l=a[a.length-2]);const c=e.toString();if(c!==""&&l&&l.width+l.height!==0)return{content:c,top:l.top,left:l.left,height:l.height,width:l.width}}).filter(Boolean)}measureDOM(t){const e=[],A=[],i=[];return t.querySelectorAll("li").forEach((s,n)=>{const o=s.getBoundingClientRect();e.push({paragraphIndex:n,left:o.left,top:o.top,width:o.width,height:o.height}),s.querySelectorAll(":scope > *").forEach((a,l)=>{const c=a.getBoundingClientRect();A.push({paragraphIndex:n,fragmentIndex:l,left:c.left,top:c.top,width:c.width,height:c.height});let h=0;!a.children.length&&a.firstChild instanceof window.Text?this.measureDOMText(a.firstChild).forEach(u=>{i.push({...u,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:h++,textWidth:-1,textHeight:-1})}):a.querySelectorAll(":scope > *").forEach(u=>{u.firstChild instanceof window.Text&&this.measureDOMText(u.firstChild).forEach(d=>{i.push({...d,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:h++,textWidth:-1,textHeight:-1})})})})}),{paragraphs:e,fragments:A,characters:i}}measureParagraphDOM(t,e){const A=e.getBoundingClientRect(),i=this.measureDOM(e);i.paragraphs.forEach(o=>{const a=t[o.paragraphIndex];a.lineBox.left=o.left-A.left,a.lineBox.top=o.top-A.top,a.lineBox.width=o.width,a.lineBox.height=o.height}),i.fragments.forEach(o=>{const a=t[o.paragraphIndex].fragments[o.fragmentIndex];a.inlineBox.left=o.left-A.left,a.inlineBox.top=o.top-A.top,a.inlineBox.width=o.width,a.inlineBox.height=o.height});const s=[];let n=0;return i.characters.forEach(o=>{const{paragraphIndex:a,fragmentIndex:l,characterIndex:c}=o;s.push({...o,newParagraphIndex:a,left:o.left-A.left,top:o.top-A.top});const h=t[a].fragments[l].characters[c],{fontHeight:u,isVertical:d}=h,f=s[n];h.inlineBox.left=f.left,h.inlineBox.top=f.top,h.inlineBox.width=f.width,h.inlineBox.height=f.height,d?(h.lineBox.left=f.left+(f.width-u)/2,h.lineBox.top=f.top,h.lineBox.width=u,h.lineBox.height=f.height):(h.lineBox.left=f.left,h.lineBox.top=f.top+(f.height-u)/2,h.lineBox.width=f.width,h.lineBox.height=u),n++}),{paragraphs:t,boundingBox:new ct(0,0,A.width,A.height)}}measure(t,e,A){let i;A||(A=this.createDOM(t,e),Object.assign(A.style,{position:"fixed",visibility:"hidden"}),document.body.appendChild(A),i=()=>A?.parentNode?.removeChild(A));const s=this.measureParagraphDOM(t,A);return i?.(),s}}function II(){const r=new ze,t=Rl(),e=kl(t);return{name:"background",pathSet:r,load:async A=>{const{backgroundImage:i}=A.style;i&&t.needsLoad(i)&&await t.load(i)},update:A=>{r.paths.length=0;const{style:i,lineBox:s,isVertical:n}=A,{backgroundImage:o,backgroundSize:a,backgroundColormap:l}=i;if(lt(o))return;const{pathSet:c}=e.parse(o),h=c.getBoundingBox(!0);let u,d,f,B;n?{x:d,y:u,width:B,height:f}=s:{x:u,y:d,width:f,height:B}=s;const p=_n(l??"none"),S=c.paths.map(Q=>{const m=Q.clone();return m.style.fill&&m.style.fill in p&&(m.style.fill=p[m.style.fill]),m.style.stroke&&m.style.stroke in p&&(m.style.stroke=p[m.style.stroke]),m});let R,w;if(a==="rigid"){R=Math.max(A.fontSize*5/h.width),w=R;const Q=new O;Q.x=h.width-f/R,Q.y=h.height-B/w,S.forEach(m=>{m.applyTransform(x=>{const M=x.x>h.left+h.width/2,V=x.y>h.top+h.height/2;M&&(x.x-=Q.x),V&&(x.y-=Q.y)})})}else R=f/h.width,w=B/h.height;const D=new Lt;D.translate(-h.x,-h.y),D.scale(R,w),n&&(D.translate(-f/2,-B/2),D.rotate(-Math.PI/2),D.translate(B/2,f/2)),D.translate(u,d),S.forEach(Q=>{Q.applyTransform(m=>{m.applyMatrix3(D)})}),r.paths.push(...S)},renderOrder:-2,render:(A,i)=>{const{boundingBox:s,computedStyle:n}=i;lt(n.backgroundColor)||(A.fillStyle=n.backgroundColor,A.fillRect(...s.array)),r.paths.forEach(o=>{if(YA({ctx:A,path:o,fontSize:n.fontSize}),i.debug){const a=new ze([o]).getBoundingBox();a&&A.strokeRect(a.x,a.y,a.width,a.height)}}),i.paragraphs.forEach(o=>{const{lineBox:a,style:l}=o;lt(l.backgroundColor)||(A.fillStyle=l.backgroundColor,A.fillRect(...a.array)),o.fragments.forEach(c=>{const{inlineBox:h,style:u}=c;lt(u.backgroundColor)||(A.fillStyle=u.backgroundColor,A.fillRect(...h.array))})})}}}function Dn(r){const{highlight:t,highlightImage:e,highlightReferImage:A,highlightColormap:i,highlightLine:s,highlightSize:n,highlightThickness:o}=r;return{image:t?.image??e??"none",referImage:t?.referImage??A??"none",colormap:t?.colormap??i??"none",line:t?.line??s??"none",size:t?.size??n??"cover",thickness:t?.thickness??o??"100%"}}function pI(){const r=new ze,t=[],e=Rl(),A=kl(e);return{name:"highlight",pathSet:r,load:async i=>{const s=new Set;i.forEachCharacter(n=>{const{computedStyle:o}=n,{image:a,referImage:l}=Dn(o);a&&e.needsLoad(a)&&s.add(a),l&&e.needsLoad(l)&&s.add(l)}),await Promise.all(Array.from(s).map(n=>e.load(n)))},update:i=>{t.length=0,r.paths.length=0;let s=[],n,o;i.forEachCharacter(a=>{const{computedStyle:l}=a,c=Dn(l),{image:h,colormap:u,line:d,size:f,thickness:B}=c;if(lt(h))n?.length&&(n=[],s.push(n));else{const{inlineBox:p,isVertical:S}=a,{fontSize:R}=l;(!o||VA(o.image,h)&&VA(o.colormap,u)&&VA(o.line,d)&&VA(o.size,f)&&VA(o.thickness,B))&&n?.length&&(S?n[0].inlineBox.left===p.left:n[0].inlineBox.top===p.top)&&n[0].fontSize===R?n.push(a):(n=[],n.push(a),s.push(n))}o=c}),s=s.filter(a=>a.length);for(let a=0;a<s.length;a++){const l=s[a],c=l[0],h=ct.from(...l.map(T=>T.compatibleGlyphBox));if(!h.height||!h.width)continue;const{computedStyle:u,isVertical:d,inlineBox:f,compatibleGlyphBox:B,strikeoutPosition:p,underlinePosition:S}=c,{fontSize:R}=u,{image:w,referImage:D,colormap:Q,line:m,size:x,thickness:M}=Dn(u),V=vn(M,{fontSize:R,total:h.width})/h.width,et=_n(Q),{pathSet:z,dom:J}=A.parse(w),$=z.getBoundingBox(!0),K=R/$.width*2,L=new ct().copy(h);d&&(L.width=h.height,L.height=h.width,L.left=h.left+h.width);const it=Math.floor(L.width);let G=it;x!=="cover"&&(G=vn(x,{fontSize:R,total:h.width})||it,L.width=G);const W=!lt(D)&<(m);if(W)$.copy(A.parse(D).pathSet.getBoundingBox(!0));else{let T;if(lt(m))if($.width/$.height>4){T="underline";const tt=J.getAttribute("viewBox");if(tt){const[U,P,q,Z]=tt.split(" ").map(X=>Number(X)),nt=P+Z/2;$.y<nt&&$.y+$.height>nt?T="line-through":$.y+$.height<nt?T="overline":T="underline"}}else T="outline";else T=m;switch(T){case"outline":{const tt=L.width*.2,U=L.height*.2;d?(L.x-=U/2,L.y-=tt/2,L.x-=L.height):(L.x-=tt/2,L.y-=U/2),L.width+=tt,L.height+=U;break}case"overline":L.height=$.height*K,d?L.x=f.left+f.width:L.y=f.top;break;case"line-through":L.height=$.height*K,d?L.x=f.left+f.width-p+L.height/2:L.y=f.top+p-L.height/2;break;case"underline":L.height=$.height*K,d?L.x=B.left+B.width-S:L.y=f.top+S;break}}const At=new Lt;if(At.translate(-$.x,-$.y),At.scale(L.width/$.width,L.height/$.height),d){const T=L.width/2,tt=L.height/2;W||At.translate(-T,-tt),At.rotate(-Math.PI/2),W||At.translate(tt,T)}At.translate(L.x,L.y);for(let T=0;T<Math.ceil(it/G);T++){const tt=At.clone();d?tt.translate(0,T*L.width):tt.translate(T*L.width,0),z.paths.forEach(U=>{const P=U.clone().applyTransform(tt);P.style.strokeWidth&&(P.style.strokeWidth*=K*V),P.style.strokeMiterlimit&&(P.style.strokeMiterlimit*=K),P.style.strokeDashoffset&&(P.style.strokeDashoffset*=K),P.style.strokeDasharray&&(P.style.strokeDasharray=P.style.strokeDasharray.map(q=>q*K)),P.style.fill&&P.style.fill in et&&(P.style.fill=et[P.style.fill]),P.style.stroke&&P.style.stroke in et&&(P.style.stroke=et[P.style.stroke]),r.paths.push(P),it!==G&&(d?t[r.paths.length-1]=new ct(h.left-h.width*2,h.top,h.width*4,h.height):t[r.paths.length-1]=new ct(h.left,h.top-h.height*2,h.width,h.height*4))})}}},renderOrder:-1,getBoundingBox:()=>{const i=[];return r.paths.forEach((s,n)=>{const o=t[n];let a=s.getBoundingBox();if(o){const l=Math.max(a.x,o.x),c=Math.max(a.y,o.y),h=Math.min(a.right,o.right),u=Math.min(a.bottom,o.bottom);a=new ct(l,c,h-l,u-c)}i.push(a)}),ct.from(...i)},render:(i,s)=>{r.paths.forEach((n,o)=>{if(YA({ctx:i,path:n,fontSize:s.computedStyle.fontSize,clipRect:t[o]}),s.debug){const a=new ze([n]).getBoundingBox();a&&i.strokeRect(a.x,a.y,a.width,a.height)}})}}}function EI(r,t){return`<svg width="${r*2}" height="${r*2}" xmlns="http://www.w3.org/2000/svg">
|
|
862
862
|
<circle cx="${r}" cy="${r}" r="${r}" fill="${t}" />
|
|
863
|
-
</svg>`}function _I(){const r=new iA;return{name:"listStyle",pathSet:r,update:t=>{r.paths.length=0;const{paragraphs:e,isVertical:A,fontSize:i}=t,s=i*.45;e.forEach(n=>{const{computedStyle:o}=n,{color:a,listStyleImage:l,listStyleColormap:u,listStyleSize:c,listStyleType:g}=o,f=xn(u);let d=c,B;if(!lt(l))B=l;else if(!lt(g)){const D=i*.38/2;switch(d=d==="cover"?D*2:d,g){case"disc":B=vI(D,String(a));break}}if(!B)return;const I=Ks(B),F=I.getBoundingBox(),b=n.fragments[0]?.characters[0];if(!b)return;const{inlineBox:y}=b,_=d==="cover"?1:bn(d,{total:i,fontSize:i})/i,Q=new Lt;if(A){const D=i/F.height*_;Q.translate(-F.left,-F.top).rotate(Math.PI/2).scale(D,D).translate(y.left+(y.width-F.height*D)/2,y.top-s)}else{const D=i/F.height*_;Q.translate(-F.left,-F.top).scale(D,D).translate(y.left-F.width*D-s,y.top+(y.height-F.height*D)/2)}r.paths.push(...I.paths.map(D=>{const S=D.clone();return S.applyTransform(Q),S.style.fill&&S.style.fill in f&&(S.style.fill=f[S.style.fill]),S.style.stroke&&S.style.stroke in f&&(S.style.stroke=f[S.style.stroke]),S}))})}}}function bI(){return{name:"outline"}}const lA=new O,qA=new Lt,uA=new Lt;function xI(){return{name:"render",getBoundingBox:r=>{const{characters:t,fontSize:e,effects:A}=r,i=[];return t.forEach(s=>{A?.forEach(n=>{if(!s.glyphBox)return;const o=s.glyphBox.clone(),a=Mn(r,n);lA.set(o.left,o.top),lA.applyMatrix3(a),o.left=lA.x,o.top=lA.y,lA.set(o.right,o.bottom),lA.applyMatrix3(a),o.width=lA.x-o.left,o.height=lA.y-o.top;const l=(n.shadowOffsetX??0)*e,u=(n.shadowOffsetY??0)*e,c=Math.max(.1,n.textStrokeWidth??0)*e;o.left+=l-c,o.top+=u-c,o.width+=c*2,o.height+=c*2,i.push(o)})}),i.length?ut.from(...i):void 0},render:(r,t)=>{const{paragraphs:e,glyphBox:A,effects:i}=t;i?i.forEach(s=>{Gr(s,A,r),r.save();const[n,o,a,l,u,c]=Mn(t,s).transpose().elements;r.transform(n,l,o,u,a,c),t.forEachCharacter(g=>{g.drawTo(r,s)}),r.restore()}):e.forEach(s=>{s.fragments.forEach(n=>{n.characters.forEach(o=>{o.drawTo(r)})})}),t.debug&&e.forEach(s=>{r.strokeRect(s.lineBox.x,s.lineBox.y,s.lineBox.width,s.lineBox.height)})}}}function Mn(r,t){const{fontSize:e,glyphBox:A}=r,i=(t.translateX??0)*e,s=(t.translateY??0)*e,n=Math.PI*2,o=(t.skewX??0)/360*n,a=(t.skewY??0)/360*n,{left:l,top:u,width:c,height:g}=A,f=l+c/2,d=u+g/2;return qA.identity(),uA.makeTranslation(i,s),qA.multiply(uA),uA.makeTranslation(f,d),qA.multiply(uA),uA.set(1,Math.tan(o),0,Math.tan(a),1,0,0,0,1),qA.multiply(uA),uA.makeTranslation(-f,-d),qA.multiply(uA),qA.clone()}function FI(){const r=new iA;return{name:"textDecoration",pathSet:r,update:t=>{r.paths.length=0;const e=[];let A,i;t.forEachCharacter(s=>{const{computedStyle:n,isVertical:o,inlineBox:a,underlinePosition:l,underlineThickness:u,strikeoutPosition:c,strikeoutSize:g}=s,{color:f,textDecoration:d,writingMode:B}=n;if(lt(d))i=void 0;else{let I=!1;if(i?.textDecoration===d&&i?.writingMode===B&&i?.color===f&&(o?A[0].inlineBox.left===a.left:A[0].inlineBox.top===a.top))switch(d){case"underline":A[0].underlinePosition===l&&A[0].underlineThickness===u&&(I=!0);break;case"line-through":A[0].strikeoutPosition===c&&A[0].strikeoutSize===g&&(I=!0);break}I?A.push(s):(A=[],A.push(s),e.push(A)),i=n}}),e.forEach(s=>{const{computedStyle:n,isVertical:o,underlinePosition:a,underlineThickness:l,strikeoutPosition:u,strikeoutSize:c}=s[0],{color:g,textDecoration:f}=n,d=ut.from(...s.map(S=>S.inlineBox)),{left:B,top:I,width:F,height:b}=d;let y=o?B+F:I;const _=o?-1:1;let Q=0;switch(f){case"overline":Q=l*2;break;case"underline":y+=_*a,Q=l*2;break;case"line-through":y+=_*u,Q=c*2;break}y-=Q;let D;o?D=new Mt([{type:"M",x:y,y:I},{type:"L",x:y,y:I+b},{type:"L",x:y+Q,y:I+b},{type:"L",x:y+Q,y:I},{type:"Z"}],{fill:g}):D=new Mt([{type:"M",x:B,y},{type:"L",x:B+F,y},{type:"L",x:B+F,y:y+Q},{type:"L",x:B,y:y+Q},{type:"Z"}],{fill:g}),r.paths.push(D)})},render:(t,e)=>{const{effects:A,computedStyle:i}=e;A?A.forEach(s=>{t.save();const[n,o,a,l,u,c]=Mn(e,s).transpose().elements;t.transform(n,l,o,u,a,c),r.paths.forEach(g=>{zA({ctx:t,path:g,fontSize:i.fontSize,...s})}),t.restore()}):r.paths.forEach(s=>{zA({ctx:t,path:s,fontSize:i.fontSize})})}}}var SI=Object.defineProperty,XA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&SI(t,e,i),i};const Rn=po();class Pe extends Oe{needsUpdate=!0;computedStyle={...Rn};paragraphs=[];lineBox=new ut;rawGlyphBox=new ut;glyphBox=new ut;pathBox=new ut;boundingBox=new ut;measurer=new Or;plugins=new Map;get fontSize(){return this.computedStyle.fontSize}get isVertical(){return this.computedStyle.writingMode.includes("vertical")}get characters(){return this.paragraphs.flatMap(t=>t.fragments.flatMap(e=>e.characters))}constructor(t={}){super(),this.set(t)}set(t={}){this.debug=t.debug??!1,this.content=RA(t.content??""),this.effects=t.effects,this.style=t.style??{},this.measureDOM=t.measureDOM,this.fonts=t.fonts,this.use(mI()).use(bI()).use(_I()).use(FI()).use(wI()).use(xI()),(t.plugins??[]).forEach(e=>{this.use(e)}),this.updateParagraphs()}onUpdateProperty(t,e,A,i){this.emit("updateProperty",t,e,A,i)}use(t){return this.plugins.set(t.name,t),this}forEachCharacter(t){return this.paragraphs.forEach((e,A)=>{e.fragments.forEach((i,s)=>{i.characters.forEach((n,o)=>{t(n,{paragraphIndex:A,fragmentIndex:s,characterIndex:o})})})}),this}async load(){await Promise.all(Array.from(this.plugins.values()).map(t=>t.load?.(this)))}updateParagraphs(){this.computedStyle={...Rn,...this.style};const{content:t,computedStyle:e}=this,A=[];return t.forEach(i=>{const{fragments:s,...n}=i,o=new DI(n,e);s.forEach(a=>{const{content:l,...u}=a;l!==void 0&&o.addFragment(l,u)}),A.push(o)}),this.paragraphs=A,this}createDOM(){return this.updateParagraphs(),this.measurer.createDOM(this.paragraphs,this.computedStyle)}measure(t=this.measureDOM){const e={paragraphs:this.paragraphs,lineBox:this.lineBox,rawGlyphBox:this.rawGlyphBox,glyphBox:this.glyphBox,pathBox:this.pathBox,boundingBox:this.boundingBox};this.updateParagraphs();const A=this.measurer.measure(this.paragraphs,this.computedStyle,t);this.paragraphs=A.paragraphs,this.lineBox=A.boundingBox,this.characters.forEach(i=>{i.update(this.fonts)}),this.rawGlyphBox=this.getGlyphBox(),Array.from(this.plugins.values()).sort((i,s)=>(i.updateOrder??0)-(s.updateOrder??0)).forEach(i=>{i.update?.(this)}),this.glyphBox=this.getGlyphBox(),this.updatePathBox().updateBoundingBox();for(const i in e)A[i]=this[i],this[i]=e[i];return this.emit("measure",{text:this,result:A}),A}getGlyphBox(){const t=O.MAX,e=O.MIN;return this.characters.forEach(A=>{if(!A.getGlyphMinMax(t,e)){const{inlineBox:i}=A,{left:s,top:n,width:o,height:a}=i,l=new O(s,n),u=new O(s+o,n+a);t.min(l,u),e.max(l,u)}}),new ut(t.x,t.y,e.x-t.x,e.y-t.y)}updatePathBox(){return this.pathBox=ut.from(this.glyphBox,...Array.from(this.plugins.values()).map(t=>t.getBoundingBox?t.getBoundingBox(this):t.pathSet?.getBoundingBox()).filter(Boolean)),this}updateBoundingBox(){return this.boundingBox=ut.from(this.rawGlyphBox,this.lineBox,this.pathBox),this}requestUpdate(){return this.needsUpdate=!0,this}update(t=this.measureDOM){const e=this.measure(t);for(const A in e)this[A]=e[A];return this.emit("update",{text:this}),this.needsUpdate=!1,this}render(t){const{view:e,pixelRatio:A=2}=t,i=e.getContext("2d");i&&(this.needsUpdate&&this.update(),fI(i,A,this.boundingBox),dI(i,this),Array.from(this.plugins.values()).sort((s,n)=>(s.renderOrder??0)-(n.renderOrder??0)).forEach(s=>{if(s.render)s.render?.(i,this);else if(s.pathSet){const n=this.computedStyle;s.pathSet.paths.forEach(o=>{zA({ctx:i,path:o,fontSize:n.fontSize})})}}),this.emit("render",{text:this,view:e,pixelRatio:A}),t.onContext?.(i))}toString(){return this.content.flatMap(t=>t.fragments.map(e=>e.content)).join("")}}XA([w()],Pe.prototype,"debug"),XA([w()],Pe.prototype,"content"),XA([w()],Pe.prototype,"effects"),XA([w()],Pe.prototype,"style"),XA([w()],Pe.prototype,"measureDOM"),XA([w()],Pe.prototype,"fonts");var MI=Object.defineProperty,Nl=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&MI(t,e,i),i};function RI(r){const t={};for(const e in r)e!=="id"&&r[e]!==void 0&&r[e]!==""&&(t[e]=r[e]);return t}function PI(r){return r.flatMap(t=>{const{fragments:e}=t,A=e.flatMap(i=>{const{content:s,...n}=i;return Array.from(hi(s)).map(()=>({...n}))});return MA(hi(e[e.length-1]?.content??""))?A:[...A,{}]})}function kI(r,t){const e=Object.keys(r),A=Object.keys(t),i=Array.from(new Set([...e,...A]));return!i.length||i.every(s=>r[s]===t[s])}const UI=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDD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A3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function NI(r){const t=document.createElement("template");return t.innerHTML=r,t.content.cloneNode(!0)}class Tl extends HTMLElement{static observedAttributes=["width","height"];static register(){customElements.define("text-editor",this)}_text=new Pe;get text(){return this._text}set text(t){t instanceof Pe?this._text=t:this._text.set(t),this.setTextInput(this.getTextValue()),this.render()}pixelRatio=2;composition=!1;selection=[0,0];prevSelection=[0,0];_oldText="";$preview;$textInput;$cursor;get selectionMinMax(){return{min:Math.min(...this.selection),max:Math.max(...this.selection)}}get selectedCharacters(){const{min:t,max:e}=this.selectionMinMax;return this.selectableCharacters.filter((A,i)=>i>=t&&i<e)}get selectableCharacters(){const t=[];this.text?.paragraphs.forEach((s,n)=>{s.fragments.forEach((o,a)=>{o.characters.forEach(l=>{t[n]||(t[n]=[]),t[n][a]||(t[n][a]=[]),t[n][a].push(l)})})});const e=s=>({color:s.computedStyle.color,left:s.lineBox.left-this.text.boundingBox.left,top:s.lineBox.top-this.text.boundingBox.top,width:s.lineBox.width,height:s.lineBox.height,content:s.content}),A=[];let i=0;return t.forEach(s=>{if(s.length===1&&s[0].length===1&&MA(s[0][0].content)){const n=s[0][0];A[i]={...e(n),isCrlf:!0}}else s.forEach(n=>{n.forEach(o=>{A[i]={...e(o)},i++,MA(o.content)||(A[i]={...e(o),content:" ",isLastSelected:!0})})});i++}),A[0]&&(A[0].isFirst=!0),A[A.length-1]&&(A[A.length-1].isLast=!0),A}get cursorPosition(){let t=0,e=0;const A=this.selectableCharacters[this.selectionMinMax.min];return A?.isLastSelected&&(this.text.isVertical?e+=A?.height??0:t+=A?.width??0),t+=A?.left??0,e+=A?.top??0,{color:A?.color,left:t,top:e,height:A?.height??0,width:A?.width??0}}constructor(){super();const t=this.attachShadow({mode:"open"});t.appendChild(NI(`
|
|
864
|
-
<style>
|
|
865
|
-
:host {
|
|
866
|
-
position: absolute;
|
|
867
|
-
width: 0;
|
|
868
|
-
height: 0;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
.preview {
|
|
872
|
-
position: absolute;
|
|
873
|
-
left: 0;
|
|
874
|
-
top: 0;
|
|
875
|
-
--selection-color: rgba(var(--color, 0, 0, 0), 0.4);
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
.text-input {
|
|
879
|
-
position: absolute;
|
|
880
|
-
opacity: 0;
|
|
881
|
-
caret-color: transparent;
|
|
882
|
-
left: 0;
|
|
883
|
-
top: 0;
|
|
884
|
-
width: 100%;
|
|
885
|
-
height: 100%;
|
|
886
|
-
padding: 0;
|
|
887
|
-
border: 0;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
.cursor {
|
|
891
|
-
position: absolute;
|
|
892
|
-
left: 0;
|
|
893
|
-
top: 0;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
.cursor.blink {
|
|
897
|
-
animation: cursor-blink 1s steps(2, start) infinite;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
@keyframes cursor-blink {
|
|
901
|
-
100% {
|
|
902
|
-
display: none;
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
</style>
|
|
906
|
-
|
|
907
|
-
<canvas class="preview"></canvas>
|
|
908
|
-
|
|
909
|
-
<textarea class="text-input" autofocus></textarea>
|
|
910
|
-
|
|
911
|
-
<div class="cursor blink"></div>
|
|
912
|
-
`)),this.$preview=t.querySelector(".preview"),this.$textInput=t.querySelector(".text-input"),this.$cursor=t.querySelector(".cursor"),this.$textInput.addEventListener("compositionstart",()=>this.composition=!0),this.$textInput.addEventListener("compositionend",()=>this.composition=!1),this.$textInput.addEventListener("keydown",this.onKeydown.bind(this)),this.$textInput.addEventListener("input",this.onInput.bind(this)),this.$textInput.addEventListener("blur",this.onBlur.bind(this)),this.$textInput.addEventListener("mousedown",this.onMousedown.bind(this))}getTextValue(){return Bo(this.getContentValue(this.text.content))}getContentValue(t,e=Bo(t),A=e){e=hi(e),e=e.replace(UI,g=>Array.from(g).length>1?"?":g),A=hi(A);const i=PI(t),s=[];let n=0,o=0,a={};hI(A,e).forEach(g=>{const f=Array.from(g.value);g.removed?o+=f.length:f.forEach(()=>{g.added?s[n]={...a}:(a=RI(i[o]),s[n]={...a},o++),n++})});let u=0;const c=[];return RA(e).forEach((g,f)=>{const{fragments:d,...B}=t[f]??{};let I={...B,fragments:[]},F;g.fragments.forEach(b=>{Array.from(b.content).forEach(y=>{const _=s[u]??{};if(F){const{content:Q,...D}=F;kI(_,D)?F.content+=y:(I.fragments.push(F),F={..._,content:y})}else F={..._,content:y};u++})}),MA(g.fragments[g.fragments.length-1]?.content??"")||u++,F&&I.fragments.push(F),I.fragments.length&&(c.push(I),I={...B,fragments:[]})}),c}setTextInput(t){this.$textInput.value=t,this._oldText=t}onInput(){const t=this.$textInput.value;this.text.content=this.getContentValue(this.text.content,t,this._oldText),this._oldText=t,this.updateSelection(),this.render()}_timer;onKeydown(t){switch(t.stopPropagation(),t.key){case"Escape":return this.$textInput.blur()}this.updateSelection(),this.render(),setTimeout(()=>{this.updateSelection(),this.render()},0),setTimeout(()=>{this.updateSelection(),this.render()},100)}onBlur(){this.emit("done",this.text)}findNearest(t){const{x:e,y:A,xWeight:i=1,yWeight:s=1}=t,n=this.selectableCharacters.reduce((o,a,l)=>{const u=Math.abs(a.left+a.width/2-e)*i+Math.abs(a.top+a.height/2-A)*s;return u<o.diff?{diff:u,index:l,value:a}:o},{diff:Number.MAX_SAFE_INTEGER,index:-1,value:void 0});if(n?.value){const o=n.value.left+n.value.width/2;return e>o&&!n.value.isCrlf&&!n.value.isLastSelected?n.index+1:n.index}return-1}updateSelection(){if(this.composition)this.selection=this.prevSelection;else{let t=0;const e=[];this.selectableCharacters.forEach((A,i)=>{t<=this.$textInput.selectionStart?e[0]=i:t<=this.$textInput.selectionEnd&&(e[1]=i),t+=A.content.length}),this.selection=e,this.prevSelection=this.selection}}updateDOMSelection(){let t=0,e=0;this.selectableCharacters.forEach((A,i)=>{i<this.selectionMinMax.min?(t+=A.content.length,e=t):i<this.selectionMinMax.max&&(e+=A.content.length)}),this.$textInput.selectionStart=t,this.$textInput.selectionEnd=e}onMousedown(t){t.preventDefault(),t.stopPropagation(),this.$textInput.focus();const e=this.findNearest({x:t.offsetX,y:t.offsetY});this.selection=[e,e],this.updateDOMSelection(),this.render();const A=s=>{this.selection[1]=this.findNearest({x:s.offsetX,y:s.offsetY}),this.updateDOMSelection(),this.render()},i=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",i)}render(){const t=this.text.isVertical;this.text.style={justifyContent:"center",alignItems:"center",textAlign:"center",color:"#FFFFFFFF",...this.text.style},this.text.style.width=this.width,this.text.style.height=this.height,this.text.requestUpdate();let e;this.text.render({pixelRatio:this.pixelRatio,view:this.$preview,onContext:i=>e=i});const A=this.selectedCharacters;if(e){const i={};A.forEach(s=>{if(s.isLastSelected)return;const n=t?s.left:s.top;i[n]||(i[n]=[]),i[n].push({x:s.left,y:s.top,w:s.width,h:s.height})}),e.fillStyle=getComputedStyle(this.$preview).getPropertyValue("--selection-color"),Object.values(i).forEach(s=>{const n={x:Math.min(...s.map(a=>a.x)),y:Math.min(...s.map(a=>a.y))},o={x:Math.max(...s.map(a=>a.x+a.w)),y:Math.max(...s.map(a=>a.y+a.h))};e.fillRect(n.x+this.text.boundingBox.left,n.y+this.text.boundingBox.top,o.x-n.x,o.y-n.y)})}if(A.length===0){this.$cursor.style.visibility="visible";const i=this.cursorPosition;this.$cursor.style.backgroundColor=i.color??"rgba(var(--color)",this.$cursor.style.left=`${i.left}px`,this.$cursor.style.top=`${i.top}px`,this.$cursor.style.height=t?"1px":`${i.height}px`,this.$cursor.style.width=t?`${i.width}px`:"1px"}else this.$cursor.style.visibility="hidden";this.$cursor.classList.remove("blink"),this._timer&&clearTimeout(this._timer),this._timer=setTimeout(()=>this.$cursor.classList.add("blink"),500),this.emit("rendered",this.text)}requestUpdate(){this.render()}attributeChangedCallback(t,e,A){this[t]=A}emit(t,e){return this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:e}))}}Nl([w()],Tl.prototype,"width"),Nl([w()],Tl.prototype,"height");var TI=Object.defineProperty,Xi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&TI(t,e,i),i};class FA extends tA{constructor(t){super(),this.parent=t,this.base.on("updateProperty",(...e)=>{switch(e[0]){case"content":case"effects":this.setter(e[0],e[1]);break}this._updateProperty(...e)})}base=new Pe;measureResult;setProperties(t){return super.setProperties(lt(t)?void 0:bc(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"content":case"effects":case"measureDOM":case"fonts":case"split":case"enabled":this.parent.requestRedraw();break}}_updateText(){this.base.style={justifyContent:"center",alignItems:"center",textAlign:"center",...this.parent.style.toJSON()},this.base.requestUpdate()}measure(){return this._updateText(),this.base.measure()}updateMeasure(){return this.measureResult=this.measure(),this}canDraw(){return!!(this.enabled&&!/^\s*$/.test(this.base.toString()))}draw(){const t=this.parent.context;this.base.update(),this.base.paragraphs.forEach(e=>{e.fragments.forEach(A=>{A.characters.forEach(i=>{t.fillStyle=i.computedStyle.color,t.addPath(i.path),t.style.fillRule="evenodd",t.closePath(),t.fill()})})})}}Xi([w({fallback:!0})],FA.prototype,"enabled"),Xi([w({alias:"base.content",fallback:()=>[]})],FA.prototype,"content"),Xi([w({alias:"base.effects"})],FA.prototype,"effects"),Xi([w({protected:!0,alias:"base.measureDOM"})],FA.prototype,"measureDOM"),Xi([w({protected:!0,alias:"base.fonts"})],FA.prototype,"fonts");var LI=Object.defineProperty,GI=Object.getOwnPropertyDescriptor,Pn=(r,t,e,A)=>{for(var i=A>1?void 0:A?GI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&LI(t,e,i),i};h.Node2D=class extends h.CanvasItem{position=new ae().on("update",()=>this.updateGlobalTransform());scale=new ae(1,1).on("update",()=>this.updateGlobalTransform());skew=new ae().on("update",()=>this.updateGlobalTransform());transform=new Yt;globalPosition=new ae;globalScale=new ae;globalSkew=new ae;globalTransform=new Yt;_parentTransformDirtyId;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"rotation":this.updateGlobalTransform();break}}getTransformOrigin(){return new ae(0,0)}getTransform(t){const e=this.getTransformOrigin(),A=new Yt;return A.translate(-e.x,-e.y).scale(this.scale.x,this.scale.y).skew(this.skew.x,this.skew.y).rotate(this.rotation),t?.(A),A.translate(this.position.x,this.position.y).translate(e.x,e.y),A}updateTransform(){this.transform.copy(this.getTransform())}updateGlobalTransform(){this.updateTransform();const t=this.getParent();t?.globalTransform?(this._parentTransformDirtyId=t.globalTransform.dirtyId,this.globalScale.set(t.globalScale.x*this.scale.x,t.globalScale.y*this.scale.y),this.globalRotation=t.globalRotation+this.rotation,t.globalTransform.multiply(this.transform,this.globalTransform)):(this.globalScale.copy(this.scale),this.globalRotation=this.rotation,this.globalTransform.copy(this.transform));const[e,A,i,s,n,o]=this.globalTransform.toArray();this.globalPosition.set(i,o),this.globalSkew.x=Math.atan2(A,e)-this.globalRotation,this.globalSkew.y=Math.atan2(s,n)-this.globalRotation,this.requestRelayout()}_transformVertices(t,e){let A,i,s,n,o,a;if(e){const u=this.globalTransform.clone();u.multiply(typeof e=="function"?e?.():e),[A,i,s,n,o,a]=u.toArray()}else[A,i,s,n,o,a]=this.globalTransform.toArray();const l=t.slice();for(let u=t.length,c=0;c<u;c+=2){const g=t[c],f=t[c+1];l[c]=A*g+i*f+s,l[c+1]=n*g+o*f+a}return l}_relayout(t){return t=super._relayout(t),this.updateGlobalTransform(),t.map(e=>({...e,vertices:this._transformVertices(e.vertices,e.vertTransform)}))}_process(t){super._process(t);const e=this.getParent();e?.globalTransform&&this._parentTransformDirtyId!==e?.globalTransform?.dirtyId&&this.requestRelayout()}},Pn([w({protected:!0,fallback:0})],h.Node2D.prototype,"rotation",2),Pn([w({protected:!0,fallback:0})],h.Node2D.prototype,"globalRotation",2),h.Node2D=Pn([st("Node2D")],h.Node2D);var OI=Object.getOwnPropertyDescriptor,HI=(r,t,e,A)=>{for(var i=A>1?void 0:A?OI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.BaseElement2D=class extends h.Node2D{size=new ae().on("update",()=>{this.updateGlobalTransform(),this.requestRedraw()});get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}_background=new $s(this);get background(){return this._background}set background(t){this._background.resetProperties().setProperties(t)}_shape=new mA(this);get shape(){return this._shape}set shape(t){this._shape.resetProperties().setProperties(t)}_fill=new Vt(this);get fill(){return this._fill}set fill(t){this._fill.resetProperties().setProperties(t)}_outline=new Ri(this);get outline(){return this._outline}set outline(t){this._outline.resetProperties().setProperties(t)}_foreground=new tn(this);get foreground(){return this._foreground}set foreground(t){this._foreground.resetProperties().setProperties(t)}_text=new FA(this);get text(){return this._text}set text(t){this._text.resetProperties().setProperties(t)}_shadow=new DA(this);get shadow(){return this._shadow}set shadow(t){this._shadow.resetProperties().setProperties(t)}constructor(t,e=[]){super(),this._updateStyleProperty=this._updateStyleProperty.bind(this),this.style=new Ui,this.setProperties(t).append(e)}setProperties(t){if(t){const{style:e,text:A,shape:i,background:s,fill:n,outline:o,foreground:a,shadow:l,...u}=t;e&&this.style.setProperties(e),s&&this.background.setProperties(s),i&&this.shape.setProperties(i),n&&this.fill.setProperties(n),o&&this.outline.setProperties(o),A&&this.text.setProperties(A),a&&this.foreground.setProperties(a),l&&this.shadow.setProperties(l),super.setProperties(u)}return this}_updateStyleProperty(t,e,A,i){switch(t){case"rotate":this.rotation=this.style.rotate*Go;break;case"scaleX":this.scale.x=this.style.scaleX;break;case"scaleY":this.scale.y=this.style.scaleY;break;case"skewX":this.skew.x=this.style.skewX;break;case"skewY":this.skew.y=this.style.skewY;break;case"transform":case"transformOrigin":this.updateGlobalTransform();break;case"opacity":this.opacity=this.style.opacity;break;case"visibility":this.visible=this.style.visibility==="visible";break;case"filter":this.requestRepaint();break;case"maskImage":this._updateMaskImage();break;case"borderRadius":this.requestRedraw();break;case"backgroundColor":this.background.color=this.style.backgroundColor;break;case"backgroundImage":this.background.image=this.style.backgroundImage;break;case"borderStyle":case"outlineStyle":this.outline.style=e;break;case"borderWidth":case"outlineWidth":this.outline.width=e;break;case"borderColor":case"outlineColor":this.outline.color=e;break}}_updateMaskImage(){const t="__$style.maskImage",e=this.style.maskImage;if(e&&e!=="none"){const A=this.getNode(t);A?A.src=e:this.appendChild(new h.MaskEffect({name:t,src:e}),"back")}else{const A=this.getNode(t);A&&this.removeChild(A)}}getTransformOrigin(){const{width:t,height:e}=this.size,[A,i]=aa(this.style.transformOrigin);return new ae(A*t,i*e)}getTransform(t){const{width:e,height:A}=this.size;return super.getTransform(i=>{oa(this.style.transform??"",e,A,i),t?.(i)})}updateGlobalTransform(){super.updateGlobalTransform(),this._updateOverflow()}getRect(){const{width:t,height:e}=this.size,A=0,i=0,s=A+t,n=i+e,[o,a,l,u,c,g]=this.globalTransform.toArray(),f=[[A,i],[A,n],[s,i],[s,n]].map(_=>[o*_[0]+a*_[1]+l,u*_[0]+c*_[1]+g]),d=f.map(_=>_[0]),B=f.map(_=>_[1]),I=Math.min(...d),F=Math.max(...d),b=Math.min(...B),y=Math.max(...B);return new xs(I,b,F-I,y-b)}_updateOverflow(){if(this.style.overflow==="hidden"){const t=this.getRect();this.mask={x:t.x,y:t.y,width:t.width,height:t.height}}else this.mask=void 0}_draw(){super._draw(),this._text.canDraw()&&this._text.updateMeasure(),this._background.canDraw()&&(this._tree?.log(this.name,"background drawing"),this._shape.drawRect(),this._background.draw()),this._fill.canDraw()&&(this._tree?.log(this.name,"fill drawing"),this._shape.draw(),this._fill.draw()),this._outline.canDraw()&&(this._tree?.log(this.name,"outline drawing"),this._shape.draw(),this._outline.draw()),this._foreground.canDraw()&&(this._tree?.log(this.name,"foreground drawing"),this._shape.drawRect(),this._foreground.draw()),this._text.canDraw()&&(this._tree?.log(this.name,"text drawing"),this._text.draw()),this._drawContent()}_drawContent(){}_repaint(t){const e=na(this.style.filter);return super._repaint(t).map(A=>({...A,colorMatrix:e.toMatrix4().toArray(!0),colorMatrixOffset:e.toVector4().toArray()}))}canPointerEvents(){return this.style.pointerEvents!=="none"}input(t,e){const A=this._children.internal;for(let i=A.length-1;i>=0;i--)A[i].input(t,e);this.isVisibleInTree()&&this._input(t,e)}_pointerInput(t,e){const{width:A,height:i}=this.size;return t.x>=0&&t.x<A&&t.y>=0&&t.y<i}_input(t,e){switch(e){case"pointerdown":case"pointermove":case"pointerup":{if(this.canPointerEvents()){const{screenX:A,screenY:i}=t;if(A&&i){const[s,n]=this.globalTransform.inverse().applyToPoint(A,i);this._pointerInput({x:s,y:n},e)&&(t.target||(t.target=this),this.emit(e,t))}}break}}}toJSON(){const t=e=>Object.keys(e).length>0?e:void 0;return ui({...super.toJSON(),style:t(this.style.toJSON()),background:t(this.background.toJSON()),shape:t(this.shape.toJSON()),fill:t(this.fill.toJSON()),outline:t(this.outline.toJSON()),text:t(this.text.toJSON()),foreground:t(this.foreground.toJSON()),shadow:t(this.shadow.toJSON())})}},h.BaseElement2D=HI([st("BaseElement2D")],h.BaseElement2D);class kn extends Ui{constructor(t){super(),this.setProperties(t)}}const Ll={left:0,top:0,width:0,height:0};for(const r in Ll)nr(kn,r,{fallback:Ll[r]});var JI=Object.getOwnPropertyDescriptor,KI=(r,t,e,A)=>{for(var i=A>1?void 0:A?JI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.Element2D=class extends h.BaseElement2D{get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}constructor(t,e=[]){super(),this.style=new kn,this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"left":this.position.x=Number(e);break;case"top":this.position.y=Number(e);break;case"width":this.size.width=Number(e);break;case"height":this.size.height=Number(e);break}switch(t){case"width":case"height":this.mask instanceof h.BaseElement2D&&(this.mask.size.width=this.size.width,this.mask.size.height=this.size.height);break}}},h.Element2D=KI([st("Element2D")],h.Element2D);var YI=(()=>{var r=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:pA&&pA.tagName.toUpperCase()==="SCRIPT"&&pA.src||new URL("index.js",document.baseURI).href;return function(t){t=t||{};var e;e||(e=typeof t<"u"?t:{});var A,i;e.ready=new Promise(function(p,E){A=p,i=E});var s=Object.assign({},e),n="";typeof document<"u"&&document.currentScript&&(n=document.currentScript.src),r&&(n=r),n.indexOf("blob:")!==0?n=n.substr(0,n.replace(/[?#].*/,"").lastIndexOf("/")+1):n="";var o=e.print||console.log.bind(console),a=e.printErr||console.warn.bind(console);Object.assign(e,s),s=null;var l;e.wasmBinary&&(l=e.wasmBinary),e.noExitRuntime,typeof WebAssembly!="object"&&K("no native wasm support detected");var u,c=!1;function g(p,E,C){C=E+C;for(var v="";!(E>=C);){var x=p[E++];if(!x)break;if(x&128){var R=p[E++]&63;if((x&224)==192)v+=String.fromCharCode((x&31)<<6|R);else{var U=p[E++]&63;x=(x&240)==224?(x&15)<<12|R<<6|U:(x&7)<<18|R<<12|U<<6|p[E++]&63,65536>x?v+=String.fromCharCode(x):(x-=65536,v+=String.fromCharCode(55296|x>>10,56320|x&1023))}}else v+=String.fromCharCode(x)}return v}var f,d,B,I,F,b,y,_,Q;function D(){var p=u.buffer;f=p,e.HEAP8=d=new Int8Array(p),e.HEAP16=I=new Int16Array(p),e.HEAP32=b=new Int32Array(p),e.HEAPU8=B=new Uint8Array(p),e.HEAPU16=F=new Uint16Array(p),e.HEAPU32=y=new Uint32Array(p),e.HEAPF32=_=new Float32Array(p),e.HEAPF64=Q=new Float64Array(p)}var S,M=[],V=[],et=[];function z(){var p=e.preRun.shift();M.unshift(p)}var J=0,$=null;function K(p){throw e.onAbort&&e.onAbort(p),p="Aborted("+p+")",a(p),c=!0,p=new WebAssembly.RuntimeError(p+". Build with -sASSERTIONS for more info."),i(p),p}function L(p){return p.startsWith("data:application/octet-stream;base64,")}var it;if(it="data:application/octet-stream;base64,AGFzbQEAAAABugM3YAF/AGACf38AYAF/AX9gA39/fwBgAn98AGACf38Bf2ADf39/AX9gBH9/f30BfWADf398AGAAAGAEf39/fwBgAX8BfGACf38BfGAFf39/f38Bf2AAAX9gA39/fwF9YAZ/f31/fX8AYAV/f39/fwBgAn9/AX1gBX9/f319AX1gAX8Bf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EQahAuIAMoAhQiASADKAIQIgJyDQEMAwsLEAIACyABIQQLIAMoAhgiAQRAA0AgASgCACECIAEQIyACIgENAAsLIARFBEAgACoCmAMhBQwBCyAEEE4gBCoCoAOSIQULIANBIGokACAFC6EDAQh/AkAgACgC6AMiBSAAKALsAyIHRwRAA0AgACAFKAIAIgIoAuQDRwRAAkAgACgC9AMoAgAiAQRAIAIgACAGIAERBgAiAQ0BC0GIBBAeIgEgAigCEDYCECABIAIpAgg3AgggASACKQIANwIAIAFBFGogAkEUakHoABArGiABQgA3AoABIAFB/ABqIgNBADsBACABQgA3AogBIAFCADcCkAEgAyACQfwAahCgASABQZgBaiACQZgBakHQAhArGiABQQA2AvADIAFCADcC6AMgAigC7AMiAyACKALoAyIERwRAIAMgBGsiBEEASA0FIAEgBBAeIgM2AuwDIAEgAzYC6AMgASADIARqNgLwAyACKALoAyIEIAIoAuwDIghHBEADQCADIAQoAgA2AgAgA0EEaiEDIARBBGoiBCAIRw0ACwsgASADNgLsAwsgASACKQL0AzcC9AMgASACKAKEBDYChAQgASACKQL8AzcC/AMgAUEANgLkAwsgBSABNgIAIAEgADYC5AMLIAZBAWohBiAFQQRqIgUgB0cNAAsLDwsQAgALUAACQAJAAkACQAJAIAIOBAQAAQIDCyAAIAEgAUEwahBDDwsgACABIAFBMGogAxBEDwsgACABIAFBMGoQQg8LECQACyAAIAEgAUEwaiADEEULcAIBfwF9IwBBEGsiBCQAIARBCGogACABQQJ0QdwlaigCACACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVbGwt5AgF/AX0jAEEQayIDJAAgA0EIaiAAIAFBAnRB7CVqKAIAIAIQU0MAAMB/IQQCQAJAAkAgAy0ADEEBaw4CAAECCyADKgIIIQQMAQsgAyoCCEMAAAAAlEMK1yM8lCEECyADQRBqJAAgBEMAAAAAl0MAAAAAIAQgBFsbC1QAAkACQAJAAkACQCACDgQEAAECAwsgACABIAFBwgBqEEMPCyAAIAEgAUHCAGogAxBEDwsgACABIAFBwgBqEEIPCxAkAAsgACABIAFBwgBqIAMQRQsvACAAIAJFQQF0IgIgASADEGAgACACIAEQS5IgACACIAEgAxB/IAAgAiABEFKSkgvOAQIDfwJ9IwBBEGsiAyQAQQEhBCADQQhqIABB/ABqIgUgACABQQF0akH2AGoiAS8BABAfAkACQCADKgIIIgcgAioCACIGXARAIAcgB1sEQCACLQAEIQIMAgsgBiAGXCEECyACLQAEIQIgBEUNACADLQAMIAJB/wFxRg0BCyAFIAEgBiACEDkDQCAALQAAIgFBBHENASAAIAFBBHI6AAAgACgCECIBBEAgACABEQAACyAAQYCAgP4HNgKcASAAKALkAyIADQALCyADQRBqJAALzgECA38CfSMAQRBrIgMkAEEBIQQgA0EIaiAAQfwAaiIFIAAgAUEBdGpB8gBqIgEvAQAQHwJAAkAgAyoCCCIHIAIqAgAiBlwEQCAHIAdbBEAgAi0ABCECDAILIAYgBlwhBAsgAi0ABCECIARFDQAgAy0ADCACQf8BcUYNAQsgBSABIAYgAhA5A0AgAC0AACIBQQRxDQEgACABQQRyOgAAIAAoAhAiAQRAIAAgAREAAAsgAEGAgID+BzYCnAEgACgC5AMiAA0ACwsgA0EQaiQACwoAIABBMGtBCkkLBQAQAgALBAAgAAsUACAABEAgACAAKAIAKAIEEQAACwsrAQF/IAAoAgwiAQRAIAEQIwsgACgCACIBBEAgACABNgIEIAEQIwsgABAjC4EEAQN/IwBBEGsiAyQAIABCADcCBCAAQcEgOwAVIABCADcCDCAAQoCAgICAgIACNwIYIAAgAC0AF0HgAXE6ABcgACAALQAAQeABcUEFcjoAACAAIAAtABRBgAFxOgAUIABBIGpBAEHOABAqGiAAQgA3AXIgAEGEgBA2AW4gAEEANgF6IABCADcCgAEgAEIANwKIASAAQgA3ApABIABCADcCoAEgAEKAgICAgICA4P8ANwKYASAAQQA6AKgBIABBrAFqQQBBxAEQKhogAEHwAmohBCAAQbABaiEC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IFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECsaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACCwQAQgALBABBAAuKBQIGfgJ/IAEgASgCAEEHakF4cSIBQRBqNgIAIAAhCSABKQMAIQMgASkDCCEGIwBBIGsiCCQAAkAgBkL///////////8AgyIEQoCAgICAgMCAPH0gBEKAgICAgIDA/8MAfVQEQCAGQgSGIANCPIiEIQQgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIARCgYCAgICAgIDAAHwhAgwCCyAEQoCAgICAgICAQH0hAiADQoCAgICAgICACFINASACIARCAYN8IQIMAQsgA1AgBEKAgICAgIDA//8AVCAEQoCAgICAgMD//wBRG0UEQCAGQgSGIANCPIiEQv////////8Dg0KAgICAgICA/P8AhCECDAELQoCAgICAgID4/wAhAiAEQv///////7//wwBWDQBCACECIARCMIinIgBBkfcASQ0AIAMhAiAGQv///////z+DQoCAgICAgMAAhCIFIQcCQCAAQYH3AGsiAUHAAHEEQCACIAFBQGqthiEHQgAhAgwBCyABRQ0AIAcgAa0iBIYgAkHAACABa62IhCEHIAIgBIYhAgsgCCACNwMQIAggBzcDGAJAQYH4ACAAayIAQcAAcQRAIAUgAEFAaq2IIQNCACEFDAELIABFDQAgBUHAACAAa62GIAMgAK0iAoiEIQMgBSACiCEFCyAIIAM3AwAgCCAFNwMIIAgpAwhCBIYgCCkDACIDQjyIhCECIAgpAxAgCCkDGIRCAFKtIANC//////////8Pg4QiA0KBgICAgICAgAhaBEAgAkIBfCECDAELIANCgICAgICAgIAIUg0AIAJCAYMgAnwhAgsgCEEgaiQAIAkgAiAGQoCAgICAgICAgH+DhL85AwALmRgDEn8BfAN+IwBBsARrIgwkACAMQQA2AiwCQCABvSIZQgBTBEBBASERQZkJIRMgAZoiAb0hGQwBCyAEQYAQcQRAQQEhEUGcCSETDAELQZ8JQZoJIARBAXEiERshEyARRSEVC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EdAAs3AQF/IAEgACgCBCIDQQF1aiEBIAAoAgAhACABIAIgA0EBcQR/IAEoAgAgAGooAgAFIAALERIACzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRDAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRCwALYQECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEQEB4iACACKQMINwMIIAAgAikDADcDACACQRBqJAAgAAtjAQJ/IwBBEGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACADIAEgAiAEQQFxBH8gASgCACAAaigCAAUgAAsRAwBBEBAeIgAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiQAIAALNwEBfyABIAAoAgQiA0EBdWohASAAKAIAIQAgASACIANBAXEEfyABKAIAIABqKAIABSAACxEEAAs5AQF/IAEgACgCBCIEQQF1aiEBIAAoAgAhACABIAIgAyAEQQFxBH8gASgCACAAaigCAAUgAAsRCAALCQAgASAAEQIACwUAQcM7Cw8AIAEgACgCAGogAjYCAAsNACABIAAoAgBqKAIACxgBAX9BEBAeIgBCADcDCCAAQQA2AgAgAAsYAQF/QRAQHiIAQgA3AwAgAEIANwMIIAALDABBMBAeQQBBMBAqCzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRHgALBQBBvjsLIQAgACABKAIAIAEgASwAC0EASBtBuzsgAigCABAQNgIACyoBAX9BDBAeIgFBADoABCABIAAoAgA2AgggAEEANgIAIAFB2Cc2AgAgAQsFAEG7OwsFAEG4OwshACAAIAEoAgAgASABLAALQQBIG0GkOyACKAIAEBA2AgAL2AEBBH8jAEEgayIDJAAgASgCACIEQfD///8HSQRAAkACQCAEQQtPBEAgBEEPckEBaiIFEB4hBiADIAVBgICAgHhyNgIQIAMgBjYC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HQAA3B0AANQdAADEHQAAxB0AANwdAADFHQAAxB0AAMQdAADEHQAAxB0AANwdAADUHQAAxB0AANUdAADVHQAAxB0AANQdAADEHQAAoR0AANQdAADEHQAAuR0AANUdAADFHQAAAAAAANQdAADEHQAA4h0AAOIdAADbHQAAdmlpZGRpAADBHQAAxR0AQcArC0EZAAoAGRkZAAAAAAUAAAAAAAAJAAAAAAsAAAAAAAAAABkAEQoZGRkDCgcAAQAJCxgAAAkGCwAACwAGGQAAABkZGQBBkSwLIQ4AAAAAAAAAABkACg0ZGRkADQAAAgAJDgAAAAkADgAADgBByywLAQwAQdcsCxUTAAAAABMAAAAACQwAAAAAAAwAAAwAQYUtCwEQAEGRLQsVDwAAAAQPAAAAAAkQAAAAAAAQAAAQAEG/LQsBEgBByy0LHhEAAAAAEQAAAAAJEgAAAAAAEgAAEgAAGgAAABoaGgBBgi4LDhoAAAAaGhoAAAAAAAAJAEGzLgsBFABBvy4LFRcAAAAAFwAAAAAJFAAAAAAAFAAAFABB7S4LARYAQfkuCycVAAAAABUAAAAACRYAAAAAABYAABYAADAxMjM0NTY3ODlBQkNERUYAQcQvCwHSAEHsLwsI//////////8AQbAwCwkQIgEAAAAAAAUAQcQwCwHNAEHcMAsKzgAAAM8AAAD8HQBB9DALAQIAQYQxCwj//////////wBByDELAQUAQdQxCwHQAEHsMQsOzgAAANEAAAAIHgAAAAQAQYQyCwEBAEGUMgsF/////woAQdgyCwHT",!L(it)){var G=it;it=e.locateFile?e.locateFile(G,n):n+G}function W(){var p=it;try{if(p==it&&l)return new Uint8Array(l);if(L(p))try{var E=FE(p.slice(37)),C=new Uint8Array(E.length);for(p=0;p<E.length;++p)C[p]=E.charCodeAt(p);var v=C}catch{throw Error("Converting base64 string to bytes failed.")}else v=void 0;var x=v;if(x)return x;throw"both async and sync fetching of the wasm failed"}catch(R){K(R)}}function At(){return l||typeof fetch!="function"?Promise.resolve().then(function(){return W()}):fetch(it,{credentials:"same-origin"}).then(function(p){if(!p.ok)throw"failed to load wasm binary file at '"+it+"'";return p.arrayBuffer()}).catch(function(){return W()})}function T(p){for(;0<p.length;)p.shift()(e)}function tt(p){if(p===void 0)return"_unknown";p=p.replace(/[^a-zA-Z0-9_]/g,"$");var E=p.charCodeAt(0);return 48<=E&&57>=E?"_"+p:p}function k(p,E){return p=tt(p),function(){return E.apply(this,arguments)}}var P=[{},{value:void 0},{value:null},{value:!0},{value:!1}],q=[];function Z(p){var E=Error,C=k(p,function(v){this.name=p,this.message=v,v=Error(v).stack,v!==void 0&&(this.stack=this.toString()+`
|
|
913
|
-
`+v.replace(/^Error(:[^\n]*)?\n/,""))});return C.prototype=Object.create(E.prototype),C.prototype.constructor=C,C.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},C}var nt=void 0;function X(p){throw new nt(p)}var It=p=>(p||X("Cannot use deleted val. handle = "+p),P[p].value),ie=p=>{switch(p){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var E=q.length?q.pop():P.length;return P[E]={ga:1,value:p},E}},re=void 0,Nt=void 0;function ct(p){for(var E="";B[p];)E+=Nt[B[p++]];return E}var yt=[];function Tt(){for(;yt.length;){var p=yt.pop();p.M.$=!1,p.delete()}}var Jt=void 0,_t={};function Zt(p,E){for(E===void 0&&X("ptr should not be undefined");p.R;)E=p.ba(E),p=p.R;return E}var Le={};function Xr(p){p=wu(p);var E=ct(p);return Ze(p),E}function On(p,E){var C=Le[p];return C===void 0&&X(E+" has unknown type "+Xr(p)),C}function jr(){}var Hn=!1;function pu(p){--p.count.value,p.count.value===0&&(p.T?p.U.W(p.T):p.P.N.W(p.O))}function Eu(p,E,C){return E===C?p:C.R===void 0?null:(p=Eu(p,E,C.R),p===null?null:C.na(p))}var Bu={};function uE(p,E){return E=Zt(p,E),_t[E]}var Cu=void 0;function Zr(p){throw new Cu(p)}function $r(p,E){return E.P&&E.O||Zr("makeClassHandle requires ptr and ptrType"),!!E.U!=!!E.T&&Zr("Both smartPtrType and smartPtr must be specified"),E.count={value:1},oi(Object.create(p,{M:{value:E}}))}function oi(p){return typeof FinalizationRegistry>"u"?(oi=E=>E,p):(Hn=new FinalizationRegistry(E=>{pu(E.M)}),oi=E=>{var C=E.M;return C.T&&Hn.register(E,{M:C},E),E},jr=E=>{Hn.unregister(E)},oi(p))}var ts={};function Jn(p){for(;p.length;){var E=p.pop();p.pop()(E)}}function tr(p){return this.fromWireType(b[p>>2])}var ai={},es={};function dA(p,E,C){function v(N){N=C(N),N.length!==p.length&&Zr("Mismatched type converter count");for(var Y=0;Y<p.length;++Y)Xe(p[Y],N[Y])}p.forEach(function(N){es[N]=E});var x=Array(E.length),R=[],U=0;E.forEach((N,Y)=>{Le.hasOwnProperty(N)?x[Y]=Le[N]:(R.push(N),ai.hasOwnProperty(N)||(ai[N]=[]),ai[N].push(()=>{x[Y]=Le[N],++U,U===R.length&&v(x)}))}),R.length===0&&v(x)}function Kn(p){switch(p){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+p)}}function Xe(p,E,C={}){if(!("argPackAdvance"in E))throw new TypeError("registerType registeredInstance requires argPackAdvance");var v=E.name;if(p||X('type "'+v+'" must have a positive integer typeid pointer'),Le.hasOwnProperty(p)){if(C.ua)return;X("Cannot register type '"+v+"' twice")}Le[p]=E,delete es[p],ai.hasOwnProperty(p)&&(E=ai[p],delete ai[p],E.forEach(x=>x()))}function Yn(p){X(p.M.P.N.name+" instance already deleted")}function IA(){}function Vn(p,E,C){if(p[E].S===void 0){var v=p[E];p[E]=function(){return p[E].S.hasOwnProperty(arguments.length)||X("Function '"+C+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+p[E].S+")!"),p[E].S[arguments.length].apply(this,arguments)},p[E].S=[],p[E].S[v.Z]=v}}function cE(p,E){e.hasOwnProperty(p)?(X("Cannot register public name '"+p+"' twice"),Vn(e,p,p),e.hasOwnProperty(void 0)&&X("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),e[p].S[void 0]=E):e[p]=E}function hE(p,E,C,v,x,R,U,N){this.name=p,this.constructor=E,this.X=C,this.W=v,this.R=x,this.pa=R,this.ba=U,this.na=N,this.ja=[]}function zn(p,E,C){for(;E!==C;)E.ba||X("Expected null or instance of "+C.name+", got an instance of "+E.name),p=E.ba(p),E=E.R;return p}function gE(p,E){return E===null?(this.ea&&X("null is not a valid "+this.name),0):(E.M||X('Cannot pass "'+jn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),zn(E.M.O,E.M.P.N,this.N))}function fE(p,E){if(E===null){if(this.ea&&X("null is not a valid "+this.name),this.da){var C=this.fa();return p!==null&&p.push(this.W,C),C}return 0}if(E.M||X('Cannot pass "'+jn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&E.M.P.ca&&X("Cannot convert argument of type "+(E.M.U?E.M.U.name:E.M.P.name)+" to parameter type "+this.name),C=zn(E.M.O,E.M.P.N,this.N),this.da)switch(E.M.T===void 0&&X("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:E.M.U===this?C=E.M.T:X("Cannot convert argument of type "+(E.M.U?E.M.U.name:E.M.P.name)+" to parameter type "+this.name);break;case 1:C=E.M.T;break;case 2:if(E.M.U===this)C=E.M.T;else{var v=E.clone();C=this.xa(C,ie(function(){v.delete()})),p!==null&&p.push(this.W,C)}break;default:X("Unsupporting sharing policy")}return C}function dE(p,E){return E===null?(this.ea&&X("null is not a valid "+this.name),0):(E.M||X('Cannot pass "'+jn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),E.M.P.ca&&X("Cannot convert argument of type "+E.M.P.name+" to parameter type "+this.name),zn(E.M.O,E.M.P.N,this.N))}function je(p,E,C,v){this.name=p,this.N=E,this.ea=C,this.ca=v,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,E.R!==void 0?this.toWireType=fE:(this.toWireType=v?gE:dE,this.V=null)}function IE(p,E){e.hasOwnProperty(p)||Zr("Replacing nonexistant public symbol"),e[p]=E,e[p].Z=void 0}function pE(p,E){var C=[];return function(){if(C.length=0,Object.assign(C,arguments),p.includes("j")){var v=e["dynCall_"+p];v=C&&C.length?v.apply(null,[E].concat(C)):v.call(null,E)}else v=S.get(E).apply(null,C);return v}}function De(p,E){p=ct(p);var C=p.includes("j")?pE(p,E):S.get(E);return typeof C!="function"&&X("unknown function pointer with signature "+p+": "+E),C}var Qu=void 0;function As(p,E){function C(R){x[R]||Le[R]||(es[R]?es[R].forEach(C):(v.push(R),x[R]=!0))}var v=[],x={};throw E.forEach(C),new Qu(p+": "+v.map(Xr).join([", "]))}function Wn(p,E,C,v,x){var R=E.length;2>R&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");var U=E[1]!==null&&C!==null,N=!1;for(C=1;C<E.length;++C)if(E[C]!==null&&E[C].V===void 0){N=!0;break}var Y=E[0].name!=="void",H=R-2,j=Array(H),rt=[],ht=[];return function(){if(arguments.length!==H&&X("function "+p+" called with "+arguments.length+" arguments, expected "+H+" args!"),ht.length=0,rt.length=U?2:1,rt[0]=x,U){var Ft=E[1].toWireType(ht,this);rt[1]=Ft}for(var ft=0;ft<H;++ft)j[ft]=E[ft+2].toWireType(ht,arguments[ft]),rt.push(j[ft]);if(ft=v.apply(null,rt),N)Jn(ht);else for(var ge=U?1:2;ge<E.length;ge++){var me=ge===1?Ft:j[ge-2];E[ge].V!==null&&E[ge].V(me)}return Ft=Y?E[0].fromWireType(ft):void 0,Ft}}function qn(p,E){for(var C=[],v=0;v<p;v++)C.push(y[E+4*v>>2]);return C}function Xn(p){4<p&&--P[p].ga===0&&(P[p]=void 0,q.push(p))}function jn(p){if(p===null)return"null";var E=typeof p;return E==="object"||E==="array"||E==="function"?p.toString():""+p}function EE(p,E){switch(E){case 2:return function(C){return this.fromWireType(_[C>>2])};case 3:return function(C){return this.fromWireType(Q[C>>3])};default:throw new TypeError("Unknown float type: "+p)}}function BE(p,E,C){switch(E){case 0:return C?function(v){return d[v]}:function(v){return B[v]};case 1:return C?function(v){return I[v>>1]}:function(v){return F[v>>1]};case 2:return C?function(v){return b[v>>2]}:function(v){return y[v>>2]};default:throw new TypeError("Unknown integer type: "+p)}}function CE(p,E){for(var C="",v=0;!(v>=E/2);++v){var x=I[p+2*v>>1];if(x==0)break;C+=String.fromCharCode(x)}return C}function QE(p,E,C){if(C===void 0&&(C=2147483647),2>C)return 0;C-=2;var v=E;C=C<2*p.length?C/2:p.length;for(var x=0;x<C;++x)I[E>>1]=p.charCodeAt(x),E+=2;return I[E>>1]=0,E-v}function yE(p){return 2*p.length}function DE(p,E){for(var C=0,v="";!(C>=E/4);){var x=b[p+4*C>>2];if(x==0)break;++C,65536<=x?(x-=65536,v+=String.fromCharCode(55296|x>>10,56320|x&1023)):v+=String.fromCharCode(x)}return v}function mE(p,E,C){if(C===void 0&&(C=2147483647),4>C)return 0;var v=E;C=v+C-4;for(var x=0;x<p.length;++x){var R=p.charCodeAt(x);if(55296<=R&&57343>=R){var U=p.charCodeAt(++x);R=65536+((R&1023)<<10)|U&1023}if(b[E>>2]=R,E+=4,E+4>C)break}return b[E>>2]=0,E-v}function wE(p){for(var E=0,C=0;C<p.length;++C){var v=p.charCodeAt(C);55296<=v&&57343>=v&&++C,E+=4}return E}var vE={};function yu(p){var E=vE[p];return E===void 0?ct(p):E}var is=[];function _E(p){var E=is.length;return is.push(p),E}function bE(p,E){for(var C=Array(p),v=0;v<p;++v)C[v]=On(y[E+4*v>>2],"parameter "+v);return C}var Du=[],xE=[null,[],[]];nt=e.BindingError=Z("BindingError"),e.count_emval_handles=function(){for(var p=0,E=5;E<P.length;++E)P[E]!==void 0&&++p;return p},e.get_first_emval=function(){for(var p=5;p<P.length;++p)if(P[p]!==void 0)return P[p];return null},re=e.PureVirtualError=Z("PureVirtualError");for(var mu=Array(256),rs=0;256>rs;++rs)mu[rs]=String.fromCharCode(rs);Nt=mu,e.getInheritedInstanceCount=function(){return Object.keys(_t).length},e.getLiveInheritedInstances=function(){var p=[],E;for(E in _t)_t.hasOwnProperty(E)&&p.push(_t[E]);return p},e.flushPendingDeletes=Tt,e.setDelayFunction=function(p){Jt=p,yt.length&&Jt&&Jt(Tt)},Cu=e.InternalError=Z("InternalError"),IA.prototype.isAliasOf=function(p){if(!(this instanceof IA&&p instanceof IA))return!1;var E=this.M.P.N,C=this.M.O,v=p.M.P.N;for(p=p.M.O;E.R;)C=E.ba(C),E=E.R;for(;v.R;)p=v.ba(p),v=v.R;return E===v&&C===p},IA.prototype.clone=function(){if(this.M.O||Yn(this),this.M.aa)return this.M.count.value+=1,this;var p=oi,E=Object,C=E.create,v=Object.getPrototypeOf(this),x=this.M;return p=p(C.call(E,v,{M:{value:{count:x.count,$:x.$,aa:x.aa,O:x.O,P:x.P,T:x.T,U:x.U}}})),p.M.count.value+=1,p.M.$=!1,p},IA.prototype.delete=function(){this.M.O||Yn(this),this.M.$&&!this.M.aa&&X("Object already scheduled for deletion"),jr(this),pu(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},IA.prototype.isDeleted=function(){return!this.M.O},IA.prototype.deleteLater=function(){return this.M.O||Yn(this),this.M.$&&!this.M.aa&&X("Object already scheduled for deletion"),yt.push(this),yt.length===1&&Jt&&Jt(Tt),this.M.$=!0,this},je.prototype.qa=function(p){return this.ka&&(p=this.ka(p)),p},je.prototype.ha=function(p){this.W&&this.W(p)},je.prototype.argPackAdvance=8,je.prototype.readValueFromPointer=tr,je.prototype.deleteObject=function(p){p!==null&&p.delete()},je.prototype.fromWireType=function(p){function E(){return this.da?$r(this.N.X,{P:this.wa,O:C,U:this,T:p}):$r(this.N.X,{P:this,O:p})}var C=this.qa(p);if(!C)return this.ha(p),null;var v=uE(this.N,C);if(v!==void 0)return v.M.count.value===0?(v.M.O=C,v.M.T=p,v.clone()):(v=v.clone(),this.ha(p),v);if(v=this.N.pa(C),v=Bu[v],!v)return E.call(this);v=this.ca?v.la:v.pointerType;var x=Eu(C,this.N,v.N);return x===null?E.call(this):this.da?$r(v.N.X,{P:v,O:x,U:this,T:p}):$r(v.N.X,{P:v,O:x})},Qu=e.UnboundTypeError=Z("UnboundTypeError");var FE=typeof atob=="function"?atob:function(p){var E="",C=0;p=p.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(p.charAt(C++)),x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(p.charAt(C++)),R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(p.charAt(C++)),U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(p.charAt(C++));v=v<<2|x>>4,x=(x&15)<<4|R>>2;var N=(R&3)<<6|U;E+=String.fromCharCode(v),R!==64&&(E+=String.fromCharCode(x)),U!==64&&(E+=String.fromCharCode(N))}while(C<p.length);return E},SE={l:function(p,E,C,v){K("Assertion failed: "+(p?g(B,p):"")+", at: "+[E?E?g(B,E):"":"unknown filename",C,v?v?g(B,v):"":"unknown function"])},q:function(p,E,C){p=ct(p),E=On(E,"wrapper"),C=It(C);var v=[].slice,x=E.N,R=x.X,U=x.R.X,N=x.R.constructor;p=k(p,function(){x.R.ja.forEach((function(H){if(this[H]===U[H])throw new re("Pure virtual function "+H+" must be implemented in JavaScript")}).bind(this)),Object.defineProperty(this,"__parent",{value:R}),this.__construct.apply(this,v.call(arguments))}),R.__construct=function(){this===R&&X("Pass correct 'this' to __construct");var H=N.implement.apply(void 0,[this].concat(v.call(arguments)));jr(H);var j=H.M;H.notifyOnDestruction(),j.aa=!0,Object.defineProperties(this,{M:{value:j}}),oi(this),H=j.O,H=Zt(x,H),_t.hasOwnProperty(H)?X("Tried to register registered instance: "+H):_t[H]=this},R.__destruct=function(){this===R&&X("Pass correct 'this' to __destruct"),jr(this);var H=this.M.O;H=Zt(x,H),_t.hasOwnProperty(H)?delete _t[H]:X("Tried to unregister unregistered instance: "+H)},p.prototype=Object.create(R);for(var Y in C)p.prototype[Y]=C[Y];return ie(p)},j:function(p){var E=ts[p];delete ts[p];var C=E.fa,v=E.W,x=E.ia,R=x.map(U=>U.ta).concat(x.map(U=>U.za));dA([p],R,U=>{var N={};return x.forEach((Y,H)=>{var j=U[H],rt=Y.ra,ht=Y.sa,Ft=U[H+x.length],ft=Y.ya,ge=Y.Aa;N[Y.oa]={read:me=>j.fromWireType(rt(ht,me)),write:(me,er)=>{var $e=[];ft(ge,me,Ft.toWireType($e,er)),Jn($e)}}}),[{name:E.name,fromWireType:function(Y){var H={},j;for(j in N)H[j]=N[j].read(Y);return v(Y),H},toWireType:function(Y,H){for(var j in N)if(!(j in H))throw new TypeError('Missing field: "'+j+'"');var rt=C();for(j in N)N[j].write(rt,H[j]);return Y!==null&&Y.push(v,rt),rt},argPackAdvance:8,readValueFromPointer:tr,V:v}]})},v:function(){},B:function(p,E,C,v,x){var R=Kn(C);E=ct(E),Xe(p,{name:E,fromWireType:function(U){return!!U},toWireType:function(U,N){return N?v:x},argPackAdvance:8,readValueFromPointer:function(U){if(C===1)var N=d;else if(C===2)N=I;else if(C===4)N=b;else throw new TypeError("Unknown boolean type size: "+E);return this.fromWireType(N[U>>R])},V:null})},f:function(p,E,C,v,x,R,U,N,Y,H,j,rt,ht){j=ct(j),R=De(x,R),N&&(N=De(U,N)),H&&(H=De(Y,H)),ht=De(rt,ht);var Ft=tt(j);cE(Ft,function(){As("Cannot construct "+j+" due to unbound types",[v])}),dA([p,E,C],v?[v]:[],function(ft){if(ft=ft[0],v)var ge=ft.N,me=ge.X;else me=IA.prototype;ft=k(Ft,function(){if(Object.getPrototypeOf(this)!==er)throw new nt("Use 'new' to construct "+j);if($e.Y===void 0)throw new nt(j+" has no accessible constructor");var bu=$e.Y[arguments.length];if(bu===void 0)throw new nt("Tried to invoke ctor of "+j+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys($e.Y).toString()+") parameters instead!");return bu.apply(this,arguments)});var er=Object.create(me,{constructor:{value:ft}});ft.prototype=er;var $e=new hE(j,ft,er,ht,ge,R,N,H);ge=new je(j,$e,!0,!1),me=new je(j+"*",$e,!1,!1);var _u=new je(j+" const*",$e,!1,!0);return Bu[p]={pointerType:me,la:_u},IE(Ft,ft),[ge,me,_u]})},d:function(p,E,C,v,x,R,U){var N=qn(C,v);E=ct(E),R=De(x,R),dA([],[p],function(Y){function H(){As("Cannot call "+j+" due to unbound types",N)}Y=Y[0];var j=Y.name+"."+E;E.startsWith("@@")&&(E=Symbol[E.substring(2)]);var rt=Y.N.constructor;return rt[E]===void 0?(H.Z=C-1,rt[E]=H):(Vn(rt,E,j),rt[E].S[C-1]=H),dA([],N,function(ht){return ht=Wn(j,[ht[0],null].concat(ht.slice(1)),null,R,U),rt[E].S===void 0?(ht.Z=C-1,rt[E]=ht):rt[E].S[C-1]=ht,[]}),[]})},p:function(p,E,C,v,x,R){0<E||K();var U=qn(E,C);x=De(v,x),dA([],[p],function(N){N=N[0];var Y="constructor "+N.name;if(N.N.Y===void 0&&(N.N.Y=[]),N.N.Y[E-1]!==void 0)throw new nt("Cannot register multiple constructors with identical number of parameters ("+(E-1)+") for class '"+N.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return N.N.Y[E-1]=()=>{As("Cannot construct "+N.name+" due to unbound types",U)},dA([],U,function(H){return H.splice(1,0,null),N.N.Y[E-1]=Wn(Y,H,null,x,R),[]}),[]})},a:function(p,E,C,v,x,R,U,N){var Y=qn(C,v);E=ct(E),R=De(x,R),dA([],[p],function(H){function j(){As("Cannot call "+rt+" due to unbound types",Y)}H=H[0];var rt=H.name+"."+E;E.startsWith("@@")&&(E=Symbol[E.substring(2)]),N&&H.N.ja.push(E);var ht=H.N.X,Ft=ht[E];return Ft===void 0||Ft.S===void 0&&Ft.className!==H.name&&Ft.Z===C-2?(j.Z=C-2,j.className=H.name,ht[E]=j):(Vn(ht,E,rt),ht[E].S[C-2]=j),dA([],Y,function(ft){return ft=Wn(rt,ft,H,R,U),ht[E].S===void 0?(ft.Z=C-2,ht[E]=ft):ht[E].S[C-2]=ft,[]}),[]})},A:function(p,E){E=ct(E),Xe(p,{name:E,fromWireType:function(C){var v=It(C);return Xn(C),v},toWireType:function(C,v){return ie(v)},argPackAdvance:8,readValueFromPointer:tr,V:null})},n:function(p,E,C){C=Kn(C),E=ct(E),Xe(p,{name:E,fromWireType:function(v){return v},toWireType:function(v,x){return x},argPackAdvance:8,readValueFromPointer:EE(E,C),V:null})},e:function(p,E,C,v,x){E=ct(E),x===-1&&(x=4294967295),x=Kn(C);var R=N=>N;if(v===0){var U=32-8*C;R=N=>N<<U>>>U}C=E.includes("unsigned")?function(N,Y){return Y>>>0}:function(N,Y){return Y},Xe(p,{name:E,fromWireType:R,toWireType:C,argPackAdvance:8,readValueFromPointer:BE(E,x,v!==0),V:null})},b:function(p,E,C){function v(R){R>>=2;var U=y;return new x(f,U[R+1],U[R])}var x=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][E];C=ct(C),Xe(p,{name:C,fromWireType:v,argPackAdvance:8,readValueFromPointer:v},{ua:!0})},o:function(p,E){E=ct(E);var C=E==="std::string";Xe(p,{name:E,fromWireType:function(v){var x=y[v>>2],R=v+4;if(C)for(var U=R,N=0;N<=x;++N){var Y=R+N;if(N==x||B[Y]==0){if(U=U?g(B,U,Y-U):"",H===void 0)var H=U;else H+="\0",H+=U;U=Y+1}}else{for(H=Array(x),N=0;N<x;++N)H[N]=String.fromCharCode(B[R+N]);H=H.join("")}return Ze(v),H},toWireType:function(v,x){x instanceof ArrayBuffer&&(x=new Uint8Array(x));var R,U=typeof x=="string";if(U||x instanceof Uint8Array||x instanceof Uint8ClampedArray||x instanceof Int8Array||X("Cannot pass non-string to std::string"),C&&U){var N=0;for(R=0;R<x.length;++R){var Y=x.charCodeAt(R);127>=Y?N++:2047>=Y?N+=2:55296<=Y&&57343>=Y?(N+=4,++R):N+=3}R=N}else R=x.length;if(N=Zn(4+R+1),Y=N+4,y[N>>2]=R,C&&U){if(U=Y,Y=R+1,R=B,0<Y){Y=U+Y-1;for(var H=0;H<x.length;++H){var j=x.charCodeAt(H);if(55296<=j&&57343>=j){var rt=x.charCodeAt(++H);j=65536+((j&1023)<<10)|rt&1023}if(127>=j){if(U>=Y)break;R[U++]=j}else{if(2047>=j){if(U+1>=Y)break;R[U++]=192|j>>6}else{if(65535>=j){if(U+2>=Y)break;R[U++]=224|j>>12}else{if(U+3>=Y)break;R[U++]=240|j>>18,R[U++]=128|j>>12&63}R[U++]=128|j>>6&63}R[U++]=128|j&63}}R[U]=0}}else if(U)for(U=0;U<R;++U)H=x.charCodeAt(U),255<H&&(Ze(Y),X("String has UTF-16 code units that do not fit in 8 bits")),B[Y+U]=H;else for(U=0;U<R;++U)B[Y+U]=x[U];return v!==null&&v.push(Ze,N),N},argPackAdvance:8,readValueFromPointer:tr,V:function(v){Ze(v)}})},i:function(p,E,C){if(C=ct(C),E===2)var v=CE,x=QE,R=yE,U=()=>F,N=1;else E===4&&(v=DE,x=mE,R=wE,U=()=>y,N=2);Xe(p,{name:C,fromWireType:function(Y){for(var H=y[Y>>2],j=U(),rt,ht=Y+4,Ft=0;Ft<=H;++Ft){var ft=Y+4+Ft*E;(Ft==H||j[ft>>N]==0)&&(ht=v(ht,ft-ht),rt===void 0?rt=ht:(rt+="\0",rt+=ht),ht=ft+E)}return Ze(Y),rt},toWireType:function(Y,H){typeof H!="string"&&X("Cannot pass non-string to C++ string type "+C);var j=R(H),rt=Zn(4+j+E);return y[rt>>2]=j>>N,x(H,rt+4,j+E),Y!==null&&Y.push(Ze,rt),rt},argPackAdvance:8,readValueFromPointer:tr,V:function(Y){Ze(Y)}})},k:function(p,E,C,v,x,R){ts[p]={name:ct(E),fa:De(C,v),W:De(x,R),ia:[]}},h:function(p,E,C,v,x,R,U,N,Y,H){ts[p].ia.push({oa:ct(E),ta:C,ra:De(v,x),sa:R,za:U,ya:De(N,Y),Aa:H})},C:function(p,E){E=ct(E),Xe(p,{va:!0,name:E,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(p,E,C,v,x){p=is[p],E=It(E),C=yu(C);var R=[];return y[v>>2]=ie(R),p(E,C,R,x)},t:function(p,E,C,v){p=is[p],E=It(E),C=yu(C),p(E,C,null,v)},g:Xn,m:function(p,E){var C=bE(p,E),v=C[0];E=v.name+"_$"+C.slice(1).map(function(U){return U.name}).join("_")+"$";var x=Du[E];if(x!==void 0)return x;var R=Array(p-1);return x=_E((U,N,Y,H)=>{for(var j=0,rt=0;rt<p-1;++rt)R[rt]=C[rt+1].readValueFromPointer(H+j),j+=C[rt+1].argPackAdvance;for(U=U[N].apply(U,R),rt=0;rt<p-1;++rt)C[rt+1].ma&&C[rt+1].ma(R[rt]);if(!v.va)return v.toWireType(Y,U)}),Du[E]=x},D:function(p){4<p&&(P[p].ga+=1)},r:function(p){var E=It(p);Jn(E),Xn(p)},c:function(){K("")},x:function(p,E,C){B.copyWithin(p,E,E+C)},w:function(p){var E=B.length;if(p>>>=0,2147483648<p)return!1;for(var C=1;4>=C;C*=2){var v=E*(1+.2/C);v=Math.min(v,p+100663296);var x=Math;v=Math.max(p,v),x=x.min.call(x,2147483648,v+(65536-v%65536)%65536);t:{try{u.grow(x-f.byteLength+65535>>>16),D();var R=1;break t}catch{}R=void 0}if(R)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(p,E,C,v){for(var x=0,R=0;R<C;R++){var U=y[E>>2],N=y[E+4>>2];E+=8;for(var Y=0;Y<N;Y++){var H=B[U+Y],j=xE[p];H===0||H===10?((p===1?o:a)(g(j,0)),j.length=0):j.push(H)}x+=N}return y[v>>2]=x,0}};(function(){function p(x){e.asm=x.exports,u=e.asm.E,D(),S=e.asm.J,V.unshift(e.asm.F),J--,e.monitorRunDependencies&&e.monitorRunDependencies(J),J==0&&$&&(x=$,$=null,x())}function E(x){p(x.instance)}function C(x){return At().then(function(R){return WebAssembly.instantiate(R,v)}).then(function(R){return R}).then(x,function(R){a("failed to asynchronously prepare wasm: "+R),K(R)})}var v={a:SE};if(J++,e.monitorRunDependencies&&e.monitorRunDependencies(J),e.instantiateWasm)try{return e.instantiateWasm(v,p)}catch(x){a("Module.instantiateWasm callback failed with error: "+x),i(x)}return function(){return l||typeof WebAssembly.instantiateStreaming!="function"||L(it)||typeof fetch!="function"?C(E):fetch(it,{credentials:"same-origin"}).then(function(x){return WebAssembly.instantiateStreaming(x,v).then(E,function(R){return a("wasm streaming compile failed: "+R),a("falling back to ArrayBuffer instantiation"),C(E)})})}().catch(i),{}})(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.F).apply(null,arguments)};var wu=e.___getTypeName=function(){return(wu=e.___getTypeName=e.asm.G).apply(null,arguments)};e.__embind_initialize_bindings=function(){return(e.__embind_initialize_bindings=e.asm.H).apply(null,arguments)};var Zn=e._malloc=function(){return(Zn=e._malloc=e.asm.I).apply(null,arguments)},Ze=e._free=function(){return(Ze=e._free=e.asm.K).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.L).apply(null,arguments)};var ss;$=function p(){ss||vu(),ss||($=p)};function vu(){function p(){if(!ss&&(ss=!0,e.calledRun=!0,!c)){if(T(V),A(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;){var E=e.postRun.shift();et.unshift(E)}T(et)}}if(!(0<J)){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)z();T(M),0<J||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),p()},1)):p())}}if(e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return vu(),t.ready}})();let Ut=function(r){return r[r.Auto=0]="Auto",r[r.FlexStart=1]="FlexStart",r[r.Center=2]="Center",r[r.FlexEnd=3]="FlexEnd",r[r.Stretch=4]="Stretch",r[r.Baseline=5]="Baseline",r[r.SpaceBetween=6]="SpaceBetween",r[r.SpaceAround=7]="SpaceAround",r[r.SpaceEvenly=8]="SpaceEvenly",r}({}),Hr=function(r){return r[r.BorderBox=0]="BorderBox",r[r.ContentBox=1]="ContentBox",r}({}),Gl=function(r){return r[r.Width=0]="Width",r[r.Height=1]="Height",r}({}),cA=function(r){return r[r.Inherit=0]="Inherit",r[r.LTR=1]="LTR",r[r.RTL=2]="RTL",r}({}),jA=function(r){return r[r.Flex=0]="Flex",r[r.None=1]="None",r[r.Contents=2]="Contents",r}({}),dt=function(r){return r[r.Left=0]="Left",r[r.Top=1]="Top",r[r.Right=2]="Right",r[r.Bottom=3]="Bottom",r[r.Start=4]="Start",r[r.End=5]="End",r[r.Horizontal=6]="Horizontal",r[r.Vertical=7]="Vertical",r[r.All=8]="All",r}({}),ZA=function(r){return r[r.None=0]="None",r[r.StretchFlexBasis=1]="StretchFlexBasis",r[r.AbsolutePositionWithoutInsetsExcludesPadding=2]="AbsolutePositionWithoutInsetsExcludesPadding",r[r.AbsolutePercentAgainstInnerSize=4]="AbsolutePercentAgainstInnerSize",r[r.All=2147483647]="All",r[r.Classic=2147483646]="Classic",r}({}),VI=function(r){return r[r.WebFlexBasis=0]="WebFlexBasis",r}({}),hA=function(r){return r[r.Column=0]="Column",r[r.ColumnReverse=1]="ColumnReverse",r[r.Row=2]="Row",r[r.RowReverse=3]="RowReverse",r}({}),Jr=function(r){return r[r.Column=0]="Column",r[r.Row=1]="Row",r[r.All=2]="All",r}({}),pe=function(r){return r[r.FlexStart=0]="FlexStart",r[r.Center=1]="Center",r[r.FlexEnd=2]="FlexEnd",r[r.SpaceBetween=3]="SpaceBetween",r[r.SpaceAround=4]="SpaceAround",r[r.SpaceEvenly=5]="SpaceEvenly",r}({}),$A=function(r){return r[r.Error=0]="Error",r[r.Warn=1]="Warn",r[r.Info=2]="Info",r[r.Debug=3]="Debug",r[r.Verbose=4]="Verbose",r[r.Fatal=5]="Fatal",r}({}),Un=function(r){return r[r.Undefined=0]="Undefined",r[r.Exactly=1]="Exactly",r[r.AtMost=2]="AtMost",r}({}),Ol=function(r){return r[r.Default=0]="Default",r[r.Text=1]="Text",r}({}),ti=function(r){return r[r.Visible=0]="Visible",r[r.Hidden=1]="Hidden",r[r.Scroll=2]="Scroll",r}({}),ei=function(r){return r[r.Static=0]="Static",r[r.Relative=1]="Relative",r[r.Absolute=2]="Absolute",r}({}),ke=function(r){return r[r.Undefined=0]="Undefined",r[r.Point=1]="Point",r[r.Percent=2]="Percent",r[r.Auto=3]="Auto",r}({}),Ai=function(r){return r[r.NoWrap=0]="NoWrap",r[r.Wrap=1]="Wrap",r[r.WrapReverse=2]="WrapReverse",r}({});const zI={ALIGN_AUTO:Ut.Auto,ALIGN_FLEX_START:Ut.FlexStart,ALIGN_CENTER:Ut.Center,ALIGN_FLEX_END:Ut.FlexEnd,ALIGN_STRETCH:Ut.Stretch,ALIGN_BASELINE:Ut.Baseline,ALIGN_SPACE_BETWEEN:Ut.SpaceBetween,ALIGN_SPACE_AROUND:Ut.SpaceAround,ALIGN_SPACE_EVENLY:Ut.SpaceEvenly,BOX_SIZING_BORDER_BOX:Hr.BorderBox,BOX_SIZING_CONTENT_BOX:Hr.ContentBox,DIMENSION_WIDTH:Gl.Width,DIMENSION_HEIGHT:Gl.Height,DIRECTION_INHERIT:cA.Inherit,DIRECTION_LTR:cA.LTR,DIRECTION_RTL:cA.RTL,DISPLAY_FLEX:jA.Flex,DISPLAY_NONE:jA.None,DISPLAY_CONTENTS:jA.Contents,EDGE_LEFT:dt.Left,EDGE_TOP:dt.Top,EDGE_RIGHT:dt.Right,EDGE_BOTTOM:dt.Bottom,EDGE_START:dt.Start,EDGE_END:dt.End,EDGE_HORIZONTAL:dt.Horizontal,EDGE_VERTICAL:dt.Vertical,EDGE_ALL:dt.All,ERRATA_NONE:ZA.None,ERRATA_STRETCH_FLEX_BASIS:ZA.StretchFlexBasis,ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING:ZA.AbsolutePositionWithoutInsetsExcludesPadding,ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE:ZA.AbsolutePercentAgainstInnerSize,ERRATA_ALL:ZA.All,ERRATA_CLASSIC:ZA.Classic,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:VI.WebFlexBasis,FLEX_DIRECTION_COLUMN:hA.Column,FLEX_DIRECTION_COLUMN_REVERSE:hA.ColumnReverse,FLEX_DIRECTION_ROW:hA.Row,FLEX_DIRECTION_ROW_REVERSE:hA.RowReverse,GUTTER_COLUMN:Jr.Column,GUTTER_ROW:Jr.Row,GUTTER_ALL:Jr.All,JUSTIFY_FLEX_START:pe.FlexStart,JUSTIFY_CENTER:pe.Center,JUSTIFY_FLEX_END:pe.FlexEnd,JUSTIFY_SPACE_BETWEEN:pe.SpaceBetween,JUSTIFY_SPACE_AROUND:pe.SpaceAround,JUSTIFY_SPACE_EVENLY:pe.SpaceEvenly,LOG_LEVEL_ERROR:$A.Error,LOG_LEVEL_WARN:$A.Warn,LOG_LEVEL_INFO:$A.Info,LOG_LEVEL_DEBUG:$A.Debug,LOG_LEVEL_VERBOSE:$A.Verbose,LOG_LEVEL_FATAL:$A.Fatal,MEASURE_MODE_UNDEFINED:Un.Undefined,MEASURE_MODE_EXACTLY:Un.Exactly,MEASURE_MODE_AT_MOST:Un.AtMost,NODE_TYPE_DEFAULT:Ol.Default,NODE_TYPE_TEXT:Ol.Text,OVERFLOW_VISIBLE:ti.Visible,OVERFLOW_HIDDEN:ti.Hidden,OVERFLOW_SCROLL:ti.Scroll,POSITION_TYPE_STATIC:ei.Static,POSITION_TYPE_RELATIVE:ei.Relative,POSITION_TYPE_ABSOLUTE:ei.Absolute,UNIT_UNDEFINED:ke.Undefined,UNIT_POINT:ke.Point,UNIT_PERCENT:ke.Percent,UNIT_AUTO:ke.Auto,WRAP_NO_WRAP:Ai.NoWrap,WRAP_WRAP:Ai.Wrap,WRAP_WRAP_REVERSE:Ai.WrapReverse};function WI(r){function t(i,s,n){const o=i[s];i[s]=function(){for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];return n.call(this,o,...l)}}for(const i of["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding","setGap"]){const s={[ke.Point]:r.Node.prototype[i],[ke.Percent]:r.Node.prototype[`${i}Percent`],[ke.Auto]:r.Node.prototype[`${i}Auto`]};t(r.Node.prototype,i,function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];const u=a.pop();let c,g;if(u==="auto")c=ke.Auto,g=void 0;else if(typeof u=="object")c=u.unit,g=u.valueOf();else if(c=typeof u=="string"&&u.endsWith("%")?ke.Percent:ke.Point,g=parseFloat(u),u!==void 0&&!Number.isNaN(u)&&Number.isNaN(g))throw new Error(`Invalid value ${u} for ${i}`);if(!s[c])throw new Error(`Failed to execute "${i}": Unsupported unit '${u}'`);return g!==void 0?s[c].call(this,...a,g):s[c].call(this,...a)})}function e(i){return r.MeasureCallback.implement({measure:function(){const{width:s,height:n}=i(...arguments);return{width:s??NaN,height:n??NaN}}})}t(r.Node.prototype,"setMeasureFunc",function(i,s){return s?i.call(this,e(s)):this.unsetMeasureFunc()});function A(i){return r.DirtiedCallback.implement({dirtied:i})}return t(r.Node.prototype,"setDirtiedFunc",function(i,s){i.call(this,A(s))}),t(r.Config.prototype,"free",function(){r.Config.destroy(this)}),t(r.Node,"create",(i,s)=>s?r.Node.createWithConfig(s):r.Node.createDefault()),t(r.Node.prototype,"free",function(){r.Node.destroy(this)}),t(r.Node.prototype,"freeRecursive",function(){for(let i=0,s=this.getChildCount();i<s;++i)this.getChild(0).freeRecursive();this.free()}),t(r.Node.prototype,"calculateLayout",function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:cA.LTR;return i.call(this,s,n,o)}),{Config:r.Config,Node:r.Node,...zI}}async function qI(){return WI(await YI())}class Hl extends Ui{constructor(t){super(),this.setProperties(t)}}const ii={auto:Ut.Auto,"flex-start":Ut.FlexStart,center:Ut.Center,"flex-end":Ut.FlexEnd,stretch:Ut.Stretch,baseline:Ut.Baseline,"space-between":Ut.SpaceBetween,"space-around":Ut.SpaceAround,"space-evenly":Ut.SpaceEvenly},Jl={none:jA.None,flex:jA.Flex,contents:jA.Contents},Kl={inherit:cA.Inherit,ltr:cA.LTR,rtl:cA.RTL},Yl={column:hA.Column,"column-reverse":hA.ColumnReverse,row:hA.Row,"row-reverse":hA.RowReverse},Vl={"no-wrap":Ai.NoWrap,wrap:Ai.Wrap,"Wrap-reverse":Ai.WrapReverse},zl={"flex-start":pe.FlexStart,center:pe.Center,"flex-end":pe.FlexEnd,"space-between":pe.SpaceBetween,"space-around":pe.SpaceAround,"space-evenly":pe.SpaceEvenly},Wl={visible:ti.Visible,hidden:ti.Hidden,scroll:ti.Scroll},ql={static:ei.Static,relative:ei.Relative,absolute:ei.Absolute},Xl={"border-box":Hr.BorderBox,"content-box":Hr.ContentBox};class Kr{constructor(t){this._element=t}static _yoga;static async load(){this._yoga=await qI()}_node=Kr._yoga.Node.create();get _style(){return this._element.style}get offsetLeft(){return this._node.getComputedLeft()}get offsetTop(){return this._node.getComputedTop()}get offsetWidth(){return this._node.getComputedWidth()}get offsetHeight(){return this._node.getComputedHeight()}calculateLayout(t,e,A){return this._node.calculateLayout(t,e,A)}getComputedLayout(){return this._node.getComputedLayout()}updateStyleProperty(t,e,A,i){switch(t){case"alignContent":this._node.setAlignContent(e?ii[e]:ii["flex-start"]);break;case"alignItems":this._node.setAlignItems(e?ii[e]:ii["flex-start"]);break;case"alignSelf":this._node.setAlignSelf(e?ii[e]:ii["flex-start"]);break;case"aspectRatio":this._node.setAspectRatio(e);break;case"borderTop":this._node.setBorder(dt.Top,this._style.borderWidth);break;case"borderBottom":this._node.setBorder(dt.Bottom,this._style.borderWidth);break;case"borderLeft":this._node.setBorder(dt.Left,this._style.borderWidth);break;case"borderRight":this._node.setBorder(dt.Right,this._style.borderWidth);break;case"border":this._node.setBorder(dt.All,this._style.borderWidth);break;case"direction":this._node.setDirection(e?Kl[e]:Kl.inherit);break;case"display":this._node.setDisplay(e?Jl[e]:Jl.flex);break;case"flex":this._node.setFlex(this._style.flex);break;case"flexBasis":this._node.setFlexBasis(this._style.flexBasis);break;case"flexDirection":this._node.setFlexDirection(e?Yl[e]:Yl.row);break;case"flexGrow":this._node.setFlexGrow(this._style.flexGrow);break;case"flexShrink":this._node.setFlexShrink(this._style.flexShrink);break;case"flexWrap":this._node.setFlexWrap(e?Vl[e]:Vl.wrap);break;case"height":this._node.setHeight(this._style.height);break;case"justifyContent":this._node.setJustifyContent(e?zl[e]:zl["flex-start"]);break;case"gap":e!==void 0&&this._node.setGap(Jr.All,e);break;case"marginTop":this._node.setMargin(dt.Top,e);break;case"marginBottom":this._node.setMargin(dt.Top,e);break;case"marginLeft":this._node.setMargin(dt.Left,e);break;case"marginRight":this._node.setMargin(dt.Top,e);break;case"margin":this._node.setMargin(dt.All,e);break;case"maxHeight":this._node.setMaxHeight(e);break;case"maxWidth":this._node.setMaxWidth(e);break;case"minHeight":this._node.setMinHeight(this._style.minHeight);break;case"minWidth":this._node.setMinWidth(this._style.minWidth);break;case"overflow":this._node.setOverflow(e?Wl[e]:Wl.visible);break;case"paddingTop":this._node.setPadding(dt.Top,this._style.paddingTop);break;case"paddingBottom":this._node.setPadding(dt.Bottom,this._style.paddingBottom);break;case"paddingLeft":this._node.setPadding(dt.Left,this._style.paddingLeft);break;case"paddingRight":this._node.setPadding(dt.Right,this._style.paddingRight);break;case"padding":this._node.setPadding(dt.All,this._style.padding);break;case"top":this._node.setPosition(dt.Top,this._style.top);break;case"bottom":this._node.setPosition(dt.Bottom,this._style.bottom);break;case"left":this._node.setPosition(dt.Left,this._style.left);break;case"right":this._node.setPosition(dt.Right,this._style.right);break;case"position":this._node.setPositionType(e?ql[e]:ql.static);break;case"boxSizing":this._node.setBoxSizing(e?Xl[e]:Xl["content-box"]);break;case"width":this._node.setWidth(this._style.width);break}}}var XI=Object.getOwnPropertyDescriptor,jI=(r,t,e,A)=>{for(var i=A>1?void 0:A?XI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.FlexElement2D=class extends h.BaseElement2D{get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}_layout=new Kr(this);get offsetLeft(){return this._layout.offsetLeft}get offsetTop(){return this._layout.offsetTop}get offsetWidth(){return this._layout.offsetWidth}get offsetHeight(){return this._layout.offsetHeight}constructor(t,e=[]){super(),this.style=new Hl,this.setProperties(t).append(e)}_parented(t){super._parented(t),t._layout&&this._layout._node&&t._layout._node.insertChild(this._layout._node,t._layout._node.getChildCount())}_unparented(t){super._unparented(t),t._layout?._node&&t._layout._node.removeChild(this._layout._node)}_updateStyleProperty(t,e,A,i){super._updateStyleProperty(t,e,A,i),this._layout.updateStyleProperty(t,e,A,i),this._layout._node.isDirty()&&this.requestRelayout()}updateTransform(){this.calculateLayout(void 0,void 0,cA.LTR);const{left:t,top:e,width:A,height:i}=this._layout.getComputedLayout();this.position.x=t,this.position.y=e,this.size.x=A,this.size.y=i,super.updateTransform()}calculateLayout(t,e,A){const i=this.getParent();i?._layout?.calculateLayout?i?._layout.calculateLayout(t,e,A):this._layout.calculateLayout(t,e,A)}},h.FlexElement2D=jI([st("FlexElement2D")],h.FlexElement2D);var ZI=Object.defineProperty,$I=Object.getOwnPropertyDescriptor,ji=(r,t,e,A)=>{for(var i=A>1?void 0:A?$I(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&ZI(t,e,i),i};h.Image2D=class extends h.Element2D{get currentFrameTexture(){return this.texture?.frames[this._frameIndex]?.texture}get textureDuration(){return this.texture?.duration??0}get naturalWidth(){return this.currentFrameTexture?.realWidth??0}get naturalHeight(){return this.currentFrameTexture?.realHeight??0}get complete(){return this._complete}_frameIndex=0;_complete=!1;_wait=Promise.resolve();constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._wait=this._load(e);break;case"srcRect":this.requestRedraw();break}}decode(){return this._wait}setResource(t){let e;if(t instanceof fr?e=t:e=new fr(t),this.texture=e.updateDuration(),this.currentFrameTexture&&(!this.style.width||!this.style.height)){const A=this.currentFrameTexture;this.style.width=A.realWidth,this.style.height=A.realHeight}return this}async _load(t){if(this._complete=!1,t)try{this.setResource(this.gif||t?.includes(".gif")?await Ne.gif.load(t):await Ne.texture.load(t)),this.requestRedraw(),this.emit("load")}catch(e){console.warn(e),this.emit("error",e)}else this.texture=void 0;this._complete=!0}_getFrameCurrentTime(){const t=this.textureDuration;if(!t||!this._tree)return 0;const e=this._currentTime;return e<0?0:e%t}_updateFrameIndex(){if(!this.texture)return this;const t=this._getFrameCurrentTime(),e=this.texture.frames,A=e.length;if(A<=1&&this._frameIndex===0)return this;let i=A-1;for(let s=0,n=0;n<A;n++)if(s+=e[n].duration??0,s>=t){i=n;break}return this._frameIndex!==i&&(this._frameIndex=i,this.requestRedraw()),this}_process(t){this._updateFrameIndex(),super._process(t)}_drawContent(){const t=this.currentFrameTexture;if(t?.valid){const{left:e=0,top:A=0,right:i=0,bottom:s=0}=this.srcRect??{},{width:n,height:o}=this.size;this.context.fillStyle=t;const a=Math.abs(1+(e+i))*n,l=Math.abs(1+(A+s))*o,u=1/a,c=1/l,g=e*n*u,f=A*o*c;this.context.uvTransform=new Yt().scale(u,c).translate(g,f),this.shape.draw(),this.context.fill()}}_repaint(t){return super._repaint(t).map(e=>({...e,disableWrapMode:!0}))}},ji([w({protected:!0})],h.Image2D.prototype,"texture",2),ji([w({fallback:""})],h.Image2D.prototype,"src",2),ji([w()],h.Image2D.prototype,"srcRect",2),ji([w({fallback:!1})],h.Image2D.prototype,"gif",2),h.Image2D=ji([st("Image2D")],h.Image2D);class Yr extends h.Element2D{texture;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_drawContent(){if(this.texture?.valid){const{width:t,height:e}=this.size;this.context.fillStyle=this.texture,this.context.uvTransform=new Yt().scale(1/t,1/e),this.shape.drawRect(),this.context.fill()}}}var tp=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,jl=(r,t,e,A)=>{for(var i=A>1?void 0:A?ep(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&tp(t,e,i),i};h.Lottie2D=class extends Yr{texture=new Ei;animation;constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._load();break}}_updateStyleProperty(t,e,A){switch(super._updateStyleProperty(t,e,A),t){case"width":this.texture.width=this.style.width;break;case"height":this.texture.height=this.style.height;break}}async _load(){this.animation=await Ne.lottie.load(this.src,this.texture.source),this.duration=this.animation.getDuration(!1)*1e3,this.texture.requestUpload(),this.requestRedraw()}_process(t){this.animation?.goToAndStop(this.currentTime,!1),this.texture.requestUpload(),this.requestRedraw(),super._process(t)}},jl([w({fallback:""})],h.Lottie2D.prototype,"src",2),h.Lottie2D=jl([st("Lottie2D")],h.Lottie2D);var Ap=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,ri=(r,t,e,A)=>{for(var i=A>1?void 0:A?ip(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Ap(t,e,i),i};const rp=new Set(Object.keys(Rn));h.Text2D=class extends Yr{texture=new Ei;base=new Pe;measureResult;_subTextsCount=0;constructor(t,e=[]){super(),this.setProperties(t),this.append(e),t?.plugins&&t.plugins.forEach(A=>{this.base.use(A)})}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"content":case"effects":case"measureDOM":case"fonts":case"split":this._updateSplit(),this.requestRedraw();break}this._subTextsCount&&t==="effects"&&this._getSubTexts().forEach(s=>{s.setProperties({[t]:e})})}_updateBase(){this.base.style=this.style.toJSON(),this.emit("updateBase",this.base),this.base.requestUpdate()}_updateStyleProperty(t,e,A){switch(t){case"left":case"top":case"width":case"height":this.requestRedraw();break;default:super._updateStyleProperty(t,e,A);break}switch(t){case"width":this.split&&this._updateSubTexts();break}typeof t=="string"&&rp.has(t)&&(this._subTextsCount&&t!=="width"&&t!=="height"&&this._getSubTexts().forEach(i=>{i.style.setProperties({[t]:e})}),this.requestRedraw())}_getSubTexts(){return this.children.front.filter(t=>t instanceof h.Text2D)}_updateSubTexts(){const t=this._getSubTexts();let e=0;this.split&&this.updateMeasure().measureResult?.paragraphs.forEach(A=>{A.fragments.forEach(i=>{i.characters.forEach(s=>{const n=t[e];n&&(n.style.left=s.inlineBox.left,n.style.top=s.inlineBox.top),e++})})})}measure(){return this._updateBase(),this.base.measure()}updateMeasure(){this.measureResult=this.measure();const{boundingBox:t}=this.measureResult,{left:e,top:A}=this.style;return this.position.x=e+Math.min(0,t.left),this.position.y=A+Math.min(0,t.top),this.size.width=t.width,this.size.height=t.height,this}_updateSplit(){this._subTextsCount&&(this.children.front.forEach(t=>this.removeChild(t)),this._subTextsCount=0),this.split&&this.measure().paragraphs.forEach(t=>{t.fragments.forEach(e=>{e.characters.forEach(A=>{this.append(new h.Text2D({internalMode:"front",style:{...A.computedStyle,left:A.inlineBox.x,top:A.inlineBox.y,width:0,height:0},content:A.content,effects:this.effects,fonts:this.fonts})),this._subTextsCount++})})})}_redraw(){return this.updateMeasure(),super._redraw()}_drawContent(){this.split||(this.base.render({pixelRatio:this.texture.pixelRatio,view:this.texture.source}),this.texture.requestUpload(),super._drawContent())}},ri([w({fallback:!1})],h.Text2D.prototype,"split",2),ri([w({alias:"base.content"})],h.Text2D.prototype,"content",2),ri([w({alias:"base.effects"})],h.Text2D.prototype,"effects",2),ri([w({protected:!0,alias:"base.measureDOM"})],h.Text2D.prototype,"measureDOM",2),ri([w({protected:!0,alias:"base.fonts"})],h.Text2D.prototype,"fonts",2),h.Text2D=ri([st("Text2D")],h.Text2D);var sp=Object.defineProperty,np=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&sp(t,e,i),i};class Nn extends h.Element2D{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":this.requestRedraw();break}}_drawCircle(t,e){this.context.arc(t,e,this.handleSize,0,Math.PI*2,!0),this.context.fillStyle=Dt.WHITE,this.context.fill(),this.context.arc(t,e,this.handleSize,0,Math.PI*2,!0),this.context.strokeStyle="rgba(0, 0, 0, 0.2)",this.context.stroke()}_drawEllipse(t,e){this.context.roundRect(t-this.handleSize,e-this.handleSize*2,this.handleSize*2,this.handleSize*4,this.handleSize),this.context.fillStyle=Dt.WHITE,this.context.fill(),this.context.roundRect(t-this.handleSize,e-this.handleSize*2,this.handleSize*2,this.handleSize*4,this.handleSize),this.context.strokeStyle="rgba(0, 0, 0, 0.2)",this.context.stroke()}_draw(){const{width:t,height:e}=this.getRect();this.context.rect(0,0,t,e),this.context.strokeStyle="#00FF00",this.context.stroke(),this._drawCircle(0,0),this._drawCircle(t,e),this._drawCircle(0,e),this._drawEllipse(0,e/2),this._drawCircle(t,0),this._drawEllipse(t,e/2)}}np([w({fallback:6})],Nn.prototype,"handleSize");var op=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,Zl=(r,t,e,A)=>{for(var i=A>1?void 0:A?ap(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&op(t,e,i),i};h.Video2D=class extends Yr{get videoDuration(){return(this.texture?.duration??0)*1e3}_wait=Promise.resolve();constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._wait=this._load(e);break}}waitLoad(){return this._wait}async _load(t){this.texture=await Ne.video.load(t),(!this.style.width||!this.style.height)&&(this.style.width=this.texture.width,this.style.height=this.texture.height),this.requestRedraw()}_updateVideoCurrentTime(){let t=this._currentTime;if(t<0)return;const e=this.texture;if(!e)return;const A=e.duration;t=A?t%(A*1e3):0,!e.isPlaying&&!e.seeking&&(t=~~t/1e3,e.currentTime!==t&&(e.currentTime=t))}_process(t){this._updateVideoCurrentTime(),super._process(t)}},Zl([w({fallback:""})],h.Video2D.prototype,"src",2),h.Video2D=Zl([st("Video2D")],h.Video2D);var lp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,Zi=(r,t,e,A)=>{for(var i=A>1?void 0:A?up(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&lp(t,e,i),i};const $l=r=>r,tu=si(.25,.1,.25,1),eu=si(.42,0,1,1),Au=si(0,0,.58,1),iu=si(.42,0,.58,1);function si(r,t,e,A){const s=3*r-3*e+1,n=3*e-6*r,o=3*r,a=3*t-3*A+1,l=3*A-6*t,u=3*t,c=B=>(3*s*B+2*n)*B+o,g=B=>((s*B+n)*B+o)*B,f=B=>((a*B+l)*B+u)*B;function d(B){let I=B,F,b;for(let Q=0;Q<8;Q++){if(b=g(I)-B,Math.abs(b)<1e-6)return I;if(F=c(I),Math.abs(F)<1e-6)break;I-=b/F}let y=1,_=0;for(I=B;y>_;){if(b=g(I)-B,Math.abs(b)<1e-6)return I;b>0?y=I:_=I,I=(y+_)/2}return I}return B=>f(d(B))}const Vr={linear:$l,ease:tu,easeIn:eu,easeOut:Au,easeInOut:iu};h.Animation=class extends h.TimelineNode{_keyframes=[];_isFirstUpdatePosition=!1;_cachedProps=new uo;_stoped=!1;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_parented(t){super._parented(t),this._updateCachedProps()}_unparented(t){super._unparented(t),this.cancel()}_process(){this.canProcess()&&this.commitStyles()}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"effectMode":case"keyframes":this._updateKeyframes();break}}_getTargets(){let t;switch(this.effectMode){case"sibling":t=this.getParent()?.children.internal.filter(e=>e instanceof h.CanvasItem)??[];break;case"parent":default:t=[this.getParent()].filter(Boolean);break}return t.map(e=>e.style)}_updateKeyframes(){const t=[],e=this.keyframes;for(let s=e.length,n=0;n<s;n++){const{offset:o=n===0?0:n/(s-1),easing:a="linear",...l}=e[n];t.push({offset:o,easing:this._parseEasing(a),props:l})}const A=t[0],i=t[t.length-1];A&&A.offset!==0&&t.unshift({offset:0,easing:this._parseEasing("linear"),props:{}}),i&&i.offset!==1&&t.push({offset:1,easing:this._parseEasing("linear"),props:{}}),this._keyframes=t,this._updateCachedProps()}commitStyles(){if(!this.keyframes.length)return;if(this._updateCurrentTime(),this.isInsideTimeRange())this._isFirstUpdatePosition||(this._isFirstUpdatePosition=!0,this._updateCachedProps());else{if(!this._isFirstUpdatePosition)return;this._isFirstUpdatePosition=!1}const t=this._getTargets(),e=1/t.length,A=this.currentTimeProgress;t.forEach((i,s)=>{const n=e===1?A:Ke(0,Math.max(0,A-e*s)/e,1),o=this._cachedProps.get(i);if(!o)return;const a=this._parseKeyframes(n,o);a?.length&&this._commitStyle(n,i,o,a[0],a[1])})}_updateCachedProps(){this.cancel(),this._getTargets().forEach(t=>{const e=new Map,A=this._keyframes;for(let i=A.length,s=0;s<i;s++)Object.keys(A[s].props).forEach(n=>{e.set(n,t[n])});this._cachedProps.set(t,e)})}_parseEasing(t){if(!t)return Vr.linear;if(t in Vr)return Vr[t];const e=t.replace(/cubic-bezier\((.+)\)/,"$1").split(",").map(A=>Number(A));return si(e[0],e[1],e[2],e[3])}_parseKeyframes(t,e){let A;const i=this._keyframes;for(let s=i.length,n=0;n<s;n++){const o=i[n],{offset:a,easing:l}=o,u={...o.props};if(A&&t<=a){const{offset:c,easing:g}=A,f={...A.props};return e.forEach((d,B)=>{(!(B in f)||f[B]===null)&&(f[B]=d),(!(B in u)||u[B]===null)&&(u[B]=d)}),[{offset:c,easing:g,props:f},{offset:a,easing:l,props:u}]}A=o}return null}_commitStyle(t,e,A,i,s){const{offset:n,easing:o,props:a}=i,{offset:l,props:u}=s,c=l-n,g=o((t-n)/c),f={width:e.width,height:e.height,fontSize:e.fontSize};A.forEach((d,B)=>{e[B]=this._getDiffValue(B,a[B],u[B],g,f)})}_getDiffValue(t,e,A,i,s){let n,o;if(e==="none"&&(e=void 0),A==="none"&&(A=void 0),e===void 0||A===void 0)if(e!==void 0)n=gi(t,String(e),s),o=Es(n);else if(A!==void 0)o=gi(t,String(A),s),n=Es(o);else return;else n=gi(t,String(e),s),o=gi(t,String(A),s);if(Array.isArray(n)&&Array.isArray(o)){const a=new Set,l={},u={};n.forEach(({name:g,args:f})=>{l[g]=f,a.add(g)}),o.forEach(({name:g,args:f})=>{u[g]=f,a.add(g)});let c="";return a.forEach(g=>{const f=Math.max(l[g]?.length??0,u[g]?.length??0),d=l[g],B=u[g];c+=`${g}(${Array.from({length:f},(I,F)=>{const b=d?.[F],y=B?.[F],_=b?.normalizedIntValue??0,Q=y?.normalizedIntValue??0;return Number.isNaN(_)||Number.isNaN(Q)?y?.value??0:bt(_,Q,i)}).join(", ")}) `}),c}else if(!Array.isArray(n)&&!Array.isArray(o))return Number.isNaN(n.normalizedIntValue)||Number.isNaN(o.normalizedIntValue)?o.value:bt(n.normalizedIntValue,o.normalizedIntValue,i)}isPlaying(){return!this.paused&&this.isInsideTimeRange()}play(){return this._stoped?(this._stoped=!1,this.startTime=this.timelineCurrentTime):this.startTime=this.timelineCurrentTime-this.currentTime,this.paused=!1,!0}pause(){return this.paused=!0,!0}stop(){return this._stoped=!0,this.paused=!0,this._currentTime=0,!0}cancel(){this._getTargets().forEach(t=>{this._cachedProps.get(t)?.forEach((e,A)=>{t[A]=e}),this._cachedProps.delete(t)})}},Zi([w()],h.Animation.prototype,"effectMode",2),Zi([w()],h.Animation.prototype,"loop",2),Zi([w()],h.Animation.prototype,"keyframes",2),Zi([w()],h.Animation.prototype,"easing",2),h.Animation=Zi([st("Animation",{renderMode:"disabled",processMode:"pausable",processSortMode:"parent_before",duration:2e3})],h.Animation);class zr extends Oe{static _instance;static get instance(){return this._instance||(this._instance=new zr),this._instance}playbackRate=1;muted=!1;volume=1;paused=!1;refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}get processors(){return console.warn("HTML Audio does not support processors"),[]}set processors(t){console.warn("HTML Audio does not support processors")}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}free(){this.removeAllListeners()}}class $i extends Oe{static PADDING=.1;_source=null;_audio=null;_end=0;_pausedReal=!1;_duration=0;_start=0;_playing=!1;get progress(){return(this._source?.currentTime??0)/this._duration}_paused=!1;get paused(){return this._paused}set paused(t){this._paused!==t&&(this._paused=t,this.refreshPaused())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh())}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}set(t,e){if(this[t]===void 0)throw new Error(`Property with name ${t} does not exist.`);switch(t){case"playbackRate":this.playbackRate=e;break;case"volume":this.volume=e;break;case"paused":this.paused=e;break;case"loop":this.loop=e;break;case"muted":this.muted=e;break}return this}_onPlay(){this._playing=!0}_onPause(){this._playing=!1}init(t){this._playing=!1,this._duration=t.source.duration;const e=this._source=t.source.cloneNode(!1);return e.src=t.parent.src,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),t.context.on("refresh",this.refresh),t.context.on("refreshPaused",this.refreshPaused),this._audio=t,this}_stop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())}stop(){this._stop(),this._source&&this.emit("stop")}get processors(){return console.warn("HTML Audio does not support processors"),[]}set processors(t){console.warn("HTML Audio does not support processors")}refresh(){if(!this._audio||!this._source)return;const t=this._audio.context,e=this._audio.parent;this._source.loop=this._loop||e.loop;const A=t.volume*(t.muted?0:1),i=e.volume*(e.muted?0:1),s=this._volume*(this._muted?0:1);this._source.volume=s*A*i,this._source.playbackRate=this._playbackRate*t.playbackRate*e.playbackRate}refreshPaused(){if(!this._source||!this._audio)return;const t=this._paused||this._audio.parent.paused||this._audio.context.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._stop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,playbackRate:this._playbackRate,loop:this._loop})),this.emit("pause",t))}play(t={}){if(!this._source)return;const{start:e=0,end:A=0}=t;A&&console.assert(A>e,"End time is before start time"),t.playbackRate!==void 0&&(this._playbackRate=t.playbackRate),t.volume!==void 0&&(this._volume=t.volume),t.loop!==void 0&&(this._loop=t.loop),t.muted!==void 0&&(this._muted=t.muted),this.refresh(),this.loop&&A!==null&&(console.warn('Looping not support when specifying an "end" time'),this.loop=!1),this._start=e,this._end=A||this._duration,this._start=Math.max(0,this._start-$i.PADDING),this._end=Math.min(this._end+$i.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=e,this._source.onloadedmetadata=null,this.emit("progress",e,this._duration),Kt.on(this._onUpdate))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start")}_onUpdate=()=>{this._source&&(this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete())};_onComplete(){Kt.off(this._onUpdate),this._stop(),this.emit("progress",1,this._duration),this.emit("end",this)}free(){Kt.off(this._onUpdate),this.removeAllListeners();const t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._stop()),this._source=null,this._playbackRate=1,this._volume=1,this._loop=!1,this._end=0,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._audio&&(this._audio.context.off("refresh",this.refresh),this._audio.context.off("refreshPaused",this.refreshPaused),this._audio=null)}}class ru{constructor(t){this.parent=t}source=new globalThis.Audio;_src="";get src(){return this._src}set src(t){this._src!==t&&(this._src=t,this.load())}get duration(){return this.source.duration}get isPlayable(){return!!this.source&&this.source.readyState===4}get context(){return zr.instance}async load(){return new Promise(t=>{this.source.onload=()=>t(this),this.source.src=this._src,this.source.load()})}createSound(){return new $i}}class Tn extends Oe{constructor(t,e){super(),this._input=t,this._output=e}_processers=[];get processors(){return this._processers}set processors(t){if(this._processers.forEach(e=>e.disconnect()),this._processers.length=0,this._input.connect(this._output),t.length){this._processers=t.slice(0),this._input.disconnect();let e;t.forEach(A=>{e?e.connect(A.destination):this._input.connect(A.destination),e=A}),e.connect(this._output)}}get destination(){return this._input}}class cp{constructor(t,e=null){this.destination=t,this.source=e}connect(t){this.source?.connect(t)}disconnect(){this.source?.disconnect()}}function hp(){if(Cs)return new AudioContext;if(Qs){const r=globalThis.webkitAudioContext;return new r}else throw new Error("Failed to createAudioContext")}function gp(r,t,e){if(ys)return new OfflineAudioContext(r,t,e);if(_o){const A=globalThis.webkitOfflineAudioContext;return new A(r,t,e)}else throw new Error("Failed to createOfflineAudioContext")}class gA extends Tn{static _instance;static get instance(){return this._instance||(this._instance=new gA),this._instance}static get audioContext(){return this.instance.audioContext}static get offlineContext(){return this.instance.offlineContext}static setParamValue(t,e){this.instance.setParamValue(t,e)}static decode(t){return this.instance.decode(t)}_context;_offlineContext;get audioContext(){return this._context}get offlineContext(){return this._offlineContext}_locked;muted=!1;volume=1;playbackRate=1;autoPause=!0;_paused=!1;_pausedOnBlur=!1;get paused(){return this._paused}set paused(t){t&&this._context.state==="running"?this._context.suspend():!t&&this._context.state==="suspended"&&this._context.resume(),this._paused=t}_compressor;_analyser;constructor(){const t=hp(),e=gp(1,2,ys?Math.max(8e3,Math.min(96e3,t.sampleRate)):44100),A=t.createDynamicsCompressor(),i=t.createAnalyser();i.connect(A),A.connect(t.destination),super(i,A),this._context=t,this._offlineContext=e,this._compressor=A,this._analyser=i,this._locked=t.state==="suspended"&&(He||vo),di&&(this._locked&&(this._unlock(),document.addEventListener("mousedown",this._unlock,!0),document.addEventListener("touchstart",this._unlock,!0),document.addEventListener("touchend",this._unlock,!0)),globalThis.addEventListener("focus",this._onFocus),globalThis.addEventListener("blur",this._onBlur))}_onFocus(){if(!this.autoPause)return;const t=this._context.state;(t==="suspended"||t==="interrupted"||!this._locked)&&(this.paused=this._pausedOnBlur,this.refreshPaused())}_onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))}_unlock=()=>{this._locked&&(this.playEmptySound(),this._context.state==="running"&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._locked=!1))};playEmptySound(){const t=this._context.createBufferSource();t.buffer=this._context.createBuffer(1,1,22050),t.connect(this._context.destination),t.start(0,0,0),t.context.state==="suspended"&&t.context.resume()}refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(t){return new Promise((e,A)=>{const i=n=>{A(new Error(n?.message||"Unable to decode file"))},s=this._offlineContext.decodeAudioData(t,e,i);s&&s.catch(i)})}setParamValue(t,e){t.setValueAtTime?t.setValueAtTime(e,this._context.currentTime):t.value=e}}class su extends Oe{_audio=null;_sourceNode=null;_gain=null;_progress=0;get progress(){return this._progress}_pausedReal=!1;_paused=!1;get paused(){return this._paused}set paused(t){this._paused!==t&&(this._paused=t,this.refreshPaused())}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh(),this._update(!0))}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}_duration=0;_end=0;_elapsed=0;_lastUpdate=this._now();_processors=[];init(t){return this._audio=t,t.context.on("refresh",this.refresh),t.context.on("refreshPaused",this.refreshPaused),this}_now(){return this._audio?.context.audioContext.currentTime??0}play(t={}){if(!this._audio)return;const{end:e=0,start:A=0}=t;e&&console.assert(e>A,"End time is before start time"),this._end=e,this._elapsed=A,t.volume!==void 0&&(this._volume=t.volume),t.playbackRate!==void 0&&(this._playbackRate=t.playbackRate),t.muted!==void 0&&(this._muted=t.muted),t.loop!==void 0&&(this._loop=t.loop),t.processors!==void 0&&(this._processors=t.processors),this._paused=!1;const{source:i,gain:s}=this._audio.cloneSource();this._sourceNode=i,this._gain=s,this.refresh(),i.onended=this._onComplete.bind(this),this._duration=i.buffer?.duration??0,this._lastUpdate=this._now(),this._loop?(i.loopStart=A,i.loopEnd=e,i.start(0,A)):e?i.start(0,A,e-A):i.start(0,A),this.emit("start"),this._update(!0),this._enableTicker(!0)}_stop(){if(this._sourceNode){this._enableTicker(!1),this._sourceNode.onended=null,this._sourceNode.stop(0),this._sourceNode.disconnect();try{this._sourceNode.buffer=null}catch(t){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",t)}this._sourceNode=null}}stop(){this._sourceNode&&(this._stop(),this.emit("stop"))}_update(t=!1){if(this._sourceNode){const e=this._now(),A=e-this._lastUpdate;if(A>0||t){this._elapsed+=A*this._sourceNode.playbackRate.value,this._lastUpdate=e;const i=this._duration;let s;if(this._sourceNode.loopStart){const n=this._sourceNode.loopEnd-this._sourceNode.loopStart;s=(this._sourceNode.loopStart+this._elapsed%n)/i}else s=this._elapsed%i/i;this._progress=s,this.emit("progress",s,i)}}}refresh(){if(!this._audio||!this._sourceNode)return;const t=this._audio.context,e=this._audio.parent;this._sourceNode.loop=this._loop||e.loop,t.setParamValue(this._gain.gain,this._volume*(this._muted?0:1)*e.volume*(e.muted?0:1)*t.volume*(t.muted?0:1)),t.setParamValue(this._sourceNode.playbackRate,this._playbackRate*e.playbackRate*t.playbackRate),this.applyProcessors()}applyProcessors(){if(this._sourceNode&&this._processors.length){this._sourceNode.disconnect();let t=this._sourceNode;this._processors.forEach(e=>{t.connect(e.destination),t=e}),t.connect(this._gain)}}refreshPaused(){if(!this._audio)return;const t=this._paused||this._audio.parent.paused||this._audio.context.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._stop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,playbackRate:this._playbackRate,loop:this._loop,volume:this._volume})),this.emit("pause",t))}_onComplete=()=>{if(this._sourceNode){this._enableTicker(!1),this._sourceNode.onended=null,this._sourceNode.disconnect();try{this._sourceNode.buffer=null}catch(t){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",t)}}this._sourceNode=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)};_updateListener=()=>this._update();_enableTicker(t){Kt.off(this._updateListener),t&&Kt.on(this._updateListener)}free(){this.removeAllListeners(),this._stop(),this._gain?.disconnect(),this._gain=null,this._audio?.context.off("refresh",this.refresh),this._audio?.context.off("refreshPaused",this.refreshPaused),this._audio=null,this._processors.forEach(t=>t.disconnect()),this._processors.length=0,this._end=0,this._playbackRate=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1}}class nu extends Tn{constructor(t){const e=gA.audioContext,A=e.createBufferSource(),i=e.createGain(),s=e.createAnalyser();A.connect(s),s.connect(i),i.connect(gA.instance.destination),super(s,i),this.parent=t,this._sourceNode=A,this.gain=i,this.analyser=s}_sourceBuffer;_sourceNode;_sourceLoad;gain;analyser;get context(){return gA.instance}get isPlayable(){return!!this._sourceNode.buffer}get duration(){return this._sourceNode.buffer?.duration??0}get buffer(){return this._sourceNode.buffer}set buffer(t){this._sourceNode.buffer=t}async load(){return this._sourceLoad||(this._sourceLoad=new Promise(t=>{this._sourceBuffer?this._decode(this._sourceBuffer).then(()=>t(this)):this.parent.src?this._loadUrl(this.parent.src).then(()=>t(this)):t(this)})),this._sourceLoad}_loadUrl(t){return new Promise(e=>{fetch(t).then(A=>A.arrayBuffer()).then(A=>this._decode(A)).finally(()=>e(this))})}_decode(t){return Promise.resolve(t instanceof AudioBuffer?t:gA.decode(t)).then(e=>(this.parent.isLoaded=!0,this.buffer=e,e))}cloneSource(){const t=this.context,e=this._sourceNode,A=t.audioContext.createBufferSource(),i=t.audioContext.createGain();return A.buffer=e.buffer,A.loop=e.loop,t.setParamValue(A.playbackRate,e.playbackRate.value),A.connect(i),i.connect(this.destination),{source:A,gain:i}}createSound(){return new su}}var fp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Ip=(r,t,e)=>t in r?fp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,pp=(r,t,e,A)=>{for(var i=A>1?void 0:A?dp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},Ep=(r,t,e)=>Ip(r,t+"",e);h.Audio=class extends h.TimelineNode{_sounds=[];_platformAudio=bo?new nu(this):new ru(this);get platformAudio(){return this._platformAudio}_src;get src(){return this._src}set src(t){this._src!==t&&(this._src=t,this.load())}isLoaded=!1;get isPlayable(){return this.isLoaded&&this._platformAudio.isPlayable}get audioDuration(){return this._platformAudio.duration*1e3}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh())}_isPlaying=!1;get isPlaying(){return this._isPlaying}multiple=!1;start=0;end=0;constructor(t=""){super(),this.src=t}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"paused":this.refreshPaused();break}}async load(){return await this._platformAudio.load(),this}pause(){return this._isPlaying=!1,this.paused=!0,this}resume(){return this._isPlaying=this._sounds.length>0,this.paused=!1,this}stop(){if(!this.isPlayable)return this;this._isPlaying=!1;for(let t=this._sounds.length-1;t>=0;t--)this._sounds[t].stop();return this}play(t={}){if(!this.isLoaded)return;this.multiple||this._removeSounds(),this._isPlaying=!0;const e=this._createSound();this._sounds.push(e),e.once("end",()=>{t.complete?.(),this._onComplete(e)}),e.once("stop",()=>this._onComplete(e));const A=(t?.start??this.start)/1e3,i=(t?.end??this.end)/1e3;return e.play({...t,start:A,end:i}),e}_removeSounds(){for(let t=this._sounds.length-1;t>=0;t--)this._recycleSound(this._sounds[t]);this._sounds.length=0}_createSound(){return h.Audio._soundPool.length>0?h.Audio._soundPool.pop().init(this._platformAudio):this._platformAudio.createSound().init(this._platformAudio)}refresh(){for(let t=this._sounds.length,e=0;e<t;e++)this._sounds[e].refresh()}refreshPaused(){for(let t=this._sounds.length,e=0;e<t;e++)this._sounds[e].refreshPaused()}_onComplete=t=>{if(this._sounds){const e=this._sounds.indexOf(t);e>-1&&this._sounds.splice(e,1),this._isPlaying=this._sounds.length>0}this._recycleSound(t)};_recycleSound(t){t.free(),h.Audio._soundPool.includes(t)||h.Audio._soundPool.push(t)}_prevTime=0;_timer=0;_process(t){if(super._process(t),this.canProcess()){const e=this._tree?.timeline.currentTime??0;e-this._prevTime>0&&(this._timer||(this._setTimeStop(),this.play({start:this.start+(e-this.delay)%this.duration})),this._isPlaying&&this._setTimeStop()),this._prevTime=e}}_setTimeStop(){this._timer&&clearTimeout(this._timer),this._timer=setTimeout(()=>{this.stop(),this._timer=0},100)}},Ep(h.Audio,"_soundPool",[]),h.Audio=pp([st("Audio")],h.Audio);class Bp extends h.Node2D{}var Cp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,Wr=(r,t,e,A)=>{for(var i=A>1?void 0:A?Qp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Cp(t,e,i),i};h.AudioWaveform=class extends h.Element2D{_audioBuffer;_src=di?new Dt(document.createElement("canvas")):void 0;_needsUpdateTexture=!1;constructor(t={}){super(),this.setProperties(t)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._loadSrc(e);break;case"gap":case"color":case"width":case"height":this._needsUpdateTexture=!0;break}}async _loadSrc(t){await globalThis.fetch(t).then(e=>e.arrayBuffer()).then(e=>gA.decode(e)).then(e=>{this._audioBuffer=e,this.syncTexture(!0)})}syncTexture(t=!1){const e=this._audioBuffer;if(!e||!t&&!this._needsUpdateTexture)return;this._needsUpdateTexture=!1;const A=this._src?.source;if(!A)return;const{width:i=0,height:s=0}=this.style;A.width=i,A.height=s;const n=A.getContext("2d");if(!n){console.warn("Failed to getContext('2d') in syncTexture");return}n.fillStyle=this.color;const o=e.getChannelData(0),a=Math.ceil(o.length/i),l=s/2;for(let u=1,c=-1,g=0;g<i;g++){for(let f=0;f<a;f++){const d=o[g*a+f];d<u&&(u=d),d>c&&(c=d)}if(!this.gap||g%(this.gap*2)===0){const f=g,d=(1+u)*l,B=this.gap||1,I=Math.max(1,(c-u)*l);n.fillRect(f,d,B,I),u=1,c=-1}}this._src?.requestUpload(),this.requestRedraw()}_process(t){this.syncTexture(),super._process(t)}_drawSrc(){const t=this._src;t?.valid&&(this.context.fillStyle=t,this.context.uvTransform=new Yt().scale(1/this.style.width,1/this.style.height))}},Wr([w()],h.AudioWaveform.prototype,"src",2),Wr([w()],h.AudioWaveform.prototype,"gap",2),Wr([w()],h.AudioWaveform.prototype,"color",2),h.AudioWaveform=Wr([st("AudioWaveform")],h.AudioWaveform);var yp=Object.getOwnPropertyDescriptor,Dp=(r,t,e,A)=>{for(var i=A>1?void 0:A?yp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.Control=class extends h.Element2D{constructor(t,e=[]){super(),this._parentUpdateRect=this._parentUpdateRect.bind(this),this.setProperties(t),this.append(e)}_parented(t){super._parented(t),t.on("updateRect",this._parentUpdateRect)}_unparented(t){super._unparented(t),t.off("updateRect",this._parentUpdateRect)}_parentUpdateRect(){const t=this._parent.getRect();this.style.left=t.left,this.style.top=t.top,this.style.width=t.width,this.style.height=t.height}_input(t,e){super._input(t,e),this._guiInput(t,e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":case"left":case"top":this.emit("updateRect");break}}_guiInput(t,e){}},h.Control=Dp([st("Control")],h.Control);var mp=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,fA=(r,t,e,A)=>{for(var i=A>1?void 0:A?wp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&mp(t,e,i),i};h.Range=class extends h.Control{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"allowGreater":case"allowLesser":case"page":case"minValue":case"maxValue":case"step":case"value":this.requestRedraw();break}}},fA([w({fallback:!1})],h.Range.prototype,"allowGreater",2),fA([w({fallback:!1})],h.Range.prototype,"allowLesser",2),fA([w({fallback:1})],h.Range.prototype,"page",2),fA([w({fallback:0})],h.Range.prototype,"minValue",2),fA([w({fallback:100})],h.Range.prototype,"maxValue",2),fA([w({fallback:.01})],h.Range.prototype,"step",2),fA([w({fallback:0})],h.Range.prototype,"value",2),h.Range=fA([st("Range")],h.Range);var vp=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,Ue=(r,t,e,A)=>{for(var i=A>1?void 0:A?_p(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&vp(t,e,i),i};h.Ruler=class extends h.Control{texture=new Ei;constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"offsetX":case"offsetY":case"thickness":case"markHeight":case"color":case"markBackgroundColor":case"markColor":case"gap":case"scale":this.requestRedraw();break}}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":this.texture[t]=e,this.requestRedraw();break}}_drawTexture(){const{width:t,height:e}=this.size,{offsetX:A,offsetY:i,thickness:s,markHeight:n,markBackgroundColor:o,markColor:a,color:l,gap:u,gapScale:c}=this,f=this.texture.source.getContext("2d");f.reset(),f.scale(this.texture.pixelRatio,this.texture.pixelRatio);const d=Math.round(A),B=Math.round(i);f.beginPath(),f.fillStyle=o||"#EEE",f.fillRect(0,0,t,s),f.fillRect(0,0,s,e),f.fill(),f.strokeStyle=a||"#000",f.moveTo(s,0),f.lineTo(s,e),f.moveTo(0,s),f.lineTo(t,s),f.stroke();const I=u,F=u*c;let b,y,_,Q,D;for(I>=F?(b=I/F,y=Math.floor(b)*I/20,_=I/20*Math.floor(b)/b):(b=F/I,y=Math.floor(I/20/b),y>=2?y=Math.floor(y/2)*2:y=1,_=y*b),f.fillStyle=f.strokeStyle,Q=d,D=0;Q<t;D++,Q+=_)f.moveTo(Q,s-(D%5?n:2*n)),f.lineTo(Q,s);for(Q=d,D=0;Q>s;D++,Q-=_)f.moveTo(Q,s-(D%5?n:2*n)),f.lineTo(Q,s);let S=0;for(Q=B,D=0;Q>s;D++,Q-=_)f.moveTo(s-(D%5?n:2*n),Q),f.lineTo(s,Q);for(Q=B,D=0;Q<e;D++,Q+=_)f.moveTo(s-(D%5?n:2*n),Q),f.lineTo(s,Q);for(f.save(),f.fillStyle=l,f.scale(.8,.8),S=s-8,Q=d,D=0;Q<t;D++,Q+=_)D%10===0&&f.fillText(String(Math.ceil(y*D)),Q*1.25-3,S*1.25);for(Q=d,D=0;Q>s;D++,Q-=_)D%10===0&&f.fillText(String(Math.ceil(-y*D)),Q*1.25-3,S*1.25);for(S=0,Q=B,D=0;Q>s;D++,Q-=_)D%10===0&&f.fillText(String(Math.ceil(y*D)),S*1.25,Q*1.25+3);for(Q=B,D=0;Q<e;D++,Q+=_)D%10===0&&f.fillText(String(Math.ceil(-y*D)),S*1.25,Q*1.25+3);f.restore(),f.stroke(),this.texture.requestUpload()}_draw(){this._drawTexture();const t=this.texture;t?.valid&&(this.context.fillStyle=t,this.context.uvTransform=new Yt().scale(1/this.size.width,1/this.size.height),this.context.rect(0,0,t.width,t.height),this.context.fill())}},Ue([w({fallback:0})],h.Ruler.prototype,"offsetX",2),Ue([w({fallback:0})],h.Ruler.prototype,"offsetY",2),Ue([w({fallback:20})],h.Ruler.prototype,"thickness",2),Ue([w({fallback:3})],h.Ruler.prototype,"markHeight",2),Ue([w({fallback:"#b2b6bc"})],h.Ruler.prototype,"color",2),Ue([w({fallback:"#f9f9fa"})],h.Ruler.prototype,"markBackgroundColor",2),Ue([w({fallback:"#b2b6bc"})],h.Ruler.prototype,"markColor",2),Ue([w({fallback:300})],h.Ruler.prototype,"gap",2),Ue([w({fallback:1})],h.Ruler.prototype,"gapScale",2),h.Ruler=Ue([st("Ruler")],h.Ruler);var bp=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,ou=(r,t,e,A)=>{for(var i=A>1?void 0:A?xp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&bp(t,e,i),i};h.ScrollBar=class extends h.Range{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":case"left":case"top":this.requestRedraw();break}}_rect(){const{size:t,position:e}=this;let A,i,s,n,o;return this.direction==="vertical"?(s=10,n=t.height*(this.page/(this.maxValue-this.minValue)),A=e.left+t.width-s,i=t.height*(this.value/(this.maxValue-this.minValue)),o=s/2):(s=t.width*(this.page/(this.maxValue-this.minValue)),n=10,A=t.width*(this.value/(this.maxValue-this.minValue)),i=e.top+t.height-n,o=n/2),{left:A,top:i,width:s,height:n,radii:o}}_draw(){const{left:t,top:e,width:A,height:i,radii:s}=this._rect();this.context.roundRect(t,e,A,i,s),this.context.fillStyle=34,this.context.fill()}_pointerInput(t,e){const{left:A,top:i,width:s,height:n}=this._rect(),o=t.x>=A&&t.x<A+s&&t.y>=i&&t.y<i+n;switch(e){case"pointerdown":case"pointermove":o?this._tree?.input.setCursor("pointer"):this._tree?.input.setCursor(void 0);break}return!1}},ou([w({fallback:"vertical"})],h.ScrollBar.prototype,"direction",2),h.ScrollBar=ou([st("ScrollBar")],h.ScrollBar);var Fp=Object.getOwnPropertyDescriptor,Sp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Fp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.XScrollBar=class extends h.ScrollBar{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},h.XScrollBar=Sp([st("XScrollBar",{direction:"horizontal"})],h.XScrollBar);var Mp=Object.getOwnPropertyDescriptor,Rp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Mp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.YScrollBar=class extends h.ScrollBar{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},h.YScrollBar=Rp([st("YScrollBar",{direction:"vertical"})],h.YScrollBar);var Pp=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,ni=(r,t,e,A)=>{for(var i=A>1?void 0:A?kp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Pp(t,e,i),i};h.Scaler=class extends h.Node{get target(){if(this.parent?.style)return this.parent}constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"translateY":case"translateX":case"scale":case"min":case"max":{this.scale=Ke(this.minScale,this.scale,this.maxScale),this._updateTarget();break}}}_updateTarget(){const t=this.target;t&&(t.style.transform=`translate(${this.translateX}px, ${this.translateY}px) scale(${this.scale})`,this.emit("updateScale",this.scale))}_onWheel(t){this.target&&(t.preventDefault(),t.ctrlKey?(t.wheelDeltaY?Math.abs(Math.abs(t.wheelDeltaY)-Math.abs(3*t.deltaY))<3:t.deltaMode===0)||(t.preventDefault(),this.scale+=t.deltaY*-.015):(this.translateX-=t.deltaX,this.translateY-=t.deltaY))}_input(t,e){switch(super._input(t,e),e){case"wheel":this._onWheel(t);break}}},ni([w({default:1})],h.Scaler.prototype,"translateX",2),ni([w({default:1})],h.Scaler.prototype,"translateY",2),ni([w({default:1})],h.Scaler.prototype,"scale",2),ni([w({default:.05})],h.Scaler.prototype,"minScale",2),ni([w({default:10})],h.Scaler.prototype,"maxScale",2),h.Scaler=ni([st("Scaler",{processMode:"disabled",renderMode:"disabled"})],h.Scaler);var Up=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Tp=(r,t,e)=>t in r?Up(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Lp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Np(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},Gp=(r,t,e)=>Tp(r,t+"",e);h.KawaseTransition=class extends h.Transition{blur=10;quality=10;apply(t,e){const A=this.currentTimeProgress;let i,s;A<.5?(i=0,s=(.5-A)/.5):(i=1,s=(A-.5)/.5);const n=this.blur,o=this.quality,a=e.width,l=e.height,u=[],c=[n];if(n>0){let F=n;const b=n/o;for(let y=1;y<o;y++)F-=b,c.push(F)}const g=1/a,f=1/l,d=[];let B;const I=o-1;for(let F=0;F<I;F++)B=c[F]+.5,d[0]=B*g,d[1]=B*f,u.push({offset:d});B=c[I]+.5,d[0]=B*g,d[1]=B*f,u.push({offset:d}),u.forEach(F=>{gt.draw(t,h.KawaseTransition.material,{sampler:i,progress:s,...F})})}},Gp(h.KawaseTransition,"material",new Ct({vert:`attribute vec2 position;
|
|
863
|
+
</svg>`}function BI(){const r=new ze;return{name:"listStyle",pathSet:r,update:t=>{r.paths.length=0;const{paragraphs:e,isVertical:A,fontSize:i}=t,s=i*.45;e.forEach(n=>{const{computedStyle:o}=n,{color:a,listStyleImage:l,listStyleColormap:c,listStyleSize:h,listStyleType:u}=o,d=_n(c);let f=h,B;if(!lt(l))B=l;else if(!lt(u)){const m=i*.38/2;switch(f=f==="cover"?m*2:f,u){case"disc":B=EI(m,String(a));break}}if(!B)return;const p=Os(B),S=p.getBoundingBox(),R=n.fragments[0]?.characters[0];if(!R)return;const{inlineBox:w}=R,D=f==="cover"?1:vn(f,{total:i,fontSize:i})/i,Q=new Lt;if(A){const m=i/S.height*D;Q.translate(-S.left,-S.top).rotate(Math.PI/2).scale(m,m).translate(w.left+(w.width-S.height*m)/2,w.top-s)}else{const m=i/S.height*D;Q.translate(-S.left,-S.top).scale(m,m).translate(w.left-S.width*m-s,w.top+(w.height-S.height*m)/2)}r.paths.push(...p.paths.map(m=>{const x=m.clone();return x.applyTransform(Q),x.style.fill&&x.style.fill in d&&(x.style.fill=d[x.style.fill]),x.style.stroke&&x.style.stroke in d&&(x.style.stroke=d[x.style.stroke]),x}))})}}}function CI(){return{name:"outline"}}const aA=new O,zA=new Lt,lA=new Lt;function QI(){const r=new ze;return{name:"render",pathSet:r,update:t=>{r.paths.length=0;const{paragraphs:e}=t;e.forEach(A=>{A.fragments.forEach(i=>{i.characters.forEach(s=>{r.paths.push(s.path)})})})},getBoundingBox:t=>{const{characters:e,fontSize:A,effects:i}=t,s=[];return e.forEach(n=>{i?.forEach(o=>{if(!n.glyphBox)return;const a=n.glyphBox.clone(),l=xn(t,o);aA.set(a.left,a.top),aA.applyMatrix3(l),a.left=aA.x,a.top=aA.y,aA.set(a.right,a.bottom),aA.applyMatrix3(l),a.width=aA.x-a.left,a.height=aA.y-a.top;const c=(o.shadowOffsetX??0)*A,h=(o.shadowOffsetY??0)*A,u=Math.max(.1,o.textStrokeWidth??0)*A;a.left+=c-u,a.top+=h-u,a.width+=u*2,a.height+=u*2,s.push(a)})}),s.length?ct.from(...s):void 0},render:(t,e)=>{const{paragraphs:A,glyphBox:i,effects:s}=e;s?s.forEach(n=>{Fr(n,i,t),t.save();const[o,a,l,c,h,u]=xn(e,n).transpose().elements;t.transform(o,c,a,h,l,u),e.forEachCharacter(d=>{d.drawTo(t,n)}),t.restore()}):A.forEach(n=>{n.fragments.forEach(o=>{o.characters.forEach(a=>{a.drawTo(t)})})}),e.debug&&A.forEach(n=>{t.strokeRect(n.lineBox.x,n.lineBox.y,n.lineBox.width,n.lineBox.height)})}}}function xn(r,t){const{fontSize:e,glyphBox:A}=r,i=(t.translateX??0)*e,s=(t.translateY??0)*e,n=Math.PI*2,o=(t.skewX??0)/360*n,a=(t.skewY??0)/360*n,{left:l,top:c,width:h,height:u}=A,d=l+h/2,f=c+u/2;return zA.identity(),lA.makeTranslation(i,s),zA.multiply(lA),lA.makeTranslation(d,f),zA.multiply(lA),lA.set(1,Math.tan(o),0,Math.tan(a),1,0,0,0,1),zA.multiply(lA),lA.makeTranslation(-d,-f),zA.multiply(lA),zA.clone()}function yI(){const r=new ze;return{name:"textDecoration",pathSet:r,update:t=>{r.paths.length=0;const e=[];let A,i;t.forEachCharacter(s=>{const{computedStyle:n,isVertical:o,inlineBox:a,underlinePosition:l,underlineThickness:c,strikeoutPosition:h,strikeoutSize:u}=s,{color:d,textDecoration:f,writingMode:B}=n;if(lt(f))i=void 0;else{let p=!1;if(i?.textDecoration===f&&i?.writingMode===B&&i?.color===d&&(o?A[0].inlineBox.left===a.left:A[0].inlineBox.top===a.top))switch(f){case"underline":A[0].underlinePosition===l&&A[0].underlineThickness===c&&(p=!0);break;case"line-through":A[0].strikeoutPosition===h&&A[0].strikeoutSize===u&&(p=!0);break}p?A.push(s):(A=[],A.push(s),e.push(A)),i=n}}),e.forEach(s=>{const{computedStyle:n,isVertical:o,underlinePosition:a,underlineThickness:l,strikeoutPosition:c,strikeoutSize:h}=s[0],{color:u,textDecoration:d}=n,f=ct.from(...s.map(x=>x.inlineBox)),{left:B,top:p,width:S,height:R}=f;let w=o?B+S:p;const D=o?-1:1;let Q=0;switch(d){case"overline":Q=l*2;break;case"underline":w+=D*a,Q=l*2;break;case"line-through":w+=D*c,Q=h*2;break}w-=Q;let m;o?m=new Rt([{type:"M",x:w,y:p},{type:"L",x:w,y:p+R},{type:"L",x:w+Q,y:p+R},{type:"L",x:w+Q,y:p},{type:"Z"}],{fill:u}):m=new Rt([{type:"M",x:B,y:w},{type:"L",x:B+S,y:w},{type:"L",x:B+S,y:w+Q},{type:"L",x:B,y:w+Q},{type:"Z"}],{fill:u}),r.paths.push(m)})},render:(t,e)=>{const{effects:A,computedStyle:i}=e;A?A.forEach(s=>{t.save();const[n,o,a,l,c,h]=xn(e,s).transpose().elements;t.transform(n,l,o,c,a,h),r.paths.forEach(u=>{YA({ctx:t,path:u,fontSize:i.fontSize,...s})}),t.restore()}):r.paths.forEach(s=>{YA({ctx:t,path:s,fontSize:i.fontSize})})}}}var mI=Object.defineProperty,WA=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&mI(t,e,i),i};const Sn=uo();class cA extends Ge{needsUpdate=!0;computedStyle={...Sn};paragraphs=[];lineBox=new ct;rawGlyphBox=new ct;glyphBox=new ct;pathBox=new ct;boundingBox=new ct;measurer=new Tr;plugins=new Map;pathSets=[];get fontSize(){return this.computedStyle.fontSize}get isVertical(){return this.computedStyle.writingMode.includes("vertical")}get characters(){return this.paragraphs.flatMap(t=>t.fragments.flatMap(e=>e.characters))}constructor(t={}){super(),this.set(t)}set(t={}){this.debug=t.debug??!1,this.content=sr(t.content??""),this.effects=t.effects,this.style=t.style??{},this.measureDOM=t.measureDOM,this.fonts=t.fonts,this.use(II()).use(CI()).use(BI()).use(yI()).use(pI()).use(QI()),(t.plugins??[]).forEach(e=>{this.use(e)}),this.updateParagraphs()}onUpdateProperty(t,e,A,i){this.emit("updateProperty",t,e,A,i)}use(t){return this.plugins.set(t.name,t),this}forEachCharacter(t){return this.paragraphs.forEach((e,A)=>{e.fragments.forEach((i,s)=>{i.characters.forEach((n,o)=>{t(n,{paragraphIndex:A,fragmentIndex:s,characterIndex:o})})})}),this}async load(){await Promise.all(Array.from(this.plugins.values()).map(t=>t.load?.(this)))}updateParagraphs(){this.computedStyle={...Sn,...this.style};const{content:t,computedStyle:e}=this,A=[];return t.forEach(i=>{const{fragments:s,...n}=i,o=new dI(n,e);s.forEach(a=>{const{content:l,...c}=a;l!==void 0&&o.addFragment(l,c)}),A.push(o)}),this.paragraphs=A,this}createDOM(){return this.updateParagraphs(),this.measurer.createDOM(this.paragraphs,this.computedStyle)}measure(t=this.measureDOM){const e={paragraphs:this.paragraphs,lineBox:this.lineBox,rawGlyphBox:this.rawGlyphBox,glyphBox:this.glyphBox,pathBox:this.pathBox,boundingBox:this.boundingBox};this.updateParagraphs();const A=this.measurer.measure(this.paragraphs,this.computedStyle,t);this.paragraphs=A.paragraphs,this.lineBox=A.boundingBox,this.characters.forEach(i=>{i.update(this.fonts)}),this.rawGlyphBox=this.getGlyphBox(),Array.from(this.plugins.values()).sort((i,s)=>(i.updateOrder??0)-(s.updateOrder??0)).forEach(i=>{i.update?.(this)}),Array.from(this.plugins.values()).sort((i,s)=>(i.renderOrder??0)-(s.renderOrder??0)).forEach(i=>{i.pathSet?.paths.length&&this.pathSets.push(i.pathSet)}),this.glyphBox=this.getGlyphBox(),this.updatePathBox().updateBoundingBox();for(const i in e)A[i]=this[i],this[i]=e[i];return this.emit("measure",{text:this,result:A}),A}getGlyphBox(){const t=O.MAX,e=O.MIN;return this.characters.forEach(A=>{if(!A.getGlyphMinMax(t,e)){const{inlineBox:i}=A,{left:s,top:n,width:o,height:a}=i,l=new O(s,n),c=new O(s+o,n+a);t.min(l,c),e.max(l,c)}}),new ct(t.x,t.y,e.x-t.x,e.y-t.y)}updatePathBox(){return this.pathBox=ct.from(this.glyphBox,...Array.from(this.plugins.values()).map(t=>t.getBoundingBox?t.getBoundingBox(this):t.pathSet?.getBoundingBox()).filter(Boolean)),this}updateBoundingBox(){return this.boundingBox=ct.from(this.rawGlyphBox,this.lineBox,this.pathBox),this}requestUpdate(){return this.needsUpdate=!0,this}update(t=this.measureDOM){const e=this.measure(t);for(const A in e)this[A]=e[A];return this.emit("update",{text:this}),this.needsUpdate=!1,this}render(t){const{view:e,pixelRatio:A=2}=t,i=e.getContext("2d");i&&(this.needsUpdate&&this.update(),nI(i,A,this.boundingBox),oI(i,this),Array.from(this.plugins.values()).sort((s,n)=>(s.renderOrder??0)-(n.renderOrder??0)).forEach(s=>{if(s.render)s.render?.(i,this);else if(s.pathSet){const n=this.computedStyle;s.pathSet.paths.forEach(o=>{YA({ctx:i,path:o,fontSize:n.fontSize})})}}),this.emit("render",{text:this,view:e,pixelRatio:A}),t.onContext?.(i))}toString(){return this.content.flatMap(t=>t.fragments.map(e=>e.content)).join("")}}WA([v()],cA.prototype,"debug"),WA([v()],cA.prototype,"content"),WA([v()],cA.prototype,"effects"),WA([v()],cA.prototype,"style"),WA([v()],cA.prototype,"measureDOM"),WA([v()],cA.prototype,"fonts");var wI=Object.defineProperty,zi=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&wI(t,e,i),i};class SA extends tA{constructor(t){super(),this.parent=t,this.base.on("updateProperty",(...e)=>{switch(e[0]){case"content":case"effects":this.setter(e[0],e[1]);break}this._updateProperty(...e)})}base=new cA;measureResult;setProperties(t){return super.setProperties(lt(t)?void 0:wh(t))}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"content":case"effects":case"measureDOM":case"fonts":case"split":case"enabled":this.parent.requestRedraw();break}}_updateText(){this.base.style={justifyContent:"center",alignItems:"center",textAlign:"center",...this.parent.style.toJSON()},this.base.requestUpdate()}measure(){return this._updateText(),this.base.measure()}updateMeasure(){return this.measureResult=this.measure(),this}canDraw(){return!!(this.enabled&&!/^\s*$/.test(this.base.toString()))}draw(){const t=this.parent.context;this.base.update(),this.base.pathSets.forEach(e=>{e.paths.forEach(A=>{t.addPath(A),t.style={...A.style},t.fillStyle=void 0,t.strokeStyle=void 0,t.fill()})})}}zi([v({fallback:!0})],SA.prototype,"enabled"),zi([v({alias:"base.content",fallback:()=>[]})],SA.prototype,"content"),zi([v({alias:"base.effects"})],SA.prototype,"effects"),zi([v({protected:!0,alias:"base.measureDOM"})],SA.prototype,"measureDOM"),zi([v({protected:!0,alias:"base.fonts"})],SA.prototype,"fonts");var vI=Object.defineProperty,_I=Object.getOwnPropertyDescriptor,Mn=(r,t,e,A)=>{for(var i=A>1?void 0:A?_I(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&vI(t,e,i),i};g.Node2D=class extends g.CanvasItem{position=new ae().on("update",()=>this.updateGlobalTransform());scale=new ae(1,1).on("update",()=>this.updateGlobalTransform());skew=new ae().on("update",()=>this.updateGlobalTransform());transform=new Yt;globalPosition=new ae;globalScale=new ae;globalSkew=new ae;globalTransform=new Yt;_parentTransformDirtyId;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"rotation":this.requestRelayout();break}}getTransformOrigin(){return new ae(0,0)}getTransform(t){const e=this.getTransformOrigin(),A=new Yt;return A.translate(-e.x,-e.y).scale(this.scale.x,this.scale.y).skew(this.skew.x,this.skew.y).rotate(this.rotation),t?.(A),A.translate(this.position.x,this.position.y).translate(e.x,e.y),A}updateTransform(){this.transform.copy(this.getTransform())}updateGlobalTransform(){this.updateTransform();const t=this.getParent();t?.globalTransform?(this._parentTransformDirtyId=t.globalTransform.dirtyId,this.globalScale.set(t.globalScale.x*this.scale.x,t.globalScale.y*this.scale.y),this.globalRotation=t.globalRotation+this.rotation,t.globalTransform.multiply(this.transform,this.globalTransform)):(this.globalScale.copy(this.scale),this.globalRotation=this.rotation,this.globalTransform.copy(this.transform));const[e,A,i,s,n,o]=this.globalTransform.toArray();this.globalPosition.set(i,o),this.globalSkew.x=Math.atan2(A,e)-this.globalRotation,this.globalSkew.y=Math.atan2(s,n)-this.globalRotation,this.requestRelayout()}_transformVertices(t,e){let A,i,s,n,o,a;if(e){const c=this.globalTransform.clone();c.multiply(typeof e=="function"?e?.():e),[A,i,s,n,o,a]=c.toArray()}else[A,i,s,n,o,a]=this.globalTransform.toArray();const l=t.slice();for(let c=t.length,h=0;h<c;h+=2){const u=t[h],d=t[h+1];l[h]=A*u+i*d+s,l[h+1]=n*u+o*d+a}return l}_relayout(t){return t=super._relayout(t),this.updateGlobalTransform(),t.map(e=>({...e,vertices:this._transformVertices(e.vertices,e.vertTransform)}))}_process(t){super._process(t);const e=this.getParent();e?.globalTransform&&this._parentTransformDirtyId!==e?.globalTransform?.dirtyId&&this.requestRelayout()}},Mn([v({protected:!0,fallback:0})],g.Node2D.prototype,"rotation",2),Mn([v({protected:!0,fallback:0})],g.Node2D.prototype,"globalRotation",2),g.Node2D=Mn([st("Node2D")],g.Node2D);var bI=Object.getOwnPropertyDescriptor,DI=(r,t,e,A)=>{for(var i=A>1?void 0:A?bI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.BaseElement2D=class extends g.Node2D{size=new ae().on("update",()=>{this.updateGlobalTransform(),this.requestRedraw()});get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}_background=new Xs(this);get background(){return this._background}set background(t){this._background.resetProperties().setProperties(t)}_shape=new wA(this);get shape(){return this._shape}set shape(t){this._shape.resetProperties().setProperties(t)}_fill=new Vt(this);get fill(){return this._fill}set fill(t){this._fill.resetProperties().setProperties(t)}_outline=new Si(this);get outline(){return this._outline}set outline(t){this._outline.resetProperties().setProperties(t)}_foreground=new js(this);get foreground(){return this._foreground}set foreground(t){this._foreground.resetProperties().setProperties(t)}_text=new SA(this);get text(){return this._text}set text(t){this._text.resetProperties().setProperties(t)}_shadow=new mA(this);get shadow(){return this._shadow}set shadow(t){this._shadow.resetProperties().setProperties(t)}constructor(t,e=[]){super(),this._updateStyleProperty=this._updateStyleProperty.bind(this),this.style=new ki,this.setProperties(t).append(e)}setProperties(t){if(t){const{style:e,text:A,shape:i,background:s,fill:n,outline:o,foreground:a,shadow:l,...c}=t;e&&this.style.setProperties(e),s&&this.background.setProperties(s),i&&this.shape.setProperties(i),n&&this.fill.setProperties(n),o&&this.outline.setProperties(o),A&&this.text.setProperties(A),a&&this.foreground.setProperties(a),l&&this.shadow.setProperties(l),super.setProperties(c)}return this}_updateStyleProperty(t,e,A,i){switch(t){case"rotate":this.rotation=this.style.rotate*No;break;case"scaleX":this.scale.x=this.style.scaleX;break;case"scaleY":this.scale.y=this.style.scaleY;break;case"skewX":this.skew.x=this.style.skewX;break;case"skewY":this.skew.y=this.style.skewY;break;case"transform":case"transformOrigin":this.updateGlobalTransform();break;case"opacity":this.opacity=this.style.opacity;break;case"visibility":this.visible=this.style.visibility==="visible";break;case"filter":this.requestRepaint();break;case"maskImage":this._updateMaskImage();break;case"borderRadius":this.requestRedraw();break;case"backgroundColor":this.background.color=this.style.backgroundColor;break;case"backgroundImage":this.background.image=this.style.backgroundImage;break;case"borderStyle":case"outlineStyle":this.outline.style=e;break;case"borderWidth":case"outlineWidth":this.outline.width=e;break;case"borderColor":case"outlineColor":this.outline.color=e;break}}_updateMaskImage(){const t="__$style.maskImage",e=this.style.maskImage;if(e&&e!=="none"){const A=this.getNode(t);A?A.src=e:this.appendChild(new g.MaskEffect({name:t,src:e}),"back")}else{const A=this.getNode(t);A&&this.removeChild(A)}}getTransformOrigin(){const{width:t,height:e}=this.size,[A,i]=ra(this.style.transformOrigin);return new ae(A*t,i*e)}getTransform(t){const{width:e,height:A}=this.size;return super.getTransform(i=>{ia(this.style.transform??"",e,A,i),t?.(i)})}updateGlobalTransform(){super.updateGlobalTransform(),this._updateOverflow()}getRect(){const{width:t,height:e}=this.size,A=0,i=0,s=A+t,n=i+e,[o,a,l,c,h,u]=this.globalTransform.toArray(),d=[[A,i],[A,n],[s,i],[s,n]].map(D=>[o*D[0]+a*D[1]+l,c*D[0]+h*D[1]+u]),f=d.map(D=>D[0]),B=d.map(D=>D[1]),p=Math.min(...f),S=Math.max(...f),R=Math.min(...B),w=Math.max(...B);return new _s(p,R,S-p,w-R)}_updateOverflow(){if(this.style.overflow==="hidden"){const t=this.getRect();this.mask={x:t.x,y:t.y,width:t.width,height:t.height}}else this.mask=void 0}_draw(){super._draw(),this._text.canDraw()&&this._text.updateMeasure(),this._background.canDraw()&&(this._tree?.log(this.name,"background drawing"),this._shape.drawRect(),this._background.draw()),this._fill.canDraw()&&(this._tree?.log(this.name,"fill drawing"),this._shape.draw(),this._fill.draw()),this._outline.canDraw()&&(this._tree?.log(this.name,"outline drawing"),this._shape.draw(),this._outline.draw()),this._foreground.canDraw()&&(this._tree?.log(this.name,"foreground drawing"),this._shape.drawRect(),this._foreground.draw()),this._text.canDraw()&&(this._tree?.log(this.name,"text drawing"),this._text.draw()),this._drawContent()}_drawContent(){}_repaint(t){const e=Aa(this.style.filter);return super._repaint(t).map(A=>({...A,colorMatrix:e.toMatrix4().toArray(!0),colorMatrixOffset:e.toVector4().toArray()}))}canPointerEvents(){return this.style.pointerEvents!=="none"}input(t,e){const A=this._children.internal;for(let i=A.length-1;i>=0;i--)A[i].input(t,e);this.isVisibleInTree()&&this._input(t,e)}_pointerInput(t,e){const{width:A,height:i}=this.size;return t.x>=0&&t.x<A&&t.y>=0&&t.y<i}_input(t,e){switch(e){case"pointerdown":case"pointermove":case"pointerup":{if(this.canPointerEvents()){const{screenX:A,screenY:i}=t;if(A&&i){const[s,n]=this.globalTransform.inverse().applyToPoint(A,i);this._pointerInput({x:s,y:n},e)&&(t.target||(t.target=this),this.emit(e,t))}}break}}}toJSON(){const t=e=>Object.keys(e).length>0?e:void 0;return ai({...super.toJSON(),style:t(this.style.toJSON()),background:t(this.background.toJSON()),shape:t(this.shape.toJSON()),fill:t(this.fill.toJSON()),outline:t(this.outline.toJSON()),text:t(this.text.toJSON()),foreground:t(this.foreground.toJSON()),shadow:t(this.shadow.toJSON())})}},g.BaseElement2D=DI([st("BaseElement2D")],g.BaseElement2D);class Rn extends ki{constructor(t){super(),this.setProperties(t)}}const Pl={left:0,top:0,width:0,height:0};for(const r in Pl)ir(Rn,r,{fallback:Pl[r]});var xI=Object.getOwnPropertyDescriptor,SI=(r,t,e,A)=>{for(var i=A>1?void 0:A?xI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.Element2D=class extends g.BaseElement2D{get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}constructor(t,e=[]){super(),this.style=new Rn,this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"left":this.position.x=Number(e);break;case"top":this.position.y=Number(e);break;case"width":this.size.width=Number(e);break;case"height":this.size.height=Number(e);break}switch(t){case"width":case"height":this.mask instanceof g.BaseElement2D&&(this.mask.size.width=this.size.width,this.mask.size.height=this.size.height);break}}},g.Element2D=SI([st("Element2D")],g.Element2D);var MI=(()=>{var r=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:pA&&pA.tagName.toUpperCase()==="SCRIPT"&&pA.src||new URL("index.js",document.baseURI).href;return function(t){t=t||{};var e;e||(e=typeof t<"u"?t:{});var A,i;e.ready=new Promise(function(I,E){A=I,i=E});var s=Object.assign({},e),n="";typeof document<"u"&&document.currentScript&&(n=document.currentScript.src),r&&(n=r),n.indexOf("blob:")!==0?n=n.substr(0,n.replace(/[?#].*/,"").lastIndexOf("/")+1):n="";var o=e.print||console.log.bind(console),a=e.printErr||console.warn.bind(console);Object.assign(e,s),s=null;var l;e.wasmBinary&&(l=e.wasmBinary),e.noExitRuntime,typeof WebAssembly!="object"&&K("no native wasm support detected");var c,h=!1;function u(I,E,C){C=E+C;for(var _="";!(E>=C);){var b=I[E++];if(!b)break;if(b&128){var k=I[E++]&63;if((b&224)==192)_+=String.fromCharCode((b&31)<<6|k);else{var N=I[E++]&63;b=(b&240)==224?(b&15)<<12|k<<6|N:(b&7)<<18|k<<12|N<<6|I[E++]&63,65536>b?_+=String.fromCharCode(b):(b-=65536,_+=String.fromCharCode(55296|b>>10,56320|b&1023))}}else _+=String.fromCharCode(b)}return _}var d,f,B,p,S,R,w,D,Q;function m(){var I=c.buffer;d=I,e.HEAP8=f=new Int8Array(I),e.HEAP16=p=new Int16Array(I),e.HEAP32=R=new Int32Array(I),e.HEAPU8=B=new Uint8Array(I),e.HEAPU16=S=new Uint16Array(I),e.HEAPU32=w=new Uint32Array(I),e.HEAPF32=D=new Float32Array(I),e.HEAPF64=Q=new Float64Array(I)}var x,M=[],V=[],et=[];function z(){var I=e.preRun.shift();M.unshift(I)}var J=0,$=null;function K(I){throw e.onAbort&&e.onAbort(I),I="Aborted("+I+")",a(I),h=!0,I=new WebAssembly.RuntimeError(I+". Build with -sASSERTIONS for more info."),i(I),I}function L(I){return I.startsWith("data:application/octet-stream;base64,")}var it;if(it="data:application/octet-stream;base64,AGFzbQEAAAABugM3YAF/AGACf38AYAF/AX9gA39/fwBgAn98AGACf38Bf2ADf39/AX9gBH9/f30BfWADf398AGAAAGAEf39/fwBgAX8BfGACf38BfGAFf39/f38Bf2AAAX9gA39/fwF9YAZ/f31/fX8AYAV/f39/fwBgAn9/AX1gBX9/f319AX1gAX8BfWADf35/AX5gB39/f39/f38AYAZ/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DQEMAwsLEAIACyABIQQLIAMoAhgiAQRAA0AgASgCACECIAEQIyACIgENAAsLIARFBEAgACoCmAMhBQwBCyAEEE4gBCoCoAOSIQULIANBIGokACAFC6EDAQh/AkAgACgC6AMiBSAAKALsAyIHRwRAA0AgACAFKAIAIgIoAuQDRwRAAkAgACgC9AMoAgAiAQRAIAIgACAGIAERBgAiAQ0BC0GIBBAeIgEgAigCEDYCECABIAIpAgg3AgggASACKQIANwIAIAFBFGogAkEUakHoABArGiABQgA3AoABIAFB/ABqIgNBADsBACABQgA3AogBIAFCADcCkAEgAyACQfwAahCgASABQZgBaiACQZgBakHQAhArGiABQQA2AvADIAFCADcC6AMgAigC7AMiAyACKALoAyIERwRAIAMgBGsiBEEASA0FIAEgBBAeIgM2AuwDIAEgAzYC6AMgASADIARqNgLwAyACKALoAyIEIAIoAuwDIghHBEADQCADIAQoAgA2AgAgA0EEaiEDIARBBGoiBCAIRw0ACwsgASADNgLsAwsgASACKQL0AzcC9AMgASACKAKEBDYChAQgASACKQL8AzcC/AMgAUEANgLkAwsgBSABNgIAIAEgADYC5AMLIAZBAWohBiAFQQRqIgUgB0cNAAsLDwsQAgALUAACQAJAAkACQAJAIAIOBAQAAQIDCyAAIAEgAUEwahBDDwsgACABIAFBMGogAxBEDwsgACABIAFBMGoQQg8LECQACyAAIAEgAUEwaiADEEULcAIBfwF9IwBBEGsiBCQAIARBCGogACABQQJ0QdwlaigCACACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVbGwt5AgF/AX0jAEEQayIDJAAgA0EIaiAAIAFBAnRB7CVqKAIAIAIQU0MAAMB/IQQCQAJAAkAgAy0ADEEBaw4CAAECCyADKgIIIQQMAQsgAyoCCEMAAAAAlEMK1yM8lCEECyADQRBqJAAgBEMAAAAAl0MAAAAAIAQgBFsbC1QAAkACQAJAAkACQCACDgQEAAECAwsgACABIAFBw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yAEIAIgAiAESxsiBARAIAUgASAEECsaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACCwQAQgALBABBAAuKBQIGfgJ/IAEgASgCAEEHakF4cSIBQRBqNgIAIAAhCSABKQMAIQMgASkDCCEGIwBBIGsiCCQAAkAgBkL///////////8AgyIEQoCAgICAgMCAPH0gBEKAgICAgIDA/8MAfVQEQCAGQgSGIANCPIiEIQQgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIARCgYCAgICAgIDAAHwhAgwCCyAEQoCAgICAgICAQH0hAiADQoCAgICAgICACFINASACIARCAYN8IQIMAQsgA1AgBEKAgICAgIDA//8AVCAEQoCAgICAgMD//wBRG0UEQCAGQgSGIANCPIiEQv////////8Dg0KAgICAgICA/P8AhCECDAELQoCAgICAgID4/wAhAiAEQv///////7//wwBWDQBCACECIARCMIinIgBBkfcASQ0AIAMhAiAGQv///////z+DQoCAgICAgMAAhCIFIQcCQCAAQYH3AGsiAUHAAHEEQCACIAFBQGqthiEHQgAhAgwBCyABRQ0AIAcgAa0iBIYgAkHAACABa62IhCEHIAIgBIYhAgsgCCACNwMQIAggBzcDGAJAQYH4ACAAayIAQcAAcQRAIAUgAEFAaq2IIQNCACEFDAELIABFDQAgBUHAACAAa62GIAMgAK0iAoiEIQMgBSACiCEFCyAIIAM3AwAgCCAFNwMIIAgpAwhCBIYgCCkDACIDQjyIhCECIAgpAxAgCCkDGIRCAFKtIANC//////////8Pg4QiA0KBgICAgICAgAhaBEAgAkIBfCECDAELIANCgICAgICAgIAIUg0AIAJCAYMgAnwhAgsgCEEgaiQAIAkgAiAGQoCAgICAgICAgH+DhL85AwALmRgDEn8BfAN+IwBBsARrIgwkACAMQQA2AiwCQCABvSIZQgBTBEBBASERQZkJIRMgAZoiAb0hGQwBCyAEQYAQcQRAQQEhEUGcCSETDAELQZ8JQZoJIARBAXEiERshEyARRSEVCwJAIBlCgICAgICAgPj/AINCgICA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F1aiEBIAAoAgAhACABIAIgA0EBcQR/IAEoAgAgAGooAgAFIAALERIACzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRDAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRCwALYQECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEQEB4iACACKQMINwMIIAAgAikDADcDACACQRBqJAAgAAtjAQJ/IwBBEGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACADIAEgAiAEQQFxBH8gASgCACAAaigCAAUgAAsRAwBBEBAeIgAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiQAIAALNwEBfyABIAAoAgQiA0EBdWohASAAKAIAIQAgASACIANBAXEEfyABKAIAIABqKAIABSAACxEEAAs5AQF/IAEgACgCBCIEQQF1aiEBIAAoAgAhACABIAIgAyAEQQFxBH8gASgCACAAaigCAAUgAAsRCAALCQAgASAAEQIACwUAQcM7Cw8AIAEgACgCAGogAjYCAAsNACABIAAoAgBqKAIACxgBAX9BEBAeIgBCADcDCCAAQQA2AgAgAAsYAQF/QRAQHiIAQgA3AwAgAEIANwMIIAALDABBMBAeQQBBMBAqCzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRHgALBQBBvjsLIQAgACABKAIAIAEgASwAC0EASBtBuzsgAigCABAQNgIACyoBAX9BDBAeIgFBADoABCABIAAoAgA2AgggAEEANgIAIAFB2Cc2AgAgAQsFAEG7OwsFAEG4OwshACAAIAEoAgAgASABLAALQQBIG0GkOyACKAIAEBA2AgAL2AEBBH8jAEEgayIDJAAgASgCACIEQfD///8HSQRAAkACQCAEQQtPBEAgBEEPckEBaiIFEB4hBiADIAVBgICAgHhyNgIQIAMgBjYCCCADIAQ2AgwgBCAGaiEFDAEL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ANgIIIAEEQCABIAEoAgAoAgQRAAALIAAoAgBBADYCEAsXACAAKAIEKAIIIgAgACgCACgCCBEAAAsuAQF/IAAoAgghAiAAIAE2AgggAgRAIAIgAigCACgCBBEAAAsgACgCAEEFNgIQCz4BAX8gACgCBCEBIABBADYCBCABBEAgASABKAIAKAIEEQAACyAAKAIAIgBBADYCCCAAIAAtAABB7wFxOgAAC0kBAX8jAEEQayIGJAAgBiABKAIEKAIEIgEgAiADIAQgBSABKAIAKAIIERAAIAAgBisDALY4AgAgACAGKwMItjgCBCAGQRBqJAALcwECfyMAQRBrIgIkACAAKAIEIQMgACABNgIEIAMEQCADIAMoAgAoAgQRAAALIAAoAgAiACgC6AMgACgC7ANHBEAgAkH5IzYCACAAQQVB2CUgAhAsECQACyAAQQQ2AgggACAALQAAQRByOgAAIAJBEGokAAs8AQF/AkAgACgCACIAKALsAyAAKALoAyIAa0ECdSABTQ0AIAAgAUECdGooAgAiAEUNACAAKAIEIQILIAILGQAgACgCACgC5AMiAEUEQEEADwsgACgCBAsXACAAKAIAIgAoAuwDIAAoAugDa0ECdQuOAwEDfyMAQdACayICJAACQCAAKAIAIgAoAuwDIAAoAugDRg0AIAEoAgAiAygC5AMhASAAIAMQb0UNACAAIAFGBEAgAkEIakEAQcQCECoaIAJBADoAGCACQgA3AxAgAkGAgID+BzYCDCACQRxqQQBBxAEQKhogAkHgAWohBCACQSBqIQEDQCABQoCAgPyLgIDAv383AhAgAUKBgICAEDcCCCABQoCAgPyLgIDAv383AgAgAUEYaiIBIARHDQALIAJCgICA/IuAgMC/fzcD8AEgAkKBgICAEDcD6AEgAkKAgID8i4CAwL9/NwPgASACQoCAgP6HgIDg/wA3AoQCIAJCgICA/oeAgOD/ADcC/AEgAiACLQD4AUH4AXE6APgBIAJBjAJqQQBBwAAQKhogA0GYAWogAkEIakHEAhArGiADQQA2AuQDCwNAIAAtAAAiAUEEcQ0BIAAgAUEEcjoAACAAKAIQIgEEQCAAIAERAAALIABBgICA/gc2Apw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wdAADFHQAAxB0AAMQdAADEHQAAxB0AANwdAADUHQAAxB0AANUdAADVHQAAxB0AANQdAADEHQAAoR0AANQdAADEHQAAuR0AANUdAADFHQAAAAAAANQdAADEHQAA4h0AAOIdAADbHQAAdmlpZGRpAADBHQAAxR0AQcArC0EZAAoAGRkZAAAAAAUAAAAAAAAJAAAAAAsAAAAAAAAAABkAEQoZGRkDCgcAAQAJCxgAAAkGCwAACwAGGQAAABkZGQBBkSwLIQ4AAAAAAAAAABkACg0ZGRkADQAAAgAJDgAAAAkADgAADgBByywLAQwAQdcsCxUTAAAAABMAAAAACQwAAAAAAAwAAAwAQYUtCwEQAEGRLQsVDwAAAAQPAAAAAAkQAAAAAAAQAAAQAEG/LQsBEgBByy0LHhEAAAAAEQAAAAAJEgAAAAAAEgAAEgAAGgAAABoaGgBBgi4LDhoAAAAaGhoAAAAAAAAJAEGzLgsBFABBvy4LFRcAAAAAFwAAAAAJFAAAAAAAFAAAFABB7S4LARYAQfkuCycVAAAAABUAAAAACRYAAAAAABYAABYAADAxMjM0NTY3ODlBQkNERUYAQcQvCwHSAEHsLwsI//////////8AQbAwCwkQIgEAAAAAAAUAQcQwCwHNAEHcMAsKzgAAAM8AAAD8HQBB9DALAQIAQYQxCwj//////////wBByDELAQUAQdQxCwHQAEHsMQsOzgAAANEAAAAIHgAAAAQAQYQyCwEBAEGUMgsF/////woAQdgyCwHT",!L(it)){var G=it;it=e.locateFile?e.locateFile(G,n):n+G}function W(){var I=it;try{if(I==it&&l)return new Uint8Array(l);if(L(I))try{var E=IE(I.slice(37)),C=new Uint8Array(E.length);for(I=0;I<E.length;++I)C[I]=E.charCodeAt(I);var _=C}catch{throw Error("Converting base64 string to bytes failed.")}else _=void 0;var b=_;if(b)return b;throw"both async and sync fetching of the wasm failed"}catch(k){K(k)}}function At(){return l||typeof fetch!="function"?Promise.resolve().then(function(){return W()}):fetch(it,{credentials:"same-origin"}).then(function(I){if(!I.ok)throw"failed to load wasm binary file at '"+it+"'";return I.arrayBuffer()}).catch(function(){return W()})}function T(I){for(;0<I.length;)I.shift()(e)}function tt(I){if(I===void 0)return"_unknown";I=I.replace(/[^a-zA-Z0-9_]/g,"$");var E=I.charCodeAt(0);return 48<=E&&57>=E?"_"+I:I}function U(I,E){return I=tt(I),function(){return E.apply(this,arguments)}}var P=[{},{value:void 0},{value:null},{value:!0},{value:!1}],q=[];function Z(I){var E=Error,C=U(I,function(_){this.name=I,this.message=_,_=Error(_).stack,_!==void 0&&(this.stack=this.toString()+`
|
|
864
|
+
`+_.replace(/^Error(:[^\n]*)?\n/,""))});return C.prototype=Object.create(E.prototype),C.prototype.constructor=C,C.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},C}var nt=void 0;function X(I){throw new nt(I)}var It=I=>(I||X("Cannot use deleted val. handle = "+I),P[I].value),ie=I=>{switch(I){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var E=q.length?q.pop():P.length;return P[E]={ga:1,value:I},E}},re=void 0,Ft=void 0;function ht(I){for(var E="";B[I];)E+=Ft[B[I++]];return E}var yt=[];function Tt(){for(;yt.length;){var I=yt.pop();I.M.$=!1,I.delete()}}var Jt=void 0,bt={};function Zt(I,E){for(E===void 0&&X("ptr should not be undefined");I.R;)E=I.ba(E),I=I.R;return E}var Te={};function zr(I){I=Cc(I);var E=ht(I);return Ze(I),E}function Tn(I,E){var C=Te[I];return C===void 0&&X(E+" has unknown type "+zr(I)),C}function Wr(){}var Ln=!1;function gc(I){--I.count.value,I.count.value===0&&(I.T?I.U.W(I.T):I.P.N.W(I.O))}function uc(I,E,C){return E===C?I:C.R===void 0?null:(I=uc(I,E,C.R),I===null?null:C.na(I))}var fc={};function Xp(I,E){return E=Zt(I,E),bt[E]}var dc=void 0;function qr(I){throw new dc(I)}function Xr(I,E){return E.P&&E.O||qr("makeClassHandle requires ptr and ptrType"),!!E.U!=!!E.T&&qr("Both smartPtrType and smartPtr must be specified"),E.count={value:1},si(Object.create(I,{M:{value:E}}))}function si(I){return typeof FinalizationRegistry>"u"?(si=E=>E,I):(Ln=new FinalizationRegistry(E=>{gc(E.M)}),si=E=>{var C=E.M;return C.T&&Ln.register(E,{M:C},E),E},Wr=E=>{Ln.unregister(E)},si(I))}var jr={};function Gn(I){for(;I.length;){var E=I.pop();I.pop()(E)}}function ji(I){return this.fromWireType(R[I>>2])}var ni={},Zr={};function dA(I,E,C){function _(F){F=C(F),F.length!==I.length&&qr("Mismatched type converter count");for(var Y=0;Y<I.length;++Y)Xe(I[Y],F[Y])}I.forEach(function(F){Zr[F]=E});var b=Array(E.length),k=[],N=0;E.forEach((F,Y)=>{Te.hasOwnProperty(F)?b[Y]=Te[F]:(k.push(F),ni.hasOwnProperty(F)||(ni[F]=[]),ni[F].push(()=>{b[Y]=Te[F],++N,N===k.length&&_(b)}))}),k.length===0&&_(b)}function On(I){switch(I){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+I)}}function Xe(I,E,C={}){if(!("argPackAdvance"in E))throw new TypeError("registerType registeredInstance requires argPackAdvance");var _=E.name;if(I||X('type "'+_+'" must have a positive integer typeid pointer'),Te.hasOwnProperty(I)){if(C.ua)return;X("Cannot register type '"+_+"' twice")}Te[I]=E,delete Zr[I],ni.hasOwnProperty(I)&&(E=ni[I],delete ni[I],E.forEach(b=>b()))}function Hn(I){X(I.M.P.N.name+" instance already deleted")}function IA(){}function Jn(I,E,C){if(I[E].S===void 0){var _=I[E];I[E]=function(){return I[E].S.hasOwnProperty(arguments.length)||X("Function '"+C+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+I[E].S+")!"),I[E].S[arguments.length].apply(this,arguments)},I[E].S=[],I[E].S[_.Z]=_}}function jp(I,E){e.hasOwnProperty(I)?(X("Cannot register public name '"+I+"' twice"),Jn(e,I,I),e.hasOwnProperty(void 0)&&X("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),e[I].S[void 0]=E):e[I]=E}function Zp(I,E,C,_,b,k,N,F){this.name=I,this.constructor=E,this.X=C,this.W=_,this.R=b,this.pa=k,this.ba=N,this.na=F,this.ja=[]}function Kn(I,E,C){for(;E!==C;)E.ba||X("Expected null or instance of "+C.name+", got an instance of "+E.name),I=E.ba(I),E=E.R;return I}function $p(I,E){return E===null?(this.ea&&X("null is not a valid "+this.name),0):(E.M||X('Cannot pass "'+Wn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),Kn(E.M.O,E.M.P.N,this.N))}function tE(I,E){if(E===null){if(this.ea&&X("null is not a valid "+this.name),this.da){var C=this.fa();return I!==null&&I.push(this.W,C),C}return 0}if(E.M||X('Cannot pass "'+Wn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&E.M.P.ca&&X("Cannot convert argument of type "+(E.M.U?E.M.U.name:E.M.P.name)+" to parameter type "+this.name),C=Kn(E.M.O,E.M.P.N,this.N),this.da)switch(E.M.T===void 0&&X("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:E.M.U===this?C=E.M.T:X("Cannot convert argument of type "+(E.M.U?E.M.U.name:E.M.P.name)+" to parameter type "+this.name);break;case 1:C=E.M.T;break;case 2:if(E.M.U===this)C=E.M.T;else{var _=E.clone();C=this.xa(C,ie(function(){_.delete()})),I!==null&&I.push(this.W,C)}break;default:X("Unsupporting sharing policy")}return C}function eE(I,E){return E===null?(this.ea&&X("null is not a valid "+this.name),0):(E.M||X('Cannot pass "'+Wn(E)+'" as a '+this.name),E.M.O||X("Cannot pass deleted object as a pointer of type "+this.name),E.M.P.ca&&X("Cannot convert argument of type "+E.M.P.name+" to parameter type "+this.name),Kn(E.M.O,E.M.P.N,this.N))}function je(I,E,C,_){this.name=I,this.N=E,this.ea=C,this.ca=_,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,E.R!==void 0?this.toWireType=tE:(this.toWireType=_?$p:eE,this.V=null)}function AE(I,E){e.hasOwnProperty(I)||qr("Replacing nonexistant public symbol"),e[I]=E,e[I].Z=void 0}function iE(I,E){var C=[];return function(){if(C.length=0,Object.assign(C,arguments),I.includes("j")){var _=e["dynCall_"+I];_=C&&C.length?_.apply(null,[E].concat(C)):_.call(null,E)}else _=x.get(E).apply(null,C);return _}}function me(I,E){I=ht(I);var C=I.includes("j")?iE(I,E):x.get(E);return typeof C!="function"&&X("unknown function pointer with signature "+I+": "+E),C}var Ic=void 0;function $r(I,E){function C(k){b[k]||Te[k]||(Zr[k]?Zr[k].forEach(C):(_.push(k),b[k]=!0))}var _=[],b={};throw E.forEach(C),new Ic(I+": "+_.map(zr).join([", "]))}function Yn(I,E,C,_,b){var k=E.length;2>k&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");var N=E[1]!==null&&C!==null,F=!1;for(C=1;C<E.length;++C)if(E[C]!==null&&E[C].V===void 0){F=!0;break}var Y=E[0].name!=="void",H=k-2,j=Array(H),rt=[],gt=[];return function(){if(arguments.length!==H&&X("function "+I+" called with "+arguments.length+" arguments, expected "+H+" args!"),gt.length=0,rt.length=N?2:1,rt[0]=b,N){var St=E[1].toWireType(gt,this);rt[1]=St}for(var ft=0;ft<H;++ft)j[ft]=E[ft+2].toWireType(gt,arguments[ft]),rt.push(j[ft]);if(ft=_.apply(null,rt),F)Gn(gt);else for(var ue=N?1:2;ue<E.length;ue++){var we=ue===1?St:j[ue-2];E[ue].V!==null&&E[ue].V(we)}return St=Y?E[0].fromWireType(ft):void 0,St}}function Vn(I,E){for(var C=[],_=0;_<I;_++)C.push(w[E+4*_>>2]);return C}function zn(I){4<I&&--P[I].ga===0&&(P[I]=void 0,q.push(I))}function Wn(I){if(I===null)return"null";var E=typeof I;return E==="object"||E==="array"||E==="function"?I.toString():""+I}function rE(I,E){switch(E){case 2:return function(C){return this.fromWireType(D[C>>2])};case 3:return function(C){return this.fromWireType(Q[C>>3])};default:throw new TypeError("Unknown float type: "+I)}}function sE(I,E,C){switch(E){case 0:return C?function(_){return f[_]}:function(_){return B[_]};case 1:return C?function(_){return p[_>>1]}:function(_){return S[_>>1]};case 2:return C?function(_){return R[_>>2]}:function(_){return w[_>>2]};default:throw new TypeError("Unknown integer type: "+I)}}function nE(I,E){for(var C="",_=0;!(_>=E/2);++_){var b=p[I+2*_>>1];if(b==0)break;C+=String.fromCharCode(b)}return C}function oE(I,E,C){if(C===void 0&&(C=2147483647),2>C)return 0;C-=2;var _=E;C=C<2*I.length?C/2:I.length;for(var b=0;b<C;++b)p[E>>1]=I.charCodeAt(b),E+=2;return p[E>>1]=0,E-_}function aE(I){return 2*I.length}function lE(I,E){for(var C=0,_="";!(C>=E/4);){var b=R[I+4*C>>2];if(b==0)break;++C,65536<=b?(b-=65536,_+=String.fromCharCode(55296|b>>10,56320|b&1023)):_+=String.fromCharCode(b)}return _}function cE(I,E,C){if(C===void 0&&(C=2147483647),4>C)return 0;var _=E;C=_+C-4;for(var b=0;b<I.length;++b){var k=I.charCodeAt(b);if(55296<=k&&57343>=k){var N=I.charCodeAt(++b);k=65536+((k&1023)<<10)|N&1023}if(R[E>>2]=k,E+=4,E+4>C)break}return R[E>>2]=0,E-_}function hE(I){for(var E=0,C=0;C<I.length;++C){var _=I.charCodeAt(C);55296<=_&&57343>=_&&++C,E+=4}return E}var gE={};function pc(I){var E=gE[I];return E===void 0?ht(I):E}var ts=[];function uE(I){var E=ts.length;return ts.push(I),E}function fE(I,E){for(var C=Array(I),_=0;_<I;++_)C[_]=Tn(w[E+4*_>>2],"parameter "+_);return C}var Ec=[],dE=[null,[],[]];nt=e.BindingError=Z("BindingError"),e.count_emval_handles=function(){for(var I=0,E=5;E<P.length;++E)P[E]!==void 0&&++I;return I},e.get_first_emval=function(){for(var I=5;I<P.length;++I)if(P[I]!==void 0)return P[I];return null},re=e.PureVirtualError=Z("PureVirtualError");for(var Bc=Array(256),es=0;256>es;++es)Bc[es]=String.fromCharCode(es);Ft=Bc,e.getInheritedInstanceCount=function(){return Object.keys(bt).length},e.getLiveInheritedInstances=function(){var I=[],E;for(E in bt)bt.hasOwnProperty(E)&&I.push(bt[E]);return I},e.flushPendingDeletes=Tt,e.setDelayFunction=function(I){Jt=I,yt.length&&Jt&&Jt(Tt)},dc=e.InternalError=Z("InternalError"),IA.prototype.isAliasOf=function(I){if(!(this instanceof IA&&I instanceof IA))return!1;var E=this.M.P.N,C=this.M.O,_=I.M.P.N;for(I=I.M.O;E.R;)C=E.ba(C),E=E.R;for(;_.R;)I=_.ba(I),_=_.R;return E===_&&C===I},IA.prototype.clone=function(){if(this.M.O||Hn(this),this.M.aa)return this.M.count.value+=1,this;var I=si,E=Object,C=E.create,_=Object.getPrototypeOf(this),b=this.M;return I=I(C.call(E,_,{M:{value:{count:b.count,$:b.$,aa:b.aa,O:b.O,P:b.P,T:b.T,U:b.U}}})),I.M.count.value+=1,I.M.$=!1,I},IA.prototype.delete=function(){this.M.O||Hn(this),this.M.$&&!this.M.aa&&X("Object already scheduled for deletion"),Wr(this),gc(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},IA.prototype.isDeleted=function(){return!this.M.O},IA.prototype.deleteLater=function(){return this.M.O||Hn(this),this.M.$&&!this.M.aa&&X("Object already scheduled for deletion"),yt.push(this),yt.length===1&&Jt&&Jt(Tt),this.M.$=!0,this},je.prototype.qa=function(I){return this.ka&&(I=this.ka(I)),I},je.prototype.ha=function(I){this.W&&this.W(I)},je.prototype.argPackAdvance=8,je.prototype.readValueFromPointer=ji,je.prototype.deleteObject=function(I){I!==null&&I.delete()},je.prototype.fromWireType=function(I){function E(){return this.da?Xr(this.N.X,{P:this.wa,O:C,U:this,T:I}):Xr(this.N.X,{P:this,O:I})}var C=this.qa(I);if(!C)return this.ha(I),null;var _=Xp(this.N,C);if(_!==void 0)return _.M.count.value===0?(_.M.O=C,_.M.T=I,_.clone()):(_=_.clone(),this.ha(I),_);if(_=this.N.pa(C),_=fc[_],!_)return E.call(this);_=this.ca?_.la:_.pointerType;var b=uc(C,this.N,_.N);return b===null?E.call(this):this.da?Xr(_.N.X,{P:_,O:b,U:this,T:I}):Xr(_.N.X,{P:_,O:b})},Ic=e.UnboundTypeError=Z("UnboundTypeError");var IE=typeof atob=="function"?atob:function(I){var E="",C=0;I=I.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I.charAt(C++)),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I.charAt(C++)),k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I.charAt(C++)),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I.charAt(C++));_=_<<2|b>>4,b=(b&15)<<4|k>>2;var F=(k&3)<<6|N;E+=String.fromCharCode(_),k!==64&&(E+=String.fromCharCode(b)),N!==64&&(E+=String.fromCharCode(F))}while(C<I.length);return E},pE={l:function(I,E,C,_){K("Assertion failed: "+(I?u(B,I):"")+", at: "+[E?E?u(B,E):"":"unknown filename",C,_?_?u(B,_):"":"unknown function"])},q:function(I,E,C){I=ht(I),E=Tn(E,"wrapper"),C=It(C);var _=[].slice,b=E.N,k=b.X,N=b.R.X,F=b.R.constructor;I=U(I,function(){b.R.ja.forEach((function(H){if(this[H]===N[H])throw new re("Pure virtual function "+H+" must be implemented in JavaScript")}).bind(this)),Object.defineProperty(this,"__parent",{value:k}),this.__construct.apply(this,_.call(arguments))}),k.__construct=function(){this===k&&X("Pass correct 'this' to __construct");var H=F.implement.apply(void 0,[this].concat(_.call(arguments)));Wr(H);var j=H.M;H.notifyOnDestruction(),j.aa=!0,Object.defineProperties(this,{M:{value:j}}),si(this),H=j.O,H=Zt(b,H),bt.hasOwnProperty(H)?X("Tried to register registered instance: "+H):bt[H]=this},k.__destruct=function(){this===k&&X("Pass correct 'this' to __destruct"),Wr(this);var H=this.M.O;H=Zt(b,H),bt.hasOwnProperty(H)?delete bt[H]:X("Tried to unregister unregistered instance: "+H)},I.prototype=Object.create(k);for(var Y in C)I.prototype[Y]=C[Y];return ie(I)},j:function(I){var E=jr[I];delete jr[I];var C=E.fa,_=E.W,b=E.ia,k=b.map(N=>N.ta).concat(b.map(N=>N.za));dA([I],k,N=>{var F={};return b.forEach((Y,H)=>{var j=N[H],rt=Y.ra,gt=Y.sa,St=N[H+b.length],ft=Y.ya,ue=Y.Aa;F[Y.oa]={read:we=>j.fromWireType(rt(gt,we)),write:(we,Zi)=>{var $e=[];ft(ue,we,St.toWireType($e,Zi)),Gn($e)}}}),[{name:E.name,fromWireType:function(Y){var H={},j;for(j in F)H[j]=F[j].read(Y);return _(Y),H},toWireType:function(Y,H){for(var j in F)if(!(j in H))throw new TypeError('Missing field: "'+j+'"');var rt=C();for(j in F)F[j].write(rt,H[j]);return Y!==null&&Y.push(_,rt),rt},argPackAdvance:8,readValueFromPointer:ji,V:_}]})},v:function(){},B:function(I,E,C,_,b){var k=On(C);E=ht(E),Xe(I,{name:E,fromWireType:function(N){return!!N},toWireType:function(N,F){return F?_:b},argPackAdvance:8,readValueFromPointer:function(N){if(C===1)var F=f;else if(C===2)F=p;else if(C===4)F=R;else throw new TypeError("Unknown boolean type size: "+E);return this.fromWireType(F[N>>k])},V:null})},f:function(I,E,C,_,b,k,N,F,Y,H,j,rt,gt){j=ht(j),k=me(b,k),F&&(F=me(N,F)),H&&(H=me(Y,H)),gt=me(rt,gt);var St=tt(j);jp(St,function(){$r("Cannot construct "+j+" due to unbound types",[_])}),dA([I,E,C],_?[_]:[],function(ft){if(ft=ft[0],_)var ue=ft.N,we=ue.X;else we=IA.prototype;ft=U(St,function(){if(Object.getPrototypeOf(this)!==Zi)throw new nt("Use 'new' to construct "+j);if($e.Y===void 0)throw new nt(j+" has no accessible constructor");var mc=$e.Y[arguments.length];if(mc===void 0)throw new nt("Tried to invoke ctor of "+j+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys($e.Y).toString()+") parameters instead!");return mc.apply(this,arguments)});var Zi=Object.create(we,{constructor:{value:ft}});ft.prototype=Zi;var $e=new Zp(j,ft,Zi,gt,ue,k,F,H);ue=new je(j,$e,!0,!1),we=new je(j+"*",$e,!1,!1);var yc=new je(j+" const*",$e,!1,!0);return fc[I]={pointerType:we,la:yc},AE(St,ft),[ue,we,yc]})},d:function(I,E,C,_,b,k,N){var F=Vn(C,_);E=ht(E),k=me(b,k),dA([],[I],function(Y){function H(){$r("Cannot call "+j+" due to unbound types",F)}Y=Y[0];var j=Y.name+"."+E;E.startsWith("@@")&&(E=Symbol[E.substring(2)]);var rt=Y.N.constructor;return rt[E]===void 0?(H.Z=C-1,rt[E]=H):(Jn(rt,E,j),rt[E].S[C-1]=H),dA([],F,function(gt){return gt=Yn(j,[gt[0],null].concat(gt.slice(1)),null,k,N),rt[E].S===void 0?(gt.Z=C-1,rt[E]=gt):rt[E].S[C-1]=gt,[]}),[]})},p:function(I,E,C,_,b,k){0<E||K();var N=Vn(E,C);b=me(_,b),dA([],[I],function(F){F=F[0];var Y="constructor "+F.name;if(F.N.Y===void 0&&(F.N.Y=[]),F.N.Y[E-1]!==void 0)throw new nt("Cannot register multiple constructors with identical number of parameters ("+(E-1)+") for class '"+F.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return F.N.Y[E-1]=()=>{$r("Cannot construct "+F.name+" due to unbound types",N)},dA([],N,function(H){return H.splice(1,0,null),F.N.Y[E-1]=Yn(Y,H,null,b,k),[]}),[]})},a:function(I,E,C,_,b,k,N,F){var Y=Vn(C,_);E=ht(E),k=me(b,k),dA([],[I],function(H){function j(){$r("Cannot call "+rt+" due to unbound types",Y)}H=H[0];var rt=H.name+"."+E;E.startsWith("@@")&&(E=Symbol[E.substring(2)]),F&&H.N.ja.push(E);var gt=H.N.X,St=gt[E];return St===void 0||St.S===void 0&&St.className!==H.name&&St.Z===C-2?(j.Z=C-2,j.className=H.name,gt[E]=j):(Jn(gt,E,rt),gt[E].S[C-2]=j),dA([],Y,function(ft){return ft=Yn(rt,ft,H,k,N),gt[E].S===void 0?(ft.Z=C-2,gt[E]=ft):gt[E].S[C-2]=ft,[]}),[]})},A:function(I,E){E=ht(E),Xe(I,{name:E,fromWireType:function(C){var _=It(C);return zn(C),_},toWireType:function(C,_){return ie(_)},argPackAdvance:8,readValueFromPointer:ji,V:null})},n:function(I,E,C){C=On(C),E=ht(E),Xe(I,{name:E,fromWireType:function(_){return _},toWireType:function(_,b){return b},argPackAdvance:8,readValueFromPointer:rE(E,C),V:null})},e:function(I,E,C,_,b){E=ht(E),b===-1&&(b=4294967295),b=On(C);var k=F=>F;if(_===0){var N=32-8*C;k=F=>F<<N>>>N}C=E.includes("unsigned")?function(F,Y){return Y>>>0}:function(F,Y){return Y},Xe(I,{name:E,fromWireType:k,toWireType:C,argPackAdvance:8,readValueFromPointer:sE(E,b,_!==0),V:null})},b:function(I,E,C){function _(k){k>>=2;var N=w;return new b(d,N[k+1],N[k])}var b=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][E];C=ht(C),Xe(I,{name:C,fromWireType:_,argPackAdvance:8,readValueFromPointer:_},{ua:!0})},o:function(I,E){E=ht(E);var C=E==="std::string";Xe(I,{name:E,fromWireType:function(_){var b=w[_>>2],k=_+4;if(C)for(var N=k,F=0;F<=b;++F){var Y=k+F;if(F==b||B[Y]==0){if(N=N?u(B,N,Y-N):"",H===void 0)var H=N;else H+="\0",H+=N;N=Y+1}}else{for(H=Array(b),F=0;F<b;++F)H[F]=String.fromCharCode(B[k+F]);H=H.join("")}return Ze(_),H},toWireType:function(_,b){b instanceof ArrayBuffer&&(b=new Uint8Array(b));var k,N=typeof b=="string";if(N||b instanceof Uint8Array||b instanceof Uint8ClampedArray||b instanceof Int8Array||X("Cannot pass non-string to std::string"),C&&N){var F=0;for(k=0;k<b.length;++k){var Y=b.charCodeAt(k);127>=Y?F++:2047>=Y?F+=2:55296<=Y&&57343>=Y?(F+=4,++k):F+=3}k=F}else k=b.length;if(F=qn(4+k+1),Y=F+4,w[F>>2]=k,C&&N){if(N=Y,Y=k+1,k=B,0<Y){Y=N+Y-1;for(var H=0;H<b.length;++H){var j=b.charCodeAt(H);if(55296<=j&&57343>=j){var rt=b.charCodeAt(++H);j=65536+((j&1023)<<10)|rt&1023}if(127>=j){if(N>=Y)break;k[N++]=j}else{if(2047>=j){if(N+1>=Y)break;k[N++]=192|j>>6}else{if(65535>=j){if(N+2>=Y)break;k[N++]=224|j>>12}else{if(N+3>=Y)break;k[N++]=240|j>>18,k[N++]=128|j>>12&63}k[N++]=128|j>>6&63}k[N++]=128|j&63}}k[N]=0}}else if(N)for(N=0;N<k;++N)H=b.charCodeAt(N),255<H&&(Ze(Y),X("String has UTF-16 code units that do not fit in 8 bits")),B[Y+N]=H;else for(N=0;N<k;++N)B[Y+N]=b[N];return _!==null&&_.push(Ze,F),F},argPackAdvance:8,readValueFromPointer:ji,V:function(_){Ze(_)}})},i:function(I,E,C){if(C=ht(C),E===2)var _=nE,b=oE,k=aE,N=()=>S,F=1;else E===4&&(_=lE,b=cE,k=hE,N=()=>w,F=2);Xe(I,{name:C,fromWireType:function(Y){for(var H=w[Y>>2],j=N(),rt,gt=Y+4,St=0;St<=H;++St){var ft=Y+4+St*E;(St==H||j[ft>>F]==0)&&(gt=_(gt,ft-gt),rt===void 0?rt=gt:(rt+="\0",rt+=gt),gt=ft+E)}return Ze(Y),rt},toWireType:function(Y,H){typeof H!="string"&&X("Cannot pass non-string to C++ string type "+C);var j=k(H),rt=qn(4+j+E);return w[rt>>2]=j>>F,b(H,rt+4,j+E),Y!==null&&Y.push(Ze,rt),rt},argPackAdvance:8,readValueFromPointer:ji,V:function(Y){Ze(Y)}})},k:function(I,E,C,_,b,k){jr[I]={name:ht(E),fa:me(C,_),W:me(b,k),ia:[]}},h:function(I,E,C,_,b,k,N,F,Y,H){jr[I].ia.push({oa:ht(E),ta:C,ra:me(_,b),sa:k,za:N,ya:me(F,Y),Aa:H})},C:function(I,E){E=ht(E),Xe(I,{va:!0,name:E,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(I,E,C,_,b){I=ts[I],E=It(E),C=pc(C);var k=[];return w[_>>2]=ie(k),I(E,C,k,b)},t:function(I,E,C,_){I=ts[I],E=It(E),C=pc(C),I(E,C,null,_)},g:zn,m:function(I,E){var C=fE(I,E),_=C[0];E=_.name+"_$"+C.slice(1).map(function(N){return N.name}).join("_")+"$";var b=Ec[E];if(b!==void 0)return b;var k=Array(I-1);return b=uE((N,F,Y,H)=>{for(var j=0,rt=0;rt<I-1;++rt)k[rt]=C[rt+1].readValueFromPointer(H+j),j+=C[rt+1].argPackAdvance;for(N=N[F].apply(N,k),rt=0;rt<I-1;++rt)C[rt+1].ma&&C[rt+1].ma(k[rt]);if(!_.va)return _.toWireType(Y,N)}),Ec[E]=b},D:function(I){4<I&&(P[I].ga+=1)},r:function(I){var E=It(I);Gn(E),zn(I)},c:function(){K("")},x:function(I,E,C){B.copyWithin(I,E,E+C)},w:function(I){var E=B.length;if(I>>>=0,2147483648<I)return!1;for(var C=1;4>=C;C*=2){var _=E*(1+.2/C);_=Math.min(_,I+100663296);var b=Math;_=Math.max(I,_),b=b.min.call(b,2147483648,_+(65536-_%65536)%65536);t:{try{c.grow(b-d.byteLength+65535>>>16),m();var k=1;break t}catch{}k=void 0}if(k)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(I,E,C,_){for(var b=0,k=0;k<C;k++){var N=w[E>>2],F=w[E+4>>2];E+=8;for(var Y=0;Y<F;Y++){var H=B[N+Y],j=dE[I];H===0||H===10?((I===1?o:a)(u(j,0)),j.length=0):j.push(H)}b+=F}return w[_>>2]=b,0}};(function(){function I(b){e.asm=b.exports,c=e.asm.E,m(),x=e.asm.J,V.unshift(e.asm.F),J--,e.monitorRunDependencies&&e.monitorRunDependencies(J),J==0&&$&&(b=$,$=null,b())}function E(b){I(b.instance)}function C(b){return At().then(function(k){return WebAssembly.instantiate(k,_)}).then(function(k){return k}).then(b,function(k){a("failed to asynchronously prepare wasm: "+k),K(k)})}var _={a:pE};if(J++,e.monitorRunDependencies&&e.monitorRunDependencies(J),e.instantiateWasm)try{return e.instantiateWasm(_,I)}catch(b){a("Module.instantiateWasm callback failed with error: "+b),i(b)}return function(){return l||typeof WebAssembly.instantiateStreaming!="function"||L(it)||typeof fetch!="function"?C(E):fetch(it,{credentials:"same-origin"}).then(function(b){return WebAssembly.instantiateStreaming(b,_).then(E,function(k){return a("wasm streaming compile failed: "+k),a("falling back to ArrayBuffer instantiation"),C(E)})})}().catch(i),{}})(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.F).apply(null,arguments)};var Cc=e.___getTypeName=function(){return(Cc=e.___getTypeName=e.asm.G).apply(null,arguments)};e.__embind_initialize_bindings=function(){return(e.__embind_initialize_bindings=e.asm.H).apply(null,arguments)};var qn=e._malloc=function(){return(qn=e._malloc=e.asm.I).apply(null,arguments)},Ze=e._free=function(){return(Ze=e._free=e.asm.K).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.L).apply(null,arguments)};var As;$=function I(){As||Qc(),As||($=I)};function Qc(){function I(){if(!As&&(As=!0,e.calledRun=!0,!h)){if(T(V),A(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;){var E=e.postRun.shift();et.unshift(E)}T(et)}}if(!(0<J)){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)z();T(M),0<J||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),I()},1)):I())}}if(e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return Qc(),t.ready}})();let Nt=function(r){return r[r.Auto=0]="Auto",r[r.FlexStart=1]="FlexStart",r[r.Center=2]="Center",r[r.FlexEnd=3]="FlexEnd",r[r.Stretch=4]="Stretch",r[r.Baseline=5]="Baseline",r[r.SpaceBetween=6]="SpaceBetween",r[r.SpaceAround=7]="SpaceAround",r[r.SpaceEvenly=8]="SpaceEvenly",r}({}),Lr=function(r){return r[r.BorderBox=0]="BorderBox",r[r.ContentBox=1]="ContentBox",r}({}),Ul=function(r){return r[r.Width=0]="Width",r[r.Height=1]="Height",r}({}),hA=function(r){return r[r.Inherit=0]="Inherit",r[r.LTR=1]="LTR",r[r.RTL=2]="RTL",r}({}),qA=function(r){return r[r.Flex=0]="Flex",r[r.None=1]="None",r[r.Contents=2]="Contents",r}({}),dt=function(r){return r[r.Left=0]="Left",r[r.Top=1]="Top",r[r.Right=2]="Right",r[r.Bottom=3]="Bottom",r[r.Start=4]="Start",r[r.End=5]="End",r[r.Horizontal=6]="Horizontal",r[r.Vertical=7]="Vertical",r[r.All=8]="All",r}({}),XA=function(r){return r[r.None=0]="None",r[r.StretchFlexBasis=1]="StretchFlexBasis",r[r.AbsolutePositionWithoutInsetsExcludesPadding=2]="AbsolutePositionWithoutInsetsExcludesPadding",r[r.AbsolutePercentAgainstInnerSize=4]="AbsolutePercentAgainstInnerSize",r[r.All=2147483647]="All",r[r.Classic=2147483646]="Classic",r}({}),RI=function(r){return r[r.WebFlexBasis=0]="WebFlexBasis",r}({}),gA=function(r){return r[r.Column=0]="Column",r[r.ColumnReverse=1]="ColumnReverse",r[r.Row=2]="Row",r[r.RowReverse=3]="RowReverse",r}({}),Gr=function(r){return r[r.Column=0]="Column",r[r.Row=1]="Row",r[r.All=2]="All",r}({}),pe=function(r){return r[r.FlexStart=0]="FlexStart",r[r.Center=1]="Center",r[r.FlexEnd=2]="FlexEnd",r[r.SpaceBetween=3]="SpaceBetween",r[r.SpaceAround=4]="SpaceAround",r[r.SpaceEvenly=5]="SpaceEvenly",r}({}),jA=function(r){return r[r.Error=0]="Error",r[r.Warn=1]="Warn",r[r.Info=2]="Info",r[r.Debug=3]="Debug",r[r.Verbose=4]="Verbose",r[r.Fatal=5]="Fatal",r}({}),kn=function(r){return r[r.Undefined=0]="Undefined",r[r.Exactly=1]="Exactly",r[r.AtMost=2]="AtMost",r}({}),Nl=function(r){return r[r.Default=0]="Default",r[r.Text=1]="Text",r}({}),ZA=function(r){return r[r.Visible=0]="Visible",r[r.Hidden=1]="Hidden",r[r.Scroll=2]="Scroll",r}({}),$A=function(r){return r[r.Static=0]="Static",r[r.Relative=1]="Relative",r[r.Absolute=2]="Absolute",r}({}),Pe=function(r){return r[r.Undefined=0]="Undefined",r[r.Point=1]="Point",r[r.Percent=2]="Percent",r[r.Auto=3]="Auto",r}({}),ti=function(r){return r[r.NoWrap=0]="NoWrap",r[r.Wrap=1]="Wrap",r[r.WrapReverse=2]="WrapReverse",r}({});const kI={ALIGN_AUTO:Nt.Auto,ALIGN_FLEX_START:Nt.FlexStart,ALIGN_CENTER:Nt.Center,ALIGN_FLEX_END:Nt.FlexEnd,ALIGN_STRETCH:Nt.Stretch,ALIGN_BASELINE:Nt.Baseline,ALIGN_SPACE_BETWEEN:Nt.SpaceBetween,ALIGN_SPACE_AROUND:Nt.SpaceAround,ALIGN_SPACE_EVENLY:Nt.SpaceEvenly,BOX_SIZING_BORDER_BOX:Lr.BorderBox,BOX_SIZING_CONTENT_BOX:Lr.ContentBox,DIMENSION_WIDTH:Ul.Width,DIMENSION_HEIGHT:Ul.Height,DIRECTION_INHERIT:hA.Inherit,DIRECTION_LTR:hA.LTR,DIRECTION_RTL:hA.RTL,DISPLAY_FLEX:qA.Flex,DISPLAY_NONE:qA.None,DISPLAY_CONTENTS:qA.Contents,EDGE_LEFT:dt.Left,EDGE_TOP:dt.Top,EDGE_RIGHT:dt.Right,EDGE_BOTTOM:dt.Bottom,EDGE_START:dt.Start,EDGE_END:dt.End,EDGE_HORIZONTAL:dt.Horizontal,EDGE_VERTICAL:dt.Vertical,EDGE_ALL:dt.All,ERRATA_NONE:XA.None,ERRATA_STRETCH_FLEX_BASIS:XA.StretchFlexBasis,ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING:XA.AbsolutePositionWithoutInsetsExcludesPadding,ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE:XA.AbsolutePercentAgainstInnerSize,ERRATA_ALL:XA.All,ERRATA_CLASSIC:XA.Classic,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:RI.WebFlexBasis,FLEX_DIRECTION_COLUMN:gA.Column,FLEX_DIRECTION_COLUMN_REVERSE:gA.ColumnReverse,FLEX_DIRECTION_ROW:gA.Row,FLEX_DIRECTION_ROW_REVERSE:gA.RowReverse,GUTTER_COLUMN:Gr.Column,GUTTER_ROW:Gr.Row,GUTTER_ALL:Gr.All,JUSTIFY_FLEX_START:pe.FlexStart,JUSTIFY_CENTER:pe.Center,JUSTIFY_FLEX_END:pe.FlexEnd,JUSTIFY_SPACE_BETWEEN:pe.SpaceBetween,JUSTIFY_SPACE_AROUND:pe.SpaceAround,JUSTIFY_SPACE_EVENLY:pe.SpaceEvenly,LOG_LEVEL_ERROR:jA.Error,LOG_LEVEL_WARN:jA.Warn,LOG_LEVEL_INFO:jA.Info,LOG_LEVEL_DEBUG:jA.Debug,LOG_LEVEL_VERBOSE:jA.Verbose,LOG_LEVEL_FATAL:jA.Fatal,MEASURE_MODE_UNDEFINED:kn.Undefined,MEASURE_MODE_EXACTLY:kn.Exactly,MEASURE_MODE_AT_MOST:kn.AtMost,NODE_TYPE_DEFAULT:Nl.Default,NODE_TYPE_TEXT:Nl.Text,OVERFLOW_VISIBLE:ZA.Visible,OVERFLOW_HIDDEN:ZA.Hidden,OVERFLOW_SCROLL:ZA.Scroll,POSITION_TYPE_STATIC:$A.Static,POSITION_TYPE_RELATIVE:$A.Relative,POSITION_TYPE_ABSOLUTE:$A.Absolute,UNIT_UNDEFINED:Pe.Undefined,UNIT_POINT:Pe.Point,UNIT_PERCENT:Pe.Percent,UNIT_AUTO:Pe.Auto,WRAP_NO_WRAP:ti.NoWrap,WRAP_WRAP:ti.Wrap,WRAP_WRAP_REVERSE:ti.WrapReverse};function PI(r){function t(i,s,n){const o=i[s];i[s]=function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return n.call(this,o,...l)}}for(const i of["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding","setGap"]){const s={[Pe.Point]:r.Node.prototype[i],[Pe.Percent]:r.Node.prototype[`${i}Percent`],[Pe.Auto]:r.Node.prototype[`${i}Auto`]};t(r.Node.prototype,i,function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];const c=a.pop();let h,u;if(c==="auto")h=Pe.Auto,u=void 0;else if(typeof c=="object")h=c.unit,u=c.valueOf();else if(h=typeof c=="string"&&c.endsWith("%")?Pe.Percent:Pe.Point,u=parseFloat(c),c!==void 0&&!Number.isNaN(c)&&Number.isNaN(u))throw new Error(`Invalid value ${c} for ${i}`);if(!s[h])throw new Error(`Failed to execute "${i}": Unsupported unit '${c}'`);return u!==void 0?s[h].call(this,...a,u):s[h].call(this,...a)})}function e(i){return r.MeasureCallback.implement({measure:function(){const{width:s,height:n}=i(...arguments);return{width:s??NaN,height:n??NaN}}})}t(r.Node.prototype,"setMeasureFunc",function(i,s){return s?i.call(this,e(s)):this.unsetMeasureFunc()});function A(i){return r.DirtiedCallback.implement({dirtied:i})}return t(r.Node.prototype,"setDirtiedFunc",function(i,s){i.call(this,A(s))}),t(r.Config.prototype,"free",function(){r.Config.destroy(this)}),t(r.Node,"create",(i,s)=>s?r.Node.createWithConfig(s):r.Node.createDefault()),t(r.Node.prototype,"free",function(){r.Node.destroy(this)}),t(r.Node.prototype,"freeRecursive",function(){for(let i=0,s=this.getChildCount();i<s;++i)this.getChild(0).freeRecursive();this.free()}),t(r.Node.prototype,"calculateLayout",function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:hA.LTR;return i.call(this,s,n,o)}),{Config:r.Config,Node:r.Node,...kI}}async function UI(){return PI(await MI())}class Fl extends ki{constructor(t){super(),this.setProperties(t)}}const ei={auto:Nt.Auto,"flex-start":Nt.FlexStart,center:Nt.Center,"flex-end":Nt.FlexEnd,stretch:Nt.Stretch,baseline:Nt.Baseline,"space-between":Nt.SpaceBetween,"space-around":Nt.SpaceAround,"space-evenly":Nt.SpaceEvenly},Tl={none:qA.None,flex:qA.Flex,contents:qA.Contents},Ll={inherit:hA.Inherit,ltr:hA.LTR,rtl:hA.RTL},Gl={column:gA.Column,"column-reverse":gA.ColumnReverse,row:gA.Row,"row-reverse":gA.RowReverse},Ol={"no-wrap":ti.NoWrap,wrap:ti.Wrap,"Wrap-reverse":ti.WrapReverse},Hl={"flex-start":pe.FlexStart,center:pe.Center,"flex-end":pe.FlexEnd,"space-between":pe.SpaceBetween,"space-around":pe.SpaceAround,"space-evenly":pe.SpaceEvenly},Jl={visible:ZA.Visible,hidden:ZA.Hidden,scroll:ZA.Scroll},Kl={static:$A.Static,relative:$A.Relative,absolute:$A.Absolute},Yl={"border-box":Lr.BorderBox,"content-box":Lr.ContentBox};class Or{constructor(t){this._element=t}static _yoga;static async load(){this._yoga=await UI()}_node=Or._yoga.Node.create();get _style(){return this._element.style}get offsetLeft(){return this._node.getComputedLeft()}get offsetTop(){return this._node.getComputedTop()}get offsetWidth(){return this._node.getComputedWidth()}get offsetHeight(){return this._node.getComputedHeight()}calculateLayout(t,e,A){return this._node.calculateLayout(t,e,A)}getComputedLayout(){return this._node.getComputedLayout()}updateStyleProperty(t,e,A,i){switch(t){case"alignContent":this._node.setAlignContent(e?ei[e]:ei["flex-start"]);break;case"alignItems":this._node.setAlignItems(e?ei[e]:ei["flex-start"]);break;case"alignSelf":this._node.setAlignSelf(e?ei[e]:ei["flex-start"]);break;case"aspectRatio":this._node.setAspectRatio(e);break;case"borderTop":this._node.setBorder(dt.Top,this._style.borderWidth);break;case"borderBottom":this._node.setBorder(dt.Bottom,this._style.borderWidth);break;case"borderLeft":this._node.setBorder(dt.Left,this._style.borderWidth);break;case"borderRight":this._node.setBorder(dt.Right,this._style.borderWidth);break;case"border":this._node.setBorder(dt.All,this._style.borderWidth);break;case"direction":this._node.setDirection(e?Ll[e]:Ll.inherit);break;case"display":this._node.setDisplay(e?Tl[e]:Tl.flex);break;case"flex":this._node.setFlex(this._style.flex);break;case"flexBasis":this._node.setFlexBasis(this._style.flexBasis);break;case"flexDirection":this._node.setFlexDirection(e?Gl[e]:Gl.row);break;case"flexGrow":this._node.setFlexGrow(this._style.flexGrow);break;case"flexShrink":this._node.setFlexShrink(this._style.flexShrink);break;case"flexWrap":this._node.setFlexWrap(e?Ol[e]:Ol.wrap);break;case"height":this._node.setHeight(this._style.height);break;case"justifyContent":this._node.setJustifyContent(e?Hl[e]:Hl["flex-start"]);break;case"gap":e!==void 0&&this._node.setGap(Gr.All,e);break;case"marginTop":this._node.setMargin(dt.Top,e);break;case"marginBottom":this._node.setMargin(dt.Top,e);break;case"marginLeft":this._node.setMargin(dt.Left,e);break;case"marginRight":this._node.setMargin(dt.Top,e);break;case"margin":this._node.setMargin(dt.All,e);break;case"maxHeight":this._node.setMaxHeight(e);break;case"maxWidth":this._node.setMaxWidth(e);break;case"minHeight":this._node.setMinHeight(this._style.minHeight);break;case"minWidth":this._node.setMinWidth(this._style.minWidth);break;case"overflow":this._node.setOverflow(e?Jl[e]:Jl.visible);break;case"paddingTop":this._node.setPadding(dt.Top,this._style.paddingTop);break;case"paddingBottom":this._node.setPadding(dt.Bottom,this._style.paddingBottom);break;case"paddingLeft":this._node.setPadding(dt.Left,this._style.paddingLeft);break;case"paddingRight":this._node.setPadding(dt.Right,this._style.paddingRight);break;case"padding":this._node.setPadding(dt.All,this._style.padding);break;case"top":this._node.setPosition(dt.Top,this._style.top);break;case"bottom":this._node.setPosition(dt.Bottom,this._style.bottom);break;case"left":this._node.setPosition(dt.Left,this._style.left);break;case"right":this._node.setPosition(dt.Right,this._style.right);break;case"position":this._node.setPositionType(e?Kl[e]:Kl.static);break;case"boxSizing":this._node.setBoxSizing(e?Yl[e]:Yl["content-box"]);break;case"width":this._node.setWidth(this._style.width);break}}}var NI=Object.getOwnPropertyDescriptor,FI=(r,t,e,A)=>{for(var i=A>1?void 0:A?NI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.FlexElement2D=class extends g.BaseElement2D{get style(){return this._style}set style(t){const e=(...A)=>{this.emit("updateStyleProperty",...A),this._updateStyleProperty(A[0],A[1],A[2],A[3])};t.on("updateProperty",e),this._style?.off("updateProperty",e),this._style=t}_layout=new Or(this);get offsetLeft(){return this._layout.offsetLeft}get offsetTop(){return this._layout.offsetTop}get offsetWidth(){return this._layout.offsetWidth}get offsetHeight(){return this._layout.offsetHeight}constructor(t,e=[]){super(),this.style=new Fl,this.setProperties(t).append(e)}_parented(t){super._parented(t),t._layout&&this._layout._node&&t._layout._node.insertChild(this._layout._node,t._layout._node.getChildCount())}_unparented(t){super._unparented(t),t._layout?._node&&t._layout._node.removeChild(this._layout._node)}_updateStyleProperty(t,e,A,i){super._updateStyleProperty(t,e,A,i),this._layout.updateStyleProperty(t,e,A,i),this._layout._node.isDirty()&&this.requestRelayout()}updateTransform(){this.calculateLayout(void 0,void 0,hA.LTR);const{left:t,top:e,width:A,height:i}=this._layout.getComputedLayout();this.position.x=t,this.position.y=e,this.size.x=A,this.size.y=i,super.updateTransform()}calculateLayout(t,e,A){const i=this.getParent();i?._layout?.calculateLayout?i?._layout.calculateLayout(t,e,A):this._layout.calculateLayout(t,e,A)}},g.FlexElement2D=FI([st("FlexElement2D")],g.FlexElement2D);var TI=Object.defineProperty,LI=Object.getOwnPropertyDescriptor,Wi=(r,t,e,A)=>{for(var i=A>1?void 0:A?LI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&TI(t,e,i),i};g.Image2D=class extends g.Element2D{get currentFrameTexture(){return this.texture?.frames[this._frameIndex]?.texture}get textureDuration(){return this.texture?.duration??0}get naturalWidth(){return this.currentFrameTexture?.realWidth??0}get naturalHeight(){return this.currentFrameTexture?.realHeight??0}get complete(){return this._complete}_frameIndex=0;_complete=!1;_wait=Promise.resolve();constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._wait=this._load(e);break;case"srcRect":this.requestRedraw();break}}decode(){return this._wait}setResource(t){let e;if(t instanceof hr?e=t:e=new hr(t),this.texture=e.updateDuration(),this.currentFrameTexture&&(!this.style.width||!this.style.height)){const A=this.currentFrameTexture;this.style.width=A.realWidth,this.style.height=A.realHeight}return this}async _load(t){if(this._complete=!1,t)try{this.setResource(this.gif||t?.includes(".gif")?await Ne.gif.load(t):await Ne.texture.load(t)),this.requestRedraw(),this.emit("load")}catch(e){console.warn(e),this.emit("error",e)}else this.texture=void 0;this._complete=!0}_getFrameCurrentTime(){const t=this.textureDuration;if(!t||!this._tree)return 0;const e=this._currentTime;return e<0?0:e%t}_updateFrameIndex(){if(!this.texture)return this;const t=this._getFrameCurrentTime(),e=this.texture.frames,A=e.length;if(A<=1&&this._frameIndex===0)return this;let i=A-1;for(let s=0,n=0;n<A;n++)if(s+=e[n].duration??0,s>=t){i=n;break}return this._frameIndex!==i&&(this._frameIndex=i,this.requestRedraw()),this}_process(t){this._updateFrameIndex(),super._process(t)}_drawContent(){const t=this.currentFrameTexture;if(t?.valid){const{left:e=0,top:A=0,right:i=0,bottom:s=0}=this.srcRect??{},{width:n,height:o}=this.size;this.context.fillStyle=t;const a=Math.abs(1+(e+i))*n,l=Math.abs(1+(A+s))*o,c=1/a,h=1/l,u=e*n*c,d=A*o*h;this.context.uvTransform=new Yt().scale(c,h).translate(u,d),this.shape.draw(),this.context.fill()}}_repaint(t){return super._repaint(t).map(e=>({...e,disableWrapMode:!0}))}},Wi([v({protected:!0})],g.Image2D.prototype,"texture",2),Wi([v({fallback:""})],g.Image2D.prototype,"src",2),Wi([v()],g.Image2D.prototype,"srcRect",2),Wi([v({fallback:!1})],g.Image2D.prototype,"gif",2),g.Image2D=Wi([st("Image2D")],g.Image2D);class Hr extends g.Element2D{texture;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_drawContent(){if(this.texture?.valid){const{width:t,height:e}=this.size;this.context.fillStyle=this.texture,this.context.uvTransform=new Yt().scale(1/t,1/e),this.shape.drawRect(),this.context.fill()}}}var GI=Object.defineProperty,OI=Object.getOwnPropertyDescriptor,Vl=(r,t,e,A)=>{for(var i=A>1?void 0:A?OI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&GI(t,e,i),i};g.Lottie2D=class extends Hr{texture=new di;animation;constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._load();break}}_updateStyleProperty(t,e,A){switch(super._updateStyleProperty(t,e,A),t){case"width":this.texture.width=this.style.width;break;case"height":this.texture.height=this.style.height;break}}async _load(){this.animation=await Ne.lottie.load(this.src,this.texture.source),this.duration=this.animation.getDuration(!1)*1e3,this.texture.requestUpload(),this.requestRedraw()}_process(t){this.animation?.goToAndStop(this.currentTime,!1),this.texture.requestUpload(),this.requestRedraw(),super._process(t)}},Vl([v({fallback:""})],g.Lottie2D.prototype,"src",2),g.Lottie2D=Vl([st("Lottie2D")],g.Lottie2D);var HI=Object.defineProperty,JI=Object.getOwnPropertyDescriptor,Ai=(r,t,e,A)=>{for(var i=A>1?void 0:A?JI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&HI(t,e,i),i};const KI=new Set(Object.keys(Sn));g.Text2D=class extends Hr{texture=new di;base=new cA;measureResult;_subTextsCount=0;constructor(t,e=[]){super(),this.setProperties(t),this.append(e),t?.plugins&&t.plugins.forEach(A=>{this.base.use(A)})}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"content":case"effects":case"measureDOM":case"fonts":case"split":this._updateSplit(),this.requestRedraw();break}this._subTextsCount&&t==="effects"&&this._getSubTexts().forEach(s=>{s.setProperties({[t]:e})})}_updateBase(){this.base.style=this.style.toJSON(),this.emit("updateBase",this.base),this.base.requestUpdate()}_updateStyleProperty(t,e,A){switch(t){case"left":case"top":case"width":case"height":this.requestRedraw();break;default:super._updateStyleProperty(t,e,A);break}switch(t){case"width":this.split&&this._updateSubTexts();break}typeof t=="string"&&KI.has(t)&&(this._subTextsCount&&t!=="width"&&t!=="height"&&this._getSubTexts().forEach(i=>{i.style.setProperties({[t]:e})}),this.requestRedraw())}_getSubTexts(){return this.children.front.filter(t=>t instanceof g.Text2D)}_updateSubTexts(){const t=this._getSubTexts();let e=0;this.split&&this.updateMeasure().measureResult?.paragraphs.forEach(A=>{A.fragments.forEach(i=>{i.characters.forEach(s=>{const n=t[e];n&&(n.style.left=s.inlineBox.left,n.style.top=s.inlineBox.top),e++})})})}measure(){return this._updateBase(),this.base.measure()}updateMeasure(){this.measureResult=this.measure();const{boundingBox:t}=this.measureResult,{left:e,top:A}=this.style;return this.position.x=e+Math.min(0,t.left),this.position.y=A+Math.min(0,t.top),this.size.width=t.width,this.size.height=t.height,this}_updateSplit(){this._subTextsCount&&(this.children.front.forEach(t=>this.removeChild(t)),this._subTextsCount=0),this.split&&this.measure().paragraphs.forEach(t=>{t.fragments.forEach(e=>{e.characters.forEach(A=>{this.append(new g.Text2D({internalMode:"front",style:{...A.computedStyle,left:A.inlineBox.x,top:A.inlineBox.y,width:0,height:0},content:A.content,effects:this.effects,fonts:this.fonts})),this._subTextsCount++})})})}_redraw(){return this.updateMeasure(),super._redraw()}_drawContent(){this.split||(this.base.render({pixelRatio:this.texture.pixelRatio,view:this.texture.source}),this.texture.requestUpload(),super._drawContent())}},Ai([v({fallback:!1})],g.Text2D.prototype,"split",2),Ai([v({alias:"base.content"})],g.Text2D.prototype,"content",2),Ai([v({alias:"base.effects"})],g.Text2D.prototype,"effects",2),Ai([v({protected:!0,alias:"base.measureDOM"})],g.Text2D.prototype,"measureDOM",2),Ai([v({protected:!0,alias:"base.fonts"})],g.Text2D.prototype,"fonts",2),g.Text2D=Ai([st("Text2D")],g.Text2D);var YI=Object.defineProperty,VI=(r,t,e,A)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(t,e,i)||i);return i&&YI(t,e,i),i};class Pn extends g.Element2D{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":this.requestRedraw();break}}_drawCircle(t,e){this.context.arc(t,e,this.handleSize,0,Math.PI*2,!0),this.context.fillStyle=mt.WHITE,this.context.fill(),this.context.arc(t,e,this.handleSize,0,Math.PI*2,!0),this.context.strokeStyle="rgba(0, 0, 0, 0.2)",this.context.stroke()}_drawEllipse(t,e){this.context.roundRect(t-this.handleSize,e-this.handleSize*2,this.handleSize*2,this.handleSize*4,this.handleSize),this.context.fillStyle=mt.WHITE,this.context.fill(),this.context.roundRect(t-this.handleSize,e-this.handleSize*2,this.handleSize*2,this.handleSize*4,this.handleSize),this.context.strokeStyle="rgba(0, 0, 0, 0.2)",this.context.stroke()}_draw(){const{width:t,height:e}=this.getRect();this.context.rect(0,0,t,e),this.context.strokeStyle="#00FF00",this.context.stroke(),this._drawCircle(0,0),this._drawCircle(t,e),this._drawCircle(0,e),this._drawEllipse(0,e/2),this._drawCircle(t,0),this._drawEllipse(t,e/2)}}VI([v({fallback:6})],Pn.prototype,"handleSize");var zI=Object.defineProperty,WI=Object.getOwnPropertyDescriptor,zl=(r,t,e,A)=>{for(var i=A>1?void 0:A?WI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&zI(t,e,i),i};g.Video2D=class extends Hr{get videoDuration(){return(this.texture?.duration??0)*1e3}_wait=Promise.resolve();constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._wait=this._load(e);break}}waitLoad(){return this._wait}async _load(t){this.texture=await Ne.video.load(t),(!this.style.width||!this.style.height)&&(this.style.width=this.texture.width,this.style.height=this.texture.height),this.requestRedraw()}_updateVideoCurrentTime(){let t=this._currentTime;if(t<0)return;const e=this.texture;if(!e)return;const A=e.duration;t=A?t%(A*1e3):0,!e.isPlaying&&!e.seeking&&(t=~~t/1e3,e.currentTime!==t&&(e.currentTime=t))}_process(t){this._updateVideoCurrentTime(),super._process(t)}},zl([v({fallback:""})],g.Video2D.prototype,"src",2),g.Video2D=zl([st("Video2D")],g.Video2D);var qI=Object.defineProperty,XI=Object.getOwnPropertyDescriptor,qi=(r,t,e,A)=>{for(var i=A>1?void 0:A?XI(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&qI(t,e,i),i};const Wl=r=>r,ql=ii(.25,.1,.25,1),Xl=ii(.42,0,1,1),jl=ii(0,0,.58,1),Zl=ii(.42,0,.58,1);function ii(r,t,e,A){const s=3*r-3*e+1,n=3*e-6*r,o=3*r,a=3*t-3*A+1,l=3*A-6*t,c=3*t,h=B=>(3*s*B+2*n)*B+o,u=B=>((s*B+n)*B+o)*B,d=B=>((a*B+l)*B+c)*B;function f(B){let p=B,S,R;for(let Q=0;Q<8;Q++){if(R=u(p)-B,Math.abs(R)<1e-6)return p;if(S=h(p),Math.abs(S)<1e-6)break;p-=R/S}let w=1,D=0;for(p=B;w>D;){if(R=u(p)-B,Math.abs(R)<1e-6)return p;R>0?w=p:D=p,p=(w+D)/2}return p}return B=>d(f(B))}const Jr={linear:Wl,ease:ql,easeIn:Xl,easeOut:jl,easeInOut:Zl};g.Animation=class extends g.TimelineNode{_keyframes=[];_isFirstUpdatePosition=!1;_cachedProps=new oo;_stoped=!1;constructor(t,e=[]){super(),this.setProperties(t).append(e)}_parented(t){super._parented(t),this._updateCachedProps()}_unparented(t){super._unparented(t),this.cancel()}_process(){this.canProcess()&&this.commitStyles()}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"effectMode":case"keyframes":this._updateKeyframes();break}}_getTargets(){let t;switch(this.effectMode){case"sibling":t=this.getParent()?.children.internal.filter(e=>e instanceof g.CanvasItem)??[];break;case"parent":default:t=[this.getParent()].filter(Boolean);break}return t.map(e=>e.style)}_updateKeyframes(){const t=[],e=this.keyframes;for(let s=e.length,n=0;n<s;n++){const{offset:o=n===0?0:n/(s-1),easing:a="linear",...l}=e[n];t.push({offset:o,easing:this._parseEasing(a),props:l})}const A=t[0],i=t[t.length-1];A&&A.offset!==0&&t.unshift({offset:0,easing:this._parseEasing("linear"),props:{}}),i&&i.offset!==1&&t.push({offset:1,easing:this._parseEasing("linear"),props:{}}),this._keyframes=t,this._updateCachedProps()}commitStyles(){if(!this.keyframes.length)return;if(this._updateCurrentTime(),this.isInsideTimeRange())this._isFirstUpdatePosition||(this._isFirstUpdatePosition=!0,this._updateCachedProps());else{if(!this._isFirstUpdatePosition)return;this._isFirstUpdatePosition=!1}const t=this._getTargets(),e=1/t.length,A=this.currentTimeProgress;t.forEach((i,s)=>{const n=e===1?A:Je(0,Math.max(0,A-e*s)/e,1),o=this._cachedProps.get(i);if(!o)return;const a=this._parseKeyframes(n,o);a?.length&&this._commitStyle(n,i,o,a[0],a[1])})}_updateCachedProps(){this.cancel(),this._getTargets().forEach(t=>{const e=new Map,A=this._keyframes;for(let i=A.length,s=0;s<i;s++)Object.keys(A[s].props).forEach(n=>{e.set(n,t[n])});this._cachedProps.set(t,e)})}_parseEasing(t){if(!t)return Jr.linear;if(t in Jr)return Jr[t];const e=t.replace(/cubic-bezier\((.+)\)/,"$1").split(",").map(A=>Number(A));return ii(e[0],e[1],e[2],e[3])}_parseKeyframes(t,e){let A;const i=this._keyframes;for(let s=i.length,n=0;n<s;n++){const o=i[n],{offset:a,easing:l}=o,c={...o.props};if(A&&t<=a){const{offset:h,easing:u}=A,d={...A.props};return e.forEach((f,B)=>{(!(B in d)||d[B]===null)&&(d[B]=f),(!(B in c)||c[B]===null)&&(c[B]=f)}),[{offset:h,easing:u,props:d},{offset:a,easing:l,props:c}]}A=o}return null}_commitStyle(t,e,A,i,s){const{offset:n,easing:o,props:a}=i,{offset:l,props:c}=s,h=l-n,u=o((t-n)/h),d={width:e.width,height:e.height,fontSize:e.fontSize};A.forEach((f,B)=>{e[B]=this._getDiffValue(B,a[B],c[B],u,d)})}_getDiffValue(t,e,A,i,s){let n,o;if(e==="none"&&(e=void 0),A==="none"&&(A=void 0),e===void 0||A===void 0)if(e!==void 0)n=ci(t,String(e),s),o=ds(n);else if(A!==void 0)o=ci(t,String(A),s),n=ds(o);else return;else n=ci(t,String(e),s),o=ci(t,String(A),s);if(Array.isArray(n)&&Array.isArray(o)){const a=new Set,l={},c={};n.forEach(({name:u,args:d})=>{l[u]=d,a.add(u)}),o.forEach(({name:u,args:d})=>{c[u]=d,a.add(u)});let h="";return a.forEach(u=>{const d=Math.max(l[u]?.length??0,c[u]?.length??0),f=l[u],B=c[u];h+=`${u}(${Array.from({length:d},(p,S)=>{const R=f?.[S],w=B?.[S],D=R?.normalizedIntValue??0,Q=w?.normalizedIntValue??0;return Number.isNaN(D)||Number.isNaN(Q)?w?.value??0:Dt(D,Q,i)}).join(", ")}) `}),h}else if(!Array.isArray(n)&&!Array.isArray(o))return Number.isNaN(n.normalizedIntValue)||Number.isNaN(o.normalizedIntValue)?o.value:Dt(n.normalizedIntValue,o.normalizedIntValue,i)}isPlaying(){return!this.paused&&this.isInsideTimeRange()}play(){return this._stoped?(this._stoped=!1,this.startTime=this.timelineCurrentTime):this.startTime=this.timelineCurrentTime-this.currentTime,this.paused=!1,!0}pause(){return this.paused=!0,!0}stop(){return this._stoped=!0,this.paused=!0,this._currentTime=0,!0}cancel(){this._getTargets().forEach(t=>{this._cachedProps.get(t)?.forEach((e,A)=>{t[A]=e}),this._cachedProps.delete(t)})}},qi([v()],g.Animation.prototype,"effectMode",2),qi([v()],g.Animation.prototype,"loop",2),qi([v()],g.Animation.prototype,"keyframes",2),qi([v()],g.Animation.prototype,"easing",2),g.Animation=qi([st("Animation",{renderMode:"disabled",processMode:"pausable",processSortMode:"parent_before",duration:2e3})],g.Animation);class Kr extends Ge{static _instance;static get instance(){return this._instance||(this._instance=new Kr),this._instance}playbackRate=1;muted=!1;volume=1;paused=!1;refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}get processors(){return console.warn("HTML Audio does not support processors"),[]}set processors(t){console.warn("HTML Audio does not support processors")}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}free(){this.removeAllListeners()}}class Xi extends Ge{static PADDING=.1;_source=null;_audio=null;_end=0;_pausedReal=!1;_duration=0;_start=0;_playing=!1;get progress(){return(this._source?.currentTime??0)/this._duration}_paused=!1;get paused(){return this._paused}set paused(t){this._paused!==t&&(this._paused=t,this.refreshPaused())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh())}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}set(t,e){if(this[t]===void 0)throw new Error(`Property with name ${t} does not exist.`);switch(t){case"playbackRate":this.playbackRate=e;break;case"volume":this.volume=e;break;case"paused":this.paused=e;break;case"loop":this.loop=e;break;case"muted":this.muted=e;break}return this}_onPlay(){this._playing=!0}_onPause(){this._playing=!1}init(t){this._playing=!1,this._duration=t.source.duration;const e=this._source=t.source.cloneNode(!1);return e.src=t.parent.src,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),t.context.on("refresh",this.refresh),t.context.on("refreshPaused",this.refreshPaused),this._audio=t,this}_stop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())}stop(){this._stop(),this._source&&this.emit("stop")}get processors(){return console.warn("HTML Audio does not support processors"),[]}set processors(t){console.warn("HTML Audio does not support processors")}refresh(){if(!this._audio||!this._source)return;const t=this._audio.context,e=this._audio.parent;this._source.loop=this._loop||e.loop;const A=t.volume*(t.muted?0:1),i=e.volume*(e.muted?0:1),s=this._volume*(this._muted?0:1);this._source.volume=s*A*i,this._source.playbackRate=this._playbackRate*t.playbackRate*e.playbackRate}refreshPaused(){if(!this._source||!this._audio)return;const t=this._paused||this._audio.parent.paused||this._audio.context.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._stop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,playbackRate:this._playbackRate,loop:this._loop})),this.emit("pause",t))}play(t={}){if(!this._source)return;const{start:e=0,end:A=0}=t;A&&console.assert(A>e,"End time is before start time"),t.playbackRate!==void 0&&(this._playbackRate=t.playbackRate),t.volume!==void 0&&(this._volume=t.volume),t.loop!==void 0&&(this._loop=t.loop),t.muted!==void 0&&(this._muted=t.muted),this.refresh(),this.loop&&A!==null&&(console.warn('Looping not support when specifying an "end" time'),this.loop=!1),this._start=e,this._end=A||this._duration,this._start=Math.max(0,this._start-Xi.PADDING),this._end=Math.min(this._end+Xi.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=e,this._source.onloadedmetadata=null,this.emit("progress",e,this._duration),Kt.on(this._onUpdate))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start")}_onUpdate=()=>{this._source&&(this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete())};_onComplete(){Kt.off(this._onUpdate),this._stop(),this.emit("progress",1,this._duration),this.emit("end",this)}free(){Kt.off(this._onUpdate),this.removeAllListeners();const t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._stop()),this._source=null,this._playbackRate=1,this._volume=1,this._loop=!1,this._end=0,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._audio&&(this._audio.context.off("refresh",this.refresh),this._audio.context.off("refreshPaused",this.refreshPaused),this._audio=null)}}class $l{constructor(t){this.parent=t}source=new globalThis.Audio;_src="";get src(){return this._src}set src(t){this._src!==t&&(this._src=t,this.load())}get duration(){return this.source.duration}get isPlayable(){return!!this.source&&this.source.readyState===4}get context(){return Kr.instance}async load(){return new Promise(t=>{this.source.onload=()=>t(this),this.source.src=this._src,this.source.load()})}createSound(){return new Xi}}class Un extends Ge{constructor(t,e){super(),this._input=t,this._output=e}_processers=[];get processors(){return this._processers}set processors(t){if(this._processers.forEach(e=>e.disconnect()),this._processers.length=0,this._input.connect(this._output),t.length){this._processers=t.slice(0),this._input.disconnect();let e;t.forEach(A=>{e?e.connect(A.destination):this._input.connect(A.destination),e=A}),e.connect(this._output)}}get destination(){return this._input}}class jI{constructor(t,e=null){this.destination=t,this.source=e}connect(t){this.source?.connect(t)}disconnect(){this.source?.disconnect()}}function ZI(){if(ps)return new AudioContext;if(Es){const r=globalThis.webkitAudioContext;return new r}else throw new Error("Failed to createAudioContext")}function $I(r,t,e){if(Bs)return new OfflineAudioContext(r,t,e);if(mo){const A=globalThis.webkitOfflineAudioContext;return new A(r,t,e)}else throw new Error("Failed to createOfflineAudioContext")}class uA extends Un{static _instance;static get instance(){return this._instance||(this._instance=new uA),this._instance}static get audioContext(){return this.instance.audioContext}static get offlineContext(){return this.instance.offlineContext}static setParamValue(t,e){this.instance.setParamValue(t,e)}static decode(t){return this.instance.decode(t)}_context;_offlineContext;get audioContext(){return this._context}get offlineContext(){return this._offlineContext}_locked;muted=!1;volume=1;playbackRate=1;autoPause=!0;_paused=!1;_pausedOnBlur=!1;get paused(){return this._paused}set paused(t){t&&this._context.state==="running"?this._context.suspend():!t&&this._context.state==="suspended"&&this._context.resume(),this._paused=t}_compressor;_analyser;constructor(){const t=ZI(),e=$I(1,2,Bs?Math.max(8e3,Math.min(96e3,t.sampleRate)):44100),A=t.createDynamicsCompressor(),i=t.createAnalyser();i.connect(A),A.connect(t.destination),super(i,A),this._context=t,this._offlineContext=e,this._compressor=A,this._analyser=i,this._locked=t.state==="suspended"&&(Oe||yo),gi&&(this._locked&&(this._unlock(),document.addEventListener("mousedown",this._unlock,!0),document.addEventListener("touchstart",this._unlock,!0),document.addEventListener("touchend",this._unlock,!0)),globalThis.addEventListener("focus",this._onFocus),globalThis.addEventListener("blur",this._onBlur))}_onFocus(){if(!this.autoPause)return;const t=this._context.state;(t==="suspended"||t==="interrupted"||!this._locked)&&(this.paused=this._pausedOnBlur,this.refreshPaused())}_onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))}_unlock=()=>{this._locked&&(this.playEmptySound(),this._context.state==="running"&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._locked=!1))};playEmptySound(){const t=this._context.createBufferSource();t.buffer=this._context.createBuffer(1,1,22050),t.connect(this._context.destination),t.start(0,0,0),t.context.state==="suspended"&&t.context.resume()}refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(t){return new Promise((e,A)=>{const i=n=>{A(new Error(n?.message||"Unable to decode file"))},s=this._offlineContext.decodeAudioData(t,e,i);s&&s.catch(i)})}setParamValue(t,e){t.setValueAtTime?t.setValueAtTime(e,this._context.currentTime):t.value=e}}class tc extends Ge{_audio=null;_sourceNode=null;_gain=null;_progress=0;get progress(){return this._progress}_pausedReal=!1;_paused=!1;get paused(){return this._paused}set paused(t){this._paused!==t&&(this._paused=t,this.refreshPaused())}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh(),this._update(!0))}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}_duration=0;_end=0;_elapsed=0;_lastUpdate=this._now();_processors=[];init(t){return this._audio=t,t.context.on("refresh",this.refresh),t.context.on("refreshPaused",this.refreshPaused),this}_now(){return this._audio?.context.audioContext.currentTime??0}play(t={}){if(!this._audio)return;const{end:e=0,start:A=0}=t;e&&console.assert(e>A,"End time is before start time"),this._end=e,this._elapsed=A,t.volume!==void 0&&(this._volume=t.volume),t.playbackRate!==void 0&&(this._playbackRate=t.playbackRate),t.muted!==void 0&&(this._muted=t.muted),t.loop!==void 0&&(this._loop=t.loop),t.processors!==void 0&&(this._processors=t.processors),this._paused=!1;const{source:i,gain:s}=this._audio.cloneSource();this._sourceNode=i,this._gain=s,this.refresh(),i.onended=this._onComplete.bind(this),this._duration=i.buffer?.duration??0,this._lastUpdate=this._now(),this._loop?(i.loopStart=A,i.loopEnd=e,i.start(0,A)):e?i.start(0,A,e-A):i.start(0,A),this.emit("start"),this._update(!0),this._enableTicker(!0)}_stop(){if(this._sourceNode){this._enableTicker(!1),this._sourceNode.onended=null,this._sourceNode.stop(0),this._sourceNode.disconnect();try{this._sourceNode.buffer=null}catch(t){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",t)}this._sourceNode=null}}stop(){this._sourceNode&&(this._stop(),this.emit("stop"))}_update(t=!1){if(this._sourceNode){const e=this._now(),A=e-this._lastUpdate;if(A>0||t){this._elapsed+=A*this._sourceNode.playbackRate.value,this._lastUpdate=e;const i=this._duration;let s;if(this._sourceNode.loopStart){const n=this._sourceNode.loopEnd-this._sourceNode.loopStart;s=(this._sourceNode.loopStart+this._elapsed%n)/i}else s=this._elapsed%i/i;this._progress=s,this.emit("progress",s,i)}}}refresh(){if(!this._audio||!this._sourceNode)return;const t=this._audio.context,e=this._audio.parent;this._sourceNode.loop=this._loop||e.loop,t.setParamValue(this._gain.gain,this._volume*(this._muted?0:1)*e.volume*(e.muted?0:1)*t.volume*(t.muted?0:1)),t.setParamValue(this._sourceNode.playbackRate,this._playbackRate*e.playbackRate*t.playbackRate),this.applyProcessors()}applyProcessors(){if(this._sourceNode&&this._processors.length){this._sourceNode.disconnect();let t=this._sourceNode;this._processors.forEach(e=>{t.connect(e.destination),t=e}),t.connect(this._gain)}}refreshPaused(){if(!this._audio)return;const t=this._paused||this._audio.parent.paused||this._audio.context.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._stop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,playbackRate:this._playbackRate,loop:this._loop,volume:this._volume})),this.emit("pause",t))}_onComplete=()=>{if(this._sourceNode){this._enableTicker(!1),this._sourceNode.onended=null,this._sourceNode.disconnect();try{this._sourceNode.buffer=null}catch(t){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",t)}}this._sourceNode=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)};_updateListener=()=>this._update();_enableTicker(t){Kt.off(this._updateListener),t&&Kt.on(this._updateListener)}free(){this.removeAllListeners(),this._stop(),this._gain?.disconnect(),this._gain=null,this._audio?.context.off("refresh",this.refresh),this._audio?.context.off("refreshPaused",this.refreshPaused),this._audio=null,this._processors.forEach(t=>t.disconnect()),this._processors.length=0,this._end=0,this._playbackRate=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1}}class ec extends Un{constructor(t){const e=uA.audioContext,A=e.createBufferSource(),i=e.createGain(),s=e.createAnalyser();A.connect(s),s.connect(i),i.connect(uA.instance.destination),super(s,i),this.parent=t,this._sourceNode=A,this.gain=i,this.analyser=s}_sourceBuffer;_sourceNode;_sourceLoad;gain;analyser;get context(){return uA.instance}get isPlayable(){return!!this._sourceNode.buffer}get duration(){return this._sourceNode.buffer?.duration??0}get buffer(){return this._sourceNode.buffer}set buffer(t){this._sourceNode.buffer=t}async load(){return this._sourceLoad||(this._sourceLoad=new Promise(t=>{this._sourceBuffer?this._decode(this._sourceBuffer).then(()=>t(this)):this.parent.src?this._loadUrl(this.parent.src).then(()=>t(this)):t(this)})),this._sourceLoad}_loadUrl(t){return new Promise(e=>{fetch(t).then(A=>A.arrayBuffer()).then(A=>this._decode(A)).finally(()=>e(this))})}_decode(t){return Promise.resolve(t instanceof AudioBuffer?t:uA.decode(t)).then(e=>(this.parent.isLoaded=!0,this.buffer=e,e))}cloneSource(){const t=this.context,e=this._sourceNode,A=t.audioContext.createBufferSource(),i=t.audioContext.createGain();return A.buffer=e.buffer,A.loop=e.loop,t.setParamValue(A.playbackRate,e.playbackRate.value),A.connect(i),i.connect(this.destination),{source:A,gain:i}}createSound(){return new tc}}var tp=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,Ap=(r,t,e)=>t in r?tp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ip=(r,t,e,A)=>{for(var i=A>1?void 0:A?ep(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},rp=(r,t,e)=>Ap(r,t+"",e);g.Audio=class extends g.TimelineNode{_sounds=[];_platformAudio=wo?new ec(this):new $l(this);get platformAudio(){return this._platformAudio}_src;get src(){return this._src}set src(t){this._src!==t&&(this._src=t,this.load())}isLoaded=!1;get isPlayable(){return this.isLoaded&&this._platformAudio.isPlayable}get audioDuration(){return this._platformAudio.duration*1e3}_volume=1;get volume(){return this._volume}set volume(t){this._volume!==t&&(this._volume=t,this.refresh())}_muted=!1;get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this.refresh())}_loop=!1;get loop(){return this._loop}set loop(t){this._loop!==t&&(this._loop=t,this.refresh())}_playbackRate=1;get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate!==t&&(this._playbackRate=t,this.refresh())}_isPlaying=!1;get isPlaying(){return this._isPlaying}multiple=!1;start=0;end=0;constructor(t=""){super(),this.src=t}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"paused":this.refreshPaused();break}}async load(){return await this._platformAudio.load(),this}pause(){return this._isPlaying=!1,this.paused=!0,this}resume(){return this._isPlaying=this._sounds.length>0,this.paused=!1,this}stop(){if(!this.isPlayable)return this;this._isPlaying=!1;for(let t=this._sounds.length-1;t>=0;t--)this._sounds[t].stop();return this}play(t={}){if(!this.isLoaded)return;this.multiple||this._removeSounds(),this._isPlaying=!0;const e=this._createSound();this._sounds.push(e),e.once("end",()=>{t.complete?.(),this._onComplete(e)}),e.once("stop",()=>this._onComplete(e));const A=(t?.start??this.start)/1e3,i=(t?.end??this.end)/1e3;return e.play({...t,start:A,end:i}),e}_removeSounds(){for(let t=this._sounds.length-1;t>=0;t--)this._recycleSound(this._sounds[t]);this._sounds.length=0}_createSound(){return g.Audio._soundPool.length>0?g.Audio._soundPool.pop().init(this._platformAudio):this._platformAudio.createSound().init(this._platformAudio)}refresh(){for(let t=this._sounds.length,e=0;e<t;e++)this._sounds[e].refresh()}refreshPaused(){for(let t=this._sounds.length,e=0;e<t;e++)this._sounds[e].refreshPaused()}_onComplete=t=>{if(this._sounds){const e=this._sounds.indexOf(t);e>-1&&this._sounds.splice(e,1),this._isPlaying=this._sounds.length>0}this._recycleSound(t)};_recycleSound(t){t.free(),g.Audio._soundPool.includes(t)||g.Audio._soundPool.push(t)}_prevTime=0;_timer=0;_process(t){if(super._process(t),this.canProcess()){const e=this._tree?.timeline.currentTime??0;e-this._prevTime>0&&(this._timer||(this._setTimeStop(),this.play({start:this.start+(e-this.delay)%this.duration})),this._isPlaying&&this._setTimeStop()),this._prevTime=e}}_setTimeStop(){this._timer&&clearTimeout(this._timer),this._timer=setTimeout(()=>{this.stop(),this._timer=0},100)}},rp(g.Audio,"_soundPool",[]),g.Audio=ip([st("Audio")],g.Audio);class sp extends g.Node2D{}var np=Object.defineProperty,op=Object.getOwnPropertyDescriptor,Yr=(r,t,e,A)=>{for(var i=A>1?void 0:A?op(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&np(t,e,i),i};g.AudioWaveform=class extends g.Element2D{_audioBuffer;_src=gi?new mt(document.createElement("canvas")):void 0;_needsUpdateTexture=!1;constructor(t={}){super(),this.setProperties(t)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"src":this._loadSrc(e);break;case"gap":case"color":case"width":case"height":this._needsUpdateTexture=!0;break}}async _loadSrc(t){await globalThis.fetch(t).then(e=>e.arrayBuffer()).then(e=>uA.decode(e)).then(e=>{this._audioBuffer=e,this.syncTexture(!0)})}syncTexture(t=!1){const e=this._audioBuffer;if(!e||!t&&!this._needsUpdateTexture)return;this._needsUpdateTexture=!1;const A=this._src?.source;if(!A)return;const{width:i=0,height:s=0}=this.style;A.width=i,A.height=s;const n=A.getContext("2d");if(!n){console.warn("Failed to getContext('2d') in syncTexture");return}n.fillStyle=this.color;const o=e.getChannelData(0),a=Math.ceil(o.length/i),l=s/2;for(let c=1,h=-1,u=0;u<i;u++){for(let d=0;d<a;d++){const f=o[u*a+d];f<c&&(c=f),f>h&&(h=f)}if(!this.gap||u%(this.gap*2)===0){const d=u,f=(1+c)*l,B=this.gap||1,p=Math.max(1,(h-c)*l);n.fillRect(d,f,B,p),c=1,h=-1}}this._src?.requestUpload(),this.requestRedraw()}_process(t){this.syncTexture(),super._process(t)}_drawSrc(){const t=this._src;t?.valid&&(this.context.fillStyle=t,this.context.uvTransform=new Yt().scale(1/this.style.width,1/this.style.height))}},Yr([v()],g.AudioWaveform.prototype,"src",2),Yr([v()],g.AudioWaveform.prototype,"gap",2),Yr([v()],g.AudioWaveform.prototype,"color",2),g.AudioWaveform=Yr([st("AudioWaveform")],g.AudioWaveform);var ap=Object.getOwnPropertyDescriptor,lp=(r,t,e,A)=>{for(var i=A>1?void 0:A?ap(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.Control=class extends g.Element2D{constructor(t,e=[]){super(),this._parentUpdateRect=this._parentUpdateRect.bind(this),this.setProperties(t),this.append(e)}_parented(t){super._parented(t),t.on("updateRect",this._parentUpdateRect)}_unparented(t){super._unparented(t),t.off("updateRect",this._parentUpdateRect)}_parentUpdateRect(){const t=this._parent.getRect();this.style.left=t.left,this.style.top=t.top,this.style.width=t.width,this.style.height=t.height}_input(t,e){super._input(t,e),this._guiInput(t,e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":case"left":case"top":this.emit("updateRect");break}}_guiInput(t,e){}},g.Control=lp([st("Control")],g.Control);var cp=Object.defineProperty,hp=Object.getOwnPropertyDescriptor,fA=(r,t,e,A)=>{for(var i=A>1?void 0:A?hp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&cp(t,e,i),i};g.Range=class extends g.Control{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"allowGreater":case"allowLesser":case"page":case"minValue":case"maxValue":case"step":case"value":this.requestRedraw();break}}},fA([v({fallback:!1})],g.Range.prototype,"allowGreater",2),fA([v({fallback:!1})],g.Range.prototype,"allowLesser",2),fA([v({fallback:1})],g.Range.prototype,"page",2),fA([v({fallback:0})],g.Range.prototype,"minValue",2),fA([v({fallback:100})],g.Range.prototype,"maxValue",2),fA([v({fallback:.01})],g.Range.prototype,"step",2),fA([v({fallback:0})],g.Range.prototype,"value",2),g.Range=fA([st("Range")],g.Range);var gp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,Ue=(r,t,e,A)=>{for(var i=A>1?void 0:A?up(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&gp(t,e,i),i};g.Ruler=class extends g.Control{texture=new di;constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"offsetX":case"offsetY":case"thickness":case"markHeight":case"color":case"markBackgroundColor":case"markColor":case"gap":case"scale":this.requestRedraw();break}}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":this.texture[t]=e,this.requestRedraw();break}}_drawTexture(){const{width:t,height:e}=this.size,{offsetX:A,offsetY:i,thickness:s,markHeight:n,markBackgroundColor:o,markColor:a,color:l,gap:c,gapScale:h}=this,d=this.texture.source.getContext("2d");d.reset(),d.scale(this.texture.pixelRatio,this.texture.pixelRatio);const f=Math.round(A),B=Math.round(i);d.beginPath(),d.fillStyle=o||"#EEE",d.fillRect(0,0,t,s),d.fillRect(0,0,s,e),d.fill(),d.strokeStyle=a||"#000",d.moveTo(s,0),d.lineTo(s,e),d.moveTo(0,s),d.lineTo(t,s),d.stroke();const p=c,S=c*h;let R,w,D,Q,m;for(p>=S?(R=p/S,w=Math.floor(R)*p/20,D=p/20*Math.floor(R)/R):(R=S/p,w=Math.floor(p/20/R),w>=2?w=Math.floor(w/2)*2:w=1,D=w*R),d.fillStyle=d.strokeStyle,Q=f,m=0;Q<t;m++,Q+=D)d.moveTo(Q,s-(m%5?n:2*n)),d.lineTo(Q,s);for(Q=f,m=0;Q>s;m++,Q-=D)d.moveTo(Q,s-(m%5?n:2*n)),d.lineTo(Q,s);let x=0;for(Q=B,m=0;Q>s;m++,Q-=D)d.moveTo(s-(m%5?n:2*n),Q),d.lineTo(s,Q);for(Q=B,m=0;Q<e;m++,Q+=D)d.moveTo(s-(m%5?n:2*n),Q),d.lineTo(s,Q);for(d.save(),d.fillStyle=l,d.scale(.8,.8),x=s-8,Q=f,m=0;Q<t;m++,Q+=D)m%10===0&&d.fillText(String(Math.ceil(w*m)),Q*1.25-3,x*1.25);for(Q=f,m=0;Q>s;m++,Q-=D)m%10===0&&d.fillText(String(Math.ceil(-w*m)),Q*1.25-3,x*1.25);for(x=0,Q=B,m=0;Q>s;m++,Q-=D)m%10===0&&d.fillText(String(Math.ceil(w*m)),x*1.25,Q*1.25+3);for(Q=B,m=0;Q<e;m++,Q+=D)m%10===0&&d.fillText(String(Math.ceil(-w*m)),x*1.25,Q*1.25+3);d.restore(),d.stroke(),this.texture.requestUpload()}_draw(){this._drawTexture();const t=this.texture;t?.valid&&(this.context.fillStyle=t,this.context.uvTransform=new Yt().scale(1/this.size.width,1/this.size.height),this.context.rect(0,0,t.width,t.height),this.context.fill())}},Ue([v({fallback:0})],g.Ruler.prototype,"offsetX",2),Ue([v({fallback:0})],g.Ruler.prototype,"offsetY",2),Ue([v({fallback:20})],g.Ruler.prototype,"thickness",2),Ue([v({fallback:3})],g.Ruler.prototype,"markHeight",2),Ue([v({fallback:"#b2b6bc"})],g.Ruler.prototype,"color",2),Ue([v({fallback:"#f9f9fa"})],g.Ruler.prototype,"markBackgroundColor",2),Ue([v({fallback:"#b2b6bc"})],g.Ruler.prototype,"markColor",2),Ue([v({fallback:300})],g.Ruler.prototype,"gap",2),Ue([v({fallback:1})],g.Ruler.prototype,"gapScale",2),g.Ruler=Ue([st("Ruler")],g.Ruler);var fp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Ac=(r,t,e,A)=>{for(var i=A>1?void 0:A?dp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&fp(t,e,i),i};g.ScrollBar=class extends g.Range{constructor(t,e=[]){super(),this.setProperties(t).append(e)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":case"height":case"left":case"top":this.requestRedraw();break}}_rect(){const{size:t,position:e}=this;let A,i,s,n,o;return this.direction==="vertical"?(s=10,n=t.height*(this.page/(this.maxValue-this.minValue)),A=e.left+t.width-s,i=t.height*(this.value/(this.maxValue-this.minValue)),o=s/2):(s=t.width*(this.page/(this.maxValue-this.minValue)),n=10,A=t.width*(this.value/(this.maxValue-this.minValue)),i=e.top+t.height-n,o=n/2),{left:A,top:i,width:s,height:n,radii:o}}_draw(){const{left:t,top:e,width:A,height:i,radii:s}=this._rect();this.context.roundRect(t,e,A,i,s),this.context.fillStyle=34,this.context.fill()}_pointerInput(t,e){const{left:A,top:i,width:s,height:n}=this._rect(),o=t.x>=A&&t.x<A+s&&t.y>=i&&t.y<i+n;switch(e){case"pointerdown":case"pointermove":o?this._tree?.input.setCursor("pointer"):this._tree?.input.setCursor(void 0);break}return!1}},Ac([v({fallback:"vertical"})],g.ScrollBar.prototype,"direction",2),g.ScrollBar=Ac([st("ScrollBar")],g.ScrollBar);var Ip=Object.getOwnPropertyDescriptor,pp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ip(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.XScrollBar=class extends g.ScrollBar{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},g.XScrollBar=pp([st("XScrollBar",{direction:"horizontal"})],g.XScrollBar);var Ep=Object.getOwnPropertyDescriptor,Bp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Ep(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.YScrollBar=class extends g.ScrollBar{constructor(t,e=[]){super(),this.setProperties(t).append(e)}},g.YScrollBar=Bp([st("YScrollBar",{direction:"vertical"})],g.YScrollBar);var Cp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,ri=(r,t,e,A)=>{for(var i=A>1?void 0:A?Qp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(A?n(t,e,i):n(i))||i);return A&&i&&Cp(t,e,i),i};g.Scaler=class extends g.Node{get target(){if(this.parent?.style)return this.parent}constructor(t,e=[]){super(),this.setProperties(t),this.append(e)}_updateProperty(t,e,A,i){switch(super._updateProperty(t,e,A,i),t){case"translateY":case"translateX":case"scale":case"min":case"max":{this.scale=Je(this.minScale,this.scale,this.maxScale),this._updateTarget();break}}}_updateTarget(){const t=this.target;t&&(t.style.transform=`translate(${this.translateX}px, ${this.translateY}px) scale(${this.scale})`,this.emit("updateScale",this.scale))}_onWheel(t){this.target&&(t.preventDefault(),t.ctrlKey?(t.wheelDeltaY?Math.abs(Math.abs(t.wheelDeltaY)-Math.abs(3*t.deltaY))<3:t.deltaMode===0)||(t.preventDefault(),this.scale+=t.deltaY*-.015):(this.translateX-=t.deltaX,this.translateY-=t.deltaY))}_input(t,e){switch(super._input(t,e),e){case"wheel":this._onWheel(t);break}}},ri([v({default:1})],g.Scaler.prototype,"translateX",2),ri([v({default:1})],g.Scaler.prototype,"translateY",2),ri([v({default:1})],g.Scaler.prototype,"scale",2),ri([v({default:.05})],g.Scaler.prototype,"minScale",2),ri([v({default:10})],g.Scaler.prototype,"maxScale",2),g.Scaler=ri([st("Scaler",{processMode:"disabled",renderMode:"disabled"})],g.Scaler);var yp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,wp=(r,t,e)=>t in r?yp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,vp=(r,t,e,A)=>{for(var i=A>1?void 0:A?mp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},_p=(r,t,e)=>wp(r,t+"",e);g.KawaseTransition=class extends g.Transition{blur=10;quality=10;apply(t,e){const A=this.currentTimeProgress;let i,s;A<.5?(i=0,s=(.5-A)/.5):(i=1,s=(A-.5)/.5);const n=this.blur,o=this.quality,a=e.width,l=e.height,c=[],h=[n];if(n>0){let S=n;const R=n/o;for(let w=1;w<o;w++)S-=R,h.push(S)}const u=1/a,d=1/l,f=[];let B;const p=o-1;for(let S=0;S<p;S++)B=h[S]+.5,f[0]=B*u,f[1]=B*d,c.push({offset:f});B=h[p]+.5,f[0]=B*u,f[1]=B*d,c.push({offset:f}),c.forEach(S=>{ut.draw(t,g.KawaseTransition.material,{sampler:i,progress:s,...S})})}},_p(g.KawaseTransition,"material",new Ct({vert:`attribute vec2 position;
|
|
914
865
|
attribute vec2 uv;
|
|
915
866
|
varying vec2 vUv;
|
|
916
867
|
void main() {
|
|
@@ -931,7 +882,7 @@ void main(void) {
|
|
|
931
882
|
color += texture2D(sampler, vec2(vUv.x - offset1.x, vUv.y - offset1.y));
|
|
932
883
|
color *= 0.25;
|
|
933
884
|
gl_FragColor = color;
|
|
934
|
-
}`})),
|
|
885
|
+
}`})),g.KawaseTransition=vp([st("KawaseTransition")],g.KawaseTransition);var bp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,xp=(r,t,e)=>t in r?bp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Sp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Dp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},Mp=(r,t,e)=>xp(r,t+"",e);g.LeftEraseTransition=class extends g.Transition{apply(t){ut.draw(t,g.LeftEraseTransition.material,{previous:0,next:1,progress:this.currentTimeProgress})}},Mp(g.LeftEraseTransition,"material",new Ct({vert:`attribute vec2 position;
|
|
935
886
|
attribute vec2 uv;
|
|
936
887
|
varying vec2 vUv;
|
|
937
888
|
void main() {
|
|
@@ -956,7 +907,7 @@ void main() {
|
|
|
956
907
|
mixPercent = 1.0;
|
|
957
908
|
}
|
|
958
909
|
gl_FragColor = mix(src2Color, src1Color, mixPercent);
|
|
959
|
-
}`})),
|
|
910
|
+
}`})),g.LeftEraseTransition=Sp([st("LeftEraseTransition")],g.LeftEraseTransition);var Rp=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,Pp=(r,t,e)=>t in r?Rp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Up=(r,t,e,A)=>{for(var i=A>1?void 0:A?kp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},Np=(r,t,e)=>Pp(r,t+"",e);g.TiltShiftTransition=class extends g.Transition{blur=100;gradientBlur=600;apply(t,e){const A=this.currentTimeProgress;let i,s;A<.5?(i=0,s=(.5-A)/.5):(i=1,s=(A-.5)/.5);const n=e.width,o=e.height,a=[0,o/2],l=[600,o/2],c=[n,o],h=l[0]-a[0],u=l[1]-a[1],d=Math.sqrt(h*h+u*u);ut.draw(t,g.TiltShiftTransition.material,{sampler:i,progress:s,blur:this.blur,gradientBlur:this.gradientBlur,start:a,end:l,delta:[h/d,u/d],texSize:c}),ut.draw(t,g.TiltShiftTransition.material,{sampler:i,progress:s,blur:this.blur,gradientBlur:this.gradientBlur,start:a,end:l,delta:[-u/d,h/d],texSize:c})}},Np(g.TiltShiftTransition,"material",new Ct({vert:`attribute vec2 position;
|
|
960
911
|
attribute vec2 uv;
|
|
961
912
|
varying vec2 vUv;
|
|
962
913
|
void main() {
|
|
@@ -1000,7 +951,7 @@ void main(void) {
|
|
|
1000
951
|
color.rgb /= color.a + 0.00001;
|
|
1001
952
|
|
|
1002
953
|
gl_FragColor = color;
|
|
1003
|
-
}`})),
|
|
954
|
+
}`})),g.TiltShiftTransition=Up([st("TiltShiftTransition")],g.TiltShiftTransition);var Fp=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,Lp=(r,t,e)=>t in r?Fp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Gp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Tp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i},Op=(r,t,e)=>Lp(r,t+"",e);g.TwistTransition=class extends g.Transition{radius;angle=4;padding=20;offset;apply(t,e){const A=this.currentTimeProgress;let i,s;A<.5?(i=0,s=(.5-A)/.5):(i=1,s=(A-.5)/.5);const n=e.width,o=e.height;ut.draw(t,g.TwistTransition.material,{sampler:i,progress:s,filterArea:[n,o,0,0],radius:this.radius??n,angle:this.angle,padding:this.padding,offset:this.offset??[n/2,o/2]})}},Op(g.TwistTransition,"material",new Ct({vert:`attribute vec2 position;
|
|
1004
955
|
attribute vec2 uv;
|
|
1005
956
|
varying vec2 vUv;
|
|
1006
957
|
void main() {
|
|
@@ -1046,4 +997,4 @@ void main(void) {
|
|
|
1046
997
|
coord = twist(coord, radius - (progress * radius));
|
|
1047
998
|
coord = unmapCoord(coord);
|
|
1048
999
|
gl_FragColor = texture2D(sampler, coord);
|
|
1049
|
-
}`})),h.TwistTransition=tE([st("TwistTransition")],h.TwistTransition);class au extends eA{install(t){const e=async A=>{const{decodeFrames:i}=await import("modern-gif");return await t.fetch(A).then(s=>s.arrayBuffer()).then(s=>i(s)).then(s=>new fr(s.map(n=>({duration:n.delay,texture:new Ms(n.data,n.width,n.height)}))))};return this.load=A=>t.loadBy(A,()=>e(A)),["image/gif"].forEach(A=>{t.register(A,e)}),t.gif=this,this}}class lu extends eA{install(t){const e=A=>t.fetch(A).then(i=>i.json());return this.load=A=>t.loadBy(A,()=>e(A)),["json"].forEach(A=>{t.register(A,e)}),t.json=this,this}}class uu extends eA{install(t){const e=async(A,i)=>(await import("lottie-web").then(n=>n.default)).loadAnimation({container:null,renderer:"canvas",rendererSettings:{context:i.getContext("2d")},loop:!1,autoplay:!1,animationData:await t.fetch(A).then(n=>n.json())});return this.load=(A,i)=>t.loadBy(A,()=>e(A,i)),["lottie"].forEach(A=>{t.register(A,e)}),t.lottie=this,this}}class cu extends eA{install(t){const e=async A=>await t.fetch(A).then(i=>i.text());return this.load=A=>t.loadBy(A,()=>e(A)),t.text=this,this}}class hu extends eA{install(t){const e=A=>t.fetchImageBitmap(A,{premultiplyAlpha:"premultiply"}).then(i=>new Dt(i));return this.load=A=>t.loadBy(A,()=>e(A)),["image/gif","image/jpeg","image/png","image/tiff","image/vnd.wap.wbmp","image/x-icon","image/x-jng","image/x-ms-bmp","image/svg+xml","image/webp"].forEach(A=>{t.register(A,e)}),t.texture=this,this}}class gu extends eA{install(t){const e=A=>new ga(A).load();return this.load=A=>t.loadBy(A,()=>e(A)),["video/3gpp","video/mpeg","video/quicktime","video/x-flv","video/x-mng","video/x-ms-asf","video/x-ms-wmv","video/x-msvideo","video/mp4"].forEach(A=>{t.register(A,e)}),t.video=this,this}}const AE=Object.entries({"text/html":["html","htm","shtml"],"text/css":["css"],"text/xml":["xml"],"image/gif":["gif"],"image/jpeg":["jpeg","jpg"],"application/x-javascript":["js"],"application/atom+xml":["atom"],"application/rss+xml":["rss"],"text/mathml":["mml"],"text/plain":["txt"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/x-component":["htc"],"image/png":["png"],"image/tiff":["tif","tiff"],"image/vnd.wap.wbmp":["wbmp"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-ms-bmp":["bmp"],"image/svg+xml":["svg"],"image/webp":["webp"],"application/java-archive":["jar","war","ear"],"application/mac-binhex40":["hqx"],"application/msword":["doc"],"application/pdf":["pdf"],"application/postscript":["ps","eps","ai"],"application/rtf":["rtf"],"application/vnd.ms-excel":["xls"],"application/vnd.ms-powerpoint":["ppt"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/x-7z-compressed":["7z"],"application/x-cocoa":["cco"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-makeself":["run"],"application/x-perl":["pl","pm"],"application/x-pilot":["prc","pdb"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-sea":["sea"],"application/x-shockwave-flash":["swf"],"application/x-stuffit":["sit"],"application/x-tcl":["tcl","tk"],"application/x-x509-ca-cert":["der","pem","crt"],"application/x-xpinstall":["xpi"],"application/xhtml+xml":["xhtml"],"application/zip":["zip"],"application/octet-stream":["bin","exe","dll","deb","dmg","eot","iso","img","msi","msp","msm"],"audio/midi":["mid","midi","kar"],"audio/mpeg":["mp3"],"audio/ogg":["ogg"],"audio/x-realaudio":["ra"],"video/3gpp":["3gpp","3gp"],"video/mpeg":["mpeg","mpg"],"video/quicktime":["mov"],"video/x-flv":["flv"],"video/x-mng":["mng"],"video/x-ms-asf":["asx","asf"],"video/x-ms-wmv":["wmv"],"video/x-msvideo":["avi"],"video/mp4":["m4v","mp4"]});function iE(r){for(const[t,e]of AE)if(e.includes(r))return t}async function rE(r){let t;if(r.startsWith("data:"))t=r.match(/^data:(.+?);/)?.[1];else if(r.startsWith("http")){const e=r.split(/[#?]/)[0].split(".").pop()?.trim();e&&(t=iE(e))}return t??await fetch(r).then(e=>e.headers.get("Content-Type"))??""}const qr="WeakRef"in globalThis;class fu{defaultHandler=t=>this.fetch(t);_handlers=new Map;_handleing=new Map;_handled=new Map;_gc=qr?new FinalizationRegistry(t=>{const e=this.get(t);e&&"free"in e&&e.free(),this._handled.delete(t)}):void 0;constructor(){qr||Kt.on(this.gc.bind(this),{sort:2})}use(t){return t.install(this),this}register(t,e){return this._handlers.set(t,e),this}fetch(t){return fetch(t)}_fixSVG(t){let e;t.includes(";base64,")?e=atob(t.split(",")[1]):e=decodeURIComponent(t.split(",")[1]);const A=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,i=A.getAttribute("width"),s=A.getAttribute("height"),n=i&&/^[\d.]+$/.test(i),o=s&&/^[\d.]+$/.test(s);if(!n||!o){const a=A.getAttribute("viewBox")?.split(" ").map(l=>Number(l));n||A.setAttribute("width",String(a?a[2]-a[0]:512)),o||A.setAttribute("height",String(a?a[3]-a[1]:512))}return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(A.outerHTML)}`}async fetchImageBitmap(t,e){return t.startsWith("http")?await this.fetch(t).then(A=>A.blob()).then(A=>A.type==="image/svg+xml"?A.text().then(i=>this.fetchImageBitmap(this._fixSVG(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i)}`),e)):createImageBitmap(A,e)):(t.startsWith("data:image/svg+xml;")&&(t=this._fixSVG(t)),new Promise(A=>{const i=new Image;i.src=t,i.onload=()=>{i.decode().finally(()=>{A(i)})}}).then(A=>createImageBitmap(A,e)))}get(t){let e=this._handled.get(t);return qr&&e instanceof WeakRef&&(e=e.deref(),e||this._handleing.delete(t)),e}set(t,e){let A=e;qr&&typeof e=="object"&&(this._gc.register(e,t),A=new WeakRef(e)),this._handled.set(t,A)}async loadBy(t,e){const A=this.get(t)??this._handleing.get(t);if(A)return A;const i=e().then(s=>(this.set(t,s),s)).finally(()=>{this._handleing.delete(t)});return this._handleing.set(t,i),i}async load(t,e){return this.loadBy(t,async()=>{const A=await rE(t);return(this._handlers.get(A)??this.defaultHandler)(t,e)})}async waitUntilLoad(){await Promise.all(Array.from(this._handleing.values()).map(t=>t.catch(e=>{console.error(e)})))}gc(){this._handled.forEach((t,e)=>{const A=this.get(e);A&&"free"in A&&A.free()}),this._handled.clear()}}const Ne=new fu().use(new ra).use(new au).use(new lu).use(new uu).use(new cu).use(new hu).use(new gu);var sE=Object.getOwnPropertyDescriptor,nE=(r,t,e,A)=>{for(var i=A>1?void 0:A?sE(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};h.CanvasItemEditor=class extends h.Control{_pointerStart;_pointerOffset;selected;dragging;hovered;hover=new h.Element2D({name:"hover",internalMode:"back",style:{visibility:"hidden",outlineStyle:"solid",outlineColor:"#00FF00FF",outlineWidth:2,pointerEvents:"none"}});transformRect=new Nn({name:"transformRect",internalMode:"back",style:{visibility:"hidden",pointerEvents:"none"}});scaler=new h.Scaler({name:"Scaler",internalMode:"back"}).on("updateScale",t=>{this.ruler.gapScale=t,this._updateScrollbars(),this._updateSelectionRect()});xScrollBar=new h.XScrollBar({name:"XScrollBar",internalMode:"back",style:{visibility:"hidden"}});yScrollBar=new h.YScrollBar({name:"yScrollBar",internalMode:"back",style:{visibility:"hidden"}});drawboard=new h.Element2D({name:"drawboard",style:{width:500,height:500,backgroundColor:"#FFFFFFFF",pointerEvents:"none"}},[this.scaler]);ruler=new h.Ruler({name:"ruler",offsetX:100,offsetY:100,style:{pointerEvents:"none"}},[this.drawboard,this.hover,this.transformRect,this.xScrollBar,this.yScrollBar]);constructor(){super(),this._onPointerdown=this._onPointerdown.bind(this),this._onPointermove=this._onPointermove.bind(this),this._onPointerup=this._onPointerup.bind(this),this.append(this.ruler)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":this.drawboard.style.left=(this.size.width-this.drawboard.size.width)/2,this.ruler.offsetX=this.drawboard.style.left;break;case"height":this.drawboard.style.top=(this.size.height-this.drawboard.size.height)/2,this.ruler.offsetY=this.drawboard.style.top;break}}_guiInput(t,e){switch(super._guiInput(t,e),e){case"pointerdown":this._onPointerdown(t);break;case"pointermove":this._onPointermove(t);break;case"pointerup":this._onPointerup();break}}_onPointerdown(t){let e=t.target;e?.equal(this)&&(e=void 0),e?.equal(this.transformRect)&&(e=this.selected),this._pointerOffset={x:t.offsetX,y:t.offsetY},this.selected=e,this.dragging=e,e instanceof h.Element2D?this._pointerStart=e.style.clone():this._pointerStart=void 0,this._updateHover(),this._updateSelectionRect()}_onPointermove(t){let e=t.target;e?.equal(this)&&(e=void 0),e?.equal(this.transformRect)&&(e=this.selected);const{selected:A,dragging:i,_pointerStart:s,_pointerOffset:n}=this;A&&e?.equal(A)?this.hovered=void 0:this.hovered=e;const o=n?{x:t.offsetX-n.x,y:t.offsetY-n.y}:{x:0,y:0};i&&s&&(i.style.left=s.left+o.x/this.scaler.scale,i.style.top=s.top+o.y/this.scaler.scale,i.update()),this._updateHover(),this._updateSelectionRect()}_onPointerup(){this.dragging=void 0,this._updateHover(),this._updateSelectionRect()}_copyGlobalTransform(t,e){t.style.visibility="visible",t.style.width=e.globalScale.x*e.size.x,t.style.height=e.globalScale.y*e.size.y,t.style.left=e.globalPosition.x,t.style.top=e.globalPosition.y,t.style.rotate=e.globalRotation,t.update()}_updateHover(){const t=this.hovered;t instanceof h.Element2D?(this.hover.style.visibility="visible",this._copyGlobalTransform(this.hover,t),this.hover.requestRedraw()):this.hover.style.visibility="hidden"}_updateSelectionRect(){this.selected?(this.transformRect.style.visibility="visible",this._copyGlobalTransform(this.transformRect,this.selected)):this.transformRect.style.visibility="hidden"}_updateScrollbars(){const t=this.ruler.gapScale,e=this.drawboard.size.height*t,A=this.drawboard.size.width*t;e>this.size.height?(this.yScrollBar.style.visibility="visible",this.yScrollBar.maxValue=e,this.yScrollBar.page=this.size.height):this.yScrollBar.style.visibility="hidden",A>this.size.width?(this.xScrollBar.style.visibility="visible",this.xScrollBar.maxValue=A,this.xScrollBar.page=this.size.width):this.xScrollBar.style.visibility="hidden"}},h.CanvasItemEditor=nE([st("CanvasItemEditor")],h.CanvasItemEditor);const du={alpha:!0,stencil:!0,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};class Iu extends Si{renderer;get view(){return this.renderer.view}get gl(){return this.renderer.gl}get screen(){return this.renderer.screen}get width(){return this.screen.width}get height(){return this.screen.height}get pixelRatio(){return this.renderer.pixelRatio}set pixelRatio(t){this.renderer.pixelRatio=t,this.resize(this.width,this.height),this.view&&(this.view.dataset.pixelRatio=String(t))}_resizeObserver=mo?new ResizeObserver(t=>{const e=t[0];if(e.target===this.view){const{inlineSize:A,blockSize:i}=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize;this.resize(A,i)}}):void 0;constructor(t={}){const{debug:e=!1,view:A,width:i,height:s,pixelRatio:n=Ds,backgroundColor:o=0,autoResize:a,autoStart:l,timeline:u,...c}=t;super(u),this.debug=e,this.renderer=new ia(A,{...du,...c}),this._setupInput(),this.pixelRatio=n,this.backgroundColor=o,a?(!A&&this.renderer.view&&(this.renderer.view.style.width="100%",this.renderer.view.style.height="100%"),this.enableAutoResize(a)):this.resize(i||this.gl.drawingBufferWidth||this.view?.clientWidth||200,s||this.gl.drawingBufferHeight||this.view?.clientHeight||200,!A),l&&this.start()}_setupInput(){return this.view&&(this.input.setTarget(this.view),["pointerdown","pointerover","pointermove","pointerup","wheel"].forEach(t=>{this.input.on(t,e=>{this.root.input(e,t),this.emit(t,e)})})),this}enableAutoResize(t=!0){return this.view&&(t?this._resizeObserver?.observe(this.view):this._resizeObserver?.unobserve(this.view)),this}resize(t,e,A=!1){return this.renderer.resize(t,e,A),this.root.width=t,this.root.height=e,this.root.requestUpload(),this.render(),this}nextTick(){return Is()}async waitUntilLoad(){await Ne.waitUntilLoad(),await this.nextTick()}async waitAndRender(t=0){await Ne.waitUntilLoad(),this._process(t),await this.nextTick(),this._render(this.renderer)}render(t=0){this._process(t),this._render(this.renderer)}async start(){await this.waitAndRender(),super.start(t=>{this._process(t),this._render(this.renderer)})}free(){super.free(),this.enableAutoResize(!1),this.renderer.free()}toPixels(){return this.renderer.toPixels()}toImageData(){return new ImageData(this.toPixels(),this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}toCanvas2D(){const t=this.toImageData(),e=document.createElement("canvas");e.width=t.width,e.height=t.height,e.getContext("2d")?.putImageData(t,0,0);const A=document.createElement("canvas");return A.width=this.width,A.height=this.height,A.getContext("2d")?.drawImage(e,0,0,e.width,e.height,0,0,A.width,A.height),A}}let Te;const Ln=[];let Gn=!1;async function oE(r=100){if(!Gn){for(Gn=!0;Ln.length;){const t=Ln.shift();if(t)try{await t()}catch(e){console.error(e)}else await new Promise(e=>setTimeout(e,r))}Gn=!1}}async function aE(r){const{data:t,width:e,height:A,debug:i=!1,time:s=0}=r;return Te??=new Iu({width:1,height:1,preserveDrawingBuffer:!0}),Te.debug=i,Te.root.removeChildren(),Te.timeline.currentTime=s,Te.resize(e,A,!0),(Array.isArray(t)?t:[t]).forEach(n=>{n instanceof h.Node?(n.parent=void 0,Te.root.appendChild(n)):Te.root.appendChild(h.Node.parse(n))}),await r.onBeforeRender?.(Te),await Te.waitAndRender(),Te.toCanvas2D()}async function lE(r){return new Promise(t=>{Ln.push(async()=>t(await aE(r))),oE()})}h.AnimatedTexture=fr,h.Assets=fu,h.AudioPipeline=Tn,h.AudioProcessor=cp,h.AudioSpectrum=Bp,h.BaseElement2DBackground=$s,h.BaseElement2DFill=Vt,h.BaseElement2DForeground=tn,h.BaseElement2DOutline=Ri,h.BaseElement2DShadow=DA,h.BaseElement2DShape=mA,h.BaseElement2DStyle=Ui,h.BaseElement2DText=FA,h.CanvasContext=Wa,h.CanvasTexture=Ei,h.Color=ve,h.ColorMatrix=_s,h.ColorTexture=ca,h.CoreObject=tA,h.DEG_TO_RAD=Go,h.DEVICE_PIXEL_RATIO=Ds,h.EffectMaterial=Ii,h.Element2DStyle=kn,h.Engine=Iu,h.FlexElement2DStyle=Hl,h.FlexLayout=Kr,h.FontLoader=ra,h.GIFLoader=au,h.Geometry=gr,h.GradientTexture=dr,h.HTMLAudio=ru,h.HTMLAudioContext=zr,h.HTMLSound=$i,h.IN_BROWSER=di,h.ImageTexture=sh,h.IndexBuffer=UA,h.Input=No,h.InputEvent=cr,h.JSONLoader=lu,h.Loader=eA,h.LottieLoader=uu,h.MainLoop=hr,h.Material=Ct,h.Matrix=_e,h.Matrix2=Hc,h.Matrix3=bs,h.Matrix4=Lo,h.MouseInputEvent=vs,h.PI=ur,h.PI_2=oe,h.PixelsTexture=Ms,h.PointerInputEvent=ko,h.Projection2D=Ho,h.QuadGeometry=Xc,h.QuadUvGeometry=gt,h.RAD_TO_DEG=Gc,h.RawWeakMap=ws,h.Rect2=xs,h.RefCounted=To,h.Renderer=Ko,h.Resource=Je,h.SUPPORTS_AUDIO_CONTEXT=Cs,h.SUPPORTS_CLICK_EVENTS=vo,h.SUPPORTS_CREATE_IMAGE_BITMAP=Bs,h.SUPPORTS_IMAGE_BITMAP=Do,h.SUPPORTS_MOUSE_EVENTS=kc,h.SUPPORTS_OFFLINE_AUDIO_CONTEXT=ys,h.SUPPORTS_POINTER_EVENTS=PA,h.SUPPORTS_RESIZE_OBSERVER=mo,h.SUPPORTS_TOUCH_EVENTS=He,h.SUPPORTS_WEBGL2=yo,h.SUPPORTS_WEBKIT_AUDIO_CONTEXT=Qs,h.SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT=_o,h.SUPPORTS_WEB_AUDIO=bo,h.SUPPORTS_WHEEL_EVENTS=wo,h.SceneTree=Si,h.TextLoader=cu,h.Texture2D=Dt,h.TextureLoader=hu,h.TextureRect2D=Yr,h.Ticker=Kt,h.Transform2D=Yt,h.TransformRect2D=Nn,h.UvGeometry=th,h.UvMaterial=pi,h.Vector=Ee,h.Vector2=ae,h.Vector3=Jc,h.Vector4=Oo,h.VertexAttribute=le,h.VertexBuffer=Ye,h.VideoLoader=gu,h.VideoTexture=ga,h.ViewportTexture=Ps,h.WebAudio=nu,h.WebAudioContext=gA,h.WebGLBatch2DModule=zo,h.WebGLBlendMode=kA,h.WebGLBufferModule=Wo,h.WebGLFramebufferModule=qo,h.WebGLMaskModule=Xo,h.WebGLModule=de,h.WebGLProgramModule=jo,h.WebGLRenderer=ia,h.WebGLScissorModule=Zo,h.WebGLState=BA,h.WebGLStateModule=Vo,h.WebGLStencilModule=$o,h.WebGLTextureModule=ta,h.WebGLVertexArrayModule=ea,h.WebGLViewportModule=Aa,h.WebSound=su,h.WheelInputEvent=Uo,h.assets=Ne,h.clamp=Ke,h.clampFrag=rl,h.createHTMLCanvas=Mo,h.createNode=xc,h.crossOrigin=Po,h.cubicBezier=si,h.curves=Oc,h.customNode=st,h.customNodes=lr,h.defaultOptions=du,h.determineCrossOrigin=Ro,h.ease=tu,h.easeIn=eu,h.easeInOut=iu,h.easeOut=Au,h.frag=il,h.getDefaultCssPropertyValue=Es,h.isCanvasElement=Fo,h.isElementNode=ms,h.isImageElement=Uc,h.isPow2=ps,h.isVideoElement=xo,h.isWebgl2=So,h.lerp=bt,h.linear=$l,h.log2=Ss,h.mapWebGLBlendModes=Yo,h.nextPow2=Fs,h.nextTick=Is,h.parseCSSFilter=na,h.parseCSSTransform=oa,h.parseCSSTransformOrigin=aa,h.parseCssFunctions=fi,h.parseCssProperty=gi,h.render=lE,h.timingFunctions=Vr,h.uid=Co,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
1000
|
+
}`})),g.TwistTransition=Gp([st("TwistTransition")],g.TwistTransition);class ic extends eA{install(t){const e=async A=>{const{decodeFrames:i}=await import("modern-gif");return await t.fetch(A).then(s=>s.arrayBuffer()).then(s=>i(s)).then(s=>new hr(s.map(n=>({duration:n.delay,texture:new xs(n.data,n.width,n.height)}))))};return this.load=A=>t.loadBy(A,()=>e(A)),["image/gif"].forEach(A=>{t.register(A,e)}),t.gif=this,this}}class rc extends eA{install(t){const e=A=>t.fetch(A).then(i=>i.json());return this.load=A=>t.loadBy(A,()=>e(A)),["json"].forEach(A=>{t.register(A,e)}),t.json=this,this}}class sc extends eA{install(t){const e=async(A,i)=>(await import("lottie-web").then(n=>n.default)).loadAnimation({container:null,renderer:"canvas",rendererSettings:{context:i.getContext("2d")},loop:!1,autoplay:!1,animationData:await t.fetch(A).then(n=>n.json())});return this.load=(A,i)=>t.loadBy(A,()=>e(A,i)),["lottie"].forEach(A=>{t.register(A,e)}),t.lottie=this,this}}class nc extends eA{install(t){const e=async A=>await t.fetch(A).then(i=>i.text());return this.load=A=>t.loadBy(A,()=>e(A)),t.text=this,this}}class oc extends eA{install(t){const e=A=>t.fetchImageBitmap(A,{premultiplyAlpha:"premultiply"}).then(i=>new mt(i));return this.load=A=>t.loadBy(A,()=>e(A)),["image/gif","image/jpeg","image/png","image/tiff","image/vnd.wap.wbmp","image/x-icon","image/x-jng","image/x-ms-bmp","image/svg+xml","image/webp"].forEach(A=>{t.register(A,e)}),t.texture=this,this}}class ac extends eA{install(t){const e=A=>new la(A).load();return this.load=A=>t.loadBy(A,()=>e(A)),["video/3gpp","video/mpeg","video/quicktime","video/x-flv","video/x-mng","video/x-ms-asf","video/x-ms-wmv","video/x-msvideo","video/mp4"].forEach(A=>{t.register(A,e)}),t.video=this,this}}const Hp=Object.entries({"text/html":["html","htm","shtml"],"text/css":["css"],"text/xml":["xml"],"image/gif":["gif"],"image/jpeg":["jpeg","jpg"],"application/x-javascript":["js"],"application/atom+xml":["atom"],"application/rss+xml":["rss"],"text/mathml":["mml"],"text/plain":["txt"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/x-component":["htc"],"image/png":["png"],"image/tiff":["tif","tiff"],"image/vnd.wap.wbmp":["wbmp"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-ms-bmp":["bmp"],"image/svg+xml":["svg"],"image/webp":["webp"],"application/java-archive":["jar","war","ear"],"application/mac-binhex40":["hqx"],"application/msword":["doc"],"application/pdf":["pdf"],"application/postscript":["ps","eps","ai"],"application/rtf":["rtf"],"application/vnd.ms-excel":["xls"],"application/vnd.ms-powerpoint":["ppt"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/x-7z-compressed":["7z"],"application/x-cocoa":["cco"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-makeself":["run"],"application/x-perl":["pl","pm"],"application/x-pilot":["prc","pdb"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-sea":["sea"],"application/x-shockwave-flash":["swf"],"application/x-stuffit":["sit"],"application/x-tcl":["tcl","tk"],"application/x-x509-ca-cert":["der","pem","crt"],"application/x-xpinstall":["xpi"],"application/xhtml+xml":["xhtml"],"application/zip":["zip"],"application/octet-stream":["bin","exe","dll","deb","dmg","eot","iso","img","msi","msp","msm"],"audio/midi":["mid","midi","kar"],"audio/mpeg":["mp3"],"audio/ogg":["ogg"],"audio/x-realaudio":["ra"],"video/3gpp":["3gpp","3gp"],"video/mpeg":["mpeg","mpg"],"video/quicktime":["mov"],"video/x-flv":["flv"],"video/x-mng":["mng"],"video/x-ms-asf":["asx","asf"],"video/x-ms-wmv":["wmv"],"video/x-msvideo":["avi"],"video/mp4":["m4v","mp4"]});function Jp(r){for(const[t,e]of Hp)if(e.includes(r))return t}async function Kp(r){let t;if(r.startsWith("data:"))t=r.match(/^data:(.+?);/)?.[1];else if(r.startsWith("http")){const e=r.split(/[#?]/)[0].split(".").pop()?.trim();e&&(t=Jp(e))}return t??await fetch(r).then(e=>e.headers.get("Content-Type"))??""}const Vr="WeakRef"in globalThis;class lc{defaultHandler=t=>this.fetch(t);_handlers=new Map;_handleing=new Map;_handled=new Map;_gc=Vr?new FinalizationRegistry(t=>{const e=this.get(t);e&&"free"in e&&e.free(),this._handled.delete(t)}):void 0;constructor(){Vr||Kt.on(this.gc.bind(this),{sort:2})}use(t){return t.install(this),this}register(t,e){return this._handlers.set(t,e),this}fetch(t){return fetch(t)}_fixSVG(t){let e;t.includes(";base64,")?e=atob(t.split(",")[1]):e=decodeURIComponent(t.split(",")[1]);const A=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,i=A.getAttribute("width"),s=A.getAttribute("height"),n=i&&/^[\d.]+$/.test(i),o=s&&/^[\d.]+$/.test(s);if(!n||!o){const a=A.getAttribute("viewBox")?.split(" ").map(l=>Number(l));n||A.setAttribute("width",String(a?a[2]-a[0]:512)),o||A.setAttribute("height",String(a?a[3]-a[1]:512))}return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(A.outerHTML)}`}async fetchImageBitmap(t,e){return t.startsWith("http")?await this.fetch(t).then(A=>A.blob()).then(A=>A.type==="image/svg+xml"?A.text().then(i=>this.fetchImageBitmap(this._fixSVG(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i)}`),e)):createImageBitmap(A,e)):(t.startsWith("data:image/svg+xml;")&&(t=this._fixSVG(t)),new Promise(A=>{const i=new Image;i.src=t,i.onload=()=>{i.decode().finally(()=>{A(i)})}}).then(A=>createImageBitmap(A,e)))}get(t){let e=this._handled.get(t);return Vr&&e instanceof WeakRef&&(e=e.deref(),e||this._handleing.delete(t)),e}set(t,e){let A=e;Vr&&typeof e=="object"&&(this._gc.register(e,t),A=new WeakRef(e)),this._handled.set(t,A)}async loadBy(t,e){const A=this.get(t)??this._handleing.get(t);if(A)return A;const i=e().then(s=>(this.set(t,s),s)).finally(()=>{this._handleing.delete(t)});return this._handleing.set(t,i),i}async load(t,e){return this.loadBy(t,async()=>{const A=await Kp(t);return(this._handlers.get(A)??this.defaultHandler)(t,e)})}async waitUntilLoad(){await Promise.all(Array.from(this._handleing.values()).map(t=>t.catch(e=>{console.error(e)})))}gc(){this._handled.forEach((t,e)=>{const A=this.get(e);A&&"free"in A&&A.free()}),this._handled.clear()}}const Ne=new lc().use(new ta).use(new ic).use(new rc).use(new sc).use(new nc).use(new oc).use(new ac);var Yp=Object.getOwnPropertyDescriptor,Vp=(r,t,e,A)=>{for(var i=A>1?void 0:A?Yp(t,e):t,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};g.CanvasItemEditor=class extends g.Control{_pointerStart;_pointerOffset;selected;dragging;hovered;hover=new g.Element2D({name:"hover",internalMode:"back",style:{visibility:"hidden",outlineStyle:"solid",outlineColor:"#00FF00FF",outlineWidth:2,pointerEvents:"none"}});transformRect=new Pn({name:"transformRect",internalMode:"back",style:{visibility:"hidden",pointerEvents:"none"}});scaler=new g.Scaler({name:"Scaler",internalMode:"back"}).on("updateScale",t=>{this.ruler.gapScale=t,this._updateScrollbars(),this._updateSelectionRect()});xScrollBar=new g.XScrollBar({name:"XScrollBar",internalMode:"back",style:{visibility:"hidden"}});yScrollBar=new g.YScrollBar({name:"yScrollBar",internalMode:"back",style:{visibility:"hidden"}});drawboard=new g.Element2D({name:"drawboard",style:{width:500,height:500,backgroundColor:"#00FFFFFF",pointerEvents:"none"}},[this.scaler]);ruler=new g.Ruler({name:"ruler",offsetX:100,offsetY:100,style:{pointerEvents:"none"}},[this.drawboard,this.hover,this.transformRect,this.xScrollBar,this.yScrollBar]);constructor(){super(),this._onPointerdown=this._onPointerdown.bind(this),this._onPointermove=this._onPointermove.bind(this),this._onPointerup=this._onPointerup.bind(this),this.append(this.ruler)}_updateStyleProperty(t,e,A,i){switch(super._updateStyleProperty(t,e,A,i),t){case"width":this.drawboard.style.left=(this.size.width-this.drawboard.size.width)/2,this.ruler.offsetX=this.drawboard.style.left;break;case"height":this.drawboard.style.top=(this.size.height-this.drawboard.size.height)/2,this.ruler.offsetY=this.drawboard.style.top;break}}_guiInput(t,e){switch(super._guiInput(t,e),e){case"pointerdown":this._onPointerdown(t);break;case"pointermove":this._onPointermove(t);break;case"pointerup":this._onPointerup();break}}_onPointerdown(t){let e=t.target;e?.equal(this)&&(e=void 0),e?.equal(this.transformRect)&&(e=this.selected),this._pointerOffset={x:t.offsetX,y:t.offsetY},this.selected=e,this.dragging=e,e instanceof g.Element2D?this._pointerStart=e.style.clone():this._pointerStart=void 0,this._updateHover(),this._updateSelectionRect()}_onPointermove(t){let e=t.target;e?.equal(this)&&(e=void 0),e?.equal(this.transformRect)&&(e=this.selected);const{selected:A,dragging:i,_pointerStart:s,_pointerOffset:n}=this;A&&e?.equal(A)?this.hovered=void 0:this.hovered=e;const o=n?{x:t.offsetX-n.x,y:t.offsetY-n.y}:{x:0,y:0};i&&s&&(i.style.left=s.left+o.x/this.scaler.scale,i.style.top=s.top+o.y/this.scaler.scale,i.update()),this._updateHover(),this._updateSelectionRect()}_onPointerup(){this.dragging=void 0,this._updateHover(),this._updateSelectionRect()}_copyGlobalTransform(t,e){t.style.visibility="visible",t.style.width=e.globalScale.x*e.size.x,t.style.height=e.globalScale.y*e.size.y,t.style.left=e.globalPosition.x,t.style.top=e.globalPosition.y,t.style.rotate=e.globalRotation,t.update()}_updateHover(){const t=this.hovered;t instanceof g.Element2D?(this.hover.style.visibility="visible",this._copyGlobalTransform(this.hover,t),this.hover.requestRedraw()):this.hover.style.visibility="hidden"}_updateSelectionRect(){this.selected?(this.transformRect.style.visibility="visible",this._copyGlobalTransform(this.transformRect,this.selected)):this.transformRect.style.visibility="hidden"}_updateScrollbars(){const t=this.ruler.gapScale,e=this.drawboard.size.height*t,A=this.drawboard.size.width*t;e>this.size.height?(this.yScrollBar.style.visibility="visible",this.yScrollBar.maxValue=e,this.yScrollBar.page=this.size.height):this.yScrollBar.style.visibility="hidden",A>this.size.width?(this.xScrollBar.style.visibility="visible",this.xScrollBar.maxValue=A,this.xScrollBar.page=this.size.width):this.xScrollBar.style.visibility="hidden"}},g.CanvasItemEditor=Vp([st("CanvasItemEditor")],g.CanvasItemEditor);const cc={alpha:!0,stencil:!0,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};class hc extends Di{renderer;get view(){return this.renderer.view}get gl(){return this.renderer.gl}get screen(){return this.renderer.screen}get width(){return this.screen.width}get height(){return this.screen.height}get pixelRatio(){return this.renderer.pixelRatio}set pixelRatio(t){this.renderer.pixelRatio=t,this.resize(this.width,this.height),this.view&&(this.view.dataset.pixelRatio=String(t))}_resizeObserver=Co?new ResizeObserver(t=>{const e=t[0];if(e.target===this.view){const{inlineSize:A,blockSize:i}=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize;this.resize(A,i)}}):void 0;constructor(t={}){const{debug:e=!1,view:A,width:i,height:s,pixelRatio:n=Cs,backgroundColor:o=0,autoResize:a,autoStart:l,timeline:c,...h}=t;super(c),this.debug=e,this.renderer=new $o(A,{...cc,...h}),this._setupInput(),this.pixelRatio=n,this.backgroundColor=o,a?(!A&&this.renderer.view&&(this.renderer.view.style.width="100%",this.renderer.view.style.height="100%"),this.enableAutoResize(a)):this.resize(i||this.gl.drawingBufferWidth||this.view?.clientWidth||200,s||this.gl.drawingBufferHeight||this.view?.clientHeight||200,!A),l&&this.start()}_setupInput(){return this.view&&(this.input.setTarget(this.view),["pointerdown","pointerover","pointermove","pointerup","wheel"].forEach(t=>{this.input.on(t,e=>{this.root.input(e,t),this.emit(t,e)})})),this}enableAutoResize(t=!0){return this.view&&(t?this._resizeObserver?.observe(this.view):this._resizeObserver?.unobserve(this.view)),this}resize(t,e,A=!1){return this.renderer.resize(t,e,A),this.root.width=t,this.root.height=e,this.root.requestUpload(),this.render(),this}nextTick(){return us()}async waitUntilLoad(){await Ne.waitUntilLoad(),await this.nextTick()}async waitAndRender(t=0){await Ne.waitUntilLoad(),this._process(t),await this.nextTick(),this._render(this.renderer)}render(t=0){this._process(t),this._render(this.renderer)}async start(){await this.waitAndRender(),super.start(t=>{this._process(t),this._render(this.renderer)})}free(){super.free(),this.enableAutoResize(!1),this.renderer.free()}toPixels(){return this.renderer.toPixels()}toImageData(){return new ImageData(this.toPixels(),this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}toCanvas2D(){const t=this.toImageData(),e=document.createElement("canvas");e.width=t.width,e.height=t.height,e.getContext("2d")?.putImageData(t,0,0);const A=document.createElement("canvas");return A.width=this.width,A.height=this.height,A.getContext("2d")?.drawImage(e,0,0,e.width,e.height,0,0,A.width,A.height),A}}let Fe;const Nn=[];let Fn=!1;async function zp(r=100){if(!Fn){for(Fn=!0;Nn.length;){const t=Nn.shift();if(t)try{await t()}catch(e){console.error(e)}else await new Promise(e=>setTimeout(e,r))}Fn=!1}}async function Wp(r){const{data:t,width:e,height:A,debug:i=!1,time:s=0}=r;return Fe??=new hc({width:1,height:1,preserveDrawingBuffer:!0}),Fe.debug=i,Fe.root.removeChildren(),Fe.timeline.currentTime=s,Fe.resize(e,A,!0),(Array.isArray(t)?t:[t]).forEach(n=>{n instanceof g.Node?(n.parent=void 0,Fe.root.appendChild(n)):Fe.root.appendChild(g.Node.parse(n))}),await r.onBeforeRender?.(Fe),await Fe.waitAndRender(),Fe.toCanvas2D()}async function qp(r){return new Promise(t=>{Nn.push(async()=>t(await Wp(r))),zp()})}g.AnimatedTexture=hr,g.Assets=lc,g.AudioPipeline=Un,g.AudioProcessor=jI,g.AudioSpectrum=sp,g.BaseElement2DBackground=Xs,g.BaseElement2DFill=Vt,g.BaseElement2DForeground=js,g.BaseElement2DOutline=Si,g.BaseElement2DShadow=mA,g.BaseElement2DShape=wA,g.BaseElement2DStyle=ki,g.BaseElement2DText=SA,g.CanvasContext=Ya,g.CanvasTexture=di,g.Color=_e,g.ColorMatrix=ws,g.ColorTexture=oa,g.CoreObject=tA,g.DEG_TO_RAD=No,g.DEVICE_PIXEL_RATIO=Cs,g.EffectMaterial=ui,g.Element2DStyle=Rn,g.Engine=hc,g.FlexElement2DStyle=Fl,g.FlexLayout=Or,g.FontLoader=ta,g.GIFLoader=ic,g.Geometry=cr,g.GradientTexture=gr,g.HTMLAudio=$l,g.HTMLAudioContext=Kr,g.HTMLSound=Xi,g.IN_BROWSER=gi,g.ImageTexture=eg,g.IndexBuffer=PA,g.Input=ko,g.InputEvent=ar,g.JSONLoader=rc,g.Loader=eA,g.LottieLoader=sc,g.MainLoop=lr,g.Material=Ct,g.Matrix=be,g.Matrix2=Th,g.Matrix3=vs,g.Matrix4=Uo,g.MouseInputEvent=ms,g.PI=or,g.PI_2=oe,g.PixelsTexture=xs,g.PointerInputEvent=Mo,g.Projection2D=To,g.QuadGeometry=Vh,g.QuadUvGeometry=ut,g.RAD_TO_DEG=Nh,g.RawWeakMap=ys,g.Rect2=_s,g.RefCounted=Po,g.Renderer=Go,g.Resource=He,g.SUPPORTS_AUDIO_CONTEXT=ps,g.SUPPORTS_CLICK_EVENTS=yo,g.SUPPORTS_CREATE_IMAGE_BITMAP=Is,g.SUPPORTS_IMAGE_BITMAP=Bo,g.SUPPORTS_MOUSE_EVENTS=Mh,g.SUPPORTS_OFFLINE_AUDIO_CONTEXT=Bs,g.SUPPORTS_POINTER_EVENTS=RA,g.SUPPORTS_RESIZE_OBSERVER=Co,g.SUPPORTS_TOUCH_EVENTS=Oe,g.SUPPORTS_WEBGL2=Eo,g.SUPPORTS_WEBKIT_AUDIO_CONTEXT=Es,g.SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT=mo,g.SUPPORTS_WEB_AUDIO=wo,g.SUPPORTS_WHEEL_EVENTS=Qo,g.SceneTree=Di,g.TextLoader=nc,g.Texture2D=mt,g.TextureLoader=oc,g.TextureRect2D=Hr,g.Ticker=Kt,g.Transform2D=Yt,g.TransformRect2D=Pn,g.UvGeometry=Xh,g.UvMaterial=fi,g.Vector=Ee,g.Vector2=ae,g.Vector3=Lh,g.Vector4=Fo,g.VertexAttribute=le,g.VertexBuffer=Ke,g.VideoLoader=ac,g.VideoTexture=la,g.ViewportTexture=Ms,g.WebAudio=ec,g.WebAudioContext=uA,g.WebGLBatch2DModule=Jo,g.WebGLBlendMode=kA,g.WebGLBufferModule=Ko,g.WebGLFramebufferModule=Yo,g.WebGLMaskModule=Vo,g.WebGLModule=de,g.WebGLProgramModule=zo,g.WebGLRenderer=$o,g.WebGLScissorModule=Wo,g.WebGLState=BA,g.WebGLStateModule=Ho,g.WebGLStencilModule=qo,g.WebGLTextureModule=Xo,g.WebGLVertexArrayModule=jo,g.WebGLViewportModule=Zo,g.WebSound=tc,g.WheelInputEvent=Ro,g.assets=Ne,g.clamp=Je,g.clampFrag=el,g.createHTMLCanvas=Do,g.createNode=vh,g.crossOrigin=So,g.cubicBezier=ii,g.curves=Fh,g.customNode=st,g.customNodes=nr,g.defaultOptions=cc,g.determineCrossOrigin=xo,g.ease=ql,g.easeIn=Xl,g.easeInOut=Zl,g.easeOut=jl,g.frag=tl,g.getDefaultCssPropertyValue=ds,g.isCanvasElement=_o,g.isElementNode=Qs,g.isImageElement=Rh,g.isPow2=fs,g.isVideoElement=vo,g.isWebgl2=bo,g.lerp=Dt,g.linear=Wl,g.log2=Ds,g.mapWebGLBlendModes=Oo,g.nextPow2=bs,g.nextTick=us,g.parseCSSFilter=Aa,g.parseCSSTransform=ia,g.parseCSSTransformOrigin=ra,g.parseCssFunctions=hi,g.parseCssProperty=ci,g.render=qp,g.timingFunctions=Jr,g.uid=Io,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|