@zyzgroup/core-web 0.1.51 → 0.1.53
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/zyzgroup_core_web.iife.js +19 -18
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +17533 -14658
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +19 -18
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/canvas/YZCanvas.d.ts +0 -23
- package/types/canvas/YZCanvas.d.ts.map +1 -1
- package/types/canvas/index.d.ts +0 -1
- package/types/canvas/index.d.ts.map +1 -1
- package/types/hooks/index.d.ts +20 -39
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useActionChannel.d.ts +18 -0
- package/types/hooks/useActionChannel.d.ts.map +1 -0
- package/types/hooks/useAttribute.d.ts +2 -0
- package/types/hooks/useAttribute.d.ts.map +1 -1
- package/types/hooks/useCoords.d.ts +6 -0
- package/types/hooks/useCoords.d.ts.map +1 -0
- package/types/hooks/useDraw/Shape.d.ts +223 -0
- package/types/hooks/useDraw/Shape.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts +102 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts +84 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/index.d.ts +3 -0
- package/types/hooks/useDraw/canvas/index.d.ts.map +1 -0
- package/types/hooks/useDraw/index.d.ts +4 -0
- package/types/hooks/useDraw/index.d.ts.map +1 -0
- package/types/hooks/useDraw/line/Arc.d.ts +25 -0
- package/types/hooks/useDraw/line/Arc.d.ts.map +1 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts +61 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/L.d.ts +33 -0
- package/types/hooks/useDraw/line/L.d.ts.map +1 -0
- package/types/hooks/useDraw/line/PathD.d.ts +58 -0
- package/types/hooks/useDraw/line/PathD.d.ts.map +1 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts +30 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/index.d.ts +6 -0
- package/types/hooks/useDraw/line/index.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts +89 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts +20 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts +6 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/index.d.ts +4 -0
- package/types/hooks/useDraw/shapes/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts +16 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts +17 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/index.d.ts +4 -0
- package/types/hooks/useDraw/svg/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/line2c.d.ts +5 -0
- package/types/hooks/useDraw/svg/line2c.d.ts.map +1 -0
- package/types/hooks/useDraw/useDraw.d.ts +18 -0
- package/types/hooks/useDraw/useDraw.d.ts.map +1 -0
- package/types/hooks/useElement.d.ts +79 -38
- package/types/hooks/useElement.d.ts.map +1 -1
- package/types/hooks/useElementEventBus.d.ts +12 -1
- package/types/hooks/useElementEventBus.d.ts.map +1 -1
- package/types/hooks/useElementEvents.d.ts +218 -0
- package/types/hooks/useElementEvents.d.ts.map +1 -0
- package/types/hooks/useEventListener.d.ts +10 -3
- package/types/hooks/useEventListener.d.ts.map +1 -1
- package/types/hooks/useFeRouteChange.d.ts +5 -8
- package/types/hooks/useFeRouteChange.d.ts.map +1 -1
- package/types/hooks/useIntersection.d.ts +2 -0
- package/types/hooks/useIntersection.d.ts.map +1 -1
- package/types/hooks/useMatchMedia.d.ts +3 -0
- package/types/hooks/useMatchMedia.d.ts.map +1 -0
- package/types/hooks/useMutation.d.ts +2 -0
- package/types/hooks/useMutation.d.ts.map +1 -1
- package/types/hooks/useResize.d.ts +6 -0
- package/types/hooks/useResize.d.ts.map +1 -1
- package/types/hooks/useSafeArea.d.ts +7 -6
- package/types/hooks/useSafeArea.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +1 -1
- package/types/hooks/useStyle.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +4 -3
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useTimestampValue.d.ts.map +1 -1
- package/types/hooks/useVisible.d.ts +5 -9
- package/types/hooks/useVisible.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/math/index.d.ts +0 -4
- package/types/math/index.d.ts.map +1 -1
- package/types/svg/YZSVG.d.ts +0 -34
- package/types/svg/YZSVG.d.ts.map +1 -1
- package/types/svg/index.d.ts +0 -1
- package/types/svg/index.d.ts.map +1 -1
- package/types/hooks/onDocumentReady.d.ts +0 -3
- package/types/hooks/onDocumentReady.d.ts.map +0 -1
- package/types/hooks/useClass.d.ts +0 -6
- package/types/hooks/useClass.d.ts.map +0 -1
- package/types/hooks/useClickA.d.ts +0 -2
- package/types/hooks/useClickA.d.ts.map +0 -1
- package/types/hooks/useClipboard.d.ts +0 -2
- package/types/hooks/useClipboard.d.ts.map +0 -1
- package/types/hooks/useDisplay.d.ts +0 -5
- package/types/hooks/useDisplay.d.ts.map +0 -1
- package/types/hooks/useDragDrop.d.ts +0 -12
- package/types/hooks/useDragDrop.d.ts.map +0 -1
- package/types/hooks/useFireEvent.d.ts +0 -7
- package/types/hooks/useFireEvent.d.ts.map +0 -1
- package/types/hooks/useHotKey.d.ts +0 -33
- package/types/hooks/useHotKey.d.ts.map +0 -1
- package/types/hooks/useHotKeyFile.d.ts +0 -8
- package/types/hooks/useHotKeyFile.d.ts.map +0 -1
- package/types/hooks/useIframe.d.ts +0 -2
- package/types/hooks/useIframe.d.ts.map +0 -1
- package/types/hooks/useLoadImage.d.ts +0 -9
- package/types/hooks/useLoadImage.d.ts.map +0 -1
- package/types/hooks/useLoadLink.d.ts +0 -3
- package/types/hooks/useLoadLink.d.ts.map +0 -1
- package/types/hooks/useLoadScript.d.ts +0 -2
- package/types/hooks/useLoadScript.d.ts.map +0 -1
- package/types/hooks/useLocation.d.ts +0 -2
- package/types/hooks/useLocation.d.ts.map +0 -1
- package/types/hooks/useMedia.d.ts +0 -4
- package/types/hooks/useMedia.d.ts.map +0 -1
- package/types/hooks/useMouse.d.ts +0 -32
- package/types/hooks/useMouse.d.ts.map +0 -1
- package/types/hooks/useObjectURL.d.ts +0 -3
- package/types/hooks/useObjectURL.d.ts.map +0 -1
- package/types/hooks/usePressDownMove.d.ts +0 -13
- package/types/hooks/usePressDownMove.d.ts.map +0 -1
- package/types/hooks/usePull.d.ts +0 -4
- package/types/hooks/usePull.d.ts.map +0 -1
- package/types/hooks/useRunInSandbox.d.ts +0 -2
- package/types/hooks/useRunInSandbox.d.ts.map +0 -1
- package/types/hooks/useScroll.d.ts +0 -4
- package/types/hooks/useScroll.d.ts.map +0 -1
- package/types/hooks/useSelectFile.d.ts +0 -18
- package/types/hooks/useSelectFile.d.ts.map +0 -1
- package/types/hooks/useVibrate.d.ts +0 -2
- package/types/hooks/useVibrate.d.ts.map +0 -1
- package/types/hooks/useWindow.d.ts +0 -5
- package/types/hooks/useWindow.d.ts.map +0 -1
- package/types/position.d.ts +0 -65
- package/types/position.d.ts.map +0 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
var ZYZGroupCoreWeb=function(f,v){"use strict";function Xn(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vn={exports:{}};(function(i,t){(function(e){i.exports=e()})(function(e){var s=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(b,S){var y=b[0],w=b[1],P=b[2],M=b[3];y+=(w&P|~w&M)+S[0]-680876936|0,y=(y<<7|y>>>25)+w|0,M+=(y&w|~y&P)+S[1]-389564586|0,M=(M<<12|M>>>20)+y|0,P+=(M&y|~M&w)+S[2]+606105819|0,P=(P<<17|P>>>15)+M|0,w+=(P&M|~P&y)+S[3]-1044525330|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&M)+S[4]-176418897|0,y=(y<<7|y>>>25)+w|0,M+=(y&w|~y&P)+S[5]+1200080426|0,M=(M<<12|M>>>20)+y|0,P+=(M&y|~M&w)+S[6]-1473231341|0,P=(P<<17|P>>>15)+M|0,w+=(P&M|~P&y)+S[7]-45705983|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&M)+S[8]+1770035416|0,y=(y<<7|y>>>25)+w|0,M+=(y&w|~y&P)+S[9]-1958414417|0,M=(M<<12|M>>>20)+y|0,P+=(M&y|~M&w)+S[10]-42063|0,P=(P<<17|P>>>15)+M|0,w+=(P&M|~P&y)+S[11]-1990404162|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&M)+S[12]+1804603682|0,y=(y<<7|y>>>25)+w|0,M+=(y&w|~y&P)+S[13]-40341101|0,M=(M<<12|M>>>20)+y|0,P+=(M&y|~M&w)+S[14]-1502002290|0,P=(P<<17|P>>>15)+M|0,w+=(P&M|~P&y)+S[15]+1236535329|0,w=(w<<22|w>>>10)+P|0,y+=(w&M|P&~M)+S[1]-165796510|0,y=(y<<5|y>>>27)+w|0,M+=(y&P|w&~P)+S[6]-1069501632|0,M=(M<<9|M>>>23)+y|0,P+=(M&w|y&~w)+S[11]+643717713|0,P=(P<<14|P>>>18)+M|0,w+=(P&y|M&~y)+S[0]-373897302|0,w=(w<<20|w>>>12)+P|0,y+=(w&M|P&~M)+S[5]-701558691|0,y=(y<<5|y>>>27)+w|0,M+=(y&P|w&~P)+S[10]+38016083|0,M=(M<<9|M>>>23)+y|0,P+=(M&w|y&~w)+S[15]-660478335|0,P=(P<<14|P>>>18)+M|0,w+=(P&y|M&~y)+S[4]-405537848|0,w=(w<<20|w>>>12)+P|0,y+=(w&M|P&~M)+S[9]+568446438|0,y=(y<<5|y>>>27)+w|0,M+=(y&P|w&~P)+S[14]-1019803690|0,M=(M<<9|M>>>23)+y|0,P+=(M&w|y&~w)+S[3]-187363961|0,P=(P<<14|P>>>18)+M|0,w+=(P&y|M&~y)+S[8]+1163531501|0,w=(w<<20|w>>>12)+P|0,y+=(w&M|P&~M)+S[13]-1444681467|0,y=(y<<5|y>>>27)+w|0,M+=(y&P|w&~P)+S[2]-51403784|0,M=(M<<9|M>>>23)+y|0,P+=(M&w|y&~w)+S[7]+1735328473|0,P=(P<<14|P>>>18)+M|0,w+=(P&y|M&~y)+S[12]-1926607734|0,w=(w<<20|w>>>12)+P|0,y+=(w^P^M)+S[5]-378558|0,y=(y<<4|y>>>28)+w|0,M+=(y^w^P)+S[8]-2022574463|0,M=(M<<11|M>>>21)+y|0,P+=(M^y^w)+S[11]+1839030562|0,P=(P<<16|P>>>16)+M|0,w+=(P^M^y)+S[14]-35309556|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^M)+S[1]-1530992060|0,y=(y<<4|y>>>28)+w|0,M+=(y^w^P)+S[4]+1272893353|0,M=(M<<11|M>>>21)+y|0,P+=(M^y^w)+S[7]-155497632|0,P=(P<<16|P>>>16)+M|0,w+=(P^M^y)+S[10]-1094730640|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^M)+S[13]+681279174|0,y=(y<<4|y>>>28)+w|0,M+=(y^w^P)+S[0]-358537222|0,M=(M<<11|M>>>21)+y|0,P+=(M^y^w)+S[3]-722521979|0,P=(P<<16|P>>>16)+M|0,w+=(P^M^y)+S[6]+76029189|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^M)+S[9]-640364487|0,y=(y<<4|y>>>28)+w|0,M+=(y^w^P)+S[12]-421815835|0,M=(M<<11|M>>>21)+y|0,P+=(M^y^w)+S[15]+530742520|0,P=(P<<16|P>>>16)+M|0,w+=(P^M^y)+S[2]-995338651|0,w=(w<<23|w>>>9)+P|0,y+=(P^(w|~M))+S[0]-198630844|0,y=(y<<6|y>>>26)+w|0,M+=(w^(y|~P))+S[7]+1126891415|0,M=(M<<10|M>>>22)+y|0,P+=(y^(M|~w))+S[14]-1416354905|0,P=(P<<15|P>>>17)+M|0,w+=(M^(P|~y))+S[5]-57434055|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~M))+S[12]+1700485571|0,y=(y<<6|y>>>26)+w|0,M+=(w^(y|~P))+S[3]-1894986606|0,M=(M<<10|M>>>22)+y|0,P+=(y^(M|~w))+S[10]-1051523|0,P=(P<<15|P>>>17)+M|0,w+=(M^(P|~y))+S[1]-2054922799|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~M))+S[8]+1873313359|0,y=(y<<6|y>>>26)+w|0,M+=(w^(y|~P))+S[15]-30611744|0,M=(M<<10|M>>>22)+y|0,P+=(y^(M|~w))+S[6]-1560198380|0,P=(P<<15|P>>>17)+M|0,w+=(M^(P|~y))+S[13]+1309151649|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~M))+S[4]-145523070|0,y=(y<<6|y>>>26)+w|0,M+=(w^(y|~P))+S[11]-1120210379|0,M=(M<<10|M>>>22)+y|0,P+=(y^(M|~w))+S[2]+718787259|0,P=(P<<15|P>>>17)+M|0,w+=(M^(P|~y))+S[9]-343485551|0,w=(w<<21|w>>>11)+P|0,b[0]=y+b[0]|0,b[1]=w+b[1]|0,b[2]=P+b[2]|0,b[3]=M+b[3]|0}function r(b){var S=[],y;for(y=0;y<64;y+=4)S[y>>2]=b.charCodeAt(y)+(b.charCodeAt(y+1)<<8)+(b.charCodeAt(y+2)<<16)+(b.charCodeAt(y+3)<<24);return S}function a(b){var S=[],y;for(y=0;y<64;y+=4)S[y>>2]=b[y]+(b[y+1]<<8)+(b[y+2]<<16)+(b[y+3]<<24);return S}function o(b){var S=b.length,y=[1732584193,-271733879,-1732584194,271733878],w,P,M,L,X,G;for(w=64;w<=S;w+=64)n(y,r(b.substring(w-64,w)));for(b=b.substring(w-64),P=b.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)M[w>>2]|=b.charCodeAt(w)<<(w%4<<3);if(M[w>>2]|=128<<(w%4<<3),w>55)for(n(y,M),w=0;w<16;w+=1)M[w]=0;return L=S*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(L[2],16),G=parseInt(L[1],16)||0,M[14]=X,M[15]=G,n(y,M),y}function h(b){var S=b.length,y=[1732584193,-271733879,-1732584194,271733878],w,P,M,L,X,G;for(w=64;w<=S;w+=64)n(y,a(b.subarray(w-64,w)));for(b=w-64<S?b.subarray(w-64):new Uint8Array(0),P=b.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)M[w>>2]|=b[w]<<(w%4<<3);if(M[w>>2]|=128<<(w%4<<3),w>55)for(n(y,M),w=0;w<16;w+=1)M[w]=0;return L=S*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(L[2],16),G=parseInt(L[1],16)||0,M[14]=X,M[15]=G,n(y,M),y}function c(b){var S="",y;for(y=0;y<4;y+=1)S+=s[b>>y*8+4&15]+s[b>>y*8&15];return S}function l(b){var S;for(S=0;S<b.length;S+=1)b[S]=c(b[S]);return b.join("")}l(o("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(S,y){return S=S|0||0,S<0?Math.max(S+y,0):Math.min(S,y)}ArrayBuffer.prototype.slice=function(S,y){var w=this.byteLength,P=b(S,w),M=w,L,X,G,W;return y!==e&&(M=b(y,w)),P>M?new ArrayBuffer(0):(L=M-P,X=new ArrayBuffer(L),G=new Uint8Array(X),W=new Uint8Array(this,P,L),G.set(W),X)}}();function u(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function d(b,S){var y=b.length,w=new ArrayBuffer(y),P=new Uint8Array(w),M;for(M=0;M<y;M+=1)P[M]=b.charCodeAt(M);return S?P:w}function m(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function g(b,S,y){var w=new Uint8Array(b.byteLength+S.byteLength);return w.set(new Uint8Array(b)),w.set(new Uint8Array(S),b.byteLength),y?w:w.buffer}function _(b){var S=[],y=b.length,w;for(w=0;w<y-1;w+=2)S.push(parseInt(b.substr(w,2),16));return String.fromCharCode.apply(String,S)}function E(){this.reset()}return E.prototype.append=function(b){return this.appendBinary(u(b)),this},E.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var S=this._buff.length,y;for(y=64;y<=S;y+=64)n(this._hash,r(this._buff.substring(y-64,y)));return this._buff=this._buff.substring(y-64),this},E.prototype.end=function(b){var S=this._buff,y=S.length,w,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M;for(w=0;w<y;w+=1)P[w>>2]|=S.charCodeAt(w)<<(w%4<<3);return this._finish(P,y),M=l(this._hash),b&&(M=_(M)),this.reset(),M},E.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},E.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},E.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},E.prototype._finish=function(b,S){var y=S,w,P,M;if(b[y>>2]|=128<<(y%4<<3),y>55)for(n(this._hash,b),y=0;y<16;y+=1)b[y]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(w[2],16),M=parseInt(w[1],16)||0,b[14]=P,b[15]=M,n(this._hash,b)},E.hash=function(b,S){return E.hashBinary(u(b),S)},E.hashBinary=function(b,S){var y=o(b),w=l(y);return S?_(w):w},E.ArrayBuffer=function(){this.reset()},E.ArrayBuffer.prototype.append=function(b){var S=g(this._buff.buffer,b,!0),y=S.length,w;for(this._length+=b.byteLength,w=64;w<=y;w+=64)n(this._hash,a(S.subarray(w-64,w)));return this._buff=w-64<y?new Uint8Array(S.buffer.slice(w-64)):new Uint8Array(0),this},E.ArrayBuffer.prototype.end=function(b){var S=this._buff,y=S.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P,M;for(P=0;P<y;P+=1)w[P>>2]|=S[P]<<(P%4<<3);return this._finish(w,y),M=l(this._hash),b&&(M=_(M)),this.reset(),M},E.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.ArrayBuffer.prototype.getState=function(){var b=E.prototype.getState.call(this);return b.buff=m(b.buff),b},E.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),E.prototype.setState.call(this,b)},E.ArrayBuffer.prototype.destroy=E.prototype.destroy,E.ArrayBuffer.prototype._finish=E.prototype._finish,E.ArrayBuffer.hash=function(b,S){var y=h(new Uint8Array(b)),w=l(y);return S?_(w):w},E})})(Vn);var Do=Vn.exports;const Ro=Xn(Do);function Gn(i,t){return function(){return i.apply(t,arguments)}}const{toString:Lo}=Object.prototype,{getPrototypeOf:ci}=Object,cs=(i=>t=>{const e=Lo.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=i=>(i=i.toLowerCase(),t=>cs(t)===i),ls=i=>t=>typeof t===i,{isArray:Ce}=Array,Ne=ls("undefined");function zo(i){return i!==null&&!Ne(i)&&i.constructor!==null&&!Ne(i.constructor)&&xt(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const qn=Dt("ArrayBuffer");function Oo(i){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(i):t=i&&i.buffer&&qn(i.buffer),t}const Bo=ls("string"),xt=ls("function"),Hn=ls("number"),us=i=>i!==null&&typeof i=="object",No=i=>i===!0||i===!1,fs=i=>{if(cs(i)!=="object")return!1;const t=ci(i);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},Fo=Dt("Date"),Yo=Dt("File"),Uo=Dt("Blob"),Xo=Dt("FileList"),Vo=i=>us(i)&&xt(i.pipe),Go=i=>{let t;return i&&(typeof FormData=="function"&&i instanceof FormData||xt(i.append)&&((t=cs(i))==="formdata"||t==="object"&&xt(i.toString)&&i.toString()==="[object FormData]"))},qo=Dt("URLSearchParams"),[Ho,jo,Wo,$o]=["ReadableStream","Request","Response","Headers"].map(Dt),Jo=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(i,t,{allOwnKeys:e=!1}={}){if(i===null||typeof i>"u")return;let s,n;if(typeof i!="object"&&(i=[i]),Ce(i))for(s=0,n=i.length;s<n;s++)t.call(null,i[s],s,i);else{const r=e?Object.getOwnPropertyNames(i):Object.keys(i),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,i[o],o,i)}}function jn(i,t){t=t.toLowerCase();const e=Object.keys(i);let s=e.length,n;for(;s-- >0;)if(n=e[s],t===n.toLowerCase())return n;return null}const me=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Wn=i=>!Ne(i)&&i!==me;function li(){const{caseless:i}=Wn(this)&&this||{},t={},e=(s,n)=>{const r=i&&jn(t,n)||n;fs(t[r])&&fs(s)?t[r]=li(t[r],s):fs(s)?t[r]=li({},s):Ce(s)?t[r]=s.slice():t[r]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&Fe(arguments[s],e);return t}const Zo=(i,t,e,{allOwnKeys:s}={})=>(Fe(t,(n,r)=>{e&&xt(n)?i[r]=Gn(n,e):i[r]=n},{allOwnKeys:s}),i),Ko=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Qo=(i,t,e,s)=>{i.prototype=Object.create(t.prototype,s),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:t.prototype}),e&&Object.assign(i.prototype,e)},th=(i,t,e,s)=>{let n,r,a;const o={};if(t=t||{},i==null)return t;do{for(n=Object.getOwnPropertyNames(i),r=n.length;r-- >0;)a=n[r],(!s||s(a,i,t))&&!o[a]&&(t[a]=i[a],o[a]=!0);i=e!==!1&&ci(i)}while(i&&(!e||e(i,t))&&i!==Object.prototype);return t},eh=(i,t,e)=>{i=String(i),(e===void 0||e>i.length)&&(e=i.length),e-=t.length;const s=i.indexOf(t,e);return s!==-1&&s===e},sh=i=>{if(!i)return null;if(Ce(i))return i;let t=i.length;if(!Hn(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=i[t];return e},ih=(i=>t=>i&&t instanceof i)(typeof Uint8Array<"u"&&ci(Uint8Array)),nh=(i,t)=>{const s=(i&&i[Symbol.iterator]).call(i);let n;for(;(n=s.next())&&!n.done;){const r=n.value;t.call(i,r[0],r[1])}},rh=(i,t)=>{let e;const s=[];for(;(e=i.exec(t))!==null;)s.push(e);return s},ah=Dt("HTMLFormElement"),oh=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),$n=(({hasOwnProperty:i})=>(t,e)=>i.call(t,e))(Object.prototype),hh=Dt("RegExp"),Jn=(i,t)=>{const e=Object.getOwnPropertyDescriptors(i),s={};Fe(e,(n,r)=>{let a;(a=t(n,r,i))!==!1&&(s[r]=a||n)}),Object.defineProperties(i,s)},ch=i=>{Jn(i,(t,e)=>{if(xt(i)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=i[e];if(xt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},lh=(i,t)=>{const e={},s=n=>{n.forEach(r=>{e[r]=!0})};return Ce(i)?s(i):s(String(i).split(t)),e},uh=()=>{},fh=(i,t)=>i!=null&&Number.isFinite(i=+i)?i:t;function dh(i){return!!(i&&xt(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const mh=i=>{const t=new Array(10),e=(s,n)=>{if(us(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[n]=s;const r=Ce(s)?[]:{};return Fe(s,(a,o)=>{const h=e(a,n+1);!Ne(h)&&(r[o]=h)}),t[n]=void 0,r}}return s};return e(i,0)},gh=Dt("AsyncFunction"),ph=i=>i&&(us(i)||xt(i))&&xt(i.then)&&xt(i.catch),Zn=((i,t)=>i?setImmediate:t?((e,s)=>(me.addEventListener("message",({source:n,data:r})=>{n===me&&r===e&&s.length&&s.shift()()},!1),n=>{s.push(n),me.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",xt(me.postMessage)),yh=typeof queueMicrotask<"u"?queueMicrotask.bind(me):typeof process<"u"&&process.nextTick||Zn,A={isArray:Ce,isArrayBuffer:qn,isBuffer:zo,isFormData:Go,isArrayBufferView:Oo,isString:Bo,isNumber:Hn,isBoolean:No,isObject:us,isPlainObject:fs,isReadableStream:Ho,isRequest:jo,isResponse:Wo,isHeaders:$o,isUndefined:Ne,isDate:Fo,isFile:Yo,isBlob:Uo,isRegExp:hh,isFunction:xt,isStream:Vo,isURLSearchParams:qo,isTypedArray:ih,isFileList:Xo,forEach:Fe,merge:li,extend:Zo,trim:Jo,stripBOM:Ko,inherits:Qo,toFlatObject:th,kindOf:cs,kindOfTest:Dt,endsWith:eh,toArray:sh,forEachEntry:nh,matchAll:rh,isHTMLForm:ah,hasOwnProperty:$n,hasOwnProp:$n,reduceDescriptors:Jn,freezeMethods:ch,toObjectSet:lh,toCamelCase:oh,noop:uh,toFiniteNumber:fh,findKey:jn,global:me,isContextDefined:Wn,isSpecCompliantForm:dh,toJSONObject:mh,isAsyncFn:gh,isThenable:ph,setImmediate:Zn,asap:yh};function F(i,t,e,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}A.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Kn=F.prototype,Qn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{Qn[i]={value:i}}),Object.defineProperties(F,Qn),Object.defineProperty(Kn,"isAxiosError",{value:!0}),F.from=(i,t,e,s,n,r)=>{const a=Object.create(Kn);return A.toFlatObject(i,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),F.call(a,i.message,t,e,s,n),a.cause=i,a.name=i.name,r&&Object.assign(a,r),a};const wh=null;function ui(i){return A.isPlainObject(i)||A.isArray(i)}function tr(i){return A.endsWith(i,"[]")?i.slice(0,-2):i}function er(i,t,e){return i?i.concat(t).map(function(n,r){return n=tr(n),!e&&r?"["+n+"]":n}).join(e?".":""):t}function xh(i){return A.isArray(i)&&!i.some(ui)}const bh=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function ds(i,t,e){if(!A.isObject(i))throw new TypeError("target must be an object");t=t||new FormData,e=A.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,E){return!A.isUndefined(E[_])});const s=e.metaTokens,n=e.visitor||l,r=e.dots,a=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(n))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(A.isDate(g))return g.toISOString();if(!h&&A.isBlob(g))throw new F("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(g)||A.isTypedArray(g)?h&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function l(g,_,E){let b=g;if(g&&!E&&typeof g=="object"){if(A.endsWith(_,"{}"))_=s?_:_.slice(0,-2),g=JSON.stringify(g);else if(A.isArray(g)&&xh(g)||(A.isFileList(g)||A.endsWith(_,"[]"))&&(b=A.toArray(g)))return _=tr(_),b.forEach(function(y,w){!(A.isUndefined(y)||y===null)&&t.append(a===!0?er([_],w,r):a===null?_:_+"[]",c(y))}),!1}return ui(g)?!0:(t.append(er(E,_,r),c(g)),!1)}const u=[],d=Object.assign(bh,{defaultVisitor:l,convertValue:c,isVisitable:ui});function m(g,_){if(!A.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));u.push(g),A.forEach(g,function(b,S){(!(A.isUndefined(b)||b===null)&&n.call(t,b,A.isString(S)?S.trim():S,_,d))===!0&&m(b,_?_.concat(S):[S])}),u.pop()}}if(!A.isObject(i))throw new TypeError("data must be an object");return m(i),t}function sr(i){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function fi(i,t){this._pairs=[],i&&ds(i,this,t)}const ir=fi.prototype;ir.append=function(t,e){this._pairs.push([t,e])},ir.toString=function(t){const e=t?function(s){return t.call(this,s,sr)}:sr;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Sh(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nr(i,t,e){if(!t)return i;const s=e&&e.encode||Sh;A.isFunction(e)&&(e={serialize:e});const n=e&&e.serialize;let r;if(n?r=n(t,e):r=A.isURLSearchParams(t)?t.toString():new fi(t,e).toString(s),r){const a=i.indexOf("#");a!==-1&&(i=i.slice(0,a)),i+=(i.indexOf("?")===-1?"?":"&")+r}return i}class vh{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(s){s!==null&&t(s)})}}const rr=vh,ar={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Th={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},di=typeof window<"u"&&typeof document<"u",mi=typeof navigator=="object"&&navigator||void 0,_h=di&&(!mi||["ReactNative","NativeScript","NS"].indexOf(mi.product)<0),Eh=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Mh=di&&window.location.href||"http://localhost",ct={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:di,hasStandardBrowserEnv:_h,hasStandardBrowserWebWorkerEnv:Eh,navigator:mi,origin:Mh},Symbol.toStringTag,{value:"Module"})),...Th};function Ph(i,t){return ds(i,new ct.classes.URLSearchParams,Object.assign({visitor:function(e,s,n,r){return ct.isNode&&A.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Ch(i){return A.matchAll(/\w+|\[(\w*)]/g,i).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ih(i){const t={},e=Object.keys(i);let s;const n=e.length;let r;for(s=0;s<n;s++)r=e[s],t[r]=i[r];return t}function or(i){function t(e,s,n,r){let a=e[r++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),h=r>=e.length;return a=!a&&A.isArray(n)?n.length:a,h?(A.hasOwnProp(n,a)?n[a]=[n[a],s]:n[a]=s,!o):((!n[a]||!A.isObject(n[a]))&&(n[a]=[]),t(e,s,n[a],r)&&A.isArray(n[a])&&(n[a]=Ih(n[a])),!o)}if(A.isFormData(i)&&A.isFunction(i.entries)){const e={};return A.forEachEntry(i,(s,n)=>{t(Ch(s),n,e,0)}),e}return null}function Ah(i,t,e){if(A.isString(i))try{return(t||JSON.parse)(i),A.trim(i)}catch(s){if(s.name!=="SyntaxError")throw s}return(e||JSON.stringify)(i)}const gi={transitional:ar,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",n=s.indexOf("application/json")>-1,r=A.isObject(t);if(r&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return n?JSON.stringify(or(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ph(t,this.formSerializer).toString();if((o=A.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ds(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),Ah(t)):t}],transformResponse:[function(t){const e=this.transitional||gi.transitional,s=e&&e.forcedJSONParsing,n=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(s&&!this.responseType||n)){const a=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?F.from(o,F.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ct.classes.FormData,Blob:ct.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],i=>{gi.headers[i]={}});const pi=gi,kh=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dh=i=>{const t={};let e,s,n;return i&&i.split(`
|
|
2
|
-
`).forEach(function(a){
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(n=>s.set(n)),s}static accessor(t){const s=(this[hr]=this[hr]={accessors:{}}).accessors,n=this.prototype;function r(a){const o=Ye(a);s[o]||(Oh(n,a),s[o]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}gs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(gs.prototype,({value:i},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>i,set(s){this[e]=s}}}),A.freezeMethods(gs);const Rt=gs;function wi(i,t){const e=this||pi,s=t||e,n=Rt.from(s.headers);let r=s.data;return A.forEach(i,function(o){r=o.call(e,r,n.normalize(),t?t.status:void 0)}),n.normalize(),r}function cr(i){return!!(i&&i.__CANCEL__)}function Ie(i,t,e){F.call(this,i??"canceled",F.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(Ie,F,{__CANCEL__:!0});function lr(i,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?i(e):t(new F("Request failed with status code "+e.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Bh(i){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}function Nh(i,t){i=i||10;const e=new Array(i),s=new Array(i);let n=0,r=0,a;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),l=s[r];a||(a=c),e[n]=h,s[n]=c;let u=r,d=0;for(;u!==n;)d+=e[u++],u=u%i;if(n=(n+1)%i,n===r&&(r=(r+1)%i),c-a<t)return;const m=l&&c-l;return m?Math.round(d*1e3/m):void 0}}function Fh(i,t){let e=0,s=1e3/t,n,r;const a=(c,l=Date.now())=>{e=l,n=null,r&&(clearTimeout(r),r=null),i.apply(null,c)};return[(...c)=>{const l=Date.now(),u=l-e;u>=s?a(c,l):(n=c,r||(r=setTimeout(()=>{r=null,a(n)},s-u)))},()=>n&&a(n)]}const ps=(i,t,e=3)=>{let s=0;const n=Nh(50,250);return Fh(r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,h=a-s,c=n(h),l=a<=o;s=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:h,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:r,lengthComputable:o!=null,[t?"download":"upload"]:!0};i(u)},e)},ur=(i,t)=>{const e=i!=null;return[s=>t[0]({lengthComputable:e,total:i,loaded:s}),t[1]]},fr=i=>(...t)=>A.asap(()=>i(...t)),Yh=ct.hasStandardBrowserEnv?((i,t)=>e=>(e=new URL(e,ct.origin),i.protocol===e.protocol&&i.host===e.host&&(t||i.port===e.port)))(new URL(ct.origin),ct.navigator&&/(msie|trident)/i.test(ct.navigator.userAgent)):()=>!0,Uh=ct.hasStandardBrowserEnv?{write(i,t,e,s,n,r){const a=[i+"="+encodeURIComponent(t)];A.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),A.isString(s)&&a.push("path="+s),A.isString(n)&&a.push("domain="+n),r===!0&&a.push("secure"),document.cookie=a.join("; ")},read(i){const t=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(i){this.write(i,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xh(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function Vh(i,t){return t?i.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):i}function dr(i,t,e){let s=!Xh(t);return i&&(s||e==!1)?Vh(i,t):t}const mr=i=>i instanceof Rt?{...i}:i;function ge(i,t){t=t||{};const e={};function s(c,l,u,d){return A.isPlainObject(c)&&A.isPlainObject(l)?A.merge.call({caseless:d},c,l):A.isPlainObject(l)?A.merge({},l):A.isArray(l)?l.slice():l}function n(c,l,u,d){if(A.isUndefined(l)){if(!A.isUndefined(c))return s(void 0,c,u,d)}else return s(c,l,u,d)}function r(c,l){if(!A.isUndefined(l))return s(void 0,l)}function a(c,l){if(A.isUndefined(l)){if(!A.isUndefined(c))return s(void 0,c)}else return s(void 0,l)}function o(c,l,u){if(u in t)return s(c,l);if(u in i)return s(void 0,c)}const h={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,l,u)=>n(mr(c),mr(l),u,!0)};return A.forEach(Object.keys(Object.assign({},i,t)),function(l){const u=h[l]||n,d=u(i[l],t[l],l);A.isUndefined(d)&&u!==o||(e[l]=d)}),e}const gr=i=>{const t=ge({},i);let{data:e,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:r,headers:a,auth:o}=t;t.headers=a=Rt.from(a),t.url=nr(dr(t.baseURL,t.url,t.allowAbsoluteUrls),i.params,i.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let h;if(A.isFormData(e)){if(ct.hasStandardBrowserEnv||ct.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((h=a.getContentType())!==!1){const[c,...l]=h?h.split(";").map(u=>u.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...l].join("; "))}}if(ct.hasStandardBrowserEnv&&(s&&A.isFunction(s)&&(s=s(t)),s||s!==!1&&Yh(t.url))){const c=n&&r&&Uh.read(r);c&&a.set(n,c)}return t},Gh=typeof XMLHttpRequest<"u"&&function(i){return new Promise(function(e,s){const n=gr(i);let r=n.data;const a=Rt.from(n.headers).normalize();let{responseType:o,onUploadProgress:h,onDownloadProgress:c}=n,l,u,d,m,g;function _(){m&&m(),g&&g(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let E=new XMLHttpRequest;E.open(n.method.toUpperCase(),n.url,!0),E.timeout=n.timeout;function b(){if(!E)return;const y=Rt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),P={data:!o||o==="text"||o==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:y,config:i,request:E};lr(function(L){e(L),_()},function(L){s(L),_()},P),E=null}"onloadend"in E?E.onloadend=b:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(b)},E.onabort=function(){E&&(s(new F("Request aborted",F.ECONNABORTED,i,E)),E=null)},E.onerror=function(){s(new F("Network Error",F.ERR_NETWORK,i,E)),E=null},E.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const P=n.transitional||ar;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),s(new F(w,P.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,i,E)),E=null},r===void 0&&a.setContentType(null),"setRequestHeader"in E&&A.forEach(a.toJSON(),function(w,P){E.setRequestHeader(P,w)}),A.isUndefined(n.withCredentials)||(E.withCredentials=!!n.withCredentials),o&&o!=="json"&&(E.responseType=n.responseType),c&&([d,g]=ps(c,!0),E.addEventListener("progress",d)),h&&E.upload&&([u,m]=ps(h),E.upload.addEventListener("progress",u),E.upload.addEventListener("loadend",m)),(n.cancelToken||n.signal)&&(l=y=>{E&&(s(!y||y.type?new Ie(null,i,E):y),E.abort(),E=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));const S=Bh(n.url);if(S&&ct.protocols.indexOf(S)===-1){s(new F("Unsupported protocol "+S+":",F.ERR_BAD_REQUEST,i));return}E.send(r||null)})},qh=(i,t)=>{const{length:e}=i=i?i.filter(Boolean):[];if(t||e){let s=new AbortController,n;const r=function(c){if(!n){n=!0,o();const l=c instanceof Error?c:this.reason;s.abort(l instanceof F?l:new Ie(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,r(new F(`timeout ${t} of ms exceeded`,F.ETIMEDOUT))},t);const o=()=>{i&&(a&&clearTimeout(a),a=null,i.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),i=null)};i.forEach(c=>c.addEventListener("abort",r));const{signal:h}=s;return h.unsubscribe=()=>A.asap(o),h}},Hh=function*(i,t){let e=i.byteLength;if(!t||e<t){yield i;return}let s=0,n;for(;s<e;)n=s+t,yield i.slice(s,n),s=n},jh=async function*(i,t){for await(const e of Wh(i))yield*Hh(e,t)},Wh=async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}const t=i.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},pr=(i,t,e,s)=>{const n=jh(i,t);let r=0,a,o=h=>{a||(a=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:c,value:l}=await n.next();if(c){o(),h.close();return}let u=l.byteLength;if(e){let d=r+=u;e(d)}h.enqueue(new Uint8Array(l))}catch(c){throw o(c),c}},cancel(h){return o(h),n.return()}},{highWaterMark:2})},ys=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yr=ys&&typeof ReadableStream=="function",$h=ys&&(typeof TextEncoder=="function"?(i=>t=>i.encode(t))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),wr=(i,...t)=>{try{return!!i(...t)}catch{return!1}},Jh=yr&&wr(()=>{let i=!1;const t=new Request(ct.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!t}),xr=64*1024,xi=yr&&wr(()=>A.isReadableStream(new Response("").body)),ws={stream:xi&&(i=>i.body)};ys&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ws[t]&&(ws[t]=A.isFunction(i[t])?e=>e[t]():(e,s)=>{throw new F(`Response type '${t}' is not supported`,F.ERR_NOT_SUPPORT,s)})})})(new Response);const Zh=async i=>{if(i==null)return 0;if(A.isBlob(i))return i.size;if(A.isSpecCompliantForm(i))return(await new Request(ct.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(A.isArrayBufferView(i)||A.isArrayBuffer(i))return i.byteLength;if(A.isURLSearchParams(i)&&(i=i+""),A.isString(i))return(await $h(i)).byteLength},Kh=async(i,t)=>{const e=A.toFiniteNumber(i.getContentLength());return e??Zh(t)},bi={http:wh,xhr:Gh,fetch:ys&&(async i=>{let{url:t,method:e,data:s,signal:n,cancelToken:r,timeout:a,onDownloadProgress:o,onUploadProgress:h,responseType:c,headers:l,withCredentials:u="same-origin",fetchOptions:d}=gr(i);c=c?(c+"").toLowerCase():"text";let m=qh([n,r&&r.toAbortSignal()],a),g;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let E;try{if(h&&Jh&&e!=="get"&&e!=="head"&&(E=await Kh(l,s))!==0){let P=new Request(t,{method:"POST",body:s,duplex:"half"}),M;if(A.isFormData(s)&&(M=P.headers.get("content-type"))&&l.setContentType(M),P.body){const[L,X]=ur(E,ps(fr(h)));s=pr(P.body,xr,L,X)}}A.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;g=new Request(t,{...d,signal:m,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:s,duplex:"half",credentials:b?u:void 0});let S=await fetch(g);const y=xi&&(c==="stream"||c==="response");if(xi&&(o||y&&_)){const P={};["status","statusText","headers"].forEach(G=>{P[G]=S[G]});const M=A.toFiniteNumber(S.headers.get("content-length")),[L,X]=o&&ur(M,ps(fr(o),!0))||[];S=new Response(pr(S.body,xr,L,()=>{X&&X(),_&&_()}),P)}c=c||"text";let w=await ws[A.findKey(ws,c)||"text"](S,i);return!y&&_&&_(),await new Promise((P,M)=>{lr(P,M,{data:w,headers:Rt.from(S.headers),status:S.status,statusText:S.statusText,config:i,request:g})})}catch(b){throw _&&_(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new F("Network Error",F.ERR_NETWORK,i,g),{cause:b.cause||b}):F.from(b,b&&b.code,i,g)}})};A.forEach(bi,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch{}Object.defineProperty(i,"adapterName",{value:t})}});const br=i=>`- ${i}`,Qh=i=>A.isFunction(i)||i===null||i===!1,Sr={getAdapter:i=>{i=A.isArray(i)?i:[i];const{length:t}=i;let e,s;const n={};for(let r=0;r<t;r++){e=i[r];let a;if(s=e,!Qh(e)&&(s=bi[(a=String(e)).toLowerCase()],s===void 0))throw new F(`Unknown adapter '${a}'`);if(s)break;n[a||"#"+r]=s}if(!s){const r=Object.entries(n).map(([o,h])=>`adapter ${o} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?r.length>1?`since :
|
|
4
|
-
`+r.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ge(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&bs.assertOptions(s,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),n!=null&&(A.isFunction(n)?e.paramsSerializer={serialize:n}:bs.assertOptions(n,{encode:Ut.function,serialize:Ut.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),bs.assertOptions(e,{baseUrl:Ut.spelling("baseURL"),withXsrfToken:Ut.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=r&&A.merge(r.common,r[e.method]);r&&A.forEach(["delete","get","head","post","put","patch","common"],g=>{delete r[g]}),e.headers=Rt.concat(a,r);const o=[];let h=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(e)===!1||(h=h&&_.synchronous,o.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let l,u=0,d;if(!h){const g=[vr.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),d=g.length,l=Promise.resolve(e);u<d;)l=l.then(g[u++],g[u++]);return l}d=o.length;let m=e;for(u=0;u<d;){const g=o[u++],_=o[u++];try{m=g(m)}catch(E){_.call(this,E);break}}try{l=vr.call(this,m)}catch(g){return Promise.reject(g)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(t){t=ge(this.defaults,t);const e=dr(t.baseURL,t.url,t.allowAbsoluteUrls);return nr(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){Ss.prototype[t]=function(e,s){return this.request(ge(s||{},{method:t,url:e,data:(s||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function e(s){return function(r,a,o){return this.request(ge(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}Ss.prototype[t]=e(),Ss.prototype[t+"Form"]=e(!0)});const vs=Ss;class vi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const s=this;this.promise.then(n=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](n);s._listeners=null}),this.promise.then=n=>{let r;const a=new Promise(o=>{s.subscribe(o),r=o}).then(n);return a.cancel=function(){s.unsubscribe(r)},a},t(function(r,a,o){s.reason||(s.reason=new Ie(r,a,o),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new vi(function(n){t=n}),cancel:t}}}const ec=vi;function sc(i){return function(e){return i.apply(null,e)}}function ic(i){return A.isObject(i)&&i.isAxiosError===!0}const Ti={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ti).forEach(([i,t])=>{Ti[t]=i});const nc=Ti;function Er(i){const t=new vs(i),e=Gn(vs.prototype.request,t);return A.extend(e,vs.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return Er(ge(i,n))},e}const tt=Er(pi);tt.Axios=vs,tt.CanceledError=Ie,tt.CancelToken=ec,tt.isCancel=cr,tt.VERSION=Tr,tt.toFormData=ds,tt.AxiosError=F,tt.Cancel=tt.CanceledError,tt.all=function(t){return Promise.all(t)},tt.spread=sc,tt.isAxiosError=ic,tt.mergeConfig=ge,tt.AxiosHeaders=Rt,tt.formToJSON=i=>or(A.isHTMLForm(i)?new FormData(i):i),tt.getAdapter=Sr.getAdapter,tt.HttpStatusCode=nc,tt.default=tt;const rc=tt,Mr=window.crypto.subtle;Mr||console.warn("Crypto API not supported");async function Pr(i,t="SHA-256"){const e=await Mr.digest(t,v.getUint8ArrayFromString(i));return v.getStringFromArrayBuffer(e)}async function Cr(i,t="SHA-256"){const e=JSON.stringify(v.getSortedObjectString(i));return Pr(e,t)}var ac=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,hc=(i,t,e,s)=>{for(var n=s>1?void 0:s?oc(t,e):t,r=i.length-1,a;r>=0;r--)(a=i[r])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&ac(t,e,n),n};class _i{instance;constructor(t){this.instance=rc.create(t);const e=new Ir;this.instance.interceptors.request.use(s=>(e.pendingRequest(s),s),s=>(e.cancelRequest(s.config),s)),t?.interceptor&&(this.instance.interceptors.request.use(t.interceptor.request,t.interceptor.requestError),this.instance.interceptors.response.use(t.interceptor.response,t.interceptor.responseError)),this.instance.interceptors.response.use(async s=>s?s.status==200?(await e.confirmRequest(s.config),s):Promise.reject(s):Promise.reject("axios response is undefined! maybe config.interceptor is NOT set return value!"),async s=>Promise.reject(s))}async request(t){return await this.instance.request(t)}async get(t,e){return this.request({...e,method:"get",url:t})}async delete(t,e){return this.request({...e,method:"delete",url:t})}async head(t,e){return this.request({...e,method:"head",url:t})}async options(t,e){return this.request({...e,method:"options",url:t})}async post(t,e,s){return this.request({...s,method:"post",url:t,data:e})}async postBlob(t,e,s){return s={...s,headers:{...s?.headers,"Content-Type":"multipart/form-data"}},this.request({...s,method:"post",url:t,data:e})}async postForm(t,e,s){return this.instance.postForm(t,e,{...s})}async put(t,e,s){return this.request({...s,method:"put",url:t,data:e})}async patch(t,e,s){return this.request({...s,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}hc([v.Cache(6e4),v.Retry(3)],_i.prototype,"request",1);class Ir{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}async getRequestId(t){const{url:e,method:s,params:n,data:r}=t;return await Cr({url:e,method:s,params:n,data:r})}async pendingRequest(t){const e=await this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const s=new AbortController;t.signal=s.signal,this.pendingRequestMap.set(e,s)}}async confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=await this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}async cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=await this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}async cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const Ei=i=>new XMLSerializer().serializeToString(i),cc=(i,t="text/html")=>new DOMParser().parseFromString(i,t),Ar=(i,t=v.MIMEEnum.SVG,e=v.EncodeEnum.utf8)=>v.toBlob(Ei(i),t,e);async function Mi(i=["*"],t){if(!document||!(document instanceof Document))throw new Error("This is not a browser environment");let e=[];const s=document.createElement("input");return s.setAttribute("type","file"),s.setAttribute("visibility","hidden"),s.setAttribute("accept",i.join(",")),t&&s.setAttribute("multiple","true"),s.addEventListener("click",n=>{s.value=""},!1),new Promise((n,r)=>{s.addEventListener("change",a=>{e=Array.from(a.target.files||[]),e.length===0?r(new Error("Cancel")):n(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),s.click()}).then(n=>(s.remove(),n)).catch(n=>{throw s.remove(),n})}function Ue(i,t=v.ReadInBrowserEnum.text,e){return new Promise((s,n)=>{const r=new FileReader;switch(r.addEventListener("progress",a=>{e?.(a.loaded,a.total)}),r.addEventListener("load",a=>{s(a.target?.result)}),r.addEventListener("error",a=>{n(a)}),t){case v.ReadInBrowserEnum.dataURL:r.readAsDataURL(i);break;case v.ReadInBrowserEnum.binaryString:r.readAsBinaryString(i);break;case v.ReadInBrowserEnum.arraybuffer:r.readAsArrayBuffer(i);break;case v.ReadInBrowserEnum.text:default:r.readAsText(i)}})}async function lc(i){const t=await Ue(i,v.ReadInBrowserEnum.arraybuffer);return v.getFileTypeFromArrayBuffer(t)}const uc=i=>{let t;return i instanceof File?t=i.name:t=i,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function fc(i){switch(i.toLowerCase()){case"jpg":case"jpeg":return v.MIMEEnum.JPEG;case"gif":return v.MIMEEnum.GIF;case"svg":return v.MIMEEnum.SVG;case"pdf":return v.MIMEEnum.PDF;case"png":default:return v.MIMEEnum.PNG}}function kr(i,t,e,s,n,r,a){const o=new FileReader;o.addEventListener("load",h=>{if(!h.target||!h.target.result)return t(h);if(e.append(h.target.result),a<s.size)kr(i,t,e,s,n,a,Math.min(a+n,s.size));else return i(e.end())}),o.addEventListener("error",h=>t(h)),o.readAsArrayBuffer(s.slice(r,a))}async function Dr(i,t=1048576){return await new Promise((e,s)=>kr(e,s,new Ro.ArrayBuffer,i,t,0,Math.min(t,i.size)))}class dc{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new _i({baseURL:t.baseURL,interceptor:{request:e=>e,response:e=>(e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk()),e)}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await Dr(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{v.increaseTime(this.time,1),this.onTime?.(v.formatTimeOverflow(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function Ts(){return new Date().getTime()}function Pi(i,t){const e=Math.max(t?.aliveInSeconds||0,0),s=Math.max(t?.aliveUntilTimestamp||0,0);function n(a,o=!1){return v.isPrimitive(a)||!v.hasYZSymbol(a,v.SYMBOL_TIMESTAMP)?{v:a,[v.SYMBOL_TIMESTAMP]:Ts()}:o?a:{...a,[v.SYMBOL_TIMESTAMP]:Ts()}}let r=n(i,!0);return{get:()=>{let a=r.v;return(e&&Ts()>r[v.SYMBOL_TIMESTAMP]+e*1e3||s&&Ts()>s)&&(a=void 0),{value:typeof a<"u"?r:void 0,rawValue:a}},set:a=>r=n(a)}}function mc(i,t){const e=v.ref(t?.value||"");if(!e.value){const s=`; ${document.cookie}`.split(`; ${i}=`).pop()?.split(";").shift();s&&(e.value=decodeURIComponent(s))}return v.watchEffect(()=>{if(e.value&&t?.days){const s="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),n=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",a=t?.secure==!0?"; secure":"";document.cookie=i+"="+encodeURIComponent(e.value)+s+n+r+a}}),{get:()=>e.value,set:s=>e.value=s}}function gc(){const i=document.cookie.split("; ");for(let t=0;t<i.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const s=encodeURIComponent(i[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",n=location.pathname.split("/");for(document.cookie=s+"/";n.length>0;)document.cookie=s+n.join("/"),n.pop();e.shift()}}}function Rr(i,t){const e=typeof i=="string"?i:i.toString();let s=t?.initValue;if(typeof s>"u")try{const o=window.localStorage.getItem(e);o&&(s=v.parse(o))}catch{}const{get:n,set:r}=Pi(s,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),a=v.ref(n().value);return v.watchEffect(()=>{if(typeof a.value<"u")try{window.localStorage.setItem(e,v.stringify(a.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const o=n();return a.value=o.value,o.rawValue},set:o=>a.value=r(o)}}function pc(){window.localStorage.clear()}function yc(i,t){const e=typeof i=="string"?i:i.toString();let s=t?.initValue;if(typeof s>"u")try{const o=window.sessionStorage.getItem(e);o&&(s=v.parse(o))}catch{}const{get:n,set:r}=Pi(s,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),a=v.ref(n().value);return v.watchEffect(()=>{if(typeof a.value<"u")try{window.sessionStorage.setItem(e,v.stringify(a.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const o=n();return a.value=o.value,o.rawValue},set:o=>a.value=r(o)}}function wc(){window.sessionStorage.clear()}function xc(i,t){let e;return i.objectStoreNames.contains(t)||(e=i.createObjectStore(t,{keyPath:"id"})),e}function bc(i,t=1,e){return new Promise((s,n)=>{let r;const a=window.indexedDB.open(i,t);a.onerror=()=>{n("无法使用IndexDB!")},a.onsuccess=o=>{r=o.target.result,xc(r,e),s(r)}})}function Sc(i,t,e={id:1,name:"xxx"}){return new Promise((s,n)=>{const r=i.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=o=>{s(o)},r.onerror=o=>{n(o)}})}function N(i,t,e,s=!1){const n=async r=>{await e(r)};try{i.addEventListener(t,n,s)}catch{i.attachEvent("on"+t,n)}return()=>{try{i.removeEventListener(t,n,s)}catch{i.detachEvent("on"+t,n)}}}const vc=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Tc=["keydown","keyup","keypress"],_c=["touchstart","touchend","touchcancel","touchmove"],Ec=["pointerdown","pointerup","pointercancel","pointermove"],Mc=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Pc=["change"];function Cc(i,t,e={bubbles:!0,detail:{}}){if(!i)return;let s;try{vc.includes(t)?s=new MouseEvent(t,e):Tc.includes(t)?s=new KeyboardEvent(t,e):_c.includes(t)?s=new TouchEvent(t,e):Ec.includes(t)?s=new PointerEvent(t,e):Mc.includes(t)?s=new DragEvent(t,e):Pc.includes(t)?s=new Event(t,e):s=new CustomEvent(t,e)}catch{document.createEvent?s=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(s=document.createEventObject())}if(i.dispatchEvent)i.dispatchEvent(s);else if(i.fireEvent&&document.createEventObject)i.fireEvent("on"+t,s);else throw new Error(`Can't fire event : ${t}`)}function Ic(i,t){const e=i.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function ie(i){i.preventDefault&&i.preventDefault();try{i.returnValue=!1}catch{}}function Lr(i){i.stopPropagation&&i.stopPropagation();try{i.cancelBubble=!0}catch{}}function Ac(i,t){let e=document.createElement(i);t="on"+t;let s=t in e;return s||(e.setAttribute(t,"return;"),s=typeof e[t]=="function"),e=null,s}function kc(i){if(document.implementation.hasFeature("MouseEvents","2.0"))return i.button;switch(i.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const _s=()=>{const i=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(i)?t="iOS":/android/i.test(i)?t="Android":/BlackBerry/i.test(i)?t="BlackBerry":/mac/i.test(i)?t="macOS":/win/i.test(i)?t="Windows":/linux/i.test(i)?t="Linux":/bsd/i.test(i)&&(t="BSD"),t.toLowerCase()};function Dc(i=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(i)){const e=i.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(i)){const e=i.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(i)){const e=i.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(i)){const e=i.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function Rc(i,t){const e=i.split("."),s=t.split(".");for(let n=0,r=e.length;n<r;n++){if(s.length==n)return 1;if(e[n]!=s[n])return e[n]>s[n]?1:-1}return e.length!=s.length?-1:0}function Ci(){const i=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(i)||/opera/i.test(i)?t="Opera":/chrome/i.test(i)?t="Chrome":/firefox/i.test(i)?t="Firefox":/safari/i.test(i)?t="Safari":/edge/i.test(i)?t="Edge":/msie|trident/i.test(i)?t="IE":/MicroMessenger/i.test(i)?t="Wechat":/alipay/i.test(i)&&(t="Ali"),t.toLowerCase()}const Lc=()=>{const i=navigator.userAgent;let t="Unknown";if(/Chrome/.test(i)){const e=i.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(i)){const e=i.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(i)){const e=i.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(i)){const e=i.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(i)){const e=i.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function zc(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Oc(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Ii(){return _s()==="ios"}function Ai(){return _s()==="macos"}function Bc(){return Ii()|Ai()}function zr(){return _s()==="android"}function Nc(){return Ii()||zr()}function Or(){const i=window.navigator.userAgent,t=i.indexOf("MSIE ");if(t>0)return parseInt(i.substring(t+5,i.indexOf(".",t)),10);if(i.indexOf("Trident/")>0){const n=i.indexOf("rv:");return parseInt(i.substring(n+3,i.indexOf(".",n)),10)}const s=i.indexOf("Edge/");return s>0?parseInt(i.substring(s+5,i.indexOf(".",s)),10):-1}const Fc=Or()!==-1,Yc=document.documentMode?document.documentMode===9:!1,Uc=document.documentMode?document.documentMode===10:!1,Xc=document.documentMode?document.documentMode===11:!1;function Br(){return Ci()==="wechat"}function Nr(){return Ci()==="ali"}function Vc(){return Br()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Gc(){return Nr()&&navigator.userAgent.match(/miniprogram/i)}const qc=typeof document<"u",Fr=typeof window<"u",Hc=typeof history<"u",jc=Fr&&window.File&&window.FileReader&&window.FileList&&window.Blob,Yr=(()=>!!(v.root.Worker&&v.root.Blob&&v.root.Promise&&v.root.OffscreenCanvas&&v.root.OffscreenCanvasRenderingContext2D&&v.root.HTMLCanvasElement&&v.root.HTMLCanvasElement.prototype.transferControlToOffscreen&&v.root.URL&&v.root.URL.createObjectURL))(),Wc=typeof Path2D=="function"&&typeof DOMMatrix=="function",Ur=function(){if(!v.root.OffscreenCanvas)return!1;const i=new OffscreenCanvas(1,1),t=i.getContext("2d");t.fillRect(0,0,1,1);const e=i.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),$c=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},Jc="webkit moz ms o".split(" ");function Es(i){return typeof i=="function"&&/native code/.test(i.toString())}function Zc(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let i=v.now();window.requestAnimationFrame=function(t){const e=v.now(),s=Math.max(0,16-(e-i)),n=window.setTimeout(function(){t(e+s)},s);return i=e+s,n}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(i){clearTimeout(i)})})();function ki(i){let t=!1;return window.requestAnimationFrame(function e(s){!t&&i(s)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function Di(i,t=0){if(t==0)return i(v.now()),()=>{};{const e=v.now();return ki(s=>s-e>=t?(i(s),!1):!0)}}function Kc(i,t=0){let e=!1,s=0;const n=v.now(),r=a=>{if(e)return;s++;const o=a-n-s*t;i(a,s,t<=o),Di(r,Math.max(0,t-o))};return Di(r,t),()=>{e=!0}}function Qc(i,t=20){const e=1e3/t;let s=0,n;return()=>(v.now()-s>=e&&(s=v.now(),n=i()),n)}window.requestIdleCallback=window.requestIdleCallback||function(i,t){const e=v.now();return setTimeout(function(){i({didTimeout:v.now()-e>50,timeRemaining:()=>Math.max(0,50-(v.now()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(i){clearTimeout(i)};function Xr(i,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?i():Xr(i,t)},{timeout:t})}const Ri=new v.CacheMap;let Li=!1;function zi(i,t,e){i&&t&&Ri.set(i,{cb:t,startTime:v.now(),timeout:e}),!Li&&(Li=!0,el(s=>{Li=!1;let n=s.timeRemaining();Ri.filter((r,a)=>{let o=!1;const h=v.now();(n>0||a.timeout&&v.now()-a.startTime>=a.timeout)&&(a.cb(),o=!0);const c=v.now();return n-=c-h,!o}),Ri.length>0&&zi()}))}let Ms=0,pe=33,ne=33,Oi;const Vr=new MessageChannel,tl=Vr.port2;Vr.port1.onmessage=i=>{Oi!==null&&Oi({didTimeout:Ms<=v.now(),timeRemaining:()=>Math.max(0,Ms-v.now())})};function el(i){return Oi=i,requestAnimationFrame(t=>{let e=t-Ms+ne;e<ne&&pe<ne?(e<8&&(e=8),ne=e<pe?pe:e):e>ne&&pe>ne?ne=e<pe?pe:e:pe=e,Ms=t+ne,tl.postMessage(null)})}function sl(i){if(typeof setImmediate<"u"&&Es(setImmediate))setImmediate(i);else if(typeof MessageChannel<"u"&&(Es(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=i,t.postMessage(null)}else typeof Promise<"u"&&Es(Promise)?Promise.resolve().then(i):setTimeout(i,0)}function il(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(t=>setTimeout(()=>{throw t}))}class Xe{static _nextId=0;static nextId(){return Xe._nextId++}}const O={Linear:{None:function(i){return i}},Ease:{In:function(i){return Math.pow(i,1.7)}},Quadratic:{In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}},Cubic:{In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}},Quartic:{In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}},Quintic:{In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}},Sinusoidal:{In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}},Exponential:{In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}},Circular:{In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}},Elastic:{In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}},Back:{In:function(i){return i===1?1:i*i*((1.70158+1)*i-1.70158)},Out:function(i){return i===0?0:--i*i*((1.70158+1)*i+1.70158)+1},InOut:function(i){const t=2.5949095;return(i*=2)<1?.5*(i*i*((t+1)*i-t)):.5*((i-=2)*i*((t+1)*i+t)+2)}},Bounce:{In:function(i){return 1-O.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?O.Bounce.In(i*2)*.5:O.Bounce.Out(i*2-1)*.5+.5}},generatePow:function(i=4){return i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(t){return t**i},Out:function(t){return 1-(1-t)**i},InOut:function(t){return t<.5?(t*2)**i/2:(1-(2-t*2)**i)/2+.5}}},random:function(i){return Math.random()},createStep:function(i){return function(t){return Math.floor(t*i)/i}},createNoisyEasing:function(i,t=.1){const e=1-t;return function(s){return t*Math.random()+e*i(s)}},swing:function(i){return i+Math.sin(i*Math.PI*2)/2},causeSeizures:function(i){return i+.2*Math.random()-.1}};function Gr(i){switch(i){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return i}}const nl=4,rl=.001,al=1e-7,ol=10,Ve=11,Ps=1/(Ve-1),hl=typeof Float32Array=="function";function qr(i,t){return 1-3*t+3*i}function Hr(i,t){return 3*t-6*i}function jr(i){return 3*i}function Cs(i,t,e){return((qr(t,e)*i+Hr(t,e))*i+jr(t))*i}function Wr(i,t,e){return 3*qr(t,e)*i*i+2*Hr(t,e)*i+jr(t)}function cl(i,t,e,s,n){let r,a,o=0;do a=t+(e-t)/2,r=Cs(a,s,n)-i,r>0?e=a:t=a;while(Math.abs(r)>al&&++o<ol);return a}function ll(i,t,e,s){for(let n=0;n<nl;++n){const r=Wr(t,e,s);if(r===0)return t;const a=Cs(t,e,s)-i;t-=a/r}return t}function ul(i){return i}function Bi(i,t,e,s){if(!(0<=i&&i<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(i===t&&e===s)return ul;const n=hl?new Float32Array(Ve):new Array(Ve);for(let a=0;a<Ve;++a)n[a]=Cs(a*Ps,i,e);function r(a){let o=0,h=1;const c=Ve-1;for(;h!==c&&n[h]<=a;++h)o+=Ps;--h;const l=(a-n[h])/(n[h+1]-n[h]),u=o+l*Ps,d=Wr(u,i,e);return d>=rl?ll(a,u,i,e):d===0?u:cl(a,o,o+Ps,i,e)}return a=>a===0||a===1?a:Cs(r(a),t,s)}function Ni(i){switch(i){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function $r(i){const[t,e,s,n]=Ni(i);return[1-s,1-n,1-t,1-e]}function fl(i){return Bi(...Ni(i))}function dl(i){return Bi(...$r(i))}const Ht={Utils:{Linear:function(i,t,e){return(t-i)*e+i},Factorial:function(){const i=[1];return function(t){let e=1;if(i[t])return i[t];for(let s=t;s>1;s--)e*=s;return i[t]=e,e}}(),Bernstein:function(i,t){const e=Ht.Utils.Factorial;return e(i)/e(t)/e(i-t)},CatmullRom:function(i,t,e,s,n){const r=(e-i)*.5,a=(s-t)*.5,o=n*n,h=n*o;return(2*t-2*e+r+a)*h+(-3*t+3*e-2*r-a)*o+r*n+t},QuadraticBezier:(i,t,e,s)=>{const n=1-s;return n*n*i+2*n*s*t+s*s*e},CubicBezier:(i,t,e,s,n)=>{const r=1-n;return r*r*r*i+3*r*r*n*t+3*r*n*n*e+n*n*n*s}},Linear:function(i,t){const e=i.length-1,s=e*t,n=Math.floor(s),r=Ht.Utils.Linear;return t<0?r(i[0],i[1],s):t>1?r(i[e],i[e-1],e-s):r(i[n],i[n+1>e?e:n+1],s-n)},Bezier:function(i,t){let e=0;const s=i.length-1,n=Math.pow,r=Ht.Utils.Bernstein;for(let a=0;a<=s;a++)e+=n(1-t,s-a)*n(t,a)*i[a]*r(s,a);return e},CatmullRom:function(i,t){const e=i.length-1;let s=e*t,n=Math.floor(s);const r=Ht.Utils.CatmullRom;return i[0]===i[e]?(t<0&&(n=Math.floor(s=e*(1+t))),r(i[(n-1+e)%e],i[n],i[(n+1)%e],i[(n+2)%e],s-n)):t<0?i[0]-(r(i[0],i[0],i[1],i[1],-s)-i[0]):t>1?i[e]-(r(i[e],i[e],i[e-1],i[e-1],s-e)-i[e]):r(i[n?n-1:0],i[n],i[e<n+1?e:n+1],i[e<n+2?e:n+2],s-n)}};class Jr{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=v.now(),e=!1){const s=Object.keys(this._tweens);for(let n=0;n<s.length;n++){const r=this._tweens[s[n]],a=!e;r&&r.update(t,a)===!1&&!e&&delete this._tweens[s[n]]}return!!Object.keys(this._tweens).length}}const Mt=new Jr;class Fi{constructor(t,e=Mt){this._object=t,this._group=e}_id=Xe.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=Ht.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=v.now()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,s,n){for(const r in s){const a=t[r],o=Array.isArray(a),h=o?"array":typeof a,c=!o&&Array.isArray(s[r]);if(!(h==="undefined"||h==="function")){if(c){let l=s[r];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,a)),s[r]=[a].concat(l)}if((h==="object"||o)&&a&&!c){e[r]=o?[]:{};for(const l in a)e[r][l]=a[l];n[r]=o?[]:{},this._setupProperties(a,e[r],s[r],n[r])}else typeof e[r]>"u"&&(e[r]=a),o||(e[r]*=1),c?n[r]=s[r].slice().reverse():n[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=v.now()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=v.now()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Mt){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=Ht.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=v.now(),e=!0){if(this._isPaused)return!0;let s,n;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),n=(t-this._startTime)/this._durationTime,n=this._durationTime===0||n>1?1:n;const a=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),n===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let o=0,h=this._chainedTweens.length;o<h;o++)this._chainedTweens[o].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,s,n){for(const r in s){if(e[r]===void 0)continue;const a=e[r]||0;let o=s[r];const h=Array.isArray(t[r]),c=Array.isArray(o);!h&&c?t[r]=this._interpolationFunction(o,n):typeof o=="object"&&o?this._updateProperties(t[r],a,o,n):(o=this._handleRelativeValue(a,o),typeof o=="number"&&(t[r]=a+(o-a)*n))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],s=this._valuesEnd[t];typeof s=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(s):this._valuesStartRepeat[t]=s,this._valuesEnd[t]=e}}const ml=Xe.nextId,gl=Mt.getAll.bind(Mt),pl=Mt.removeAll.bind(Mt),yl=Mt.add.bind(Mt),wl=Mt.remove.bind(Mt),xl=Mt.update.bind(Mt),bl={now:v.now,Sequence:Xe,Easing:O,Interpolation:Ht,Group:Jr,Tween:Fi,nextId:ml,getAll:gl,removeAll:pl,add:yl,remove:wl,update:xl};class Yi{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=v.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=v.now();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Is{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){v.ShellSort(this.tweens,(e,s)=>t?e.delay>s.delay:e.delay<=s.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(s=>{const n={...s};delete n.tween,n.fromValues={...n.fromValues},n.toValues={...n.toValues},e.push(n)}),e}addTween(t,e,s){const n={fromValues:t,toValues:e,frames:typeof s?.frames=="number"?s.frames:1,delay:typeof s?.delay=="number"?s.delay:this.tweens.length,easeFunction:s?.easeFunction||O.Linear.None,interpolationFunction:s?.interpolationFunction||Ht.Linear,repeat:typeof s?.repeat=="number"?s.repeat:0,yoyo:s?.yoyo||!1,onStart:s?.onStart||(()=>{}),onUpdate:s?.onUpdate||(()=>{}),onComplete:s?.onComplete||(()=>{})};return this.tweens.push(n),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Yi,s=this.frameDuration;return new Promise(n=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=ki(r=>{if(!this.isPaused){const o=Math.max(0,r-this.pausedDuration),h=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(c=>c.delay*s<=h).forEach(c=>{c.tween||(c.tween=new Fi({...c.fromValues}).to({...c.toValues},c.frames*s).easing(c.easeFunction).interpolation(c.interpolationFunction).repeat(c.repeat).yoyo(c.yoyo).onStart(c.onStart).onUpdate(c.onUpdate).onComplete(c.onComplete),c.tween.start(o)),(c.delay+c.frames*(c.repeat+1))*s>h?c.tween.update(o):(c.tween.isPlaying()&&c.tween.end(),v.deleteArrayItem(t,c))})}const a=!!t.length;return a||(this.onGroupComplete?.(),n()),a})})}isPaused=!1;pausedClock=new Yi;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(s=>{e=Math.max(e,s.delay+s.frames),s.easeFunction=Gr(s.easeFunction);const n={...s.toValues};s.toValues={...s.fromValues},s.fromValues={...n}}),t.forEach(s=>{s.delay=e-s.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const As=new v.CacheMap,Zr=(i=!0)=>{As.filter((t,e)=>(e.alternate&&($s(e,e.alternate),i&&As.set(t,e.alternate),e.alternate=void 0),i))};function Ui(i){let t=As.get(i);return t||(t=Ws(i),As.set(i,t)),t}function Kr(i){const t=Ui(i);return t.alternate||(t.alternate=Ws(i)),t.alternate}function Sl(i,t,e=!0){t(Kr(i)),Zr(e)}function Xi(i,t,e=!0){t(Kr(i)),zi("FLUSH_DOM_ACTION",()=>Zr(e),50)}function Y(i){return i*Math.PI/180}function lt(i){return i*180/Math.PI}function ks(i,t,e=0){return Math.sqrt(i*i+t*t+e*e)}function Ds(i,t,e,s){return ks(e-i,s-t)}function Rs(i,t,e,s){const n=e-i,r=s-t;return n*n+r*r}function re(i,t,e,s){let n=Math.atan2(s-t,e-i);return n<0&&(n+=Math.PI*2),n}function Pt(i,t){return{dx:Math.cos(i)*t,dy:Math.sin(i)*t}}function vl(i,t,e){if(typeof e=="number"){const s=Math.sqrt(Math.pow(i,2)+Math.pow(t,2)+Math.pow(e,2));return{x:i/=s,y:t/=s,z:e/=s}}else{const s=Math.sqrt(Math.pow(i,2)+Math.pow(t,2));return{x:i/=s,y:t/=s}}}function Tl(i,t,e,s,n=10){if(Math.abs(e-i)<n&&Math.abs(s-t)<n)return"no";const r=lt(re(i,t,e,s));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const Qr=_l("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function _l(i,t=10){const e={},s=i.split(",");for(let n=0;n<s.length;n+=2){const r="&"+s[n+1]+";",a=parseInt(s[n],t);e[r]="&#"+a+";"}return e["\\xa0"]=" ",e}function ft(i,t){const e=Object.keys(t);for(let s=0;s<e.length;s++)i=i.replace(new RegExp("{"+e[s]+"}","gi"),""+t[e[s]]);return i}function Ls(i){let t,e;if(!i)throw new Error("cannot create a random attribute name for an undefined object");const s="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=s[Math.floor(Math.random()*s.length)];while(i[t]);return t}function El(i){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[i]||t.start}function Ml(i){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[i]||t.alphabetic}const Ge={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class zs{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement("stop");if(s.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(s.setAttribute("stop-color",ft("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),s.setAttribute("stop-opacity",r[4]))}else s.setAttribute("stop-color",e);this.__root.appendChild(s)}}class Vi{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class qe{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:s=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=s),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ge);for(let e=0,s=t.length;e<s;e++){const n=t[e];this[n]=Ge[n].canvas}}__getStyleState(){const t={},e=Object.keys(Ge);for(let s=0,n=e.length;s<n;s++){const r=e[s];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let s=0,n=e.length;s<n;s++){const r=e[s];this[r]=t[r]}}__createElement(t,e={},s=!1){const n=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);s&&(n.setAttribute("fill","none"),n.setAttribute("stroke","none"));for(let a=0;a<r.length;a++){const o=r[a];n.setAttribute(o,e[o])}return n}__applyStyleToCurrentElement(t){let e=this.__currentElement;const s=this.__currentElementsToStyle;s&&(e.setAttribute(t,""),e=s.element,s.children.forEach(r=>{r.setAttribute(t,"")}));const n=Object.keys(Ge);for(let r=0;r<n.length;r++){const a=Ge[n[r]],o=this[n[r]];if(a.apply){if(o instanceof Vi){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const h=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,ft("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof zs)e.setAttribute(a.apply,ft("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);if(c){e.setAttribute(a.svgAttr,ft("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let l=parseFloat(c[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(a.svgAttr+"-opacity",""+l)}}else{let h=a.svgAttr;if(n[r]==="globalAlpha"&&(h=t+"-"+a.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const n=Object.keys(Qr);for(let r=0,a=n.length;r<a;r++){const o=n[r],h=Qr[o],c=new RegExp(o,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const n=this.__createElement("g");e.appendChild(n),this.__currentElement=n}let s=this.__currentElement.getAttribute("transform");s?s+=" ":s="",s+=t,this.__currentElement.setAttribute("transform",s)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ft("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ft("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ft("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,n,r,a){this.__addTransform(ft("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:s,d:n,e:r,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(ft("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(ft("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ft("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,n,r,a){this.__currentPosition={x:r,y:a},this.__addPathCommand(ft("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:s,cp2y:n,x:r,y:a}))}quadraticCurveTo(t,e,s,n){this.__currentPosition={x:s,y:n},this.__addPathCommand(ft("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:s,y:n}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,s,n,r){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(a===t&&o===e||t===s&&e===n||r===0){this.lineTo(t,e);return}const h=this.normalize([a-t,o-e]),c=this.normalize([s-t,n-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const l=h[0]*c[0]+h[1]*c[1],u=Math.acos(Math.abs(l)),d=this.normalize([h[0]+c[0],h[1]+c[1]]),m=r/Math.sin(u/2),g=t+m*d[0],_=e+m*d[1],E=[-h[1],h[0]],b=[c[1],-c[0]],S=function(P){const M=P[0];return P[1]>=0?Math.acos(M):-Math.acos(M)},y=S(E),w=S(b);this.lineTo(g+E[0]*r,_+E[1]*r),this.arc(g,_,r,y,w)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,s,n){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+s,e),this.lineTo(t+s,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()}fillRect(t,e,s,n){const r=this.__createElement("rect",{x:t,y:e,width:s,height:n},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,s,n){const r=this.__createElement("rect",{x:t,y:e,width:s,height:n},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),s=this.__rootSVG.childNodes[1],n=s.childNodes;for(let r=n.length-1;r>=0;r--)n[r]&&s.removeChild(n[r]);this.__currentElement=s,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,s,n){if(t===0&&e===0&&s===this.width&&n===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:s,height:n,fill:"#FFFFFF"},!0);r.appendChild(a)}createLinearGradient(t,e,s,n){const r=this.__createElement("linearGradient",{id:Ls(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:n+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new zs(r,this)}createRadialGradient(t,e,s,n,r,a){const o=this.__createElement("radialGradient",{id:Ls(this.__ids),cx:n+"px",cy:r+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new zs(o,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),s={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(s.decoration="underline"),this.__fontHref&&(s.href=this.__fontHref),s}__wrapTextLink(t,e){if(t.href){const s=this.__createElement("a");return s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),s.appendChild(e),s}return e}__applyText(t,e,s,n){const r=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:s,"text-anchor":El(this.textAlign),"dominant-baseline":Ml(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(n),a.appendChild(this.__wrapTextLink(r,o))}fillText(t,e,s){this.__applyText(t,e,s,"fill")}strokeText(t,e,s){this.__applyText(t,e,s,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,s,n,r,a){if(n===r)return;n=n%(2*Math.PI),r=r%(2*Math.PI),n===r&&(r=(r+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+s*Math.cos(r),h=e+s*Math.sin(r),c=t+s*Math.cos(n),l=e+s*Math.sin(n),u=a?0:1;let d=0,m=r-n;m<0&&(m+=2*Math.PI),a?d=m>Math.PI?0:1:d=m>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(ft("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:s,ry:s,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),s=Ls(this.__ids),n=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",s),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ft("url(#{id})",{id:s})),t.appendChild(n),this.__currentElement=n}drawImage(...t){let e=t[0],s,n,r,a,o=0,h=0,c,l,u,d,m,g,_,E;if(t.length===3)s=t[1],n=t[2],c=e.width,l=e.height,r=c,a=l;else if(t.length===5)s=t[1],n=t[2],r=t[3],a=t[4],c=e.width,l=e.height;else if(t.length===9)o=t[1],h=t[2],c=t[3],l=t[4],s=t[5],n=t[6],r=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const b=this.__closestGroupOrSvg();this.__currentElement;const S="translate("+s+", "+n+")";if(e instanceof qe){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)E=d.childNodes[0].getAttribute("id"),this.__ids[E]=E,this.__SVGdefs.appendChild(d.childNodes[0]);if(m=u.childNodes[1],m){const y=m.getAttribute("transform");let w;y?w=y+" "+S:w=S,m.setAttribute("transform",w),b.appendChild(m)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(g=this.__createElement("image"),g.setAttribute("width",r),g.setAttribute("height",a),g.setAttribute("preserveAspectRatio","none"),(o||h||c!==e.width||l!==e.height)&&(_=this.__document.createElement("canvas"),_.width=r,_.height=a,_.getContext("2d")?.drawImage(e,o,h,c,l,0,0,r,a),e=_),g.setAttribute("transform",S),g.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),b.appendChild(g))}createPattern(t,e){const s=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),n=Ls(this.__ids);let r;return s.setAttribute("id",n),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),s.appendChild(r),this.__SVGdefs.appendChild(s)):t instanceof qe&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new Vi(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Os{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,s,n=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),n&&(this.customContext=new qe({canvas:this.canvas,width:e||this.canvas.width,height:s||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,s,n){return this.context.fillRect(t,e,s,n),this.customContext&&this.customContext.fillRect(t,e,s,n),this}fillText(t,e,s,n){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,s,n),this.customContext&&this.customContext.fillText(t,e,s),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,s,n){return this.context.strokeText(t,e,s,n),this.customContext&&this.customContext.strokeText(t,e,s),this}strokeRect(t,e,s,n){return this.context.strokeRect(t,e,s,n),this.customContext&&this.customContext.strokeRect(t,e,s,n),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,s=this.canvas.width,n=this.canvas.height){return this.context.clearRect(t,e,s,n),this.customContext&&this.customContext.clearRect(t,e,s,n),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const s=new Path2D;s.addPath(t,e),this.currentPath2D=s}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,s=0){return this.translate(e,s),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-s),this.changePath2D(),this}scale(t,e=t,s=0,n=0){return this.translate(s,n),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-s,-n),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,s,n,r,a){return this.context.arc(t,e,s,n,r,a),this.customContext&&this.customContext.arc(t,e,s,n,r,a?-1:1),this.currentPath2D.arc(t,e,s,n,r,a),this}arcTo(t,e,s,n,r){return this.context.arcTo(t,e,s,n,r),this.customContext&&this.customContext.arcTo(t,e,s,n,r),this.currentPath2D.arcTo(t,e,s,n,r),this}ellipse(t,e,s,n,r,a,o,h){return this.context.ellipse(t,e,s,n,r,a,o,h),this.currentPath2D.ellipse(t,e,s,n,r,a,o,h),this}quadraticCurveTo(t,e,s,n){return this.context.quadraticCurveTo(t,e,s,n),this.customContext&&this.customContext.quadraticCurveTo(t,e,s,n),this.currentPath2D.quadraticCurveTo(t,e,s,n),this}bezierCurveTo(t,e,s,n,r,a){return this.context.bezierCurveTo(t,e,s,n,r,a),this.customContext&&this.customContext.bezierCurveTo(t,e,s,n,r,a),this.currentPath2D.bezierCurveTo(t,e,s,n,r,a),this}rect(t,e,s,n){return this.context.rect(t,e,s,n),this.customContext&&this.customContext.rect(t,e,s,n),this.currentPath2D.rect(t,e,s,n),this}createLinearGradient(t,e,s,n,r){const a=this.context.createLinearGradient(t,e,s,n);return r&&Object.entries(r).forEach(([o,h])=>{a.addColorStop(parseFloat(o),h)}),a}createRadialGradient(t,e,s,n,r,a,o){const h=this.context.createRadialGradient(t,e,s,n,r,a);return o&&Object.entries(o).forEach(([c,l])=>{h.addColorStop(parseFloat(c),l)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const s=e[0],n=e[1];this.context.drawImage(t,s,n)}else if(e.length===4){const s=e[0],n=e[1],r=e[2],a=e[3];this.context.drawImage(t,s,n,r,a)}else if(e.length===8){const s=e[0],n=e[1],r=e[2],a=e[3],o=e[4],h=e[5],c=e[6],l=e[7];this.context.drawImage(t,s,n,r,a,o,h,c,l)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,s=this.canvas.width,n=this.canvas.height,r){return this.context.getImageData(t,e,s,n,r)}putImageData(t,e=0,s=0){return this.context.putImageData(t,e,s)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}let Bs=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=re(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),n=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:s,width:n-e,height:r-s}}else{const e=Math.sin(t),s=Math.cos(t),n=s*this.x-e*this.y,r=s*this.toX-e*this.toY,a=s*this.y+e*this.x,o=s*this.toY+e*this.toX;return{x:Math.min(n,r),y:Math.min(a,o),width:Math.max(n,r)-Math.min(n,r),height:Math.max(a,o)-Math.min(a,o)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,s=this.y,n=t.toX,r=t.toY,a=this.toX-e,o=t.x-n;if(!a&&!o)return null;const h=(this.toY-s)/a,c=(t.y-r)/o;if(a){if(!o)return{x:n,y:h*(n-e)+s}}else return{x:e,y:c*(e-n)+r};const l=(-c*n+r+h*e-s)/(h-c),u=h*(l-e)+s;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const ta=Bs;class Gi extends Bs{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,s,n,r,a,o,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,s,n,r,a,o,h,!this.sweepFlag)}convert(t,e,s,n,r,a,o,h,c){const l=o/180*Math.PI,u=(t-s)/2,d=(e-n)/2,m=Math.cos(l)*u+Math.sin(l)*d,g=-Math.sin(l)*u+Math.cos(l)*d,_=m*m/(r*r)+g*g/(a*a);if(_>1){const $=Math.sqrt(_);throw r=$*r,a=$*a,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${a}.`)}const E=Math.sqrt((r*r*a*a-r*r*g*g-a*a*m*m)/(r*r*g*g+a*a*m*m)),b=h!=c?1:-1,S=b*E*r*g/a,y=b*E*-a*m/r,w=(t+s)/2,P=(e+n)/2,M=Math.cos(l)*S-Math.sin(l)*y+w,L=Math.sin(l)*S+Math.cos(l)*y+P,X=($,K,ot,st)=>($*st>=K*ot?1:-1)*Math.acos(($*ot+K*st)/(Math.sqrt($*$+K*K)*Math.sqrt(ot*ot+st*st))),G=X(1,0,t-M,e-L)-l,W=X(t-M,e-L,s-M,n-L);return[M,L,r,a,l,G,G+W]}}class Pl extends Bs{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,s,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let s,n,r,a;for(let c=0;c<2;++c)s=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,n=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-n/(2*s),0<a&&a<1&&[t,e][c].push(s*a*a+n*a+r));const o={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},h={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:o.x,y:o.y,width:h.x-o.x,height:h.y-o.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const Cl=Pl;class pt extends Bs{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,n=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t;const a=[this.y,this.toY],o=[this.x,this.toX];let h;const c=[];Math.abs(n)>1e12&&(n=.5),Math.abs(r)>1e12&&(r=.5),n>=0&&n<=1&&(h=this.interpolate(n),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,n=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t,Math.abs(n)>1e12&&(n=.5),Math.abs(r)>1e12&&(r=.5),n>=0&&n<=1&&(h=this.interpolate(n),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y}));const l=[],u=c.length;for(let g=0;g<u;g++){for(let _=g+1;_<u;_++)c[g].X===c[_].X&&c[g].Y===c[_].Y&&(_=++g);l.push({X:c[g].X,Y:c[g].Y})}const d={x:Math.min.apply(Math,o),y:Math.min.apply(Math,a)},m={x:Math.max.apply(Math,o),y:Math.max.apply(Math,a)};return{x:d.x,y:d.y,width:m.x-d.x,height:m.y-d.y,dots:l}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,s,n,r){const a=-3*e+9*s-9*n+3*r,o=t*a+6*e-12*s+6*n;return t*o-3*e+3*s}static bezlen(t,e,s,n,r,a,o,h,c=1){c=Math.max(0,Math.min(c,1));const l=c/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let m=0;for(let g=0;g<12;g++){const _=l*u[g]+l,E=this.base3(_,t,s,r,o),b=this.base3(_,e,n,a,h);m+=d[g]*Math.sqrt(E*E+b*b)}return l*m}length(t=1){return pt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,s=this.y,n=this.c1x,r=this.c1y,a=this.c2x,o=this.c2y,h=this.toX,c=this.toY;if(t<0||pt.bezlen(e,s,n,r,a,o,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,m=pt.bezlen(e,s,n,r,a,o,h,c,d);for(;Math.abs(m-t)>.01;)u/=2,d+=(m<t?1:-1)*u,m=pt.bezlen(e,s,n,r,a,o,h,c,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),s=1-e,n=Math.pow(s,3),r=Math.pow(s,2),a=e*e,o=a*e,h=n*this.x+r*3*e*this.c1x+s*3*e*e*this.c2x+o*this.toX,c=n*this.y+r*3*e*this.c1y+s*3*e*e*this.c2y+o*this.toY,l=this.x+2*e*(this.c1x-this.x)+a*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+a*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+a*(this.toX-2*this.c2x+this.c1x),m=this.c1y+2*e*(this.c2y-this.c1y)+a*(this.toY-2*this.c2y+this.c1y),g=s*this.x+e*this.c1x,_=s*this.y+e*this.c1y,E=s*this.c2x+e*this.toX,b=s*this.c2y+e*this.toY,S=90-Math.atan2(l-d,u-m)*180/Math.PI;return{x:h,y:c,m:{x:l,y:u},n:{x:d,y:m},start:{x:g,y:_},end:{x:E,y:b},alpha:S}}}const He=Math.PI*2;function ea(i,t,e,s){const n=i*s-t*e<0?-1:1;let r=i*e+t*s;return r>1&&(r=1),r<-1&&(r=-1),n*Math.acos(r)}function Il(i,t,e,s,n,r,a,o,h,c){const l=c*(i-e)/2+h*(t-s)/2,u=-h*(i-e)/2+c*(t-s)/2,d=a*a,m=o*o,g=l*l,_=u*u;let E=d*m-d*_-m*g;E<0&&(E=0),E/=d*_+m*g,E=Math.sqrt(E)*(n===r?-1:1);const b=E*a/o*u,S=E*-o/a*l,y=c*b-h*S+(i+e)/2,w=h*b+c*S+(t+s)/2,P=(l-b)/a,M=(u-S)/o,L=(-l-b)/a,X=(-u-S)/o,G=ea(1,0,P,M);let W=ea(P,M,L,X);return r===0&&W>0&&(W-=He),r===1&&W<0&&(W+=He),[y,w,G,W]}function Al(i,t){const e=1.3333333333333333*Math.tan(t/4),s=Math.cos(i),n=Math.sin(i),r=Math.cos(i+t),a=Math.sin(i+t);return[s,n,s-n*e,n+s*e,r+a*e,a-r*e,r,a]}function sa(i,t,e,s,n,r,a,o,h){const c=Math.sin(h*He/360),l=Math.cos(h*He/360),u=l*(i-e)/2+c*(t-s)/2,d=-c*(i-e)/2+l*(t-s)/2;if(u===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const m=u*u/(a*a)+d*d/(o*o);m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m));const g=Il(i,t,e,s,n,r,a,o,c,l),_=[];let E=g[2],b=g[3];const S=Math.max(Math.ceil(Math.abs(b)/(He/4)),1);b/=S;for(let y=0;y<S;y++)_.push(Al(E,b)),E+=b;return _.map(y=>{for(let w=0;w<y.length;w+=2){let P=y[w+0],M=y[w+1];P*=a,M*=o;const L=l*P-c*M,X=c*P+l*M;y[w+0]=L+g[0],y[w+1]=X+g[1]}return y})}function qi(i,t,e,s,n,r){return[i/3+.6666666666666666*e,t/3+.6666666666666666*s,n/3+.6666666666666666*e,r/3+.6666666666666666*s,n,r]}function je(i,t,e,s){return[i,t,e,s,e,s]}const We={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class ye{static createSVGElement(t="path",e){const s=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&oe(s,e),s}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||v.generateUUID()})}static downloadFromSVGElement(t,e="shape"){return En(Ar(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return En(v.toBlob(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return Ei(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return ye.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(s,n,r)=>{let a=n.toLowerCase();const o=v.extractAllNumbers(r);for(a=="m"&&o.length>We[a]&&(e.push([n,...o.splice(0,We[a])]),a="l",n=n=="m"?"l":"L");o.length;){if(o.length<We[a])throw new Error(`parseSVGPath substring:{ ${s} } command:{ ${n} } args:{ ${o} }`);e.push([n,...o.splice(0,We[a])])}return a=="z"&&e.push([n]),""}),e}static absolutizeSVGPath(t){let e=0,s=0,n=0,r=0;return t.map(function(a){const o=a[0],h=o.toUpperCase();if(o!=h)switch(a[0]=h,o){case"a":a[6]+=n,a[7]+=r;break;case"v":a[1]+=r;break;case"h":a[1]+=n;break;default:for(let c=1;c<a.length;)a[c++]+=n,a[c++]+=r}switch(h){case"Z":n=e,r=s;break;case"H":n=a[1];break;case"V":r=a[1];break;case"M":n=e=a[1],r=s=a[2];break;default:n=a[a.length-2],r=a[a.length-1]}return a})}static relativeSVGPath(t){let e=0,s=0,n=0,r=0;return t.map(function(a){const o=a[0],h=o.toLowerCase();if(o!=h)switch(a[0]=h,o){case"A":a[6]-=n,a[7]-=r;break;case"V":a[1]-=r;break;case"H":a[1]-=n;break;default:for(let c=1;c<a.length;)a[c++]-=n,a[c++]-=r}switch(h){case"z":n=e,r=s;break;case"h":n+=a[1];break;case"v":r+=a[1];break;case"m":n+=a[1],r+=a[2],e+=a[1],s+=a[2];break;default:n+=a[a.length-2],r+=a[a.length-1]}return a})}static normalizeSVGPath(t){const e=[];let s=0,n=0,r=0,a=0,o=0,h=0,c=0,l=0,u;for(let d=0,m=t.length;d<m;d++){let g=t[d];const _=g[0];switch(_){case"M":s=g[1],n=g[2];break;case"A":const E=sa(r,a,g[6],g[7],g[4],g[5],g[1],g[2],g[3]);if(!E.length)continue;E.forEach((y,w)=>{const[P,M,L,X,G,W,$,K]=y;g=["C",L,X,G,W,$,K],w<E.length-1&&e.push(g)});break;case"S":let b=r,S=a;(u=="C"||u=="S")&&(b+=b-c,S+=S-l),g=["C",b,S,g[1],g[2],g[3],g[4]];break;case"T":u=="Q"||u=="T"?(o=r*2-o,h=a*2-h):(o=r,h=a),g=["C",...qi(r,a,o,h,g[1],g[2])];break;case"Q":o=g[1],h=g[2],g=["C",...qi(r,a,g[1],g[2],g[3],g[4])];break;case"L":g=["C",...je(r,a,g[1],g[2])];break;case"H":g=["C",...je(r,a,g[1],a)];break;case"V":g=["C",...je(r,a,r,g[1])];break;case"Z":g=["C",...je(r,a,s,n)];break}u=_,r=g[g.length-2],a=g[g.length-1],g.length>4?(c=g[g.length-4],l=g[g.length-3]):(c=r,l=a),e.push(g)}return e}static catmullRom2bezier(t){const e=[];for(let s=0,n=t.length;n-2>s;s+=2){let r;s==0?r=[{x:t[s],y:t[s+1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+4],y:t[s+5]}]:n-4==s?r=[{x:t[s-2],y:t[s-1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+2],y:t[s+3]}]:r=[{x:t[s-2],y:t[s-1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+4],y:t[s+5]}];const a=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y])}return e}static zvhToLSVGPath(t){const e=[];let s=["L",0,0],n;for(let r=0,a=t.length;r<a;r++){const o=t[r];switch(o[0]){case"M":s=["L",o[1],o[2]],e.push(o);break;case"Z":e.push(s);break;case"H":n=e[e.length-1]||["L",0,0],e.push(["L",o[1],n[n.length-1]]);break;case"V":n=e[e.length-1]||["L",0,0],e.push(["L",n[n.length-2],o[1]]);break;default:e.push(o)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let s,n=0,r=0;for(let a=0,o=t.length;a<o;a++){const h=t[a],c=e[h[0]];c&&(h[0]=c.to,s&&(s[0]===c.to?(n=2*Number(s[c.x+2])-Number(s[c.x]),r=2*Number(s[c.x+3])-Number(s[c.x+1])):(n=Number(s[s.length-2]),r=Number(s[s.length-1]))),h.splice(1,0,n,r)),s=h}return t}}const bt=ye;class St{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(bt.parseSVGPath(t),e):t instanceof St?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const s=bt.normalizeSVGPath(bt.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let n=!1;for(let r=0,a=s.length;r<a;r++){const o=s[r];if(o[0]=="M"){n||(n=!0,this.startPathX=o[1],this.startPathY=o[2]),this.prevPathX=o[1],this.prevPathY=o[2];continue}this.appendLine(new pt({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new St;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let s=2,n=t.length;s+5<n;s+=6)e.appendLine(new pt({c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}));return e}static fromLines(t){const e=new St;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let s=0,n=t.length;s<n;s++)e.appendLine(t[s]);return e}appendLine(t){if(t instanceof Gi){sa(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[l,u,d,m,g,_,E,b]=c;this.normalizedLines.push(new pt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:m,c2x:g,c2y:_,toX:E,toY:b})),this.prevPathX=E,this.prevPathY=b});return}let e,s,n,r,a,o;t instanceof pt?(e=t.c1x,s=t.c1y,n=t.c2x,r=t.c2y,a=t.toX,o=t.toY):t instanceof Cl?[e,s,n,r,a,o]=qi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,n,r,a,o]=je(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new pt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:s,c2x:n,c2y:r,toX:a,toY:o})),this.prevPathX=a,this.prevPathY=o}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform(),n=[];n.push(["M",t,e]);for(let r=0,a=s.length;r<a;r++)n.push(...s[r].toSVGPathData());return n}toSVGPathD(){return bt.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:s,normalizedLines:n}=this.updateTransform();t.beginPath(),t.moveTo(e,s),n.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],s=[];if(t.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),s.push(c.y,c.y+c.height)}),e.length==0||s.length==0)return{x:0,y:0,width:0,height:0};const n=Math.min.apply(0,e),r=Math.min.apply(0,s),a=Math.max.apply(0,e),o=Math.max.apply(0,s);return{x:n,y:r,width:a-n,height:o-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new wt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,s=this.startPathY;({x:e,y:s}=t.transformPoint({x:e,y:s}));const n=[];return this.normalizedLines.forEach(r=>{let a=r.x,o=r.y,h=r.c1x,c=r.c1y,l=r.c2x,u=r.c2y,d=r.toX,m=r.toY;({x:a,y:o}=t.transformPoint({x:a,y:o})),{x:h,y:c}=t.transformPoint({x:h,y:c}),{x:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:m}=t.transformPoint({x:d,y:m}),n.push(new pt({x:a,y:o,c1x:h,c1y:c,c2x:l,c2y:u,toX:d,toY:m}))}),{startPathX:e,startPathY:s,normalizedLines:n}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,s)=>e+=s.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let s=0;const n=e.length;for(let r=0;r<n;r++){const a=e[r],o=a.length();if(s+o>=t)return a.getPointAtSegmentLength(t-s);s+=o}return e[n-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:s,normalizedLines:n}=this.updateTransform(),r=n.length;if(r===0)return{x:e,y:s};if(r===1)return n[0].interpolate(t);{let a=t*r,o=n[0];if(a--,a>1)for(let h=1;h<r&&(o=n[h],a>1);h++)a-=1;return o.interpolate(a)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const s=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(s,t):s}}getSubpathsAtLength(t,e,s){const{startPathX:n,startPathY:r,normalizedLines:a}=t.updateTransform();let o=null,h=0;const c=new St;c.prevPathX=c.startPathX=n,c.prevPathY=c.startPathY=r;for(let l=0,u=a.length;l<u;l++){const d=a[l],m=d.length();if(h+m>e&&!o){const g=d.getPointAtSegmentLength(e-h);if(c.appendLine(new pt({c1x:g.start.x,c1y:g.start.y,c2x:g.m.x,c2y:g.m.y,toX:g.x,toY:g.y})),s)return c;o=c,c.appendLine(new pt({c1x:g.n.x,c1y:g.n.y,c2x:g.end.x,c2y:g.end.y,toX:d.x,toY:d.y})),h+=m;continue}h+=m,c.appendLine(d)}return c}closestPoint(t,e){const s=this.getTotalLength();let n={x:t,y:e},r=0,a=1/0,o=8;for(let c=0;c<=s;c+=o){const l=this.getPointAtLength(c),u=Rs(l.x,l.y,t,e);u<a&&(n=l,r=c,a=u)}for(o/=2;o>.5;){const c=r-o,l=this.getPointAtLength(c),u=Rs(l.x,l.y,t,e),d=r+o,m=this.getPointAtLength(d),g=Rs(m.x,m.y,t,e);c>=0&&u<a?(n=l,r=c,a=u):d<=s&&g<a?(n=m,r=d,a=g):o/=2}const h=this.getPointAtLength(r+(r===s?-.1:.1));return{point:n,rotation:r>=s?re(h.x,h.y,n.x,n.y):re(n.x,n.y,h.x,h.y),distance:Math.sqrt(a)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform();return[t,e].concat(s.reduce((n,r)=>n.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let s=t[e-2],n=t[e-1],r=0;for(let a=0;a<e;a+=6)r+=Ds(t[a],t[a+1],s,n),s=t[a],n=t[a+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,s=e.length;let n=t-s;const r=Math.ceil(t/s),a=[];a.push(["M",e[0],e[1]]);let o=2;for(;o+5<=s-1;){const h=e[o++],c=e[o++],l=e[o++],u=e[o++],d=e[o++],m=e[o++];a.push(["C",h,c,l,u,d,m]);let g=0;for(;g<r&&n>0;)a.push(["C",d,m,d,m,d,m]),n-=6,g++}return a}static mixPoints(t,e,s){const n=t.length,r=new Array(n);for(let a=0;a<n;a++)r[a]=v.maxDotNumber(t[a]+(e[a]-t[a])*s,6);return r}static getPathInterpolator(t,e){return s=>Math.abs(s-0)<Number.EPSILON?t:Math.abs(s-1)<Number.EPSILON?e:St.fromPolymorphPoints(St.mixPoints(new St({d:t}).polymorphPoints,new St({d:e}).polymorphPoints,s)).toSVGPathData()}}const kl=St;class H extends v.EventBus{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=v.generateUUID(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const s=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",s),this.strokeDashTotalLength=v.extractAllNumbers(s).reduce((n,r)=>n+r,0)}return v.reactive(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new St,v.watchEffect(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(s=>{const n=s.originMatrix?s.originMatrix.clone():new wt;n.translate(-t.x+s.x,-t.y+s.y),s.originMatrix=n});const e=this.originMatrix?this.originMatrix.clone():new wt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,s){if(s instanceof Os)return s.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let n;try{n=new SVGPoint(t,e)}catch{n=s.createSVGPoint(),n.x=t,n.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(n);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,s){if(s instanceof Os)return s.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let n;try{n=new SVGPoint(t,e)}catch{n=s.createSVGPoint(),n.x=t,n.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(n):!1}clone(){return v.newConstructor(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([s,n])=>[v.toKebab(s),n]))):e&&(this.attrs[v.toKebab(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[v.toKebab(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[v.toKebab(t)]}distance(t){return Ds(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=lt(re(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:n}=Pt(Y(this.degree),e);this.vx=s,this.vy=n,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:n}=Pt(Y(this.degree),e);this.ax=s,this.ay=n,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,s=t.y-this.y,n=e*e+s*s,r=Math.sqrt(n),a=this.mass*t.mass/n,o=a*e/r,h=a*s/r;this.vx+=o/this.mass,this.vy+=h/this.mass,t.vx-=o/t.mass,t.vy-=h/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=v.parseNumber(t?.gravity,0);this.vy+=e;const s=v.parseNumber(t?.friction,1);this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const s=v.parseNumber(e?.easing,.05),n=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=n*s,this.vy=r*s,this.run(e)}runSpringTo(t,e){const s=v.parseNumber(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(n=>{const r=n.x-this.cX-this.x,a=n.y-this.cY-this.y,o=r*s,h=a*s;this.vx+=o,this.vy+=h}),this.run({friction:.9,...e})}springMassTo(t,e){const s=v.parseNumber(e?.springLength,100),n=v.parseNumber(e?.spring,1e-4),r=t.x-this.x,a=t.y-this.y,o=Math.sqrt(r*r+a*a);if(o<s){const h=r*n,c=a*n;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-o/s}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const s=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*s),this.getPointAtLength(e*s)}strokeDashTween(t=1e3,e){const s=this.initPathD(),n=v.maxDotNumber(s.getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const r=e?.onUpdate,a=new Is({frameDuration:t});a.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,h)=>{this.setAttr("strokeDashoffset",""+v.maxDotNumber(o.offset,2)),r?.(o,h)}})),a.play()}}class $e extends H{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,s){this.cX=t,this.cY=e,this.cZ=s}rotateX(t){({x:this.y,y:this.z}=zt(Y(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=zt(Y(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=zt(Y(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return ks(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,s=t.y-this.y,n=t.z-this.z;return Math.sqrt(e*e+s*s+n*n)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y,n=this.z;return{x:s*t.z-n*t.y,y:n*t.x-e*t.z,z:e*t.y-s*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}class Hi{_x;_y;_z;_w;constructor(t=0,e=0,s=0,n=1){this._x=t,this._y=e,this._z=s,this._w=n}static slerpFlat(t,e,s,n,r,a,o){let h=s[n+0],c=s[n+1],l=s[n+2],u=s[n+3];const d=r[a+0],m=r[a+1],g=r[a+2],_=r[a+3];if(o===0){t[e+0]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u;return}if(o===1){t[e+0]=d,t[e+1]=m,t[e+2]=g,t[e+3]=_;return}if(u!==_||h!==d||c!==m||l!==g){let E=1-o;const b=h*d+c*m+l*g+u*_,S=b>=0?1:-1,y=1-b*b;if(y>Number.EPSILON){const P=Math.sqrt(y),M=Math.atan2(P,b*S);E=Math.sin(E*M)/P,o=Math.sin(o*M)/P}const w=o*S;if(h=h*E+d*w,c=c*E+m*w,l=l*E+g*w,u=u*E+_*w,E===1-o){const P=1/Math.sqrt(h*h+c*c+l*l+u*u);h*=P,c*=P,l*=P,u*=P}}t[e]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,s,n,r,a){const o=s[n],h=s[n+1],c=s[n+2],l=s[n+3],u=r[a],d=r[a+1],m=r[a+2],g=r[a+3];return t[e]=o*g+l*u+h*m-c*d,t[e+1]=h*g+l*d+c*u-o*m,t[e+2]=c*g+l*m+o*d-h*u,t[e+3]=l*g-o*u-h*d-c*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,s=this._z,n=this._w){return this._x=t,this._y=e,this._z=s,this._w=n,this._onChangeCallback(),this}clone(){return new Hi(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const s=t.x,n=t.y,r=t.z,a=t.order,o=Math.cos,h=Math.sin,c=o(s/2),l=o(n/2),u=o(r/2),d=h(s/2),m=h(n/2),g=h(r/2);switch(a){case"XYZ":this._x=d*l*u+c*m*g,this._y=c*m*u-d*l*g,this._z=c*l*g+d*m*u,this._w=c*l*u-d*m*g;break;case"YXZ":this._x=d*l*u+c*m*g,this._y=c*m*u-d*l*g,this._z=c*l*g-d*m*u,this._w=c*l*u+d*m*g;break;case"ZXY":this._x=d*l*u-c*m*g,this._y=c*m*u+d*l*g,this._z=c*l*g+d*m*u,this._w=c*l*u-d*m*g;break;case"ZYX":this._x=d*l*u-c*m*g,this._y=c*m*u+d*l*g,this._z=c*l*g-d*m*u,this._w=c*l*u+d*m*g;break;case"YZX":this._x=d*l*u+c*m*g,this._y=c*m*u+d*l*g,this._z=c*l*g-d*m*u,this._w=c*l*u-d*m*g;break;case"XZY":this._x=d*l*u-c*m*g,this._y=c*m*u-d*l*g,this._z=c*l*g+d*m*u,this._w=c*l*u+d*m*g;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const s=e/2,n=Math.sin(s);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,s=e[0],n=e[4],r=e[8],a=e[1],o=e[5],h=e[9],c=e[2],l=e[6],u=e[10],d=s+o+u;if(d>0){const m=.5/Math.sqrt(d+1);this._w=.25/m,this._x=(l-h)*m,this._y=(r-c)*m,this._z=(a-n)*m}else if(s>o&&s>u){const m=2*Math.sqrt(1+s-o-u);this._w=(l-h)/m,this._x=.25*m,this._y=(n+a)/m,this._z=(r+c)/m}else if(o>u){const m=2*Math.sqrt(1+o-s-u);this._w=(r-c)/m,this._x=(n+a)/m,this._y=.25*m,this._z=(h+l)/m}else{const m=2*Math.sqrt(1+u-s-o);this._w=(a-n)/m,this._x=(r+c)/m,this._y=(h+l)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let s=t.dot(e)+1;return s<Number.EPSILON?(s=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=s):(this._x=0,this._y=-t.z,this._z=t.y,this._w=s)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=s),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(v.clamp(this.dot(t),-1,1)))}rotateTowards(t,e){const s=this.angleTo(t);if(s===0)return this;const n=Math.min(1,e/s);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const s=t._x,n=t._y,r=t._z,a=t._w,o=e._x,h=e._y,c=e._z,l=e._w;return this._x=s*l+a*o+n*c-r*h,this._y=n*l+a*h+r*o-s*c,this._z=r*l+a*c+s*h-n*o,this._w=a*l-s*o-n*h-r*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const s=this._x,n=this._y,r=this._z,a=this._w;let o=a*t._w+s*t._x+n*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=s,this._y=n,this._z=r,this;const h=1-o*o;if(h<=Number.EPSILON){const m=1-e;return this._w=m*a+e*this._w,this._x=m*s+e*this._x,this._y=m*n+e*this._y,this._z=m*r+e*this._z,this.normalize(),this}const c=Math.sqrt(h),l=Math.atan2(c,o),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c;return this._w=a*u+this._w*d,this._x=s*u+this._x*d,this._y=n*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,s){return this.copy(t).slerp(e,s)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),s=Math.random(),n=Math.sqrt(1-s),r=Math.sqrt(s);return this.set(n*Math.sin(t),n*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Je{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Je(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,s=this.y;return this.x=t.m11*e+t.m21*s+t.m31,this.y=t.m12*e+t.m22*s+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=v.clamp(this.x,t.x,e.x),this.y=v.clamp(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=v.clamp(this.x,t,e),this.y=v.clamp(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(v.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return ia.copy(this).projectOnVector(t),this.sub(ia)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(v.clamp(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y;return e*e+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const s=Math.cos(e),n=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*s-a*n+t.x,this.y=r*n+a*s+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class vt{x=0;y=0;z=0;constructor(t=0,e=0,s=0){this.x=t,this.y=e,this.z=s}set(t=0,e=0,s=0){return this.x=t,this.y=e,this.z=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new vt(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(na.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(na.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,s=this.y,n=this.z,r=t.value;return this.x=r[0]*e+r[3]*s+r[6]*n,this.y=r[1]*e+r[4]*s+r[7]*n,this.z=r[2]*e+r[5]*s+r[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,s=this.y,n=this.z,r=t.value,a=1/(r[3]*e+r[7]*s+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*s+r[8]*n+r[12])*a,this.y=(r[1]*e+r[5]*s+r[9]*n+r[13])*a,this.z=(r[2]*e+r[6]*s+r[10]*n+r[14])*a,this}applyQuaternion(t){const e=this.x,s=this.y,n=this.z,r=t.x,a=t.y,o=t.z,h=t.w,c=2*(a*n-o*s),l=2*(o*e-r*n),u=2*(r*s-a*e);return this.x=e+h*c+a*u-o*l,this.y=s+h*l+o*c-r*u,this.z=n+h*u+r*l-a*c,this}transformDirection(t){const e=this.x,s=this.y,n=this.z,r=t.value;return this.x=r[0]*e+r[4]*s+r[8]*n,this.y=r[1]*e+r[5]*s+r[9]*n,this.z=r[2]*e+r[6]*s+r[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=v.clamp(this.x,t.x,e.x),this.y=v.clamp(this.y,t.y,e.y),this.z=v.clamp(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=v.clamp(this.x,t,e),this.y=v.clamp(this.y,t,e),this.z=v.clamp(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(v.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const s=t.x,n=t.y,r=t.z,a=e.x,o=e.y,h=e.z;return this.x=n*h-r*o,this.y=r*a-s*h,this.z=s*o-n*a,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return Wi.copy(this).projectOnVector(t),this.sub(Wi)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Wi.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(v.clamp(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y,n=this.z-t.z;return e*e+s*s+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),s=this.setFromMatrix4Column(t,1).length(),n=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=s,this.z=n,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,s=Math.sqrt(1-e*e);return this.x=s*Math.cos(t),this.y=e,this.z=s*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class ji{x=0;y=0;z=0;w=1;constructor(t=0,e=0,s=0,n=1){this.x=t,this.y=e,this.z=s,this.w=n}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,s=0,n=1){return this.x=t,this.y=e,this.z=s,this.w=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new ji(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,s=this.y,n=this.z,r=this.w,a=t.value;return this.x=a[0]*e+a[4]*s+a[8]*n+a[12]*r,this.y=a[1]*e+a[5]*s+a[9]*n+a[13]*r,this.z=a[2]*e+a[6]*s+a[10]*n+a[14]*r,this.w=a[3]*e+a[7]*s+a[11]*n+a[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,s,n,r;const h=t.value,c=h[0],l=h[4],u=h[8],d=h[1],m=h[5],g=h[9],_=h[2],E=h[6],b=h[10];if(Math.abs(l-d)<.01&&Math.abs(u-_)<.01&&Math.abs(g-E)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+_)<.1&&Math.abs(g+E)<.1&&Math.abs(c+m+b-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const y=(c+1)/2,w=(m+1)/2,P=(b+1)/2,M=(l+d)/4,L=(u+_)/4,X=(g+E)/4;return y>w&&y>P?y<.01?(s=0,n=.707106781,r=.707106781):(s=Math.sqrt(y),n=M/s,r=L/s):w>P?w<.01?(s=.707106781,n=0,r=.707106781):(n=Math.sqrt(w),s=M/n,r=X/n):P<.01?(s=.707106781,n=.707106781,r=0):(r=Math.sqrt(P),s=L/r,n=X/r),this.set(s,n,r,e),this}let S=Math.sqrt((E-g)*(E-g)+(u-_)*(u-_)+(d-l)*(d-l));return Math.abs(S)<.001&&(S=1),this.x=(E-g)/S,this.y=(u-_)/S,this.z=(d-l)/S,this.w=Math.acos((c+m+b-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=v.clamp(this.x,t.x,e.x),this.y=v.clamp(this.y,t.y,e.y),this.z=v.clamp(this.z,t.z,e.z),this.w=v.clamp(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=v.clamp(this.x,t,e),this.y=v.clamp(this.y,t,e),this.z=v.clamp(this.z,t,e),this.w=v.clamp(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(v.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this.w=t.w+(e.w-t.w)*s,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const ia=new Je,Wi=new vt,na=new Hi,Ze=2e3,$i=2001,ra=[1,0,0,1],aa=[1,0,0,1,0,0],oa=[1,0,0,0,1,0,0,0,1],ha=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Ji{value;constructor(t=ra){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,s=0,n=1){return this.m11=t,this.m21=e,this.m12=s,this.m22=n,this}identity(){return this.value=Array.from(ra),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Ji(this.value)}fromArray(t,e=0){for(let s=0;s<4;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const s=t.value,n=e.value,r=this.value,a=s[0],o=s[2],h=s[1],c=s[3],l=n[0],u=n[2],d=n[1],m=n[3];return r[0]=a*l+o*d,r[2]=a*u+o*m,r[1]=h*l+c*d,r[3]=h*u+c*m,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class Ae{value;constructor(t=oa){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,s=0,n=0,r=1,a=0,o=0,h=0,c=1){const l=this.value;return l[0]=t,l[1]=n,l[2]=o,l[3]=e,l[4]=r,l[5]=h,l[6]=s,l[7]=a,l[8]=c,this}identity(){return this.value=Array.from(oa),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new Ae(this.value)}fromArray(t,e=0){for(let s=0;s<9;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,s){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const s=t.value,n=e.value,r=this.value,a=s[0],o=s[3],h=s[6],c=s[1],l=s[4],u=s[7],d=s[2],m=s[5],g=s[8],_=n[0],E=n[3],b=n[6],S=n[1],y=n[4],w=n[7],P=n[2],M=n[5],L=n[8];return r[0]=a*_+o*S+h*P,r[3]=a*E+o*y+h*M,r[6]=a*b+o*w+h*L,r[1]=c*_+l*S+u*P,r[4]=c*E+l*y+u*M,r[7]=c*b+l*w+u*L,r[2]=d*_+m*S+g*P,r[5]=d*E+m*y+g*M,r[8]=d*b+m*w+g*L,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],s=t[1],n=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8];return e*a*l-e*o*c-s*r*l+s*o*h+n*r*c-n*a*h}invert(){const t=this.value,e=t[0],s=t[1],n=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8],u=l*a-o*c,d=o*h-l*r,m=c*r-a*h,g=e*u+s*d+n*m;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return t[0]=u*_,t[1]=(n*c-l*s)*_,t[2]=(o*s-n*a)*_,t[3]=d*_,t[4]=(l*e-n*h)*_,t[5]=(n*r-o*e)*_,t[6]=m*_,t[7]=(s*h-c*e)*_,t[8]=(a*e-s*r)*_,this}transpose(){let t;const e=this.value;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}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,s,n,r,a,o){const h=Math.cos(r),c=Math.sin(r);return this.set(s*h,s*c,-s*(h*a+c*o)+a+t,-n*c,n*h,-n*(-c*a+h*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(Zi.makeScale(t,e)),this}rotate(t){return this.premultiply(Zi.makeRotation(-t)),this}translate(t,e){return this.premultiply(Zi.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,s,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class yt{value;is3dSpecial=!1;constructor(t=ha){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,s=0,n=0,r=0,a=1,o=0,h=0,c=0,l=0,u=1,d=0,m=0,g=0,_=0,E=1){const b=this.value;return b[0]=t,b[4]=e,b[8]=s,b[12]=n,b[1]=r,b[5]=a,b[9]=o,b[13]=h,b[2]=c,b[6]=l,b[10]=u,b[14]=d,b[3]=m,b[7]=g,b[11]=_,b[15]=E,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(ha),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new yt(this.value)}static fromString(t){const e=new yt,s=v.regMatchAll("number",t);return s.length===16&&s.forEach((n,r)=>{n.fullMatch&&(e.value[r]=parseFloat(n.fullMatch))}),e}fromArray(t,e=0){for(let s=0;s<16;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.value;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t[e+9]=s[9],t[e+10]=s[10],t[e+11]=s[11],t[e+12]=s[12],t[e+13]=s[13],t[e+14]=s[14],t[e+15]=s[15],t}copyPosition(t){const e=this.value,s=t.value;return e[12]=s[12],e[13]=s[13],e[14]=s[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,s){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),s.setFromMatrix4Column(this,2),this}makeBasis(t,e,s){return this.set(t.x,e.x,s.x,0,t.y,e.y,s.y,0,t.z,e.z,s.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,s=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+s*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+s*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+s*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+s*this.m44}}toMatrix(t){const{scalarX:e,scalarY:s,skewX:n,skewY:r,x:a,y:o}=this.split(),h=[e,r,n,s,a,o];return t?(t.value=h,t):new wt(h)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>v.maxDotNumber(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),s=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),n=lt(v.clamp(Math.asin(-this.m13),-1,1));let r=lt(Math.atan2(this.m23,this.m33));Math.cos(Y(n))===0&&(r=lt(Math.atan2(-this.m31,this.m22)));let a=lt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(a+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:s,degreeX:r,degreeY:n,degreeZ:a,skewX:lt(this.m14),skewY:lt(this.m24),skewZ:lt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,s=t.value,n=1/ke.setFromMatrix4Column(t,0).length(),r=1/ke.setFromMatrix4Column(t,1).length(),a=1/ke.setFromMatrix4Column(t,2).length();return e[0]=s[0]*n,e[1]=s[1]*n,e[2]=s[2]*n,e[3]=0,e[4]=s[4]*r,e[5]=s[5]*r,e[6]=s[6]*r,e[7]=0,e[8]=s[8]*a,e[9]=s[9]*a,e[10]=s[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,s=t.x,n=t.y,r=t.z,a=Math.cos(s),o=Math.sin(s),h=Math.cos(n),c=Math.sin(n),l=Math.cos(r),u=Math.sin(r);if(t.order==="XYZ"){const d=a*l,m=a*u,g=o*l,_=o*u;e[0]=h*l,e[4]=-h*u,e[8]=c,e[1]=m+g*c,e[5]=d-_*c,e[9]=-o*h,e[2]=_-d*c,e[6]=g+m*c,e[10]=a*h}else if(t.order==="YXZ"){const d=h*l,m=h*u,g=c*l,_=c*u;e[0]=d+_*o,e[4]=g*o-m,e[8]=a*c,e[1]=a*u,e[5]=a*l,e[9]=-o,e[2]=m*o-g,e[6]=_+d*o,e[10]=a*h}else if(t.order==="ZXY"){const d=h*l,m=h*u,g=c*l,_=c*u;e[0]=d-_*o,e[4]=-a*u,e[8]=g+m*o,e[1]=m+g*o,e[5]=a*l,e[9]=_-d*o,e[2]=-a*c,e[6]=o,e[10]=a*h}else if(t.order==="ZYX"){const d=a*l,m=a*u,g=o*l,_=o*u;e[0]=h*l,e[4]=g*c-m,e[8]=d*c+_,e[1]=h*u,e[5]=_*c+d,e[9]=m*c-g,e[2]=-c,e[6]=o*h,e[10]=a*h}else if(t.order==="YZX"){const d=a*h,m=a*c,g=o*h,_=o*c;e[0]=h*l,e[4]=_-d*u,e[8]=g*u+m,e[1]=u,e[5]=a*l,e[9]=-o*l,e[2]=-c*l,e[6]=m*u+g,e[10]=d-_*u}else if(t.order==="XZY"){const d=a*h,m=a*c,g=o*h,_=o*c;e[0]=h*l,e[4]=-u,e[8]=c*l,e[1]=d*u+_,e[5]=a*l,e[9]=m*u-g,e[2]=g*u-m,e[6]=o*l,e[10]=_*u+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Dl,t,Rl)}lookAt(t,e,s){const n=this.value;return Tt.subVectors(t,e),Tt.lengthSq()===0&&(Tt.z=1),Tt.normalize(),ae.crossVectors(s,Tt),ae.lengthSq()===0&&(Math.abs(s.z)===1?Tt.x+=1e-4:Tt.z+=1e-4,Tt.normalize(),ae.crossVectors(s,Tt)),ae.normalize(),Ns.crossVectors(Tt,ae),n[0]=ae.x,n[4]=Ns.x,n[8]=Tt.x,n[1]=ae.y,n[5]=Ns.y,n[9]=Tt.y,n[2]=ae.z,n[6]=Ns.z,n[10]=Tt.z,this}multiplyMatrices(t,e){const s=t.value,n=e.value,r=this.value,a=s[0],o=s[4],h=s[8],c=s[12],l=s[1],u=s[5],d=s[9],m=s[13],g=s[2],_=s[6],E=s[10],b=s[14],S=s[3],y=s[7],w=s[11],P=s[15],M=n[0],L=n[4],X=n[8],G=n[12],W=n[1],$=n[5],K=n[9],ot=n[13],st=n[2],Bt=n[6],Et=n[10],It=n[14],Nt=n[3],z=n[7],R=n[11],U=n[15];return r[0]=a*M+o*W+h*st+c*Nt,r[4]=a*L+o*$+h*Bt+c*z,r[8]=a*X+o*K+h*Et+c*R,r[12]=a*G+o*ot+h*It+c*U,r[1]=l*M+u*W+d*st+m*Nt,r[5]=l*L+u*$+d*Bt+m*z,r[9]=l*X+u*K+d*Et+m*R,r[13]=l*G+u*ot+d*It+m*U,r[2]=g*M+_*W+E*st+b*Nt,r[6]=g*L+_*$+E*Bt+b*z,r[10]=g*X+_*K+E*Et+b*R,r[14]=g*G+_*ot+E*It+b*U,r[3]=S*M+y*W+w*st+P*Nt,r[7]=S*L+y*$+w*Bt+P*z,r[11]=S*X+y*K+w*Et+P*R,r[15]=S*G+y*ot+w*It+P*U,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],s=t[4],n=t[8],r=t[12],a=t[1],o=t[5],h=t[9],c=t[13],l=t[2],u=t[6],d=t[10],m=t[14],g=t[3],_=t[7],E=t[11],b=t[15];return g*(+r*h*u-n*c*u-r*o*d+s*c*d+n*o*m-s*h*m)+_*(+e*h*m-e*c*d+r*a*d-n*a*m+n*c*l-r*h*l)+E*(+e*c*u-e*o*m-r*a*u+s*a*m+r*o*l-s*c*l)+b*(-n*o*l-e*h*u+e*o*d+n*a*u-s*a*d+s*h*l)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,s){const n=this.value;return t instanceof vt?(n[12]=t.x,n[13]=t.y,n[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof s=="number"&&(n[12]=t,n[13]=e,n[14]=s),this}invert(){const t=this.value,e=t[0],s=t[1],n=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8],u=t[9],d=t[10],m=t[11],g=t[12],_=t[13],E=t[14],b=t[15],S=u*E*c-_*d*c+_*h*m-o*E*m-u*h*b+o*d*b,y=g*d*c-l*E*c-g*h*m+a*E*m+l*h*b-a*d*b,w=l*_*c-g*u*c+g*o*m-a*_*m-l*o*b+a*u*b,P=g*u*h-l*_*h-g*o*d+a*_*d+l*o*E-a*u*E,M=e*S+s*y+n*w+r*P;if(M===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/M;return t[0]=S*L,t[1]=(_*d*r-u*E*r-_*n*m+s*E*m+u*n*b-s*d*b)*L,t[2]=(o*E*r-_*h*r+_*n*c-s*E*c-o*n*b+s*h*b)*L,t[3]=(u*h*r-o*d*r-u*n*c+s*d*c+o*n*m-s*h*m)*L,t[4]=y*L,t[5]=(l*E*r-g*d*r+g*n*m-e*E*m-l*n*b+e*d*b)*L,t[6]=(g*h*r-a*E*r-g*n*c+e*E*c+a*n*b-e*h*b)*L,t[7]=(a*d*r-l*h*r+l*n*c-e*d*c-a*n*m+e*h*m)*L,t[8]=w*L,t[9]=(g*u*r-l*_*r-g*s*m+e*_*m+l*s*b-e*u*b)*L,t[10]=(a*_*r-g*o*r+g*s*c-e*_*c-a*s*b+e*o*b)*L,t[11]=(l*o*r-a*u*r-l*s*c+e*u*c+a*s*m-e*o*m)*L,t[12]=P*L,t[13]=(l*_*n-g*u*n+g*s*d-e*_*d-l*s*E+e*u*E)*L,t[14]=(g*o*n-a*_*n-g*s*h+e*_*h+a*s*E-e*o*E)*L,t[15]=(a*u*n-l*o*n+l*s*h-e*u*h-a*s*d+e*o*d)*L,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],s=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,s,n))}makeTranslation(t,e,s){return t instanceof vt?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,s,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),s=Math.sin(t);return this.set(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const s=Math.cos(e),n=Math.sin(e),r=1-s,a=t.x,o=t.y,h=t.z,c=r*a,l=r*o;return this.set(c*a+s,c*o-n*h,c*h+n*o,0,c*o+n*h,l*o+s,l*h-n*a,0,c*h-n*o,l*h+n*a,r*h*h+s,0,0,0,0,1),this}makeScale(t,e,s){return this.set(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1),this}makeShear(t,e,s,n,r,a){return this.set(1,s,r,0,t,1,a,0,e,n,1,0,0,0,0,1),this}makePerspective(t,e,s,n,r,a,o=Ze){const h=this.value,c=2*r/(e-t),l=2*r/(s-n),u=(e+t)/(e-t),d=(s+n)/(s-n);let m,g;if(o===Ze)m=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===$i)m=-a/(a-r),g=-a*r/(a-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+o);return h[0]=c,h[4]=0,h[8]=u,h[12]=0,h[1]=0,h[5]=l,h[9]=d,h[13]=0,h[2]=0,h[6]=0,h[10]=m,h[14]=g,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,s,n,r,a,o=Ze){const h=this.value,c=1/(e-t),l=1/(s-n),u=1/(a-r),d=(e+t)*c,m=(s+n)*l;let g,_;if(o===Ze)g=(a+r)*u,_=-2*u;else if(o===$i)g=r*u,_=-1*u;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return h[0]=2*c,h[4]=0,h[8]=0,h[12]=-d,h[1]=0,h[5]=2*l,h[9]=0,h[13]=-m,h[2]=0,h[6]=0,h[10]=_,h[14]=-g,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}compose(t,e,s){const n=this.value,r=e.x,a=e.y,o=e.z,h=e.w,c=r+r,l=a+a,u=o+o,d=r*c,m=r*l,g=r*u,_=a*l,E=a*u,b=o*u,S=h*c,y=h*l,w=h*u,P=s.x,M=s.y,L=s.z;return n[0]=(1-(_+b))*P,n[1]=(m+w)*P,n[2]=(g-y)*P,n[3]=0,n[4]=(m-w)*M,n[5]=(1-(d+b))*M,n[6]=(E+S)*M,n[7]=0,n[8]=(g+y)*L,n[9]=(E-S)*L,n[10]=(1-(d+_))*L,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,s){const n=this.value;let r=ke.set(n[0],n[1],n[2]).length();const a=ke.set(n[4],n[5],n[6]).length(),o=ke.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],Lt.copy(this);const c=1/r,l=1/a,u=1/o;return Lt.value[0]*=c,Lt.value[1]*=c,Lt.value[2]*=c,Lt.value[4]*=l,Lt.value[5]*=l,Lt.value[6]*=l,Lt.value[8]*=u,Lt.value[9]*=u,Lt.value[10]*=u,e.setFromRotationMatrix4(Lt),s.x=r,s.y=a,s.z=o,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,s=0){return this.multiply(new yt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1]))}scale(t=1,e=1,s=1){return this.multiply(new yt([t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1]))}scaleVector3(t){const e=this.value,s=t.x,n=t.y,r=t.z;return e[0]*=s,e[4]*=n,e[8]*=r,e[1]*=s,e[5]*=n,e[9]*=r,e[2]*=s,e[6]*=n,e[10]*=r,e[3]*=s,e[7]*=n,e[11]*=r,this}rotateX(t){const e=Y(t),s=Math.cos(e),n=Math.sin(e);return this.multiply(new yt([1,0,0,0,0,s,n,0,0,-n,s,0,0,0,0,1]))}rotateY(t){const e=Y(t),s=Math.cos(e),n=Math.sin(e);return this.multiply(new yt([s,0,-n,0,0,1,0,0,n,0,s,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=Y(t),s=Math.cos(e),n=Math.sin(e);return this.multiply(new yt([s,n,0,0,-n,s,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,s=0){return this.multiply(new yt([1,0,0,Y(t),0,1,0,Y(e),0,0,1,Y(s),0,0,0,1]))}perspective(t){return this.multiply(new yt([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,s=t.x*this.m12+t.y*this.m22+this.m42,n=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,a=e+this.m31,o=s+this.m32,h=n+this.m33,c=r+this.m34;r==0&&(r=1e-4),e/=r,s/=r,n/=r,c==0&&(c=1e-4),a/=c,o/=c,h/=c;const l=h-n;if(l==0)return{x:e,y:s,z:n,mass:r};const u=-n/l;return e+=u*(a-e),s+=u*(o-s),{x:e,y:s,z:n,mass:r}}project(t){const e=t.z;let s=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,n=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),s/=r,n/=r,r<0&&(s-=this.m41,n-=this.m42,s*=1/r,n*=1/r,s+=this.m41,n+=this.m42),{x:s,y:n,z:e,mass:r}}bounds(t,e,s,n){const r=new $e({x:t,y:e}),a=new $e({x:t+s,y:e}),o=new $e({x:t+s,y:e+n}),h=new $e({x:t,y:e+n});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:h.x,y:h.y,z:h.z,mass:h.mass}=this.project(h);const c=Math.min(r.x,a.x,o.x,h.x),l=Math.min(r.y,a.y,o.y,h.y),u=Math.max(r.x,a.x,o.x,h.x)-c,d=Math.max(r.y,a.y,o.y,h.y)-l;return{x:c,y:l,width:u,height:d}}}class wt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=aa){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new wt,s=v.regMatchAll("number",t);return s.length===6&&s.forEach((n,r)=>{n.fullMatch&&(e.value[r]=parseFloat(n.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new yt(e)}identity(){return this.value=Array.from(aa),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new wt(this.value)}multiply(t){const e=this.clone(),s=t instanceof wt?t:new wt(t);return this.m11=s.m11*e.m11+s.m12*e.m21+s.m13*e.m31,this.m12=s.m11*e.m12+s.m12*e.m22+s.m13*e.m32,this.m13=s.m11*e.m13+s.m12*e.m23+s.m13*e.m33,this.m21=s.m21*e.m11+s.m22*e.m21+s.m23*e.m31,this.m22=s.m21*e.m12+s.m22*e.m22+s.m23*e.m32,this.m23=s.m21*e.m13+s.m22*e.m23+s.m23*e.m33,this.m31=s.m31*e.m11+s.m32*e.m21+s.m33*e.m31,this.m32=s.m31*e.m12+s.m32*e.m22+s.m33*e.m32,this.m33=s.m31*e.m13+s.m32*e.m23+s.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,s=this.m13,n=this.m21,r=this.m22,a=this.m23,o=this.m31,h=this.m32,c=this.m33,l=c*r-a*h,u=-c*n+a*o,d=h*n-r*o;let m=t*l+e*u+s*d;return m?(m=1/m,this.m11=l*m,this.m12=(-c*e+s*h)*m,this.m13=(a*e-s*r)*m,this.m21=u*m,this.m22=(c*t-s*o)*m,this.m23=(-a*t+s*n)*m,this.m31=d*m,this.m32=(-h*t+e*o)*m,this.m33=(r*t-e*n)*m,this):null}adjugate(){const t=new wt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=lt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:lt(Math.atan2(-this.m21,this.m22)),skewY:lt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],s=this.value[1],n=this.value[2],r=this.value[3],a=this.value[4],o=this.value[5],h=t.value[0],c=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],m=t.value[5],g=h*u,_=c*l,E=(l*s-e*u)/(_-g),b=(h*s-e*c)/(g-_),S=(l*r-n*u)/(_-g),y=(h*r-n*c)/(g-_),w=(l*(o-m)+u*(d-a))/(_-g),P=(h*(o-m)+c*(d-a))/(g-_),M=[E,b,S,y,w,P];return new wt(M)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>v.maxDotNumber(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,s){return this.matrix4.translate(t,e,s),this.matrix4.toMatrix(this),this}translate3dTo(t,e,s){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,s-this.matrix4.m43),this}rotate(t,e=0,s=0){const n=Y(t),r=Math.cos(n),a=Math.sin(n);return this.translate(e,s),this.multiply([r,a,-a,r,0,0]),this.translate(-e,-s),this.toMatrix4(),this}rotateTo(t,e=0,s=0){const{degree:n}=this.split();return this.rotate(t-n,e,s),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,s){return this.matrix4.rotateX(t).rotateY(e).rotateZ(s),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,s){const{degreeX:n,degreeY:r,degreeZ:a}=this.matrix4.split();return this.rotate3d(t-n,e-r,s-a),this}scale(t,e=t,s=0,n=0){return this.translate(s,n),this.multiply([t,0,0,e,0,0]),this.translate(-s,-n),this.toMatrix4(),this}scaleTo(t,e=t,s=0,n=0){return this.scale(t/this.m11,e/this.m22,s,n)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,s=t){return this.matrix4.scale(t,e,s),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,s=t){const{scalarX:n,scalarY:r,scalarZ:a}=this.matrix4.split();return this.scale3d(t/n,e/r,s/a),this}skew(t,e=t){return this.multiply([Math.cos(Y(e)),Math.sin(Y(e)),-Math.sin(Y(t)),Math.cos(Y(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:s,skewY:n}=this.split();return this.skew(t-s,e-n)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,s){return this}skew3dTo(t,e,s){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const Dl=new vt(0,0,0),Rl=new vt(1,1,1),ae=new vt,Ns=new vt,Tt=new vt,ke=new vt,Zi=new Ae,Lt=new yt;function Ki(i){const t=new wt;return i.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,s,n){n.indexOf(",")>=0?n=n.split(/\s*,\s*/):n=n.split(/\s+/);const r=[];for(let a=0,o=n.length;a<o;a++)n[a].trim()&&r.push(parseFloat(""+n[a]));switch(s.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new yt(r)),t.matrix4.toMatrix(t);break}return""}),t}function zt(i,t,e){const s=new wt;return s.rotate(lt(i)),s.transformPoint({x:t,y:e})}function Qi(i){const t=typeof i?.x=="number"?i?.x:0,e=typeof i?.y=="number"?i?.y:0,s=typeof i?.degree=="number"?i?.degree:0,n=typeof i?.scalarX=="number"?i?.scalarX:1,r=typeof i?.scalarY=="number"?i?.scalarY:1,a=Y(s),o=Math.cos(a),h=Math.sin(a),c=new DOMMatrix([o*n,h*n,-h*r,o*r,t,e]);return c.multiplySelf(new DOMMatrix(i?.originMatrix||"")),c}function Ll(i,t){const e=new Path2D(i),s=new Path2D;return s.addPath(e,Qi(t)),s}function we(i,t,e){const s=Ui(i);return s.props.style=s.props.style||{},t?s.props.style[t]||s.props.style[v.toCamel(t)]||s.props.style[v.toKebab(t)]||"":s.props.style}function tn(i,t,e){Xi(i,s=>{s.props.style=s.props.style||{},typeof t=="string"&&e?s.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(n=>{s.props.style[n]=t[n]})},!0)}function en(i){const t={};if(getComputedStyle){const e=getComputedStyle(i);for(let s=0,n=e.length;s<n;s++)t[e[s]]=e.getPropertyValue(t[s])}else{const e=i.currentStyle;for(const s in e)t[s]=e[s]}return i.style.cssText&&i.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[s,n]=e.split(":");s&&n&&(t[s.trim()]=n.trim())}),t}function zl(i,t,e){let s=i.style[t]||"";if(!s&&getComputedStyle){t=v.toKebab(t);const n=getComputedStyle(i,e),r=n.getPropertyPriority(t);s=n.getPropertyValue(t).trim()+(r?"!"+r:"")}return s||(s=i.currentStyle[t]||""),s}function Fs(i,t,e){typeof t=="string"&&e?i.style.setProperty(v.toKebab(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(s=>{Fs(i,s,t[s])})}function sn(i,t){typeof t=="string"?i.style.removeProperty(v.toKebab(t)):Object.keys(t).forEach(e=>{sn(i,e)})}function ca(i,t){let e;if(typeof t=="string"){const s=document.querySelector(t)?.shadowRoot;s?e=s:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const s=document.createElement("style");return s.innerHTML=i,e.appendChild(s),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(s)}}else{const s=document.styleSheets[0].insertRule(i);return()=>{document.styleSheets[0].deleteRule(s)}}}function Ol(i,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:we(i,"transform")||""});const s=Ki(e.transform),n={};for(const r in t){const a=t[r];switch(r){case"transform":break;case"translate":s.translate(a[0]||0,a[1]||0);break;case"translateTo":s.translateTo(a[0]||0,a[1]||0);break;case"translateX":s.translateX(a||0);break;case"translateXTo":s.translateXTo(a||0);break;case"translateY":s.translateY(a||0);break;case"translateYTo":s.translateYTo(a||0);break;case"translateZ":s.translateZ(a||0);break;case"translateZTo":s.translateZTo(a||0);break;case"translate3d":s.translate3d(a[0]||0,a[1]||0,a[2]||0);break;case"translate3dTo":s.translate3dTo(a[0]||0,a[1]||0,a[2]||0);break;case"rotate":typeof a=="number"?s.rotate(a||0):s.rotate(a[0]||0,a[1]||0,a[2]||0);break;case"rotateTo":typeof a=="number"?s.rotateTo(a||0):s.rotateTo(a[0]||0,a[1]||0,a[2]||0);break;case"rotateX":s.rotateX(a||0);break;case"rotateXTo":s.rotateXTo(a||0);break;case"rotateY":s.rotateY(a||0);break;case"rotateYTo":s.rotateYTo(a||0);break;case"rotateZ":s.rotateZ(a||0);break;case"rotateZTo":s.rotateZTo(a||0);break;case"rotate3d":s.rotate3d(a[0]||0,a[1]||0,a[2]||0);break;case"rotate3dTo":s.rotate3dTo(a[0]||0,a[1]||0,a[2]||0);break;case"scale":typeof a=="number"?s.scale(a||1):s.scale(a[0]||1,a[1]||1,a[2]||0,a[3]||0);break;case"scaleTo":typeof a=="number"?s.scaleTo(a||1):s.scaleTo(a[0]||1,a[1]||1,a[2]||0,a[3]||0);break;case"scaleX":s.scaleX(a||1);break;case"scaleXTo":s.scaleXTo(a||1);break;case"scaleY":s.scaleY(a||1);break;case"scaleYTo":s.scaleYTo(a||1);break;case"scaleZ":s.scaleZ(a||1);break;case"scaleZTo":s.scaleZTo(a||1);break;case"scale3d":typeof a=="number"?s.scale3d(a||1):s.scale3d(a[0]||1,a[1]||1,a[2]||1);break;case"scale3dTo":typeof a=="number"?s.scale3dTo(a||1):s.scale3dTo(a[0]||1,a[1]||1,a[2]||1);break;case"skew":typeof a=="number"?s.skew(a||0):s.skew(a[0]||0,a[1]||0);break;case"skewTo":typeof a=="number"?s.skewTo(a||0):s.skewTo(a[0]||0,a[1]||0);break;case"skewX":s.skewX(a||0);break;case"skewXTo":s.skewXTo(a||0);break;case"skewY":s.skewY(a||0);break;case"skewYTo":s.skewYTo(a||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":s.perspective(a||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=we(i,r)),Object.assign(n,{[r]:`${a}`});break}}return Object.assign(n,{transform:s.toString()}),n}function oe(i,t,e){if(t===void 0&&e===void 0)return nn(i);if(typeof t=="string"&&e===void 0)return la(i,t);let s={};typeof t=="object"?s=t:typeof t=="string"&&typeof e=="string"&&(s[t]=""+e),Xi(i,n=>{Object.entries(s).forEach(([r,a])=>{n.props[r]=""+a})})}const Bl=["-o-","-ms-","-moz-","-webkit-",""];function nn(i){const t={};for(let e=0,s=i.attributes,n=s.length;e<n;e++){const r=s[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=en(i):t[r.nodeName]=r.nodeValue)}return t}function la(i,t){return t==="style"?en(i):i.getAttribute(v.toKebab(t))}function De(i,t,e){return i.setAttribute(v.toKebab(t),""+e)}function Nl(i,t){t.split(/[,\s]+/i).forEach(e=>{const s=v.toKebab(e.trim());s!=""&&i.removeAttribute(s)})}function Fl(i,t){De(i,"draggable","true");const e=[];return e.push(N(i,"dragstart",s=>{ie(s),Lr(s);const n=s.dataTransfer;n&&(n.effectAllowed="move",n.setData("text/plain","some-data")),t?.onStart?.(s)},!0)),e.push(N(i,"drag",s=>{ie(s),t?.onDrag?.(s)})),e.push(N(i,"dragend",s=>{ie(s),t?.onEnd?.(s)})),()=>{e.forEach(s=>s())}}function Yl(i,t){const e=[];return e.push(N(i,"dragenter",s=>{ie(s),t?.onEnter?.(s)})),e.push(N(i,"dragover",s=>{ie(s);const n=s.dataTransfer;n&&(n.dropEffect="move"),t?.onOver?.(s)})),e.push(N(i,"dragleave",s=>{ie(s),t?.onLeave?.(s)})),e.push(N(i,"drop",s=>{ie(s);const n=s.dataTransfer;if(!n){t?.onDrop?.(s,[]);return}t?.onDrop?.(s,[...n.files])})),()=>{e.forEach(s=>s())}}function Ul(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Ke(){const i=document.documentElement;return{clientWidth:i.clientWidth,clientHeight:i.clientHeight,clientTop:i.clientTop,clientLeft:i.clientLeft,scrollWidth:i.scrollWidth,scrollHeight:i.scrollHeight,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft,offsetWidth:i.offsetWidth,offsetHeight:i.offsetHeight,offsetTop:i.offsetTop,offsetLeft:i.offsetLeft,offsetParent:i.offsetParent}}function Xl(){const i=document.body;return{clientWidth:i.clientWidth,clientHeight:i.clientHeight,clientTop:i.clientTop,clientLeft:i.clientLeft,scrollWidth:i.scrollWidth,scrollHeight:i.scrollHeight,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft,offsetWidth:i.offsetWidth,offsetHeight:i.offsetHeight,offsetTop:i.offsetTop,offsetLeft:i.offsetLeft,offsetParent:i.offsetParent}}function ua(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function Vl(){const{scrollWidth:i,scrollHeight:t}=Ke();return{width:i,height:t}}function rn(i){const{top:t,left:e,width:s,height:n}=i.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=Ke();return{x:e+r,y:t+a,width:s,height:n}}function Gl(i){let t=i,e=0,s=0;for(;t!==null;)e+=t.offsetLeft,s+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:s,width:i.offsetWidth,height:i.offsetHeight}}function fa(i){return i.getBoundingClientRect()}function ql(i){const t=i.getBoundingClientRect();return{x:i.offsetLeft,y:i.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Hl(){const{clientHeight:i,scrollTop:t,scrollHeight:e}=Ke(),s=e-i;return s<=0?0:t/s*100}function da(){const i={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,s){i.x=e.x,i.y=e.y,typeof s=="boolean"&&(i.isDown=s),this.setCurrentMousePoint(e,s)},setCurrentMousePoint:(e,s)=>{const n=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-n,t.dy=t.y-r,t.dStartX=t.x-i.x,t.dStartY=t.y-i.y,typeof s=="boolean"&&(t.isDown=s)}}}function jl(i){if("center"in i){const t=i.center,e=fa(i.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:i.clientX,y:i.clientY}}function an(i){if("center"in i)return i.center;if(typeof i.pageX=="number"&&typeof i.pageY=="number")return{x:i.pageX,y:i.pageY};const{scrollLeft:t,scrollTop:e}=Ke();return{x:i.clientX+t,y:i.clientY+e}}function Re(i,t){const e={x:0,y:0};if(t){const s=an(i),n=rn(t);e.x=v.clamp(s.x-n.x,0,n.width),e.y=v.clamp(s.y-n.y,0,n.height)}else{let s=0,n=0;if("currentTarget"in i&&i.currentTarget&&i.target&&i.currentTarget!=i.target){const r=i.currentTarget.getBoundingClientRect(),a=i.target.getBoundingClientRect();s=a.left-r.left,n=a.top-r.top}if("offsetX"in i)e.x=i.offsetX+s,e.y=i.offsetY+n;else{const r=an(i),a=rn(i.target);e.x=v.clamp(r.x-a.x+s,0,a.width),e.y=v.clamp(r.y-a.y+n,0,a.height)}}return e}var ma={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
1
|
+
var ZYZGroupCoreWeb=function(m,E){"use strict";function qr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var jr={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var s=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(w,S){var x=w[0],b=w[1],M=w[2],P=w[3];x+=(b&M|~b&P)+S[0]-680876936|0,x=(x<<7|x>>>25)+b|0,P+=(x&b|~x&M)+S[1]-389564586|0,P=(P<<12|P>>>20)+x|0,M+=(P&x|~P&b)+S[2]+606105819|0,M=(M<<17|M>>>15)+P|0,b+=(M&P|~M&x)+S[3]-1044525330|0,b=(b<<22|b>>>10)+M|0,x+=(b&M|~b&P)+S[4]-176418897|0,x=(x<<7|x>>>25)+b|0,P+=(x&b|~x&M)+S[5]+1200080426|0,P=(P<<12|P>>>20)+x|0,M+=(P&x|~P&b)+S[6]-1473231341|0,M=(M<<17|M>>>15)+P|0,b+=(M&P|~M&x)+S[7]-45705983|0,b=(b<<22|b>>>10)+M|0,x+=(b&M|~b&P)+S[8]+1770035416|0,x=(x<<7|x>>>25)+b|0,P+=(x&b|~x&M)+S[9]-1958414417|0,P=(P<<12|P>>>20)+x|0,M+=(P&x|~P&b)+S[10]-42063|0,M=(M<<17|M>>>15)+P|0,b+=(M&P|~M&x)+S[11]-1990404162|0,b=(b<<22|b>>>10)+M|0,x+=(b&M|~b&P)+S[12]+1804603682|0,x=(x<<7|x>>>25)+b|0,P+=(x&b|~x&M)+S[13]-40341101|0,P=(P<<12|P>>>20)+x|0,M+=(P&x|~P&b)+S[14]-1502002290|0,M=(M<<17|M>>>15)+P|0,b+=(M&P|~M&x)+S[15]+1236535329|0,b=(b<<22|b>>>10)+M|0,x+=(b&P|M&~P)+S[1]-165796510|0,x=(x<<5|x>>>27)+b|0,P+=(x&M|b&~M)+S[6]-1069501632|0,P=(P<<9|P>>>23)+x|0,M+=(P&b|x&~b)+S[11]+643717713|0,M=(M<<14|M>>>18)+P|0,b+=(M&x|P&~x)+S[0]-373897302|0,b=(b<<20|b>>>12)+M|0,x+=(b&P|M&~P)+S[5]-701558691|0,x=(x<<5|x>>>27)+b|0,P+=(x&M|b&~M)+S[10]+38016083|0,P=(P<<9|P>>>23)+x|0,M+=(P&b|x&~b)+S[15]-660478335|0,M=(M<<14|M>>>18)+P|0,b+=(M&x|P&~x)+S[4]-405537848|0,b=(b<<20|b>>>12)+M|0,x+=(b&P|M&~P)+S[9]+568446438|0,x=(x<<5|x>>>27)+b|0,P+=(x&M|b&~M)+S[14]-1019803690|0,P=(P<<9|P>>>23)+x|0,M+=(P&b|x&~b)+S[3]-187363961|0,M=(M<<14|M>>>18)+P|0,b+=(M&x|P&~x)+S[8]+1163531501|0,b=(b<<20|b>>>12)+M|0,x+=(b&P|M&~P)+S[13]-1444681467|0,x=(x<<5|x>>>27)+b|0,P+=(x&M|b&~M)+S[2]-51403784|0,P=(P<<9|P>>>23)+x|0,M+=(P&b|x&~b)+S[7]+1735328473|0,M=(M<<14|M>>>18)+P|0,b+=(M&x|P&~x)+S[12]-1926607734|0,b=(b<<20|b>>>12)+M|0,x+=(b^M^P)+S[5]-378558|0,x=(x<<4|x>>>28)+b|0,P+=(x^b^M)+S[8]-2022574463|0,P=(P<<11|P>>>21)+x|0,M+=(P^x^b)+S[11]+1839030562|0,M=(M<<16|M>>>16)+P|0,b+=(M^P^x)+S[14]-35309556|0,b=(b<<23|b>>>9)+M|0,x+=(b^M^P)+S[1]-1530992060|0,x=(x<<4|x>>>28)+b|0,P+=(x^b^M)+S[4]+1272893353|0,P=(P<<11|P>>>21)+x|0,M+=(P^x^b)+S[7]-155497632|0,M=(M<<16|M>>>16)+P|0,b+=(M^P^x)+S[10]-1094730640|0,b=(b<<23|b>>>9)+M|0,x+=(b^M^P)+S[13]+681279174|0,x=(x<<4|x>>>28)+b|0,P+=(x^b^M)+S[0]-358537222|0,P=(P<<11|P>>>21)+x|0,M+=(P^x^b)+S[3]-722521979|0,M=(M<<16|M>>>16)+P|0,b+=(M^P^x)+S[6]+76029189|0,b=(b<<23|b>>>9)+M|0,x+=(b^M^P)+S[9]-640364487|0,x=(x<<4|x>>>28)+b|0,P+=(x^b^M)+S[12]-421815835|0,P=(P<<11|P>>>21)+x|0,M+=(P^x^b)+S[15]+530742520|0,M=(M<<16|M>>>16)+P|0,b+=(M^P^x)+S[2]-995338651|0,b=(b<<23|b>>>9)+M|0,x+=(M^(b|~P))+S[0]-198630844|0,x=(x<<6|x>>>26)+b|0,P+=(b^(x|~M))+S[7]+1126891415|0,P=(P<<10|P>>>22)+x|0,M+=(x^(P|~b))+S[14]-1416354905|0,M=(M<<15|M>>>17)+P|0,b+=(P^(M|~x))+S[5]-57434055|0,b=(b<<21|b>>>11)+M|0,x+=(M^(b|~P))+S[12]+1700485571|0,x=(x<<6|x>>>26)+b|0,P+=(b^(x|~M))+S[3]-1894986606|0,P=(P<<10|P>>>22)+x|0,M+=(x^(P|~b))+S[10]-1051523|0,M=(M<<15|M>>>17)+P|0,b+=(P^(M|~x))+S[1]-2054922799|0,b=(b<<21|b>>>11)+M|0,x+=(M^(b|~P))+S[8]+1873313359|0,x=(x<<6|x>>>26)+b|0,P+=(b^(x|~M))+S[15]-30611744|0,P=(P<<10|P>>>22)+x|0,M+=(x^(P|~b))+S[6]-1560198380|0,M=(M<<15|M>>>17)+P|0,b+=(P^(M|~x))+S[13]+1309151649|0,b=(b<<21|b>>>11)+M|0,x+=(M^(b|~P))+S[4]-145523070|0,x=(x<<6|x>>>26)+b|0,P+=(b^(x|~M))+S[11]-1120210379|0,P=(P<<10|P>>>22)+x|0,M+=(x^(P|~b))+S[2]+718787259|0,M=(M<<15|M>>>17)+P|0,b+=(P^(M|~x))+S[9]-343485551|0,b=(b<<21|b>>>11)+M|0,w[0]=x+w[0]|0,w[1]=b+w[1]|0,w[2]=M+w[2]|0,w[3]=P+w[3]|0}function r(w){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=w.charCodeAt(x)+(w.charCodeAt(x+1)<<8)+(w.charCodeAt(x+2)<<16)+(w.charCodeAt(x+3)<<24);return S}function a(w){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=w[x]+(w[x+1]<<8)+(w[x+2]<<16)+(w[x+3]<<24);return S}function o(w){var S=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,M,P,R,B,F;for(b=64;b<=S;b+=64)i(x,r(w.substring(b-64,b)));for(w=w.substring(b-64),M=w.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<M;b+=1)P[b>>2]|=w.charCodeAt(b)<<(b%4<<3);if(P[b>>2]|=128<<(b%4<<3),b>55)for(i(x,P),b=0;b<16;b+=1)P[b]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(R[2],16),F=parseInt(R[1],16)||0,P[14]=B,P[15]=F,i(x,P),x}function h(w){var S=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,M,P,R,B,F;for(b=64;b<=S;b+=64)i(x,a(w.subarray(b-64,b)));for(w=b-64<S?w.subarray(b-64):new Uint8Array(0),M=w.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<M;b+=1)P[b>>2]|=w[b]<<(b%4<<3);if(P[b>>2]|=128<<(b%4<<3),b>55)for(i(x,P),b=0;b<16;b+=1)P[b]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(R[2],16),F=parseInt(R[1],16)||0,P[14]=B,P[15]=F,i(x,P),x}function c(w){var S="",x;for(x=0;x<4;x+=1)S+=s[w>>x*8+4&15]+s[w>>x*8&15];return S}function l(w){var S;for(S=0;S<w.length;S+=1)w[S]=c(w[S]);return w.join("")}l(o("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function w(S,x){return S=S|0||0,S<0?Math.max(S+x,0):Math.min(S,x)}ArrayBuffer.prototype.slice=function(S,x){var b=this.byteLength,M=w(S,b),P=b,R,B,F,V;return x!==e&&(P=w(x,b)),M>P?new ArrayBuffer(0):(R=P-M,B=new ArrayBuffer(R),F=new Uint8Array(B),V=new Uint8Array(this,M,R),F.set(V),B)}}();function u(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function d(w,S){var x=w.length,b=new ArrayBuffer(x),M=new Uint8Array(b),P;for(P=0;P<x;P+=1)M[P]=w.charCodeAt(P);return S?M:b}function f(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function p(w,S,x){var b=new Uint8Array(w.byteLength+S.byteLength);return b.set(new Uint8Array(w)),b.set(new Uint8Array(S),w.byteLength),x?b:b.buffer}function y(w){var S=[],x=w.length,b;for(b=0;b<x-1;b+=2)S.push(parseInt(w.substr(b,2),16));return String.fromCharCode.apply(String,S)}function v(){this.reset()}return v.prototype.append=function(w){return this.appendBinary(u(w)),this},v.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var S=this._buff.length,x;for(x=64;x<=S;x+=64)i(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(w){var S=this._buff,x=S.length,b,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P;for(b=0;b<x;b+=1)M[b>>2]|=S.charCodeAt(b)<<(b%4<<3);return this._finish(M,x),P=l(this._hash),w&&(P=y(P)),this.reset(),P},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(w,S){var x=S,b,M,P;if(w[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,w),x=0;x<16;x+=1)w[x]=0;b=this._length*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),M=parseInt(b[2],16),P=parseInt(b[1],16)||0,w[14]=M,w[15]=P,i(this._hash,w)},v.hash=function(w,S){return v.hashBinary(u(w),S)},v.hashBinary=function(w,S){var x=o(w),b=l(x);return S?y(b):b},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(w){var S=p(this._buff.buffer,w,!0),x=S.length,b;for(this._length+=w.byteLength,b=64;b<=x;b+=64)i(this._hash,a(S.subarray(b-64,b)));return this._buff=b-64<x?new Uint8Array(S.buffer.slice(b-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(w){var S=this._buff,x=S.length,b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M,P;for(M=0;M<x;M+=1)b[M>>2]|=S[M]<<(M%4<<3);return this._finish(b,x),P=l(this._hash),w&&(P=y(P)),this.reset(),P},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var w=v.prototype.getState.call(this);return w.buff=f(w.buff),w},v.ArrayBuffer.prototype.setState=function(w){return w.buff=d(w.buff,!0),v.prototype.setState.call(this,w)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(w,S){var x=h(new Uint8Array(w)),b=l(x);return S?y(b):b},v})})(jr);var Yc=jr.exports;const Xc=qr(Yc);function Hr(n,t){return function(){return n.apply(t,arguments)}}const{toString:Uc}=Object.prototype,{getPrototypeOf:Fn}=Object,Rs=(n=>t=>{const e=Uc.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=n=>(n=n.toLowerCase(),t=>Rs(t)===n),Os=n=>t=>typeof t===n,{isArray:Ve}=Array,ss=Os("undefined");function Vc(n){return n!==null&&!ss(n)&&n.constructor!==null&&!ss(n.constructor)&&Pt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Wr=Nt("ArrayBuffer");function $c(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Wr(n.buffer),t}const Gc=Os("string"),Pt=Os("function"),Jr=Os("number"),zs=n=>n!==null&&typeof n=="object",qc=n=>n===!0||n===!1,Ns=n=>{if(Rs(n)!=="object")return!1;const t=Fn(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},jc=Nt("Date"),Hc=Nt("File"),Wc=Nt("Blob"),Jc=Nt("FileList"),Zc=n=>zs(n)&&Pt(n.pipe),Kc=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Pt(n.append)&&((t=Rs(n))==="formdata"||t==="object"&&Pt(n.toString)&&n.toString()==="[object FormData]"))},Qc=Nt("URLSearchParams"),[tl,el,sl,nl]=["ReadableStream","Request","Response","Headers"].map(Nt),il=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ns(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),Ve(n))for(s=0,i=n.length;s<i;s++)t.call(null,n[s],s,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,n[o],o,n)}}function Zr(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,i;for(;s-- >0;)if(i=e[s],t===i.toLowerCase())return i;return null}const Se=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Kr=n=>!ss(n)&&n!==Se;function Yn(){const{caseless:n}=Kr(this)&&this||{},t={},e=(s,i)=>{const r=n&&Zr(t,i)||i;Ns(t[r])&&Ns(s)?t[r]=Yn(t[r],s):Ns(s)?t[r]=Yn({},s):Ve(s)?t[r]=s.slice():t[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&ns(arguments[s],e);return t}const rl=(n,t,e,{allOwnKeys:s}={})=>(ns(t,(i,r)=>{e&&Pt(i)?n[r]=Hr(i,e):n[r]=i},{allOwnKeys:s}),n),al=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),ol=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},hl=(n,t,e,s)=>{let i,r,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),r=i.length;r-- >0;)a=i[r],(!s||s(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&Fn(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},cl=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},ll=n=>{if(!n)return null;if(Ve(n))return n;let t=n.length;if(!Jr(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},ul=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Fn(Uint8Array)),fl=(n,t)=>{const s=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=s.next())&&!i.done;){const r=i.value;t.call(n,r[0],r[1])}},dl=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},ml=Nt("HTMLFormElement"),pl=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,i){return s.toUpperCase()+i}),Qr=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),gl=Nt("RegExp"),ta=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};ns(e,(i,r)=>{let a;(a=t(i,r,n))!==!1&&(s[r]=a||i)}),Object.defineProperties(n,s)},yl=n=>{ta(n,(t,e)=>{if(Pt(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(Pt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},wl=(n,t)=>{const e={},s=i=>{i.forEach(r=>{e[r]=!0})};return Ve(n)?s(n):s(String(n).split(t)),e},xl=()=>{},bl=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function vl(n){return!!(n&&Pt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const _l=n=>{const t=new Array(10),e=(s,i)=>{if(zs(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const r=Ve(s)?[]:{};return ns(s,(a,o)=>{const h=e(a,i+1);!ss(h)&&(r[o]=h)}),t[i]=void 0,r}}return s};return e(n,0)},Sl=Nt("AsyncFunction"),El=n=>n&&(zs(n)||Pt(n))&&Pt(n.then)&&Pt(n.catch),ea=((n,t)=>n?setImmediate:t?((e,s)=>(Se.addEventListener("message",({source:i,data:r})=>{i===Se&&r===e&&s.length&&s.shift()()},!1),i=>{s.push(i),Se.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Pt(Se.postMessage)),Tl=typeof queueMicrotask<"u"?queueMicrotask.bind(Se):typeof process<"u"&&process.nextTick||ea,I={isArray:Ve,isArrayBuffer:Wr,isBuffer:Vc,isFormData:Kc,isArrayBufferView:$c,isString:Gc,isNumber:Jr,isBoolean:qc,isObject:zs,isPlainObject:Ns,isReadableStream:tl,isRequest:el,isResponse:sl,isHeaders:nl,isUndefined:ss,isDate:jc,isFile:Hc,isBlob:Wc,isRegExp:gl,isFunction:Pt,isStream:Zc,isURLSearchParams:Qc,isTypedArray:ul,isFileList:Jc,forEach:ns,merge:Yn,extend:rl,trim:il,stripBOM:al,inherits:ol,toFlatObject:hl,kindOf:Rs,kindOfTest:Nt,endsWith:cl,toArray:ll,forEachEntry:fl,matchAll:dl,isHTMLForm:ml,hasOwnProperty:Qr,hasOwnProp:Qr,reduceDescriptors:ta,freezeMethods:yl,toObjectSet:wl,toCamelCase:pl,noop:xl,toFiniteNumber:bl,findKey:Zr,global:Se,isContextDefined:Kr,isSpecCompliantForm:vl,toJSONObject:_l,isAsyncFn:Sl,isThenable:El,setImmediate:ea,asap:Tl};function Y(n,t,e,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}I.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}});const sa=Y.prototype,na={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{na[n]={value:n}}),Object.defineProperties(Y,na),Object.defineProperty(sa,"isAxiosError",{value:!0}),Y.from=(n,t,e,s,i,r)=>{const a=Object.create(sa);return I.toFlatObject(n,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),Y.call(a,n.message,t,e,s,i),a.cause=n,a.name=n.name,r&&Object.assign(a,r),a};const Pl=null;function Xn(n){return I.isPlainObject(n)||I.isArray(n)}function ia(n){return I.endsWith(n,"[]")?n.slice(0,-2):n}function ra(n,t,e){return n?n.concat(t).map(function(i,r){return i=ia(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function Ml(n){return I.isArray(n)&&!n.some(Xn)}const Cl=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function Bs(n,t,e){if(!I.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=I.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!I.isUndefined(v[y])});const s=e.metaTokens,i=e.visitor||l,r=e.dots,a=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(I.isDate(p))return p.toISOString();if(!h&&I.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(p)||I.isTypedArray(p)?h&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,v){let w=p;if(p&&!v&&typeof p=="object"){if(I.endsWith(y,"{}"))y=s?y:y.slice(0,-2),p=JSON.stringify(p);else if(I.isArray(p)&&Ml(p)||(I.isFileList(p)||I.endsWith(y,"[]"))&&(w=I.toArray(p)))return y=ia(y),w.forEach(function(x,b){!(I.isUndefined(x)||x===null)&&t.append(a===!0?ra([y],b,r):a===null?y:y+"[]",c(x))}),!1}return Xn(p)?!0:(t.append(ra(v,y,r),c(p)),!1)}const u=[],d=Object.assign(Cl,{defaultVisitor:l,convertValue:c,isVisitable:Xn});function f(p,y){if(!I.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));u.push(p),I.forEach(p,function(w,S){(!(I.isUndefined(w)||w===null)&&i.call(t,w,I.isString(S)?S.trim():S,y,d))===!0&&f(w,y?y.concat(S):[S])}),u.pop()}}if(!I.isObject(n))throw new TypeError("data must be an object");return f(n),t}function aa(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Un(n,t){this._pairs=[],n&&Bs(n,this,t)}const oa=Un.prototype;oa.append=function(t,e){this._pairs.push([t,e])},oa.toString=function(t){const e=t?function(s){return t.call(this,s,aa)}:aa;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function Al(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ha(n,t,e){if(!t)return n;const s=e&&e.encode||Al;I.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=I.isURLSearchParams(t)?t.toString():new Un(t,e).toString(s),r){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class Il{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(s){s!==null&&t(s)})}}const ca=Il,la={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kl={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Un,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vn=typeof window<"u"&&typeof document<"u",$n=typeof navigator=="object"&&navigator||void 0,Dl=Vn&&(!$n||["ReactNative","NativeScript","NS"].indexOf($n.product)<0),Ll=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Rl=Vn&&window.location.href||"http://localhost",pt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vn,hasStandardBrowserEnv:Dl,hasStandardBrowserWebWorkerEnv:Ll,navigator:$n,origin:Rl},Symbol.toStringTag,{value:"Module"})),...kl};function Ol(n,t){return Bs(n,new pt.classes.URLSearchParams,Object.assign({visitor:function(e,s,i,r){return pt.isNode&&I.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function zl(n){return I.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Nl(n){const t={},e=Object.keys(n);let s;const i=e.length;let r;for(s=0;s<i;s++)r=e[s],t[r]=n[r];return t}function ua(n){function t(e,s,i,r){let a=e[r++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),h=r>=e.length;return a=!a&&I.isArray(i)?i.length:a,h?(I.hasOwnProp(i,a)?i[a]=[i[a],s]:i[a]=s,!o):((!i[a]||!I.isObject(i[a]))&&(i[a]=[]),t(e,s,i[a],r)&&I.isArray(i[a])&&(i[a]=Nl(i[a])),!o)}if(I.isFormData(n)&&I.isFunction(n.entries)){const e={};return I.forEachEntry(n,(s,i)=>{t(zl(s),i,e,0)}),e}return null}function Bl(n,t,e){if(I.isString(n))try{return(t||JSON.parse)(n),I.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(e||JSON.stringify)(n)}const Gn={transitional:la,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",i=s.indexOf("application/json")>-1,r=I.isObject(t);if(r&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return i?JSON.stringify(ua(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ol(t,this.formSerializer).toString();if((o=I.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Bs(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Bl(t)):t}],transformResponse:[function(t){const e=this.transitional||Gn.transitional,s=e&&e.forcedJSONParsing,i=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(s&&!this.responseType||i)){const a=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?Y.from(o,Y.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],n=>{Gn.headers[n]={}});const qn=Gn,Fl=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yl=n=>{const t={};let e,s,i;return n&&n.split(`
|
|
2
|
+
`).forEach(function(a){i=a.indexOf(":"),e=a.substring(0,i).trim().toLowerCase(),s=a.substring(i+1).trim(),!(!e||t[e]&&Fl[e])&&(e==="set-cookie"?t[e]?t[e].push(s):t[e]=[s]:t[e]=t[e]?t[e]+", "+s:s)}),t},fa=Symbol("internals");function is(n){return n&&String(n).trim().toLowerCase()}function Fs(n){return n===!1||n==null?n:I.isArray(n)?n.map(Fs):String(n)}function Xl(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=e.exec(n);)t[s[1]]=s[2];return t}const Ul=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function jn(n,t,e,s,i){if(I.isFunction(s))return s.call(this,t,e);if(i&&(t=e),!!I.isString(t)){if(I.isString(s))return t.indexOf(s)!==-1;if(I.isRegExp(s))return s.test(t)}}function Vl(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,s)=>e.toUpperCase()+s)}function $l(n,t){const e=I.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+e,{value:function(i,r,a){return this[s].call(this,t,i,r,a)},configurable:!0})})}class Ys{constructor(t){t&&this.set(t)}set(t,e,s){const i=this;function r(o,h,c){const l=is(h);if(!l)throw new Error("header name must be a non-empty string");const u=I.findKey(i,l);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||h]=Fs(o))}const a=(o,h)=>I.forEach(o,(c,l)=>r(c,l,h));if(I.isPlainObject(t)||t instanceof this.constructor)a(t,e);else if(I.isString(t)&&(t=t.trim())&&!Ul(t))a(Yl(t),e);else if(I.isHeaders(t))for(const[o,h]of t.entries())r(h,o,s);else t!=null&&r(e,t,s);return this}get(t,e){if(t=is(t),t){const s=I.findKey(this,t);if(s){const i=this[s];if(!e)return i;if(e===!0)return Xl(i);if(I.isFunction(e))return e.call(this,i,s);if(I.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=is(t),t){const s=I.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||jn(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let i=!1;function r(a){if(a=is(a),a){const o=I.findKey(s,a);o&&(!e||jn(s,s[o],o,e))&&(delete s[o],i=!0)}}return I.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let s=e.length,i=!1;for(;s--;){const r=e[s];(!t||jn(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,s={};return I.forEach(this,(i,r)=>{const a=I.findKey(s,r);if(a){e[a]=Fs(i),delete e[r];return}const o=t?Vl(r):String(r).trim();o!==r&&delete e[r],e[o]=Fs(i),s[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return I.forEach(this,(s,i)=>{s!=null&&s!==!1&&(e[i]=t&&I.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[fa]=this[fa]={accessors:{}}).accessors,i=this.prototype;function r(a){const o=is(a);s[o]||($l(i,a),s[o]=!0)}return I.isArray(t)?t.forEach(r):r(t),this}}Ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.reduceDescriptors(Ys.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(s){this[e]=s}}}),I.freezeMethods(Ys);const Bt=Ys;function Hn(n,t){const e=this||qn,s=t||e,i=Bt.from(s.headers);let r=s.data;return I.forEach(n,function(o){r=o.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function da(n){return!!(n&&n.__CANCEL__)}function $e(n,t,e){Y.call(this,n??"canceled",Y.ERR_CANCELED,t,e),this.name="CanceledError"}I.inherits($e,Y,{__CANCEL__:!0});function ma(n,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?n(e):t(new Y("Request failed with status code "+e.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Gl(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function ql(n,t){n=n||10;const e=new Array(n),s=new Array(n);let i=0,r=0,a;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),l=s[r];a||(a=c),e[i]=h,s[i]=c;let u=r,d=0;for(;u!==i;)d+=e[u++],u=u%n;if(i=(i+1)%n,i===r&&(r=(r+1)%n),c-a<t)return;const f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function jl(n,t){let e=0,s=1e3/t,i,r;const a=(c,l=Date.now())=>{e=l,i=null,r&&(clearTimeout(r),r=null),n.apply(null,c)};return[(...c)=>{const l=Date.now(),u=l-e;u>=s?a(c,l):(i=c,r||(r=setTimeout(()=>{r=null,a(i)},s-u)))},()=>i&&a(i)]}const Xs=(n,t,e=3)=>{let s=0;const i=ql(50,250);return jl(r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,h=a-s,c=i(h),l=a<=o;s=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:h,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:r,lengthComputable:o!=null,[t?"download":"upload"]:!0};n(u)},e)},pa=(n,t)=>{const e=n!=null;return[s=>t[0]({lengthComputable:e,total:n,loaded:s}),t[1]]},ga=n=>(...t)=>I.asap(()=>n(...t)),Hl=pt.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,pt.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,Wl=pt.hasStandardBrowserEnv?{write(n,t,e,s,i,r){const a=[n+"="+encodeURIComponent(t)];I.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),I.isString(s)&&a.push("path="+s),I.isString(i)&&a.push("domain="+i),r===!0&&a.push("secure"),document.cookie=a.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jl(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Zl(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ya(n,t,e){let s=!Jl(t);return n&&(s||e==!1)?Zl(n,t):t}const wa=n=>n instanceof Bt?{...n}:n;function Ee(n,t){t=t||{};const e={};function s(c,l,u,d){return I.isPlainObject(c)&&I.isPlainObject(l)?I.merge.call({caseless:d},c,l):I.isPlainObject(l)?I.merge({},l):I.isArray(l)?l.slice():l}function i(c,l,u,d){if(I.isUndefined(l)){if(!I.isUndefined(c))return s(void 0,c,u,d)}else return s(c,l,u,d)}function r(c,l){if(!I.isUndefined(l))return s(void 0,l)}function a(c,l){if(I.isUndefined(l)){if(!I.isUndefined(c))return s(void 0,c)}else return s(void 0,l)}function o(c,l,u){if(u in t)return s(c,l);if(u in n)return s(void 0,c)}const h={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,l,u)=>i(wa(c),wa(l),u,!0)};return I.forEach(Object.keys(Object.assign({},n,t)),function(l){const u=h[l]||i,d=u(n[l],t[l],l);I.isUndefined(d)&&u!==o||(e[l]=d)}),e}const xa=n=>{const t=Ee({},n);let{data:e,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:a,auth:o}=t;t.headers=a=Bt.from(a),t.url=ha(ya(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let h;if(I.isFormData(e)){if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((h=a.getContentType())!==!1){const[c,...l]=h?h.split(";").map(u=>u.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...l].join("; "))}}if(pt.hasStandardBrowserEnv&&(s&&I.isFunction(s)&&(s=s(t)),s||s!==!1&&Hl(t.url))){const c=i&&r&&Wl.read(r);c&&a.set(i,c)}return t},Kl=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(e,s){const i=xa(n);let r=i.data;const a=Bt.from(i.headers).normalize();let{responseType:o,onUploadProgress:h,onDownloadProgress:c}=i,l,u,d,f,p;function y(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const x=Bt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),M={data:!o||o==="text"||o==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:n,request:v};ma(function(R){e(R),y()},function(R){s(R),y()},M),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(s(new Y("Request aborted",Y.ECONNABORTED,n,v)),v=null)},v.onerror=function(){s(new Y("Network Error",Y.ERR_NETWORK,n,v)),v=null},v.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const M=i.transitional||la;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),s(new Y(b,M.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,n,v)),v=null},r===void 0&&a.setContentType(null),"setRequestHeader"in v&&I.forEach(a.toJSON(),function(b,M){v.setRequestHeader(M,b)}),I.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),o&&o!=="json"&&(v.responseType=i.responseType),c&&([d,p]=Xs(c,!0),v.addEventListener("progress",d)),h&&v.upload&&([u,f]=Xs(h),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(l=x=>{v&&(s(!x||x.type?new $e(null,n,v):x),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const S=Gl(i.url);if(S&&pt.protocols.indexOf(S)===-1){s(new Y("Unsupported protocol "+S+":",Y.ERR_BAD_REQUEST,n));return}v.send(r||null)})},Ql=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let s=new AbortController,i;const r=function(c){if(!i){i=!0,o();const l=c instanceof Error?c:this.reason;s.abort(l instanceof Y?l:new $e(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const o=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r));const{signal:h}=s;return h.unsubscribe=()=>I.asap(o),h}},tu=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let s=0,i;for(;s<e;)i=s+t,yield n.slice(s,i),s=i},eu=async function*(n,t){for await(const e of su(n))yield*tu(e,t)},su=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},ba=(n,t,e,s)=>{const i=eu(n,t);let r=0,a,o=h=>{a||(a=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:c,value:l}=await i.next();if(c){o(),h.close();return}let u=l.byteLength;if(e){let d=r+=u;e(d)}h.enqueue(new Uint8Array(l))}catch(c){throw o(c),c}},cancel(h){return o(h),i.return()}},{highWaterMark:2})},Us=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",va=Us&&typeof ReadableStream=="function",nu=Us&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),_a=(n,...t)=>{try{return!!n(...t)}catch{return!1}},iu=va&&_a(()=>{let n=!1;const t=new Request(pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Sa=64*1024,Wn=va&&_a(()=>I.isReadableStream(new Response("").body)),Vs={stream:Wn&&(n=>n.body)};Us&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Vs[t]&&(Vs[t]=I.isFunction(n[t])?e=>e[t]():(e,s)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,s)})})})(new Response);const ru=async n=>{if(n==null)return 0;if(I.isBlob(n))return n.size;if(I.isSpecCompliantForm(n))return(await new Request(pt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(I.isArrayBufferView(n)||I.isArrayBuffer(n))return n.byteLength;if(I.isURLSearchParams(n)&&(n=n+""),I.isString(n))return(await nu(n)).byteLength},au=async(n,t)=>{const e=I.toFiniteNumber(n.getContentLength());return e??ru(t)},Jn={http:Pl,xhr:Kl,fetch:Us&&(async n=>{let{url:t,method:e,data:s,signal:i,cancelToken:r,timeout:a,onDownloadProgress:o,onUploadProgress:h,responseType:c,headers:l,withCredentials:u="same-origin",fetchOptions:d}=xa(n);c=c?(c+"").toLowerCase():"text";let f=Ql([i,r&&r.toAbortSignal()],a),p;const y=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(h&&iu&&e!=="get"&&e!=="head"&&(v=await au(l,s))!==0){let M=new Request(t,{method:"POST",body:s,duplex:"half"}),P;if(I.isFormData(s)&&(P=M.headers.get("content-type"))&&l.setContentType(P),M.body){const[R,B]=pa(v,Xs(ga(h)));s=ba(M.body,Sa,R,B)}}I.isString(u)||(u=u?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:s,duplex:"half",credentials:w?u:void 0});let S=await fetch(p);const x=Wn&&(c==="stream"||c==="response");if(Wn&&(o||x&&y)){const M={};["status","statusText","headers"].forEach(F=>{M[F]=S[F]});const P=I.toFiniteNumber(S.headers.get("content-length")),[R,B]=o&&pa(P,Xs(ga(o),!0))||[];S=new Response(ba(S.body,Sa,R,()=>{B&&B(),y&&y()}),M)}c=c||"text";let b=await Vs[I.findKey(Vs,c)||"text"](S,n);return!x&&y&&y(),await new Promise((M,P)=>{ma(M,P,{data:b,headers:Bt.from(S.headers),status:S.status,statusText:S.statusText,config:n,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,n,p),{cause:w.cause||w}):Y.from(w,w&&w.code,n,p)}})};I.forEach(Jn,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Ea=n=>`- ${n}`,ou=n=>I.isFunction(n)||n===null||n===!1,Ta={getAdapter:n=>{n=I.isArray(n)?n:[n];const{length:t}=n;let e,s;const i={};for(let r=0;r<t;r++){e=n[r];let a;if(s=e,!ou(e)&&(s=Jn[(a=String(e)).toLowerCase()],s===void 0))throw new Y(`Unknown adapter '${a}'`);if(s)break;i[a||"#"+r]=s}if(!s){const r=Object.entries(i).map(([o,h])=>`adapter ${o} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?r.length>1?`since :
|
|
4
|
+
`+r.map(Ea).join(`
|
|
5
|
+
`):" "+Ea(r[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:Jn};function Zn(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new $e(null,n)}function Pa(n){return Zn(n),n.headers=Bt.from(n.headers),n.data=Hn.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ta.getAdapter(n.adapter||qn.adapter)(n).then(function(s){return Zn(n),s.data=Hn.call(n,n.transformResponse,s),s.headers=Bt.from(s.headers),s},function(s){return da(s)||(Zn(n),s&&s.response&&(s.response.data=Hn.call(n,n.transformResponse,s.response),s.response.headers=Bt.from(s.response.headers))),Promise.reject(s)})}const Ma="1.8.4",$s={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{$s[n]=function(s){return typeof s===n||"a"+(t<1?"n ":" ")+n}});const Ca={};$s.transitional=function(t,e,s){function i(r,a){return"[Axios v"+Ma+"] Transitional option '"+r+"'"+a+(s?". "+s:"")}return(r,a,o)=>{if(t===!1)throw new Y(i(a," has been removed"+(e?" in "+e:"")),Y.ERR_DEPRECATED);return e&&!Ca[a]&&(Ca[a]=!0,console.warn(i(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,a,o):!0}},$s.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function hu(n,t,e){if(typeof n!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let i=s.length;for(;i-- >0;){const r=s[i],a=t[r];if(a){const o=n[r],h=o===void 0||a(o,r,n);if(h!==!0)throw new Y("option "+r+" must be "+h,Y.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Y("Unknown option "+r,Y.ERR_BAD_OPTION)}}const Gs={assertOptions:hu,validators:$s},qt=Gs.validators;class qs{constructor(t){this.defaults=t,this.interceptors={request:new ca,response:new ca}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
+
`+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ee(this.defaults,e);const{transitional:s,paramsSerializer:i,headers:r}=e;s!==void 0&&Gs.assertOptions(s,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean)},!1),i!=null&&(I.isFunction(i)?e.paramsSerializer={serialize:i}:Gs.assertOptions(i,{encode:qt.function,serialize:qt.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Gs.assertOptions(e,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=r&&I.merge(r.common,r[e.method]);r&&I.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Bt.concat(a,r);const o=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(e)===!1||(h=h&&y.synchronous,o.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let l,u=0,d;if(!h){const p=[Pa.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,l=Promise.resolve(e);u<d;)l=l.then(p[u++],p[u++]);return l}d=o.length;let f=e;for(u=0;u<d;){const p=o[u++],y=o[u++];try{f=p(f)}catch(v){y.call(this,v);break}}try{l=Pa.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(t){t=Ee(this.defaults,t);const e=ya(t.baseURL,t.url,t.allowAbsoluteUrls);return ha(e,t.params,t.paramsSerializer)}}I.forEach(["delete","get","head","options"],function(t){qs.prototype[t]=function(e,s){return this.request(Ee(s||{},{method:t,url:e,data:(s||{}).data}))}}),I.forEach(["post","put","patch"],function(t){function e(s){return function(r,a,o){return this.request(Ee(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}qs.prototype[t]=e(),qs.prototype[t+"Form"]=e(!0)});const js=qs;class Kn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const s=this;this.promise.then(i=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](i);s._listeners=null}),this.promise.then=i=>{let r;const a=new Promise(o=>{s.subscribe(o),r=o}).then(i);return a.cancel=function(){s.unsubscribe(r)},a},t(function(r,a,o){s.reason||(s.reason=new $e(r,a,o),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Kn(function(i){t=i}),cancel:t}}}const cu=Kn;function lu(n){return function(e){return n.apply(null,e)}}function uu(n){return I.isObject(n)&&n.isAxiosError===!0}const Qn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qn).forEach(([n,t])=>{Qn[t]=n});const fu=Qn;function Aa(n){const t=new js(n),e=Hr(js.prototype.request,t);return I.extend(e,js.prototype,t,{allOwnKeys:!0}),I.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return Aa(Ee(n,i))},e}const ot=Aa(qn);ot.Axios=js,ot.CanceledError=$e,ot.CancelToken=cu,ot.isCancel=da,ot.VERSION=Ma,ot.toFormData=Bs,ot.AxiosError=Y,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=lu,ot.isAxiosError=uu,ot.mergeConfig=Ee,ot.AxiosHeaders=Bt,ot.formToJSON=n=>ua(I.isHTMLForm(n)?new FormData(n):n),ot.getAdapter=Ta.getAdapter,ot.HttpStatusCode=fu,ot.default=ot;const du=ot,Ia=window.crypto.subtle;Ia||console.warn("Crypto API not supported");async function ka(n,t="SHA-256"){const e=await Ia.digest(t,E.getUint8ArrayFromString(n));return E.getStringFromArrayBuffer(e)}async function Da(n,t="SHA-256"){const e=JSON.stringify(E.getSortedObjectString(n));return ka(e,t)}var mu=Object.defineProperty,pu=Object.getOwnPropertyDescriptor,gu=(n,t,e,s)=>{for(var i=s>1?void 0:s?pu(t,e):t,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(t,e,i):a(i))||i);return s&&i&&mu(t,e,i),i};class ti{instance;constructor(t){this.instance=du.create(t);const e=new La;this.instance.interceptors.request.use(s=>(e.pendingRequest(s),s),s=>(e.cancelRequest(s.config),s)),t?.interceptor&&(this.instance.interceptors.request.use(t.interceptor.request,t.interceptor.requestError),this.instance.interceptors.response.use(t.interceptor.response,t.interceptor.responseError)),this.instance.interceptors.response.use(async s=>s?s.status==200?(await e.confirmRequest(s.config),s):Promise.reject(s):Promise.reject("axios response is undefined! maybe config.interceptor is NOT set return value!"),async s=>Promise.reject(s))}async request(t){return await this.instance.request(t)}async get(t,e){return this.request({...e,method:"get",url:t})}async delete(t,e){return this.request({...e,method:"delete",url:t})}async head(t,e){return this.request({...e,method:"head",url:t})}async options(t,e){return this.request({...e,method:"options",url:t})}async post(t,e,s){return this.request({...s,method:"post",url:t,data:e})}async postBlob(t,e,s){return s={...s,headers:{...s?.headers,"Content-Type":"multipart/form-data"}},this.request({...s,method:"post",url:t,data:e})}async postForm(t,e,s){return this.instance.postForm(t,e,{...s})}async put(t,e,s){return this.request({...s,method:"put",url:t,data:e})}async patch(t,e,s){return this.request({...s,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}gu([E.Cache(6e4),E.Retry(3)],ti.prototype,"request",1);class La{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}async getRequestId(t){const{url:e,method:s,params:i,data:r}=t;return await Da({url:e,method:s,params:i,data:r})}async pendingRequest(t){const e=await this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const s=new AbortController;t.signal=s.signal,this.pendingRequestMap.set(e,s)}}async confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=await this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}async cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=await this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}async cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const ei=n=>new XMLSerializer().serializeToString(n),yu=(n,t="text/html")=>new DOMParser().parseFromString(n,t),si=(n,t=E.MIMEEnum.SVG,e=E.EncodeEnum.utf8)=>E.toBlob(ei(n),t,e);async function ni(n=["*"],t){let e=[];const s=document.createElement("input");return s.setAttribute("type","file"),s.setAttribute("visibility","hidden"),s.setAttribute("accept",n.join(",")),t&&s.setAttribute("multiple","true"),s.addEventListener("click",i=>{s.value=""},!1),new Promise((i,r)=>{s.addEventListener("change",a=>{e=Array.from(a.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),s.click()}).then(i=>(s.remove(),i)).catch(i=>{throw s.remove(),i})}function rs(n,t=E.ReadInBrowserEnum.text,e){return new Promise((s,i)=>{const r=new FileReader;switch(r.addEventListener("progress",a=>{e?.(a.loaded,a.total)}),r.addEventListener("load",a=>{s(a.target?.result)}),r.addEventListener("error",a=>{i(a)}),t){case E.ReadInBrowserEnum.dataURL:r.readAsDataURL(n);break;case E.ReadInBrowserEnum.binaryString:r.readAsBinaryString(n);break;case E.ReadInBrowserEnum.arraybuffer:r.readAsArrayBuffer(n);break;case E.ReadInBrowserEnum.text:default:r.readAsText(n)}})}async function wu(n){const t=await rs(n,E.ReadInBrowserEnum.arraybuffer);return E.getFileTypeFromArrayBuffer(t)}const xu=n=>{let t;return n instanceof File?t=n.name:t=n,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function bu(n){switch(n.toLowerCase()){case"jpg":case"jpeg":return E.MIMEEnum.JPEG;case"gif":return E.MIMEEnum.GIF;case"svg":return E.MIMEEnum.SVG;case"pdf":return E.MIMEEnum.PDF;case"png":default:return E.MIMEEnum.PNG}}function Ra(n,t,e,s,i,r,a){const o=new FileReader;o.addEventListener("load",h=>{if(!h.target||!h.target.result)return t(h);if(e.append(h.target.result),a<s.size)Ra(n,t,e,s,i,a,Math.min(a+i,s.size));else return n(e.end())}),o.addEventListener("error",h=>t(h)),o.readAsArrayBuffer(s.slice(r,a))}async function Oa(n,t=1048576){return await new Promise((e,s)=>Ra(e,s,new Xc.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class vu{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new ti({baseURL:t.baseURL,interceptor:{request:e=>e,response:e=>(e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk()),e)}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await Oa(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{E.increaseTime(this.time,1),this.onTime?.(E.formatTimeOverflow(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var za={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
7
7
|
* http://hammerjs.github.io/
|
|
8
8
|
*
|
|
9
9
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
10
|
-
* Licensed under the MIT license */(function(
|
|
10
|
+
* Licensed under the MIT license */(function(n){(function(t,e,s,i){var r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",h=Math.round,c=Math.abs,l=Date.now;function u(g,_,C){return setTimeout(x(g,C),_)}function d(g,_,C){return Array.isArray(g)?(f(g,C[_],C),!0):!1}function f(g,_,C){var A;if(g)if(g.forEach)g.forEach(_,C);else if(g.length!==i)for(A=0;A<g.length;)_.call(C,g[A],A,g),A++;else for(A in g)g.hasOwnProperty(A)&&_.call(C,g[A],A,g)}function p(g,_,C){var A="DEPRECATED METHOD: "+_+`
|
|
11
11
|
`+C+` AT
|
|
12
|
-
`;return function(){var D=new Error("get-stack-trace"),B=D&&D.stack?D.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",V=t.console&&(t.console.warn||t.console.log);return V&&V.call(t.console,I,B),p.apply(this,arguments)}}var _;typeof Object.assign!="function"?_=function(x){if(x===n||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var C=Object(x),I=1;I<arguments.length;I++){var D=arguments[I];if(D!==n&&D!==null)for(var B in D)D.hasOwnProperty(B)&&(C[B]=D[B])}return C}:_=Object.assign;var E=g(function(x,C,I){for(var D=Object.keys(C),B=0;B<D.length;)(!I||I&&x[D[B]]===n)&&(x[D[B]]=C[D[B]]),B++;return x},"extend","Use `assign`."),b=g(function(x,C){return E(x,C,!0)},"merge","Use `assign`.");function S(p,x,C){var I=x.prototype,D;D=p.prototype=Object.create(I),D.constructor=p,D._super=I,C&&_(D,C)}function y(p,x){return function(){return p.apply(x,arguments)}}function w(p,x){return typeof p==o?p.apply(x&&x[0]||n,x):p}function P(p,x){return p===n?x:p}function M(p,x,C){m(W(x),function(I){p.addEventListener(I,C,!1)})}function L(p,x,C){m(W(x),function(I){p.removeEventListener(I,C,!1)})}function X(p,x){for(;p;){if(p==x)return!0;p=p.parentNode}return!1}function G(p,x){return p.indexOf(x)>-1}function W(p){return p.trim().split(/\s+/g)}function $(p,x,C){if(p.indexOf&&!C)return p.indexOf(x);for(var I=0;I<p.length;){if(C&&p[I][C]==x||!C&&p[I]===x)return I;I++}return-1}function K(p){return Array.prototype.slice.call(p,0)}function ot(p,x,C){for(var I=[],D=[],B=0;B<p.length;){var V=x?p[B][x]:p[B];$(D,V)<0&&I.push(p[B]),D[B]=V,B++}return C&&(x?I=I.sort(function(ht,gt){return ht[x]>gt[x]}):I=I.sort()),I}function st(p,x){for(var C,I,D=x[0].toUpperCase()+x.slice(1),B=0;B<r.length;){if(C=r[B],I=C?C+D:x,I in p)return I;B++}return n}var Bt=1;function Et(){return Bt++}function It(p){var x=p.ownerDocument||p;return x.defaultView||x.parentWindow||t}var Nt=/mobile|tablet|ip(ad|hone|od)|android/i,z="ontouchstart"in t,R=st(t,"PointerEvent")!==n,U=z&&Nt.test(navigator.userAgent),q="touch",mt="pen",Ft="mouse",Ks="kinect",Qs=25,nt=1,Vt=2,Z=4,ut=8,Oe=1,_e=2,Ee=4,fe=8,k=16,Q=_e|Ee,Me=fe|k,fo=Q|Me,mo=["x","y"],ti=["clientX","clientY"];function At(p,x){var C=this;this.manager=p,this.callback=x,this.element=p.element,this.target=p.options.inputTarget,this.domHandler=function(I){w(p.options.enable,[p])&&C.handler(I)},this.init()}At.prototype={handler:function(){},init:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(It(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(It(this.element),this.evWin,this.domHandler)}};function am(p){var x,C=p.options.inputClass;return C?x=C:R?x=Rn:U?x=ii:z?x=Ln:x=si,new x(p,om)}function om(p,x,C){var I=C.pointers.length,D=C.changedPointers.length,B=x&nt&&I-D===0,V=x&(Z|ut)&&I-D===0;C.isFirst=!!B,C.isFinal=!!V,B&&(p.session={}),C.eventType=x,hm(p,C),p.emit("hammer.input",C),p.recognize(C),p.session.prevInput=C}function hm(p,x){var C=p.session,I=x.pointers,D=I.length;C.firstInput||(C.firstInput=go(x)),D>1&&!C.firstMultiple?C.firstMultiple=go(x):D===1&&(C.firstMultiple=!1);var B=C.firstInput,V=C.firstMultiple,rt=V?V.center:B.center,ht=x.center=po(I);x.timeStamp=l(),x.deltaTime=x.timeStamp-B.timeStamp,x.angle=Dn(rt,ht),x.distance=ei(rt,ht),cm(C,x),x.offsetDirection=wo(x.deltaX,x.deltaY);var gt=yo(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=gt.x,x.overallVelocityY=gt.y,x.overallVelocity=c(gt.x)>c(gt.y)?gt.x:gt.y,x.scale=V?fm(V.pointers,I):1,x.rotation=V?um(V.pointers,I):0,x.maxPointers=C.prevInput?x.pointers.length>C.prevInput.maxPointers?x.pointers.length:C.prevInput.maxPointers:x.pointers.length,lm(C,x);var qt=p.element;X(x.srcEvent.target,qt)&&(qt=x.srcEvent.target),x.target=qt}function cm(p,x){var C=x.center,I=p.offsetDelta||{},D=p.prevDelta||{},B=p.prevInput||{};(x.eventType===nt||B.eventType===Z)&&(D=p.prevDelta={x:B.deltaX||0,y:B.deltaY||0},I=p.offsetDelta={x:C.x,y:C.y}),x.deltaX=D.x+(C.x-I.x),x.deltaY=D.y+(C.y-I.y)}function lm(p,x){var C=p.lastInterval||x,I=x.timeStamp-C.timeStamp,D,B,V,rt;if(x.eventType!=ut&&(I>Qs||C.velocity===n)){var ht=x.deltaX-C.deltaX,gt=x.deltaY-C.deltaY,qt=yo(I,ht,gt);B=qt.x,V=qt.y,D=c(qt.x)>c(qt.y)?qt.x:qt.y,rt=wo(ht,gt),p.lastInterval=x}else D=C.velocity,B=C.velocityX,V=C.velocityY,rt=C.direction;x.velocity=D,x.velocityX=B,x.velocityY=V,x.direction=rt}function go(p){for(var x=[],C=0;C<p.pointers.length;)x[C]={clientX:h(p.pointers[C].clientX),clientY:h(p.pointers[C].clientY)},C++;return{timeStamp:l(),pointers:x,center:po(x),deltaX:p.deltaX,deltaY:p.deltaY}}function po(p){var x=p.length;if(x===1)return{x:h(p[0].clientX),y:h(p[0].clientY)};for(var C=0,I=0,D=0;D<x;)C+=p[D].clientX,I+=p[D].clientY,D++;return{x:h(C/x),y:h(I/x)}}function yo(p,x,C){return{x:x/p||0,y:C/p||0}}function wo(p,x){return p===x?Oe:c(p)>=c(x)?p<0?_e:Ee:x<0?fe:k}function ei(p,x,C){C||(C=mo);var I=x[C[0]]-p[C[0]],D=x[C[1]]-p[C[1]];return Math.sqrt(I*I+D*D)}function Dn(p,x,C){C||(C=mo);var I=x[C[0]]-p[C[0]],D=x[C[1]]-p[C[1]];return Math.atan2(D,I)*180/Math.PI}function um(p,x){return Dn(x[1],x[0],ti)+Dn(p[1],p[0],ti)}function fm(p,x){return ei(x[0],x[1],ti)/ei(p[0],p[1],ti)}var dm={mousedown:nt,mousemove:Vt,mouseup:Z},mm="mousedown",gm="mousemove mouseup";function si(){this.evEl=mm,this.evWin=gm,this.pressed=!1,At.apply(this,arguments)}S(si,At,{handler:function(x){var C=dm[x.type];C&nt&&x.button===0&&(this.pressed=!0),C&Vt&&x.which!==1&&(C=Z),this.pressed&&(C&Z&&(this.pressed=!1),this.callback(this.manager,C,{pointers:[x],changedPointers:[x],pointerType:Ft,srcEvent:x}))}});var pm={pointerdown:nt,pointermove:Vt,pointerup:Z,pointercancel:ut,pointerout:ut},ym={2:q,3:mt,4:Ft,5:Ks},xo="pointerdown",bo="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(xo="MSPointerDown",bo="MSPointerMove MSPointerUp MSPointerCancel");function Rn(){this.evEl=xo,this.evWin=bo,At.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}S(Rn,At,{handler:function(x){var C=this.store,I=!1,D=x.type.toLowerCase().replace("ms",""),B=pm[D],V=ym[x.pointerType]||x.pointerType,rt=V==q,ht=$(C,x.pointerId,"pointerId");B&nt&&(x.button===0||rt)?ht<0&&(C.push(x),ht=C.length-1):B&(Z|ut)&&(I=!0),!(ht<0)&&(C[ht]=x,this.callback(this.manager,B,{pointers:C,changedPointers:[x],pointerType:V,srcEvent:x}),I&&C.splice(ht,1))}});var wm={touchstart:nt,touchmove:Vt,touchend:Z,touchcancel:ut},xm="touchstart",bm="touchstart touchmove touchend touchcancel";function So(){this.evTarget=xm,this.evWin=bm,this.started=!1,At.apply(this,arguments)}S(So,At,{handler:function(x){var C=wm[x.type];if(C===nt&&(this.started=!0),!!this.started){var I=Sm.call(this,x,C);C&(Z|ut)&&I[0].length-I[1].length===0&&(this.started=!1),this.callback(this.manager,C,{pointers:I[0],changedPointers:I[1],pointerType:q,srcEvent:x})}}});function Sm(p,x){var C=K(p.touches),I=K(p.changedTouches);return x&(Z|ut)&&(C=ot(C.concat(I),"identifier",!0)),[C,I]}var vm={touchstart:nt,touchmove:Vt,touchend:Z,touchcancel:ut},Tm="touchstart touchmove touchend touchcancel";function ii(){this.evTarget=Tm,this.targetIds={},At.apply(this,arguments)}S(ii,At,{handler:function(x){var C=vm[x.type],I=_m.call(this,x,C);I&&this.callback(this.manager,C,{pointers:I[0],changedPointers:I[1],pointerType:q,srcEvent:x})}});function _m(p,x){var C=K(p.touches),I=this.targetIds;if(x&(nt|Vt)&&C.length===1)return I[C[0].identifier]=!0,[C,C];var D,B,V=K(p.changedTouches),rt=[],ht=this.target;if(B=C.filter(function(gt){return X(gt.target,ht)}),x===nt)for(D=0;D<B.length;)I[B[D].identifier]=!0,D++;for(D=0;D<V.length;)I[V[D].identifier]&&rt.push(V[D]),x&(Z|ut)&&delete I[V[D].identifier],D++;if(rt.length)return[ot(B.concat(rt),"identifier",!0),rt]}var Em=2500,vo=25;function Ln(){At.apply(this,arguments);var p=y(this.handler,this);this.touch=new ii(this.manager,p),this.mouse=new si(this.manager,p),this.primaryTouch=null,this.lastTouches=[]}S(Ln,At,{handler:function(x,C,I){var D=I.pointerType==q,B=I.pointerType==Ft;if(!(B&&I.sourceCapabilities&&I.sourceCapabilities.firesTouchEvents)){if(D)Mm.call(this,C,I);else if(B&&Pm.call(this,I))return;this.callback(x,C,I)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Mm(p,x){p&nt?(this.primaryTouch=x.changedPointers[0].identifier,To.call(this,x)):p&(Z|ut)&&To.call(this,x)}function To(p){var x=p.changedPointers[0];if(x.identifier===this.primaryTouch){var C={x:x.clientX,y:x.clientY};this.lastTouches.push(C);var I=this.lastTouches,D=function(){var B=I.indexOf(C);B>-1&&I.splice(B,1)};setTimeout(D,Em)}}function Pm(p){for(var x=p.srcEvent.clientX,C=p.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var D=this.lastTouches[I],B=Math.abs(x-D.x),V=Math.abs(C-D.y);if(B<=vo&&V<=vo)return!0}return!1}var _o=st(a.style,"touchAction"),Eo=_o!==n,Mo="compute",Po="auto",zn="manipulation",Pe="none",as="pan-x",os="pan-y",ni=Im();function On(p,x){this.manager=p,this.set(x)}On.prototype={set:function(p){p==Mo&&(p=this.compute()),Eo&&this.manager.element.style&&ni[p]&&(this.manager.element.style[_o]=p),this.actions=p.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var p=[];return m(this.manager.recognizers,function(x){w(x.options.enable,[x])&&(p=p.concat(x.getTouchAction()))}),Cm(p.join(" "))},preventDefaults:function(p){var x=p.srcEvent,C=p.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var I=this.actions,D=G(I,Pe)&&!ni[Pe],B=G(I,os)&&!ni[os],V=G(I,as)&&!ni[as];if(D){var rt=p.pointers.length===1,ht=p.distance<2,gt=p.deltaTime<250;if(rt&&ht&>)return}if(!(V&&B)&&(D||B&&C&Q||V&&C&Me))return this.preventSrc(x)},preventSrc:function(p){this.manager.session.prevented=!0,p.preventDefault()}};function Cm(p){if(G(p,Pe))return Pe;var x=G(p,as),C=G(p,os);return x&&C?Pe:x||C?x?as:os:G(p,zn)?zn:Po}function Im(){if(!Eo)return!1;var p={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(C){p[C]=x?t.CSS.supports("touch-action",C):!0}),p}var ri=1,kt=2,Be=4,de=8,te=de,hs=16,Gt=32;function ee(p){this.options=_({},this.defaults,p||{}),this.id=Et(),this.manager=null,this.options.enable=P(this.options.enable,!0),this.state=ri,this.simultaneous={},this.requireFail=[]}ee.prototype={defaults:{},set:function(p){return _(this.options,p),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(p){if(d(p,"recognizeWith",this))return this;var x=this.simultaneous;return p=ai(p,this),x[p.id]||(x[p.id]=p,p.recognizeWith(this)),this},dropRecognizeWith:function(p){return d(p,"dropRecognizeWith",this)?this:(p=ai(p,this),delete this.simultaneous[p.id],this)},requireFailure:function(p){if(d(p,"requireFailure",this))return this;var x=this.requireFail;return p=ai(p,this),$(x,p)===-1&&(x.push(p),p.requireFailure(this)),this},dropRequireFailure:function(p){if(d(p,"dropRequireFailure",this))return this;p=ai(p,this);var x=$(this.requireFail,p);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(p){return!!this.simultaneous[p.id]},emit:function(p){var x=this,C=this.state;function I(D){x.manager.emit(D,p)}C<de&&I(x.options.event+Co(C)),I(x.options.event),p.additionalEvent&&I(p.additionalEvent),C>=de&&I(x.options.event+Co(C))},tryEmit:function(p){if(this.canEmit())return this.emit(p);this.state=Gt},canEmit:function(){for(var p=0;p<this.requireFail.length;){if(!(this.requireFail[p].state&(Gt|ri)))return!1;p++}return!0},recognize:function(p){var x=_({},p);if(!w(this.options.enable,[this,x])){this.reset(),this.state=Gt;return}this.state&(te|hs|Gt)&&(this.state=ri),this.state=this.process(x),this.state&(kt|Be|de|hs)&&this.tryEmit(x)},process:function(p){},getTouchAction:function(){},reset:function(){}};function Co(p){return p&hs?"cancel":p&de?"end":p&Be?"move":p&kt?"start":""}function Io(p){return p==k?"down":p==fe?"up":p==_e?"left":p==Ee?"right":""}function ai(p,x){var C=x.manager;return C?C.get(p):p}function Yt(){ee.apply(this,arguments)}S(Yt,ee,{defaults:{pointers:1},attrTest:function(p){var x=this.options.pointers;return x===0||p.pointers.length===x},process:function(p){var x=this.state,C=p.eventType,I=x&(kt|Be),D=this.attrTest(p);return I&&(C&ut||!D)?x|hs:I||D?C&Z?x|de:x&kt?x|Be:kt:Gt}});function oi(){Yt.apply(this,arguments),this.pX=null,this.pY=null}S(oi,Yt,{defaults:{event:"pan",threshold:10,pointers:1,direction:fo},getTouchAction:function(){var p=this.options.direction,x=[];return p&Q&&x.push(os),p&Me&&x.push(as),x},directionTest:function(p){var x=this.options,C=!0,I=p.distance,D=p.direction,B=p.deltaX,V=p.deltaY;return D&x.direction||(x.direction&Q?(D=B===0?Oe:B<0?_e:Ee,C=B!=this.pX,I=Math.abs(p.deltaX)):(D=V===0?Oe:V<0?fe:k,C=V!=this.pY,I=Math.abs(p.deltaY))),p.direction=D,C&&I>x.threshold&&D&x.direction},attrTest:function(p){return Yt.prototype.attrTest.call(this,p)&&(this.state&kt||!(this.state&kt)&&this.directionTest(p))},emit:function(p){this.pX=p.deltaX,this.pY=p.deltaY;var x=Io(p.direction);x&&(p.additionalEvent=this.options.event+x),this._super.emit.call(this,p)}});function Bn(){Yt.apply(this,arguments)}S(Bn,Yt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.scale-1)>this.options.threshold||this.state&kt)},emit:function(p){if(p.scale!==1){var x=p.scale<1?"in":"out";p.additionalEvent=this.options.event+x}this._super.emit.call(this,p)}});function Nn(){ee.apply(this,arguments),this._timer=null,this._input=null}S(Nn,ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Po]},process:function(p){var x=this.options,C=p.pointers.length===x.pointers,I=p.distance<x.threshold,D=p.deltaTime>x.time;if(this._input=p,!I||!C||p.eventType&(Z|ut)&&!D)this.reset();else if(p.eventType&nt)this.reset(),this._timer=u(function(){this.state=te,this.tryEmit()},x.time,this);else if(p.eventType&Z)return te;return Gt},reset:function(){clearTimeout(this._timer)},emit:function(p){this.state===te&&(p&&p.eventType&Z?this.manager.emit(this.options.event+"up",p):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function Fn(){Yt.apply(this,arguments)}S(Fn,Yt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.rotation)>this.options.threshold||this.state&kt)}});function Yn(){Yt.apply(this,arguments)}S(Yn,Yt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Q|Me,pointers:1},getTouchAction:function(){return oi.prototype.getTouchAction.call(this)},attrTest:function(p){var x=this.options.direction,C;return x&(Q|Me)?C=p.overallVelocity:x&Q?C=p.overallVelocityX:x&Me&&(C=p.overallVelocityY),this._super.attrTest.call(this,p)&&x&p.offsetDirection&&p.distance>this.options.threshold&&p.maxPointers==this.options.pointers&&c(C)>this.options.velocity&&p.eventType&Z},emit:function(p){var x=Io(p.offsetDirection);x&&this.manager.emit(this.options.event+x,p),this.manager.emit(this.options.event,p)}});function hi(){ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}S(hi,ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[zn]},process:function(p){var x=this.options,C=p.pointers.length===x.pointers,I=p.distance<x.threshold,D=p.deltaTime<x.time;if(this.reset(),p.eventType&nt&&this.count===0)return this.failTimeout();if(I&&D&&C){if(p.eventType!=Z)return this.failTimeout();var B=this.pTime?p.timeStamp-this.pTime<x.interval:!0,V=!this.pCenter||ei(this.pCenter,p.center)<x.posThreshold;this.pTime=p.timeStamp,this.pCenter=p.center,!V||!B?this.count=1:this.count+=1,this._input=p;var rt=this.count%x.taps;if(rt===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=te,this.tryEmit()},x.interval,this),kt):te}return Gt},failTimeout:function(){return this._timer=u(function(){this.state=Gt},this.options.interval,this),Gt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==te&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function se(p,x){return x=x||{},x.recognizers=P(x.recognizers,se.defaults.preset),new Un(p,x)}se.VERSION="2.0.7",se.defaults={domEvents:!1,touchAction:Mo,enable:!0,inputTarget:null,inputClass:null,preset:[[Fn,{enable:!1}],[Bn,{enable:!1},["rotate"]],[Yn,{direction:Q}],[oi,{direction:Q},["swipe"]],[hi],[hi,{event:"doubletap",taps:2},["tap"]],[Nn]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Am=1,Ao=2;function Un(p,x){this.options=_({},se.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||p,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=p,this.input=am(this),this.touchAction=new On(this,this.options.touchAction),ko(this,!0),m(this.options.recognizers,function(C){var I=this.add(new C[0](C[1]));C[2]&&I.recognizeWith(C[2]),C[3]&&I.requireFailure(C[3])},this)}Un.prototype={set:function(p){return _(this.options,p),p.touchAction&&this.touchAction.update(),p.inputTarget&&(this.input.destroy(),this.input.target=p.inputTarget,this.input.init()),this},stop:function(p){this.session.stopped=p?Ao:Am},recognize:function(p){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(p);var C,I=this.recognizers,D=x.curRecognizer;(!D||D&&D.state&te)&&(D=x.curRecognizer=null);for(var B=0;B<I.length;)C=I[B],x.stopped!==Ao&&(!D||C==D||C.canRecognizeWith(D))?C.recognize(p):C.reset(),!D&&C.state&(kt|Be|de)&&(D=x.curRecognizer=C),B++}},get:function(p){if(p instanceof ee)return p;for(var x=this.recognizers,C=0;C<x.length;C++)if(x[C].options.event==p)return x[C];return null},add:function(p){if(d(p,"add",this))return this;var x=this.get(p.options.event);return x&&this.remove(x),this.recognizers.push(p),p.manager=this,this.touchAction.update(),p},remove:function(p){if(d(p,"remove",this))return this;if(p=this.get(p),p){var x=this.recognizers,C=$(x,p);C!==-1&&(x.splice(C,1),this.touchAction.update())}return this},on:function(p,x){if(p!==n&&x!==n){var C=this.handlers;return m(W(p),function(I){C[I]=C[I]||[],C[I].push(x)}),this}},off:function(p,x){if(p!==n){var C=this.handlers;return m(W(p),function(I){x?C[I]&&C[I].splice($(C[I],x),1):delete C[I]}),this}},emit:function(p,x){this.options.domEvents&&km(p,x);var C=this.handlers[p]&&this.handlers[p].slice();if(!(!C||!C.length)){x.type=p,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var I=0;I<C.length;)C[I](x),I++}},destroy:function(){this.element&&ko(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ko(p,x){var C=p.element;if(C.style){var I;m(p.options.cssProps,function(D,B){I=st(C.style,B),x?(p.oldCssProps[I]=C.style[I],C.style[I]=D):C.style[I]=p.oldCssProps[I]||""}),x||(p.oldCssProps={})}}function km(p,x){var C=e.createEvent("Event");C.initEvent(p,!0,!0),C.gesture=x,x.target.dispatchEvent(C)}_(se,{INPUT_START:nt,INPUT_MOVE:Vt,INPUT_END:Z,INPUT_CANCEL:ut,STATE_POSSIBLE:ri,STATE_BEGAN:kt,STATE_CHANGED:Be,STATE_ENDED:de,STATE_RECOGNIZED:te,STATE_CANCELLED:hs,STATE_FAILED:Gt,DIRECTION_NONE:Oe,DIRECTION_LEFT:_e,DIRECTION_RIGHT:Ee,DIRECTION_UP:fe,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:Q,DIRECTION_VERTICAL:Me,DIRECTION_ALL:fo,Manager:Un,Input:At,TouchAction:On,TouchInput:ii,MouseInput:si,PointerEventInput:Rn,TouchMouseInput:Ln,SingleTouchInput:So,Recognizer:ee,AttrRecognizer:Yt,Tap:hi,Pan:oi,Swipe:Yn,Pinch:Bn,Rotate:Fn,Press:Nn,on:M,off:L,each:m,merge:b,extend:E,assign:_,inherit:S,bindFn:y,prefixed:st});var Dm=typeof t<"u"?t:typeof self<"u"?self:{};Dm.Hammer=se,typeof n=="function"&&n.amd?n(function(){return se}):i.exports?i.exports=se:t[s]=se})(window,document,"Hammer")})(ma);var Wl=ma.exports;const $l=Xn(Wl);async function on(i,t){return new Promise(e=>{const s=new ResizeObserver(n=>{const a=n[0].contentRect;t(a),e(()=>{s.unobserve(i)})});s.observe(i)})}function Jl(i){return i(window.innerWidth,window.innerHeight),N(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,s=t.target.innerHeight;i(e,s)})}function he(i,t){return ga(i,t)}function ga(i,t){const e=i.eb,s=a=>{e.on("pointerMove",r),e.on("pointerUp",n),e.on("pointerCancel",n),t?.start?.(a)},n=a=>{e.off("pointerMove",r),e.off("pointerUp",n),e.off("pointerCancel",n),t?.end?.(a)},r=a=>{t?.move?.(a)};return e.on("pointerDown",s),()=>e.off("pointerDown",s)}function Zl(i,t){const e=i.eb,s=a=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",n,!1),t?.start?.(a)},n=a=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",n,!1),t?.end?.(a)},r=a=>{t?.move?.(a)};return e.on("mouseDown",s),()=>e.off("mouseDown",s)}function Kl(i,t){const e=i.eb,s=a=>{e.on("touchMove",r),e.on("touchEnd",n),e.on("touchCancel",n);const o=a.changedTouches[0];t?.start?.(o)},n=a=>{e.off("touchMove",r),e.off("touchEnd",n),e.off("touchCancel",n);const o=a.changedTouches[0];t?.end?.(o)},r=a=>{const o=a.changedTouches[0];t?.move?.(o)};return e.on("touchStart",s),()=>e.off("touchStart",s)}function Ql(i=document.documentElement){const t=new v.EventBus,e=new $l(i);let s=[];const n=da(),r=n.mousePoint,a=k=>{t.emit("mouseDown",k)},o=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||n.setCurrentMousePoint(Re(k,i)),t.emit("mouseMove",k)},c=k=>{t.emit("mouseOver",k)},l=k=>{t.emit("mouseOut",k)},u=k=>{t.emit("mouseEnter",k)},d=k=>{t.emit("mouseLeave",k)},m=k=>{t.emit("mouseClick",k)},g=k=>{t.emit("mouseDoubleClick",k)},_=k=>{t.emit("mouseWheel",k)},E=k=>{t.emit("mouseContextMenu",k)},b=k=>{t.emit("touchStart",k)},S=k=>{t.emit("touchEnd",k)},y=k=>{t.emit("touchCancel",k)},w=k=>{const Q=k.changedTouches[0];r.isDown||n.setCurrentMousePoint(Re(Q,i)),t.emit("touchMove",k)},P=k=>{t.emit("pointerDown",k)},M=k=>{t.emit("pointerUp",k)},L=k=>{t.emit("pointerCancel",k)},X=k=>{t.emit("pointerMove",k)},G=k=>{t.emit("pan",k)},W=k=>{t.emit("panStart",k)},$=k=>{t.emit("panMove",k)},K=k=>{t.emit("panEnd",k)},ot=k=>{t.emit("panCancel",k)},st=k=>{t.emit("panLeft",k)},Bt=k=>{t.emit("panRight",k)},Et=k=>{t.emit("panUp",k)},It=k=>{t.emit("panDown",k)},Nt=k=>{t.emit("pinch",k)},z=k=>{t.emit("pinchin",k)},R=k=>{t.emit("pinchout",k)},U=k=>{t.emit("press",k)},q=k=>{t.emit("rotate",k)},mt=k=>{t.emit("swipe",k)},Ft=k=>{t.emit("swipeLeft",k)},Ks=k=>{t.emit("swipeRight",k)},Qs=k=>{t.emit("swipeUp",k)},nt=k=>{t.emit("swipeDown",k)},Vt=k=>{t.emit("tap",k)},Z=k=>{!k.target||i==k.target||i.contains(k.target)||t.emit("tapOutSide",k)},ut=k=>{t.emit("transitionstart",k)},Oe=k=>{t.emit("transitionend",k)},_e=k=>{t.emit("animationstart",k)},Ee=k=>{t.emit("animationend",k)};let fe={...i.getBoundingClientRect(),width:i.offsetWidth,height:i.offsetHeight};return{el:i,get rect(){return fe},mousePoint:r,eb:t,start:async function(){s.push(N(i,"mousedown",a)),s.push(N(i,"mouseup",o)),s.push(N(i,"mousemove",h)),s.push(N(i,"mouseover",c)),s.push(N(i,"mouseout",l)),s.push(N(i,"mouseenter",u)),s.push(N(i,"mouseleave",d)),s.push(N(i,"click",m)),s.push(N(i,"dblclick",g)),s.push(N(i,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",_)),s.push(N(i,"contextmenu",E)),s.push(N(i,"touchstart",b)),s.push(N(i,"touchend",S)),s.push(N(i,"touchcancel",y)),s.push(N(i,"touchmove",w)),s.push(N(i,"pointerdown",P)),s.push(N(i,"pointerup",M)),s.push(N(i,"pointercancel",L)),s.push(N(i,"pointermove",X)),e.on("pan",G),e.on("panstart",W),e.on("panmove",$),e.on("panend",K),e.on("pancancel",ot),e.on("panleft",st),e.on("panright",Bt),e.on("panup",Et),e.on("pandown",It),e.on("pinch",Nt),e.on("pinchin",z),e.on("pinchout",R),e.on("press",U),e.on("rotate",q),e.on("swipe",mt),e.on("swipeleft",Ft),e.on("swiperight",Ks),e.on("swipeup",Qs),e.on("swipedown",nt),e.on("tap",Vt),s.push(N(document,"pointerdown",Z)),s.push(N(i,"transitionstart",ut)),s.push(N(i,"transitionend",Oe)),s.push(N(i,"animationstart",_e)),s.push(N(i,"animationend",Ee));const k=await on(i,Q=>{fe=Q,t.emit("resize",Q)});s.push(k),s.push(he(this,{start:Q=>{n.setStartMousePoint(Re(Q,i),!0)},move:Q=>{n.setCurrentMousePoint(Re(Q,i))},end:Q=>{n.setCurrentMousePoint(Re(Q,i),!1)}}))},end:()=>{t.removeAllListeners(),s.forEach(k=>k()),s=[],e.off("pan",G),e.off("panstart",W),e.off("panmove",$),e.off("panend",K),e.off("pancancel",ot),e.off("panleft",st),e.off("panright",Bt),e.off("panup",Et),e.off("pandown",It),e.off("pinch",Nt),e.off("pinchin",z),e.off("pinchout",R),e.off("press",U),e.off("rotate",q),e.off("swipe",mt),e.off("swipeleft",Ft),e.off("swiperight",Ks),e.off("swipeup",Qs),e.off("swipedown",nt),e.off("tap",Vt)}}}function tu(i,t,e=50){return he(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function eu(i,t,e=50){return he(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function pa(i="(prefers-color-scheme: dark)"){const t=window.matchMedia(i),e=v.ref(t.matches);return N(t,"change",s=>{e.value=s.matches}),{get:()=>e.value}}const{get:hn,set:su}=Rr(v.createYZSymbol("theme"));function cn(i){switch(su(i),hn()){case"dark":document.documentElement.classList.add("dark"),De(document.documentElement,"data-theme","dark");break;default:document.documentElement.classList.remove("dark"),De(document.documentElement,"data-theme","light");break}}function iu(){let i=hn();if(!i){const{get:t}=pa("(prefers-color-scheme: dark)");i=t()?"dark":"light"}switch(cn(i),i){case"dark":return"dark";default:return"light"}}function nu(){cn(hn()=="dark"?"light":"dark")}function ya(i,t=""){return getComputedStyle(document.documentElement).getPropertyValue(i)||t}function ru(i,t){document.documentElement.style.setProperty(i,t)}const au={getSelectedText:()=>window.getSelection()?.toString()||""};function ou(i){document.getElementsByTagName("title")[0].innerText=i,document.title=i}function wa(i){let t=!1,e;function s(){document.readyState==="loading"||t||(i(),e?.(),t=!0)}try{e=N(document,"DOMContentLoaded",s)}catch{e=N(window,"load",s)}return s(),e}function xa(i){return N(window,"beforeunload",t=>{i(t)})}async function ba(i,t){return new Promise(e=>{new MutationObserver((n,r)=>{t(n,r),e(()=>{r.disconnect()})}).observe(i,{attributes:!0,childList:!0,subtree:!0})})}const jt=new v.EventBus;let Sa="";ba(document,()=>{location.href!==Sa&&(Sa=location.href,jt.emit("urlchange",location.href))}),N(window,"hashchange",()=>{jt.emit("hashchange",location.hash)}),N(window,"popstate",i=>{jt.emit("popstate",i.state)});const va={onUrlChange:i=>(jt.on("urlchange",i),()=>{jt.off("urlchange",i)}),onHashChange:i=>(jt.on("hashchange",i),()=>{jt.off("hashchange",i)}),goto:(i,t=null)=>{history.pushState(t,"",i)},replace:(i,t=null)=>{history.replaceState(t,"",i)},onPopState:i=>(jt.on("popstate",i),()=>{jt.off("popstate",i)})};function hu(i){return va.onPopState(()=>{const{pathname:t,search:e}=location;i[t]?.()})}let Ta=!1;function cu(){Ta||(Ta=!0,ca(`
|
|
12
|
+
`;return function(){var D=new Error("get-stack-trace"),N=D&&D.stack?D.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",$=t.console&&(t.console.warn||t.console.log);return $&&$.call(t.console,A,N),g.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(_){if(_===i||_===null)throw new TypeError("Cannot convert undefined or null to object");for(var C=Object(_),A=1;A<arguments.length;A++){var D=arguments[A];if(D!==i&&D!==null)for(var N in D)D.hasOwnProperty(N)&&(C[N]=D[N])}return C}:y=Object.assign;var v=p(function(_,C,A){for(var D=Object.keys(C),N=0;N<D.length;)(!A||A&&_[D[N]]===i)&&(_[D[N]]=C[D[N]]),N++;return _},"extend","Use `assign`."),w=p(function(_,C){return v(_,C,!0)},"merge","Use `assign`.");function S(g,_,C){var A=_.prototype,D;D=g.prototype=Object.create(A),D.constructor=g,D._super=A,C&&y(D,C)}function x(g,_){return function(){return g.apply(_,arguments)}}function b(g,_){return typeof g==o?g.apply(_&&_[0]||i,_):g}function M(g,_){return g===i?_:g}function P(g,_,C){f(V(_),function(A){g.addEventListener(A,C,!1)})}function R(g,_,C){f(V(_),function(A){g.removeEventListener(A,C,!1)})}function B(g,_){for(;g;){if(g==_)return!0;g=g.parentNode}return!1}function F(g,_){return g.indexOf(_)>-1}function V(g){return g.trim().split(/\s+/g)}function G(g,_,C){if(g.indexOf&&!C)return g.indexOf(_);for(var A=0;A<g.length;){if(C&&g[A][C]==_||!C&&g[A]===_)return A;A++}return-1}function J(g){return Array.prototype.slice.call(g,0)}function nt(g,_,C){for(var A=[],D=[],N=0;N<g.length;){var $=_?g[N][_]:g[N];G(D,$)<0&&A.push(g[N]),D[N]=$,N++}return C&&(_?A=A.sort(function(mt,St){return mt[_]>St[_]}):A=A.sort()),A}function K(g,_){for(var C,A,D=_[0].toUpperCase()+_.slice(1),N=0;N<r.length;){if(C=r[N],A=C?C+D:_,A in g)return A;N++}return i}var Ut=1;function kt(){return Ut++}function Rt(g){var _=g.ownerDocument||g;return _.defaultView||_.parentWindow||t}var Vt=/mobile|tablet|ip(ad|hone|od)|android/i,O="ontouchstart"in t,L=K(t,"PointerEvent")!==i,X=O&&Vt.test(navigator.userAgent),H="touch",_t="pen",$t="mouse",Cn="kinect",An=25,ft=1,Ht=2,it=4,yt=8,ts=1,Fe=2,Ye=4,ve=8,k=16,at=Fe|Ye,Xe=ve|k,vc=at|Xe,_c=["x","y"],In=["clientX","clientY"];function Ot(g,_){var C=this;this.manager=g,this.callback=_,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(A){b(g.options.enable,[g])&&C.handler(A)},this.init()}Ot.prototype={handler:function(){},init:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(Rt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&R(this.element,this.evEl,this.domHandler),this.evTarget&&R(this.target,this.evTarget,this.domHandler),this.evWin&&R(Rt(this.element),this.evWin,this.domHandler)}};function B1(g){var _,C=g.options.inputClass;return C?_=C:L?_=zr:X?_=Ln:O?_=Nr:_=Dn,new _(g,F1)}function F1(g,_,C){var A=C.pointers.length,D=C.changedPointers.length,N=_&ft&&A-D===0,$=_&(it|yt)&&A-D===0;C.isFirst=!!N,C.isFinal=!!$,N&&(g.session={}),C.eventType=_,Y1(g,C),g.emit("hammer.input",C),g.recognize(C),g.session.prevInput=C}function Y1(g,_){var C=g.session,A=_.pointers,D=A.length;C.firstInput||(C.firstInput=Sc(_)),D>1&&!C.firstMultiple?C.firstMultiple=Sc(_):D===1&&(C.firstMultiple=!1);var N=C.firstInput,$=C.firstMultiple,dt=$?$.center:N.center,mt=_.center=Ec(A);_.timeStamp=l(),_.deltaTime=_.timeStamp-N.timeStamp,_.angle=Or(dt,mt),_.distance=kn(dt,mt),X1(C,_),_.offsetDirection=Pc(_.deltaX,_.deltaY);var St=Tc(_.deltaTime,_.deltaX,_.deltaY);_.overallVelocityX=St.x,_.overallVelocityY=St.y,_.overallVelocity=c(St.x)>c(St.y)?St.x:St.y,_.scale=$?$1($.pointers,A):1,_.rotation=$?V1($.pointers,A):0,_.maxPointers=C.prevInput?_.pointers.length>C.prevInput.maxPointers?_.pointers.length:C.prevInput.maxPointers:_.pointers.length,U1(C,_);var Jt=g.element;B(_.srcEvent.target,Jt)&&(Jt=_.srcEvent.target),_.target=Jt}function X1(g,_){var C=_.center,A=g.offsetDelta||{},D=g.prevDelta||{},N=g.prevInput||{};(_.eventType===ft||N.eventType===it)&&(D=g.prevDelta={x:N.deltaX||0,y:N.deltaY||0},A=g.offsetDelta={x:C.x,y:C.y}),_.deltaX=D.x+(C.x-A.x),_.deltaY=D.y+(C.y-A.y)}function U1(g,_){var C=g.lastInterval||_,A=_.timeStamp-C.timeStamp,D,N,$,dt;if(_.eventType!=yt&&(A>An||C.velocity===i)){var mt=_.deltaX-C.deltaX,St=_.deltaY-C.deltaY,Jt=Tc(A,mt,St);N=Jt.x,$=Jt.y,D=c(Jt.x)>c(Jt.y)?Jt.x:Jt.y,dt=Pc(mt,St),g.lastInterval=_}else D=C.velocity,N=C.velocityX,$=C.velocityY,dt=C.direction;_.velocity=D,_.velocityX=N,_.velocityY=$,_.direction=dt}function Sc(g){for(var _=[],C=0;C<g.pointers.length;)_[C]={clientX:h(g.pointers[C].clientX),clientY:h(g.pointers[C].clientY)},C++;return{timeStamp:l(),pointers:_,center:Ec(_),deltaX:g.deltaX,deltaY:g.deltaY}}function Ec(g){var _=g.length;if(_===1)return{x:h(g[0].clientX),y:h(g[0].clientY)};for(var C=0,A=0,D=0;D<_;)C+=g[D].clientX,A+=g[D].clientY,D++;return{x:h(C/_),y:h(A/_)}}function Tc(g,_,C){return{x:_/g||0,y:C/g||0}}function Pc(g,_){return g===_?ts:c(g)>=c(_)?g<0?Fe:Ye:_<0?ve:k}function kn(g,_,C){C||(C=_c);var A=_[C[0]]-g[C[0]],D=_[C[1]]-g[C[1]];return Math.sqrt(A*A+D*D)}function Or(g,_,C){C||(C=_c);var A=_[C[0]]-g[C[0]],D=_[C[1]]-g[C[1]];return Math.atan2(D,A)*180/Math.PI}function V1(g,_){return Or(_[1],_[0],In)+Or(g[1],g[0],In)}function $1(g,_){return kn(_[0],_[1],In)/kn(g[0],g[1],In)}var G1={mousedown:ft,mousemove:Ht,mouseup:it},q1="mousedown",j1="mousemove mouseup";function Dn(){this.evEl=q1,this.evWin=j1,this.pressed=!1,Ot.apply(this,arguments)}S(Dn,Ot,{handler:function(_){var C=G1[_.type];C&ft&&_.button===0&&(this.pressed=!0),C&Ht&&_.which!==1&&(C=it),this.pressed&&(C&it&&(this.pressed=!1),this.callback(this.manager,C,{pointers:[_],changedPointers:[_],pointerType:$t,srcEvent:_}))}});var H1={pointerdown:ft,pointermove:Ht,pointerup:it,pointercancel:yt,pointerout:yt},W1={2:H,3:_t,4:$t,5:Cn},Mc="pointerdown",Cc="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Mc="MSPointerDown",Cc="MSPointerMove MSPointerUp MSPointerCancel");function zr(){this.evEl=Mc,this.evWin=Cc,Ot.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}S(zr,Ot,{handler:function(_){var C=this.store,A=!1,D=_.type.toLowerCase().replace("ms",""),N=H1[D],$=W1[_.pointerType]||_.pointerType,dt=$==H,mt=G(C,_.pointerId,"pointerId");N&ft&&(_.button===0||dt)?mt<0&&(C.push(_),mt=C.length-1):N&(it|yt)&&(A=!0),!(mt<0)&&(C[mt]=_,this.callback(this.manager,N,{pointers:C,changedPointers:[_],pointerType:$,srcEvent:_}),A&&C.splice(mt,1))}});var J1={touchstart:ft,touchmove:Ht,touchend:it,touchcancel:yt},Z1="touchstart",K1="touchstart touchmove touchend touchcancel";function Ac(){this.evTarget=Z1,this.evWin=K1,this.started=!1,Ot.apply(this,arguments)}S(Ac,Ot,{handler:function(_){var C=J1[_.type];if(C===ft&&(this.started=!0),!!this.started){var A=Q1.call(this,_,C);C&(it|yt)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,C,{pointers:A[0],changedPointers:A[1],pointerType:H,srcEvent:_})}}});function Q1(g,_){var C=J(g.touches),A=J(g.changedTouches);return _&(it|yt)&&(C=nt(C.concat(A),"identifier",!0)),[C,A]}var ty={touchstart:ft,touchmove:Ht,touchend:it,touchcancel:yt},ey="touchstart touchmove touchend touchcancel";function Ln(){this.evTarget=ey,this.targetIds={},Ot.apply(this,arguments)}S(Ln,Ot,{handler:function(_){var C=ty[_.type],A=sy.call(this,_,C);A&&this.callback(this.manager,C,{pointers:A[0],changedPointers:A[1],pointerType:H,srcEvent:_})}});function sy(g,_){var C=J(g.touches),A=this.targetIds;if(_&(ft|Ht)&&C.length===1)return A[C[0].identifier]=!0,[C,C];var D,N,$=J(g.changedTouches),dt=[],mt=this.target;if(N=C.filter(function(St){return B(St.target,mt)}),_===ft)for(D=0;D<N.length;)A[N[D].identifier]=!0,D++;for(D=0;D<$.length;)A[$[D].identifier]&&dt.push($[D]),_&(it|yt)&&delete A[$[D].identifier],D++;if(dt.length)return[nt(N.concat(dt),"identifier",!0),dt]}var ny=2500,Ic=25;function Nr(){Ot.apply(this,arguments);var g=x(this.handler,this);this.touch=new Ln(this.manager,g),this.mouse=new Dn(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}S(Nr,Ot,{handler:function(_,C,A){var D=A.pointerType==H,N=A.pointerType==$t;if(!(N&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(D)iy.call(this,C,A);else if(N&&ry.call(this,A))return;this.callback(_,C,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function iy(g,_){g&ft?(this.primaryTouch=_.changedPointers[0].identifier,kc.call(this,_)):g&(it|yt)&&kc.call(this,_)}function kc(g){var _=g.changedPointers[0];if(_.identifier===this.primaryTouch){var C={x:_.clientX,y:_.clientY};this.lastTouches.push(C);var A=this.lastTouches,D=function(){var N=A.indexOf(C);N>-1&&A.splice(N,1)};setTimeout(D,ny)}}function ry(g){for(var _=g.srcEvent.clientX,C=g.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var D=this.lastTouches[A],N=Math.abs(_-D.x),$=Math.abs(C-D.y);if(N<=Ic&&$<=Ic)return!0}return!1}var Dc=K(a.style,"touchAction"),Lc=Dc!==i,Rc="compute",Oc="auto",Br="manipulation",Ue="none",Is="pan-x",ks="pan-y",Rn=oy();function Fr(g,_){this.manager=g,this.set(_)}Fr.prototype={set:function(g){g==Rc&&(g=this.compute()),Lc&&this.manager.element.style&&Rn[g]&&(this.manager.element.style[Dc]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return f(this.manager.recognizers,function(_){b(_.options.enable,[_])&&(g=g.concat(_.getTouchAction()))}),ay(g.join(" "))},preventDefaults:function(g){var _=g.srcEvent,C=g.offsetDirection;if(this.manager.session.prevented){_.preventDefault();return}var A=this.actions,D=F(A,Ue)&&!Rn[Ue],N=F(A,ks)&&!Rn[ks],$=F(A,Is)&&!Rn[Is];if(D){var dt=g.pointers.length===1,mt=g.distance<2,St=g.deltaTime<250;if(dt&&mt&&St)return}if(!($&&N)&&(D||N&&C&at||$&&C&Xe))return this.preventSrc(_)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function ay(g){if(F(g,Ue))return Ue;var _=F(g,Is),C=F(g,ks);return _&&C?Ue:_||C?_?Is:ks:F(g,Br)?Br:Oc}function oy(){if(!Lc)return!1;var g={},_=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(C){g[C]=_?t.CSS.supports("touch-action",C):!0}),g}var On=1,zt=2,es=4,_e=8,ie=_e,Ds=16,Wt=32;function re(g){this.options=y({},this.defaults,g||{}),this.id=kt(),this.manager=null,this.options.enable=M(this.options.enable,!0),this.state=On,this.simultaneous={},this.requireFail=[]}re.prototype={defaults:{},set:function(g){return y(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(d(g,"recognizeWith",this))return this;var _=this.simultaneous;return g=zn(g,this),_[g.id]||(_[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return d(g,"dropRecognizeWith",this)?this:(g=zn(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(d(g,"requireFailure",this))return this;var _=this.requireFail;return g=zn(g,this),G(_,g)===-1&&(_.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(d(g,"dropRequireFailure",this))return this;g=zn(g,this);var _=G(this.requireFail,g);return _>-1&&this.requireFail.splice(_,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var _=this,C=this.state;function A(D){_.manager.emit(D,g)}C<_e&&A(_.options.event+zc(C)),A(_.options.event),g.additionalEvent&&A(g.additionalEvent),C>=_e&&A(_.options.event+zc(C))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=Wt},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(Wt|On)))return!1;g++}return!0},recognize:function(g){var _=y({},g);if(!b(this.options.enable,[this,_])){this.reset(),this.state=Wt;return}this.state&(ie|Ds|Wt)&&(this.state=On),this.state=this.process(_),this.state&(zt|es|_e|Ds)&&this.tryEmit(_)},process:function(g){},getTouchAction:function(){},reset:function(){}};function zc(g){return g&Ds?"cancel":g&_e?"end":g&es?"move":g&zt?"start":""}function Nc(g){return g==k?"down":g==ve?"up":g==Fe?"left":g==Ye?"right":""}function zn(g,_){var C=_.manager;return C?C.get(g):g}function Gt(){re.apply(this,arguments)}S(Gt,re,{defaults:{pointers:1},attrTest:function(g){var _=this.options.pointers;return _===0||g.pointers.length===_},process:function(g){var _=this.state,C=g.eventType,A=_&(zt|es),D=this.attrTest(g);return A&&(C&yt||!D)?_|Ds:A||D?C&it?_|_e:_&zt?_|es:zt:Wt}});function Nn(){Gt.apply(this,arguments),this.pX=null,this.pY=null}S(Nn,Gt,{defaults:{event:"pan",threshold:10,pointers:1,direction:vc},getTouchAction:function(){var g=this.options.direction,_=[];return g&at&&_.push(ks),g&Xe&&_.push(Is),_},directionTest:function(g){var _=this.options,C=!0,A=g.distance,D=g.direction,N=g.deltaX,$=g.deltaY;return D&_.direction||(_.direction&at?(D=N===0?ts:N<0?Fe:Ye,C=N!=this.pX,A=Math.abs(g.deltaX)):(D=$===0?ts:$<0?ve:k,C=$!=this.pY,A=Math.abs(g.deltaY))),g.direction=D,C&&A>_.threshold&&D&_.direction},attrTest:function(g){return Gt.prototype.attrTest.call(this,g)&&(this.state&zt||!(this.state&zt)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var _=Nc(g.direction);_&&(g.additionalEvent=this.options.event+_),this._super.emit.call(this,g)}});function Yr(){Gt.apply(this,arguments)}S(Yr,Gt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&zt)},emit:function(g){if(g.scale!==1){var _=g.scale<1?"in":"out";g.additionalEvent=this.options.event+_}this._super.emit.call(this,g)}});function Xr(){re.apply(this,arguments),this._timer=null,this._input=null}S(Xr,re,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Oc]},process:function(g){var _=this.options,C=g.pointers.length===_.pointers,A=g.distance<_.threshold,D=g.deltaTime>_.time;if(this._input=g,!A||!C||g.eventType&(it|yt)&&!D)this.reset();else if(g.eventType&ft)this.reset(),this._timer=u(function(){this.state=ie,this.tryEmit()},_.time,this);else if(g.eventType&it)return ie;return Wt},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===ie&&(g&&g.eventType&it?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function Ur(){Gt.apply(this,arguments)}S(Ur,Gt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&zt)}});function Vr(){Gt.apply(this,arguments)}S(Vr,Gt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|Xe,pointers:1},getTouchAction:function(){return Nn.prototype.getTouchAction.call(this)},attrTest:function(g){var _=this.options.direction,C;return _&(at|Xe)?C=g.overallVelocity:_&at?C=g.overallVelocityX:_&Xe&&(C=g.overallVelocityY),this._super.attrTest.call(this,g)&&_&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&c(C)>this.options.velocity&&g.eventType&it},emit:function(g){var _=Nc(g.offsetDirection);_&&this.manager.emit(this.options.event+_,g),this.manager.emit(this.options.event,g)}});function Bn(){re.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}S(Bn,re,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Br]},process:function(g){var _=this.options,C=g.pointers.length===_.pointers,A=g.distance<_.threshold,D=g.deltaTime<_.time;if(this.reset(),g.eventType&ft&&this.count===0)return this.failTimeout();if(A&&D&&C){if(g.eventType!=it)return this.failTimeout();var N=this.pTime?g.timeStamp-this.pTime<_.interval:!0,$=!this.pCenter||kn(this.pCenter,g.center)<_.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!$||!N?this.count=1:this.count+=1,this._input=g;var dt=this.count%_.taps;if(dt===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ie,this.tryEmit()},_.interval,this),zt):ie}return Wt},failTimeout:function(){return this._timer=u(function(){this.state=Wt},this.options.interval,this),Wt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ie&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ae(g,_){return _=_||{},_.recognizers=M(_.recognizers,ae.defaults.preset),new $r(g,_)}ae.VERSION="2.0.7",ae.defaults={domEvents:!1,touchAction:Rc,enable:!0,inputTarget:null,inputClass:null,preset:[[Ur,{enable:!1}],[Yr,{enable:!1},["rotate"]],[Vr,{direction:at}],[Nn,{direction:at},["swipe"]],[Bn],[Bn,{event:"doubletap",taps:2},["tap"]],[Xr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var hy=1,Bc=2;function $r(g,_){this.options=y({},ae.defaults,_||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=B1(this),this.touchAction=new Fr(this,this.options.touchAction),Fc(this,!0),f(this.options.recognizers,function(C){var A=this.add(new C[0](C[1]));C[2]&&A.recognizeWith(C[2]),C[3]&&A.requireFailure(C[3])},this)}$r.prototype={set:function(g){return y(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?Bc:hy},recognize:function(g){var _=this.session;if(!_.stopped){this.touchAction.preventDefaults(g);var C,A=this.recognizers,D=_.curRecognizer;(!D||D&&D.state&ie)&&(D=_.curRecognizer=null);for(var N=0;N<A.length;)C=A[N],_.stopped!==Bc&&(!D||C==D||C.canRecognizeWith(D))?C.recognize(g):C.reset(),!D&&C.state&(zt|es|_e)&&(D=_.curRecognizer=C),N++}},get:function(g){if(g instanceof re)return g;for(var _=this.recognizers,C=0;C<_.length;C++)if(_[C].options.event==g)return _[C];return null},add:function(g){if(d(g,"add",this))return this;var _=this.get(g.options.event);return _&&this.remove(_),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(d(g,"remove",this))return this;if(g=this.get(g),g){var _=this.recognizers,C=G(_,g);C!==-1&&(_.splice(C,1),this.touchAction.update())}return this},on:function(g,_){if(g!==i&&_!==i){var C=this.handlers;return f(V(g),function(A){C[A]=C[A]||[],C[A].push(_)}),this}},off:function(g,_){if(g!==i){var C=this.handlers;return f(V(g),function(A){_?C[A]&&C[A].splice(G(C[A],_),1):delete C[A]}),this}},emit:function(g,_){this.options.domEvents&&cy(g,_);var C=this.handlers[g]&&this.handlers[g].slice();if(!(!C||!C.length)){_.type=g,_.preventDefault=function(){_.srcEvent.preventDefault()};for(var A=0;A<C.length;)C[A](_),A++}},destroy:function(){this.element&&Fc(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Fc(g,_){var C=g.element;if(C.style){var A;f(g.options.cssProps,function(D,N){A=K(C.style,N),_?(g.oldCssProps[A]=C.style[A],C.style[A]=D):C.style[A]=g.oldCssProps[A]||""}),_||(g.oldCssProps={})}}function cy(g,_){var C=e.createEvent("Event");C.initEvent(g,!0,!0),C.gesture=_,_.target.dispatchEvent(C)}y(ae,{INPUT_START:ft,INPUT_MOVE:Ht,INPUT_END:it,INPUT_CANCEL:yt,STATE_POSSIBLE:On,STATE_BEGAN:zt,STATE_CHANGED:es,STATE_ENDED:_e,STATE_RECOGNIZED:ie,STATE_CANCELLED:Ds,STATE_FAILED:Wt,DIRECTION_NONE:ts,DIRECTION_LEFT:Fe,DIRECTION_RIGHT:Ye,DIRECTION_UP:ve,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:Xe,DIRECTION_ALL:vc,Manager:$r,Input:Ot,TouchAction:Fr,TouchInput:Ln,MouseInput:Dn,PointerEventInput:zr,TouchMouseInput:Nr,SingleTouchInput:Ac,Recognizer:re,AttrRecognizer:Gt,Tap:Bn,Pan:Nn,Swipe:Vr,Pinch:Yr,Rotate:Ur,Press:Xr,on:P,off:R,each:f,merge:w,extend:v,assign:y,inherit:S,bindFn:x,prefixed:K});var ly=typeof t<"u"?t:typeof self<"u"?self:{};ly.Hammer=ae,typeof i=="function"&&i.amd?i(function(){return ae}):n.exports?n.exports=ae:t[s]=ae})(window,document,"Hammer")})(za);var _u=za.exports;const tt=qr(_u);var ii=function(n,t){return ii=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])},ii(n,t)};function he(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ii(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Su(n,t,e,s){function i(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function o(l){try{c(s.next(l))}catch(u){a(u)}}function h(l){try{c(s.throw(l))}catch(u){a(u)}}function c(l){l.done?r(l.value):i(l.value).then(o,h)}c((s=s.apply(n,t||[])).next())})}function Na(n,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,i,r,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return h([c,l])}}function h(c){if(s)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(e=0)),e;)try{if(s=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(n,e)}catch(l){c=[6,l],i=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Te(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],s=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ce(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var s=e.call(n),i,r=[],a;try{for(;(t===void 0||t-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(e=s.return)&&e.call(s)}finally{if(a)throw a.error}}return r}function Pe(n,t,e){if(e||arguments.length===2)for(var s=0,i=t.length,r;s<i;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return n.concat(r||Array.prototype.slice.call(t))}function Ge(n){return this instanceof Ge?(this.v=n,this):new Ge(n)}function Eu(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=e.apply(n,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(f){return function(p){return Promise.resolve(p).then(f,u)}}function o(f,p){s[f]&&(i[f]=function(y){return new Promise(function(v,w){r.push([f,y,v,w])>1||h(f,y)})},p&&(i[f]=p(i[f])))}function h(f,p){try{c(s[f](p))}catch(y){d(r[0][3],y)}}function c(f){f.value instanceof Ge?Promise.resolve(f.value.v).then(l,u):d(r[0][2],f)}function l(f){h("next",f)}function u(f){h("throw",f)}function d(f,p){f(p),r.shift(),r.length&&h(r[0][0],r[0][1])}}function Tu(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Te=="function"?Te(n):n[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(r){e[r]=n[r]&&function(a){return new Promise(function(o,h){a=n[r](a),i(o,h,a.done,a.value)})}}function i(r,a,o,h){Promise.resolve(h).then(function(c){r({value:c,done:o})},a)}}typeof SuppressedError=="function"&&SuppressedError;function q(n){return typeof n=="function"}function ri(n){var t=function(s){Error.call(s),s.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ai=ri(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
13
|
+
`+e.map(function(s,i){return i+1+") "+s.toString()}).join(`
|
|
14
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function as(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var qe=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,s,i,r;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Te(a),h=o.next();!h.done;h=o.next()){var c=h.value;c.remove(this)}}catch(y){t={error:y}}finally{try{h&&!h.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(q(l))try{l()}catch(y){r=y instanceof ai?y.errors:[y]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Te(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ya(p)}catch(y){r=r??[],y instanceof ai?r=Pe(Pe([],ce(r)),ce(y.errors)):r.push(y)}}}catch(y){s={error:y}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(s)throw s.error}}}if(r)throw new ai(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ya(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&as(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&as(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Ba=qe.EMPTY;function Fa(n){return n instanceof qe||n&&"closed"in n&&q(n.remove)&&q(n.add)&&q(n.unsubscribe)}function Ya(n){q(n)?n():n.unsubscribe()}var Xa={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},oi={setTimeout:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];var i=oi.delegate;return i?.setTimeout?i.setTimeout.apply(i,Pe([n,t],ce(e))):setTimeout.apply(void 0,Pe([n,t],ce(e)))},clearTimeout:function(n){var t=oi.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Ua(n){oi.setTimeout(function(){throw n})}function os(){}function Hs(n){n()}var hi=function(n){he(t,n);function t(e){var s=n.call(this)||this;return s.isStopped=!1,e?(s.destination=e,Fa(e)&&e.add(s)):s.destination=Au,s}return t.create=function(e,s,i){return new Ws(e,s,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(qe),Pu=Function.prototype.bind;function ci(n,t){return Pu.call(n,t)}var Mu=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){Js(s)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){Js(s)}else Js(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Js(e)}},n}(),Ws=function(n){he(t,n);function t(e,s,i){var r=n.call(this)||this,a;if(q(e)||!e)a={next:e??void 0,error:s??void 0,complete:i??void 0};else{var o;r&&Xa.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=function(){return r.unsubscribe()},a={next:e.next&&ci(e.next,o),error:e.error&&ci(e.error,o),complete:e.complete&&ci(e.complete,o)}):a=e}return r.destination=new Mu(a),r}return t}(hi);function Js(n){Ua(n)}function Cu(n){throw n}var Au={closed:!0,next:os,error:Cu,complete:os},li=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Me(n){return n}function Iu(n){return n.length===0?Me:n.length===1?n[0]:function(e){return n.reduce(function(s,i){return i(s)},e)}}var et=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,s){var i=this,r=Du(t)?t:new Ws(t,e,s);return Hs(function(){var a=i,o=a.operator,h=a.source;r.add(o?o.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var s=this;return e=Va(e),new e(function(i,r){var a=new Ws({next:function(o){try{t(o)}catch(h){r(h),a.unsubscribe()}},error:r,complete:i});s.subscribe(a)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[li]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Iu(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Va(t),new t(function(s,i){var r;e.subscribe(function(a){return r=a},function(a){return i(a)},function(){return s(r)})})},n.create=function(t){return new n(t)},n}();function Va(n){var t;return(t=n??Xa.Promise)!==null&&t!==void 0?t:Promise}function ku(n){return n&&q(n.next)&&q(n.error)&&q(n.complete)}function Du(n){return n&&n instanceof hi||ku(n)&&Fa(n)}function Lu(n){return q(n?.lift)}function Mt(n){return function(t){if(Lu(t))return t.lift(function(e){try{return n(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function ct(n,t,e,s,i){return new Ru(n,t,e,s,i)}var Ru=function(n){he(t,n);function t(e,s,i,r,a,o){var h=n.call(this,e)||this;return h.onFinalize=a,h.shouldUnsubscribe=o,h._next=s?function(c){try{s(c)}catch(l){e.error(l)}}:n.prototype._next,h._error=r?function(c){try{r(c)}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(hi),Ou=ri(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ui=function(n){he(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new $a(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ou},t.prototype.next=function(e){var s=this;Hs(function(){var i,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var a=Te(s.currentObservers),o=a.next();!o.done;o=a.next()){var h=o.value;h.next(e)}}catch(c){i={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var s=this;Hs(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var i=s.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Hs(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,i=this,r=i.hasError,a=i.isStopped,o=i.observers;return r||a?Ba:(this.currentObservers=null,o.push(e),new qe(function(){s.currentObservers=null,as(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,i=s.hasError,r=s.thrownError,a=s.isStopped;i?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new et;return e.source=this,e},t.create=function(e,s){return new $a(e,s)},t}(et),$a=function(n){he(t,n);function t(e,s){var i=n.call(this)||this;return i.destination=e,i.source=s,i}return t.prototype.next=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.next)===null||i===void 0||i.call(s,e)},t.prototype.error=function(e){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.error)===null||i===void 0||i.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,i;return(i=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&i!==void 0?i:Ba},t}(ui),Ga={now:function(){return(Ga.delegate||Date).now()},delegate:void 0},zu=function(n){he(t,n);function t(e,s){return n.call(this)||this}return t.prototype.schedule=function(e,s){return this},t}(qe),Zs={setInterval:function(n,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];var i=Zs.delegate;return i?.setInterval?i.setInterval.apply(i,Pe([n,t],ce(e))):setInterval.apply(void 0,Pe([n,t],ce(e)))},clearInterval:function(n){var t=Zs.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},Nu=function(n){he(t,n);function t(e,s){var i=n.call(this,e,s)||this;return i.scheduler=e,i.work=s,i.pending=!1,i}return t.prototype.schedule=function(e,s){var i;if(s===void 0&&(s=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(a,r,s)),this.pending=!0,this.delay=s,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,s),this},t.prototype.requestAsyncId=function(e,s,i){return i===void 0&&(i=0),Zs.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,s,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return s;s!=null&&Zs.clearInterval(s)},t.prototype.execute=function(e,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,s);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,s){var i=!1,r;try{this.work(e)}catch(a){i=!0,r=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,s=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,as(r,this),s!=null&&(this.id=this.recycleAsyncId(i,s,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(zu),qa=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,s){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(s,e)},n.now=Ga.now,n}(),Bu=function(n){he(t,n);function t(e,s){s===void 0&&(s=qa.now);var i=n.call(this,e,s)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var s=this.actions;if(this._active){s.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=s.shift());if(this._active=!1,i){for(;e=s.shift();)e.unsubscribe();throw i}},t}(qa),fi=new Bu(Nu),Fu=fi,ja=new et(function(n){return n.complete()});function Ha(n){return n&&q(n.schedule)}function di(n){return n[n.length-1]}function Yu(n){return q(di(n))?n.pop():void 0}function hs(n){return Ha(di(n))?n.pop():void 0}function Xu(n,t){return typeof di(n)=="number"?n.pop():t}var mi=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Wa(n){return q(n?.then)}function Ja(n){return q(n[li])}function Za(n){return Symbol.asyncIterator&&q(n?.[Symbol.asyncIterator])}function Ka(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Uu(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Qa=Uu();function to(n){return q(n?.[Qa])}function eo(n){return Eu(this,arguments,function(){var e,s,i,r;return Na(this,function(a){switch(a.label){case 0:e=n.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Ge(e.read())];case 3:return s=a.sent(),i=s.value,r=s.done,r?[4,Ge(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ge(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function so(n){return q(n?.getReader)}function gt(n){if(n instanceof et)return n;if(n!=null){if(Ja(n))return Vu(n);if(mi(n))return $u(n);if(Wa(n))return Gu(n);if(Za(n))return no(n);if(to(n))return qu(n);if(so(n))return ju(n)}throw Ka(n)}function Vu(n){return new et(function(t){var e=n[li]();if(q(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $u(n){return new et(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function Gu(n){return new et(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Ua)})}function qu(n){return new et(function(t){var e,s;try{for(var i=Te(n),r=i.next();!r.done;r=i.next()){var a=r.value;if(t.next(a),t.closed)return}}catch(o){e={error:o}}finally{try{r&&!r.done&&(s=i.return)&&s.call(i)}finally{if(e)throw e.error}}t.complete()})}function no(n){return new et(function(t){Hu(n,t).catch(function(e){return t.error(e)})})}function ju(n){return no(eo(n))}function Hu(n,t){var e,s,i,r;return Su(this,void 0,void 0,function(){var a,o;return Na(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),e=Tu(n),h.label=1;case 1:return[4,e.next()];case 2:if(s=h.sent(),!!s.done)return[3,4];if(a=s.value,t.next(a),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=h.sent(),i={error:o},[3,11];case 6:return h.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Zt(n,t,e,s,i){s===void 0&&(s=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(r),!i)return r}function io(n,t){return t===void 0&&(t=0),Mt(function(e,s){e.subscribe(ct(s,function(i){return Zt(s,n,function(){return s.next(i)},t)},function(){return Zt(s,n,function(){return s.complete()},t)},function(i){return Zt(s,n,function(){return s.error(i)},t)}))})}function pi(n,t){return t===void 0&&(t=0),Mt(function(e,s){s.add(n.schedule(function(){return e.subscribe(s)},t))})}function Wu(n,t){return gt(n).pipe(pi(t),io(t))}function Ju(n,t){return gt(n).pipe(pi(t),io(t))}function Zu(n,t){return new et(function(e){var s=0;return t.schedule(function(){s===n.length?e.complete():(e.next(n[s++]),e.closed||this.schedule())})})}function Ku(n,t){return new et(function(e){var s;return Zt(e,t,function(){s=n[Qa](),Zt(e,t,function(){var i,r,a;try{i=s.next(),r=i.value,a=i.done}catch(o){e.error(o);return}a?e.complete():e.next(r)},0,!0)}),function(){return q(s?.return)&&s.return()}})}function ro(n,t){if(!n)throw new Error("Iterable cannot be null");return new et(function(e){Zt(e,t,function(){var s=n[Symbol.asyncIterator]();Zt(e,t,function(){s.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function Qu(n,t){return ro(eo(n),t)}function tf(n,t){if(n!=null){if(Ja(n))return Wu(n,t);if(mi(n))return Zu(n,t);if(Wa(n))return Ju(n,t);if(Za(n))return ro(n,t);if(to(n))return Ku(n,t);if(so(n))return Qu(n,t)}throw Ka(n)}function cs(n,t){return t?tf(n,t):gt(n)}function ef(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=hs(n);return cs(n,e)}var sf=ri(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function nf(n,t){var e=typeof t=="object";return new Promise(function(s,i){var r=new Ws({next:function(a){s(a),r.unsubscribe()},error:i,complete:function(){e?s(t.defaultValue):i(new sf)}});n.subscribe(r)})}function rf(n){return n instanceof Date&&!isNaN(n)}function rt(n,t){return Mt(function(e,s){var i=0;e.subscribe(ct(s,function(r){s.next(n.call(t,r,i++))}))})}var af=Array.isArray;function of(n,t){return af(t)?n.apply(void 0,Pe([],ce(t))):n(t)}function gi(n){return rt(function(t){return of(n,t)})}var hf=Array.isArray,cf=Object.getPrototypeOf,lf=Object.prototype,uf=Object.keys;function ff(n){if(n.length===1){var t=n[0];if(hf(t))return{args:t,keys:null};if(df(t)){var e=uf(t);return{args:e.map(function(s){return t[s]}),keys:e}}}return{args:n,keys:null}}function df(n){return n&&typeof n=="object"&&cf(n)===lf}function mf(n,t){return n.reduce(function(e,s,i){return e[s]=t[i],e},{})}function pf(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=hs(n),s=Yu(n),i=ff(n),r=i.args,a=i.keys;if(r.length===0)return cs([],e);var o=new et(gf(r,e,a?function(h){return mf(a,h)}:Me));return s?o.pipe(gi(s)):o}function gf(n,t,e){return e===void 0&&(e=Me),function(s){ao(t,function(){for(var i=n.length,r=new Array(i),a=i,o=i,h=function(l){ao(t,function(){var u=cs(n[l],t),d=!1;u.subscribe(ct(s,function(f){r[l]=f,d||(d=!0,o--),o||s.next(e(r.slice()))},function(){--a||s.complete()}))},s)},c=0;c<i;c++)h(c)},s)}}function ao(n,t,e){n?Zt(e,n,t):t()}function yf(n,t,e,s,i,r,a,o){var h=[],c=0,l=0,u=!1,d=function(){u&&!h.length&&!c&&t.complete()},f=function(y){return c<s?p(y):h.push(y)},p=function(y){r&&t.next(y),c++;var v=!1;gt(e(y,l++)).subscribe(ct(t,function(w){i?.(w),r?f(w):t.next(w)},function(){v=!0},void 0,function(){if(v)try{c--;for(var w=function(){var S=h.shift();a?Zt(t,a,function(){return p(S)}):p(S)};h.length&&c<s;)w();d()}catch(S){t.error(S)}}))};return n.subscribe(ct(t,f,function(){u=!0,d()})),function(){o?.()}}function yi(n,t,e){return e===void 0&&(e=1/0),q(t)?yi(function(s,i){return rt(function(r,a){return t(s,r,i,a)})(gt(n(s,i)))},e):(typeof t=="number"&&(e=t),Mt(function(s,i){return yf(s,i,n,e)}))}function oo(n){return n===void 0&&(n=1/0),yi(Me,n)}function wf(){return oo(1)}function ho(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return wf()(cs(n,hs(n)))}var xf=["addListener","removeListener"],bf=["addEventListener","removeEventListener"],vf=["on","off"];function wi(n,t,e,s){if(q(e)&&(s=e,e=void 0),s)return wi(n,t,e).pipe(gi(s));var i=ce(Ef(n)?bf.map(function(o){return function(h){return n[o](t,h,e)}}):_f(n)?xf.map(co(n,t)):Sf(n)?vf.map(co(n,t)):[],2),r=i[0],a=i[1];if(!r&&mi(n))return yi(function(o){return wi(o,t,e)})(gt(n));if(!r)throw new TypeError("Invalid event target");return new et(function(o){var h=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return o.next(1<c.length?c:c[0])};return r(h),function(){return a(h)}})}function co(n,t){return function(e){return function(s){return n[e](t,s)}}}function _f(n){return q(n.addListener)&&q(n.removeListener)}function Sf(n){return q(n.on)&&q(n.off)}function Ef(n){return q(n.addEventListener)&&q(n.removeEventListener)}function st(n,t,e){return e?st(n,t).pipe(gi(e)):new et(function(s){var i=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return s.next(a.length===1?a[0]:a)},r=n(i);return q(t)?function(){return t(i,r)}:void 0})}function Tf(n,t,e){n===void 0&&(n=0),e===void 0&&(e=Fu);var s=-1;return t!=null&&(Ha(t)?e=t:s=t),new et(function(i){var r=rf(n)?+n-e.now():n;r<0&&(r=0);var a=0;return e.schedule(function(){i.closed||(i.next(a++),0<=s?this.schedule(void 0,s):i.complete())},r)})}function Pf(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=hs(n),s=Xu(n,1/0),i=n;return i.length?i.length===1?gt(i[0]):oo(s)(cs(i,e)):ja}var Mf=Array.isArray;function Cf(n){return n.length===1&&Mf(n[0])?n[0]:n}function lo(n,t){return Mt(function(e,s){var i=0;e.subscribe(ct(s,function(r){return n.call(t,r,i++)&&s.next(r)}))})}function xi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=Cf(n),n.length===1?gt(n[0]):new et(Af(n))}function Af(n){return function(t){for(var e=[],s=function(r){e.push(gt(n[r]).subscribe(ct(t,function(a){if(e){for(var o=0;o<e.length;o++)o!==r&&e[o].unsubscribe();e=null}t.next(a)})))},i=0;e&&!t.closed&&i<n.length;i++)s(i)}}function le(n,t){return t===void 0&&(t=Me),n=n??If,Mt(function(e,s){var i,r=!0;e.subscribe(ct(s,function(a){var o=t(a);(r||!n(i,o))&&(r=!1,i=o,s.next(a))}))})}function If(n,t){return n===t}function uo(n,t){return t?function(e){return e.pipe(uo(function(s,i){return gt(n(s,i)).pipe(rt(function(r,a){return t(s,r,i,a)}))}))}:Mt(function(e,s){var i=0,r=null,a=!1;e.subscribe(ct(s,function(o){r||(r=ct(s,void 0,function(){r=null,a&&s.complete()}),gt(n(o,i++)).subscribe(r))},function(){a=!0,!r&&s.complete()}))})}function ue(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=hs(n);return Mt(function(s,i){(e?ho(n,s,e):ho(n,s)).subscribe(i)})}function Ks(n,t){return Mt(function(e,s){var i=null,r=0,a=!1,o=function(){return a&&!i&&s.complete()};e.subscribe(ct(s,function(h){i?.unsubscribe();var c=0,l=r++;gt(n(h,l)).subscribe(i=ct(s,function(u){return s.next(t?t(h,u,l,c++):u)},function(){i=null,o()}))},function(){a=!0,o()}))})}function kf(){return Ks(Me)}function bi(n){return Mt(function(t,e){gt(n).subscribe(ct(e,function(){return e.complete()},os)),!e.closed&&t.subscribe(e)})}function Ce(n,t,e){var s=q(n)||t||e?{next:n,error:t,complete:e}:n;return s?Mt(function(i,r){var a;(a=s.subscribe)===null||a===void 0||a.call(s);var o=!0;i.subscribe(ct(r,function(h){var c;(c=s.next)===null||c===void 0||c.call(s,h),r.next(h)},function(){var h;o=!1,(h=s.complete)===null||h===void 0||h.call(s),r.complete()},function(h){var c;o=!1,(c=s.error)===null||c===void 0||c.call(s,h),r.error(h)},function(){var h,c;o&&((h=s.unsubscribe)===null||h===void 0||h.call(s)),(c=s.finalize)===null||c===void 0||c.call(s)}))}):Me}function Df(n,t){return Mt(function(e,s){var i=t??{},r=i.leading,a=r===void 0?!0:r,o=i.trailing,h=o===void 0?!1:o,c=!1,l=null,u=null,d=!1,f=function(){u?.unsubscribe(),u=null,h&&(v(),d&&s.complete())},p=function(){u=null,d&&s.complete()},y=function(w){return u=gt(n(w)).subscribe(ct(s,f,p))},v=function(){if(c){c=!1;var w=l;l=null,s.next(w),!d&&y(w)}};e.subscribe(ct(s,function(w){c=!0,l=w,!(u&&!u.closed)&&(a?v():y(w))},function(){d=!0,!(h&&c&&u&&!u.closed)&&s.complete()}))})}function Lf(n,t,e){t===void 0&&(t=fi);var s=Tf(n,t);return Df(function(){return s},e)}function Rf(n,t){return Mt(function(e,s){var i=[],r=function(a){for(;0<i.length;)i.shift().error(a);s.error(a)};gt(n).subscribe(ct(s,function(a){var o=new ui;i.push(o);var h=new qe,c=function(){as(i,o),o.complete(),h.unsubscribe()},l;try{l=gt(t(a))}catch(u){r(u);return}s.next(o.asObservable()),h.add(l.subscribe(ct(s,c,os,r)))},os)),e.subscribe(ct(s,function(a){var o,h,c=i.slice();try{for(var l=Te(c),u=l.next();!u.done;u=l.next()){var d=u.value;d.next(a)}}catch(f){o={error:f}}finally{try{u&&!u.done&&(h=l.return)&&h.call(l)}finally{if(o)throw o.error}}},function(){for(;0<i.length;)i.shift().complete();s.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function j(n,t,e,s=!1){const i=async r=>{await e(r)};try{n.addEventListener(t,i,s)}catch{n.attachEvent("on"+t,i)}return()=>{try{n.removeEventListener(t,i,s)}catch{n.detachEvent("on"+t,i)}}}function U(n,t,e=!1){return wi(n,t,{capture:e})}function fe(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}function fo(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}const Of=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],zf=["keydown","keyup","keypress"],Nf=["touchstart","touchend","touchcancel","touchmove"],Bf=["pointerdown","pointerup","pointercancel","pointermove"],Ff=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Yf=["change"];function Xf(n,t,e={bubbles:!0,detail:{}}){if(!n)return;let s;try{Of.includes(t)?s=new MouseEvent(t,e):zf.includes(t)?s=new KeyboardEvent(t,e):Nf.includes(t)?s=new TouchEvent(t,e):Bf.includes(t)?s=new PointerEvent(t,e):Ff.includes(t)?s=new DragEvent(t,e):Yf.includes(t)?s=new Event(t,e):s=new CustomEvent(t,e)}catch{document.createEvent?s=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(s=document.createEventObject())}if(n.dispatchEvent)n.dispatchEvent(s);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,s);else throw new Error(`Can't fire event : ${t}`)}function Uf(n,t){const e=n.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function Vf(n,t){let e=document.createElement(n);t="on"+t;let s=t in e;return s||(e.setAttribute(t,"return;"),s=typeof e[t]=="function"),e=null,s}const Qs=()=>{const n=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(n)?t="iOS":/android/i.test(n)?t="Android":/BlackBerry/i.test(n)?t="BlackBerry":/mac/i.test(n)?t="macOS":/win/i.test(n)?t="Windows":/linux/i.test(n)?t="Linux":/bsd/i.test(n)&&(t="BSD"),t.toLowerCase()};function $f(n=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(n)){const e=n.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(n)){const e=n.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(n)){const e=n.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(n)){const e=n.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function Gf(n,t){const e=n.split("."),s=t.split(".");for(let i=0,r=e.length;i<r;i++){if(s.length==i)return 1;if(e[i]!=s[i])return e[i]>s[i]?1:-1}return e.length!=s.length?-1:0}function vi(){const n=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(n)||/opera/i.test(n)?t="Opera":/chrome/i.test(n)?t="Chrome":/firefox/i.test(n)?t="Firefox":/safari/i.test(n)?t="Safari":/edge/i.test(n)?t="Edge":/msie|trident/i.test(n)?t="IE":/MicroMessenger/i.test(n)?t="Wechat":/alipay/i.test(n)&&(t="Ali"),t.toLowerCase()}const qf=()=>{const n=navigator.userAgent;let t="Unknown";if(/Chrome/.test(n)){const e=n.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(n)){const e=n.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(n)){const e=n.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(n)){const e=n.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(n)){const e=n.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function jf(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Hf(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function _i(){return Qs()==="ios"}function mo(){return Qs()==="macos"}function Wf(){return _i()|mo()}function po(){return Qs()==="android"}function Jf(){return _i()||po()}function go(){const n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const i=n.indexOf("rv:");return parseInt(n.substring(i+3,n.indexOf(".",i)),10)}const s=n.indexOf("Edge/");return s>0?parseInt(n.substring(s+5,n.indexOf(".",s)),10):-1}const Zf=go()!==-1,Kf=document.documentMode?document.documentMode===9:!1,Qf=document.documentMode?document.documentMode===10:!1,td=document.documentMode?document.documentMode===11:!1;function yo(){return vi()==="wechat"}function wo(){return vi()==="ali"}function ed(){return yo()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function sd(){return wo()&&navigator.userAgent.match(/miniprogram/i)}const nd=typeof document<"u",xo=typeof window<"u",id=typeof history<"u",rd=xo&&window.File&&window.FileReader&&window.FileList&&window.Blob,bo=(()=>!!(E.root.Worker&&E.root.Blob&&E.root.Promise&&E.root.OffscreenCanvas&&E.root.OffscreenCanvasRenderingContext2D&&E.root.HTMLCanvasElement&&E.root.HTMLCanvasElement.prototype.transferControlToOffscreen&&E.root.URL&&E.root.URL.createObjectURL))(),ad=typeof Path2D=="function"&&typeof DOMMatrix=="function",vo=function(){if(!E.root.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),od=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},hd="webkit moz ms o".split(" ");function tn(n){return typeof n=="function"&&/native code/.test(n.toString())}function cd(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let n=E.now();window.requestAnimationFrame=function(t){const e=E.now(),s=Math.max(0,16-(e-n)),i=window.setTimeout(function(){t(e+s)},s);return n=e+s,i}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})})();function Si(n){let t=!1;return window.requestAnimationFrame(function e(s){!t&&n(s)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function Ei(n,t=0){if(t==0)return n(E.now()),()=>{};{const e=E.now();return Si(s=>s-e>=t?(n(s),!1):!0)}}function ld(n,t=0){let e=!1,s=0;const i=E.now(),r=a=>{if(e)return;s++;const o=a-i-s*t;n(a,s,t<=o),Ei(r,Math.max(0,t-o))};return Ei(r,t),()=>{e=!0}}function ud(n,t=20){const e=1e3/t;let s=0,i;return()=>(E.now()-s>=e&&(s=E.now(),i=n()),i)}window.requestIdleCallback=window.requestIdleCallback||function(n,t){const e=E.now();return setTimeout(function(){n({didTimeout:E.now()-e>50,timeRemaining:()=>Math.max(0,50-(E.now()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(n){clearTimeout(n)};function _o(n,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?n():_o(n,t)},{timeout:t})}const Ti=new E.CacheMap;let Pi=!1;function Mi(n,t,e){n&&t&&Ti.set(n,{cb:t,startTime:E.now(),timeout:e}),!Pi&&(Pi=!0,dd(s=>{Pi=!1;let i=s.timeRemaining();Ti.filter((r,a)=>{let o=!1;const h=E.now();(i>0||a.timeout&&E.now()-a.startTime>=a.timeout)&&(a.cb(),o=!0);const c=E.now();return i-=c-h,!o}),Ti.length>0&&Mi()}))}let en=0,Ae=33,de=33,Ci;const So=new MessageChannel,fd=So.port2;So.port1.onmessage=n=>{Ci!==null&&Ci({didTimeout:en<=E.now(),timeRemaining:()=>Math.max(0,en-E.now())})};function dd(n){return Ci=n,requestAnimationFrame(t=>{let e=t-en+de;e<de&&Ae<de?(e<8&&(e=8),de=e<Ae?Ae:e):e>de&&Ae>de?de=e<Ae?Ae:e:Ae=e,en=t+de,fd.postMessage(null)})}function md(n){if(typeof setImmediate<"u"&&tn(setImmediate))setImmediate(n);else if(typeof MessageChannel<"u"&&(tn(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=n,t.postMessage(null)}else typeof Promise<"u"&&tn(Promise)?Promise.resolve().then(n):setTimeout(n,0)}function pd(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(t=>setTimeout(()=>{throw t}))}class ls{static _nextId=0;static nextId(){return ls._nextId++}}const z={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-z.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?z.Bounce.In(n*2)*.5:z.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(s){return t*Math.random()+e*n(s)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function Eo(n){switch(n){case z.Quadratic.In:return z.Quadratic.Out;case z.Quadratic.Out:return z.Quadratic.In;case z.Quadratic.InOut:return z.Quadratic.InOut;case z.Cubic.In:return z.Cubic.Out;case z.Cubic.Out:return z.Cubic.In;case z.Cubic.InOut:return z.Cubic.InOut;case z.Quartic.In:return z.Quartic.Out;case z.Quartic.Out:return z.Quartic.In;case z.Quartic.InOut:return z.Quartic.InOut;case z.Quintic.In:return z.Quintic.Out;case z.Quintic.Out:return z.Quintic.In;case z.Quintic.InOut:return z.Quintic.InOut;case z.Sinusoidal.In:return z.Sinusoidal.Out;case z.Sinusoidal.Out:return z.Sinusoidal.In;case z.Sinusoidal.InOut:return z.Sinusoidal.InOut;case z.Exponential.In:return z.Exponential.Out;case z.Exponential.Out:return z.Exponential.In;case z.Exponential.InOut:return z.Exponential.InOut;case z.Circular.In:return z.Circular.Out;case z.Circular.Out:return z.Circular.In;case z.Circular.InOut:return z.Circular.InOut;case z.Elastic.In:return z.Elastic.Out;case z.Elastic.Out:return z.Elastic.In;case z.Elastic.InOut:return z.Elastic.InOut;case z.Back.In:return z.Back.Out;case z.Back.Out:return z.Back.In;case z.Back.InOut:return z.Back.InOut;case z.Bounce.In:return z.Bounce.Out;case z.Bounce.Out:return z.Bounce.In;case z.Bounce.InOut:return z.Bounce.InOut;default:return n}}const gd=4,yd=.001,wd=1e-7,xd=10,us=11,sn=1/(us-1),bd=typeof Float32Array=="function";function To(n,t){return 1-3*t+3*n}function Po(n,t){return 3*t-6*n}function Mo(n){return 3*n}function nn(n,t,e){return((To(t,e)*n+Po(t,e))*n+Mo(t))*n}function Co(n,t,e){return 3*To(t,e)*n*n+2*Po(t,e)*n+Mo(t)}function vd(n,t,e,s,i){let r,a,o=0;do a=t+(e-t)/2,r=nn(a,s,i)-n,r>0?e=a:t=a;while(Math.abs(r)>wd&&++o<xd);return a}function _d(n,t,e,s){for(let i=0;i<gd;++i){const r=Co(t,e,s);if(r===0)return t;const a=nn(t,e,s)-n;t-=a/r}return t}function Sd(n){return n}function Ai(n,t,e,s){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===s)return Sd;const i=bd?new Float32Array(us):new Array(us);for(let a=0;a<us;++a)i[a]=nn(a*sn,n,e);function r(a){let o=0,h=1;const c=us-1;for(;h!==c&&i[h]<=a;++h)o+=sn;--h;const l=(a-i[h])/(i[h+1]-i[h]),u=o+l*sn,d=Co(u,n,e);return d>=yd?_d(a,u,n,e):d===0?u:vd(a,o,o+sn,n,e)}return a=>a===0||a===1?a:nn(r(a),t,s)}function Ii(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function Ao(n){const[t,e,s,i]=Ii(n);return[1-s,1-i,1-t,1-e]}function Ed(n){return Ai(...Ii(n))}function Td(n){return Ai(...Ao(n))}const Kt={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let s=t;s>1;s--)e*=s;return n[t]=e,e}}(),Bernstein:function(n,t){const e=Kt.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,s,i){const r=(e-n)*.5,a=(s-t)*.5,o=i*i,h=i*o;return(2*t-2*e+r+a)*h+(-3*t+3*e-2*r-a)*o+r*i+t},QuadraticBezier:(n,t,e,s)=>{const i=1-s;return i*i*n+2*i*s*t+s*s*e},CubicBezier:(n,t,e,s,i)=>{const r=1-i;return r*r*r*n+3*r*r*i*t+3*r*i*i*e+i*i*i*s}},Linear:function(n,t){const e=n.length-1,s=e*t,i=Math.floor(s),r=Kt.Utils.Linear;return t<0?r(n[0],n[1],s):t>1?r(n[e],n[e-1],e-s):r(n[i],n[i+1>e?e:i+1],s-i)},Bezier:function(n,t){let e=0;const s=n.length-1,i=Math.pow,r=Kt.Utils.Bernstein;for(let a=0;a<=s;a++)e+=i(1-t,s-a)*i(t,a)*n[a]*r(s,a);return e},CatmullRom:function(n,t){const e=n.length-1;let s=e*t,i=Math.floor(s);const r=Kt.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(i=Math.floor(s=e*(1+t))),r(n[(i-1+e)%e],n[i],n[(i+1)%e],n[(i+2)%e],s-i)):t<0?n[0]-(r(n[0],n[0],n[1],n[1],-s)-n[0]):t>1?n[e]-(r(n[e],n[e],n[e-1],n[e-1],s-e)-n[e]):r(n[i?i-1:0],n[i],n[e<i+1?e:i+1],n[e<i+2?e:i+2],s-i)}};class Io{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=E.now(),e=!1){const s=Object.keys(this._tweens);for(let i=0;i<s.length;i++){const r=this._tweens[s[i]],a=!e;r&&r.update(t,a)===!1&&!e&&delete this._tweens[s[i]]}return!!Object.keys(this._tweens).length}}const Dt=new Io;class ki{constructor(t,e=Dt){this._object=t,this._group=e}_id=ls.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=z.Linear.None;_interpolationFunction=Kt.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=E.now()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,s,i){for(const r in s){const a=t[r],o=Array.isArray(a),h=o?"array":typeof a,c=!o&&Array.isArray(s[r]);if(!(h==="undefined"||h==="function")){if(c){let l=s[r];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,a)),s[r]=[a].concat(l)}if((h==="object"||o)&&a&&!c){e[r]=o?[]:{};for(const l in a)e[r][l]=a[l];i[r]=o?[]:{},this._setupProperties(a,e[r],s[r],i[r])}else typeof e[r]>"u"&&(e[r]=a),o||(e[r]*=1),c?i[r]=s[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=E.now()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=E.now()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Dt){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=z.Linear.None){return this._easingFunction=t,this}interpolation(t=Kt.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=E.now(),e=!0){if(this._isPaused)return!0;let s,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const a=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let o=0,h=this._chainedTweens.length;o<h;o++)this._chainedTweens[o].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,s,i){for(const r in s){if(e[r]===void 0)continue;const a=e[r]||0;let o=s[r];const h=Array.isArray(t[r]),c=Array.isArray(o);!h&&c?t[r]=this._interpolationFunction(o,i):typeof o=="object"&&o?this._updateProperties(t[r],a,o,i):(o=this._handleRelativeValue(a,o),typeof o=="number"&&(t[r]=a+(o-a)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],s=this._valuesEnd[t];typeof s=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(s):this._valuesStartRepeat[t]=s,this._valuesEnd[t]=e}}const Pd=ls.nextId,Md=Dt.getAll.bind(Dt),Cd=Dt.removeAll.bind(Dt),Ad=Dt.add.bind(Dt),Id=Dt.remove.bind(Dt),kd=Dt.update.bind(Dt),Dd={now:E.now,Sequence:ls,Easing:z,Interpolation:Kt,Group:Io,Tween:ki,nextId:Pd,getAll:Md,removeAll:Cd,add:Ad,remove:Id,update:kd};class Di{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=E.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=E.now();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class fs{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){E.ShellSort(this.tweens,(e,s)=>t?e.delay>s.delay:e.delay<=s.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(s=>{const i={...s};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,s){const i={fromValues:t,toValues:e,frames:typeof s?.frames=="number"?s.frames:1,delay:typeof s?.delay=="number"?s.delay:this.tweens.length,easeFunction:s?.easeFunction||z.Linear.None,interpolationFunction:s?.interpolationFunction||Kt.Linear,repeat:typeof s?.repeat=="number"?s.repeat:0,yoyo:s?.yoyo||!1,onStart:s?.onStart||(()=>{}),onUpdate:s?.onUpdate||(()=>{}),onComplete:s?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Di,s=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=Si(r=>{if(!this.isPaused){const o=Math.max(0,r-this.pausedDuration),h=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(c=>c.delay*s<=h).forEach(c=>{c.tween||(c.tween=new ki({...c.fromValues}).to({...c.toValues},c.frames*s).easing(c.easeFunction).interpolation(c.interpolationFunction).repeat(c.repeat).yoyo(c.yoyo).onStart(c.onStart).onUpdate(c.onUpdate).onComplete(c.onComplete),c.tween.start(o)),(c.delay+c.frames*(c.repeat+1))*s>h?c.tween.update(o):(c.tween.isPlaying()&&c.tween.end(),E.deleteArrayItem(t,c))})}const a=!!t.length;return a||(this.onGroupComplete?.(),i()),a})})}isPaused=!1;pausedClock=new Di;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(s=>{e=Math.max(e,s.delay+s.frames),s.easeFunction=Eo(s.easeFunction);const i={...s.toValues};s.toValues={...s.fromValues},s.fromValues={...i}}),t.forEach(s=>{s.delay=e-s.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const rn=new E.CacheMap,ko=(n=!0)=>{rn.filter((t,e)=>(e.alternate&&(Tn(e,e.alternate),n&&rn.set(t,e.alternate),e.alternate=void 0),n))};function Li(n){let t=rn.get(n);return t||(t=En(n),rn.set(n,t)),t}function Do(n){const t=Li(n);return t.alternate||(t.alternate=En(n)),t.alternate}function Ld(n,t,e=!0){t(Do(n)),ko(e)}function Ri(n,t,e=!0){t(Do(n)),Mi("FLUSH_DOM_ACTION",()=>ko(e),50)}function Q(n){return n*Math.PI/180}function wt(n){return n*180/Math.PI}function an(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function ds(n,t,e,s){return an(e-n,s-t)}function Ie(n,t,e,s){const i=e-n,r=s-t;return i*i+r*r}function Ft(n,t,e,s){let i=Math.atan2(s-t,e-n);return i<0&&(i+=Math.PI*2),i}function je(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function Rd(n,t,e){if(typeof e=="number"){const s=Math.sqrt(Math.pow(n,2)+Math.pow(t,2)+Math.pow(e,2));return{x:n/=s,y:t/=s,z:e/=s}}else{const s=Math.sqrt(Math.pow(n,2)+Math.pow(t,2));return{x:n/=s,y:t/=s}}}function Od(n,t,e,s,i=10){if(Math.abs(e-n)<i&&Math.abs(s-t)<i)return"no";const r=wt(Ft(n,t,e,s));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const Lo=zd("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function zd(n,t=10){const e={},s=n.split(",");for(let i=0;i<s.length;i+=2){const r="&"+s[i+1]+";",a=parseInt(s[i],t);e[r]="&#"+a+";"}return e["\\xa0"]=" ",e}function xt(n,t){const e=Object.keys(t);for(let s=0;s<e.length;s++)n=n.replace(new RegExp("{"+e[s]+"}","gi"),""+t[e[s]]);return n}function on(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const s="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=s[Math.floor(Math.random()*s.length)];while(n[t]);return t}function Nd(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function Bd(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ms={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let hn=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement("stop");if(s.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(s.setAttribute("stop-color",xt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),s.setAttribute("stop-opacity",r[4]))}else s.setAttribute("stop-color",e);this.__root.appendChild(s)}},Oi=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},Ro=class Gr{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:s=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=s),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ms);for(let e=0,s=t.length;e<s;e++){const i=t[e];this[i]=ms[i].canvas}}__getStyleState(){const t={},e=Object.keys(ms);for(let s=0,i=e.length;s<i;s++){const r=e[s];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let s=0,i=e.length;s<i;s++){const r=e[s];this[r]=t[r]}}__createElement(t,e={},s=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);s&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let a=0;a<r.length;a++){const o=r[a];i.setAttribute(o,e[o])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const s=this.__currentElementsToStyle;s&&(e.setAttribute(t,""),e=s.element,s.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(ms);for(let r=0;r<i.length;r++){const a=ms[i[r]],o=this[i[r]];if(a.apply){if(o instanceof Oi){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const h=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,xt("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof hn)e.setAttribute(a.apply,xt("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);if(c){e.setAttribute(a.svgAttr,xt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let l=parseFloat(c[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(a.svgAttr+"-opacity",""+l)}}else{let h=a.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+a.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(Lo);for(let r=0,a=i.length;r<a;r++){const o=i[r],h=Lo[o],c=new RegExp(o,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let s=this.__currentElement.getAttribute("transform");s?s+=" ":s="",s+=t,this.__currentElement.setAttribute("transform",s)}scale(t,e){e===void 0&&(e=t),this.__addTransform(xt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(xt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(xt("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,i,r,a){this.__addTransform(xt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:s,d:i,e:r,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(xt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(xt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(xt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,i,r,a){this.__currentPosition={x:r,y:a},this.__addPathCommand(xt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:s,cp2y:i,x:r,y:a}))}quadraticCurveTo(t,e,s,i){this.__currentPosition={x:s,y:i},this.__addPathCommand(xt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:s,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,s,i,r){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(a===t&&o===e||t===s&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([a-t,o-e]),c=this.normalize([s-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const l=h[0]*c[0]+h[1]*c[1],u=Math.acos(Math.abs(l)),d=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(u/2),p=t+f*d[0],y=e+f*d[1],v=[-h[1],h[0]],w=[c[1],-c[0]],S=function(M){const P=M[0];return M[1]>=0?Math.acos(P):-Math.acos(P)},x=S(v),b=S(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,s,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+s,e),this.lineTo(t+s,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),s=this.__rootSVG.childNodes[1],i=s.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&s.removeChild(i[r]);this.__currentElement=s,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,s,i){if(t===0&&e===0&&s===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:s,height:i,fill:"#FFFFFF"},!0);r.appendChild(a)}createLinearGradient(t,e,s,i){const r=this.__createElement("linearGradient",{id:on(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new hn(r,this)}createRadialGradient(t,e,s,i,r,a){const o=this.__createElement("radialGradient",{id:on(this.__ids),cx:i+"px",cy:r+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new hn(o,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),s={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(s.decoration="underline"),this.__fontHref&&(s.href=this.__fontHref),s}__wrapTextLink(t,e){if(t.href){const s=this.__createElement("a");return s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),s.appendChild(e),s}return e}__applyText(t,e,s,i){const r=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:s,"text-anchor":Nd(this.textAlign),"dominant-baseline":Bd(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(i),a.appendChild(this.__wrapTextLink(r,o))}fillText(t,e,s){this.__applyText(t,e,s,"fill")}strokeText(t,e,s){this.__applyText(t,e,s,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,s,i,r,a){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+s*Math.cos(r),h=e+s*Math.sin(r),c=t+s*Math.cos(i),l=e+s*Math.sin(i),u=a?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),a?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(xt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:s,ry:s,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),s=on(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",s),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",xt("url(#{id})",{id:s})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],s,i,r,a,o=0,h=0,c,l,u,d,f,p,y,v;if(t.length===3)s=t[1],i=t[2],c=e.width,l=e.height,r=c,a=l;else if(t.length===5)s=t[1],i=t[2],r=t[3],a=t[4],c=e.width,l=e.height;else if(t.length===9)o=t[1],h=t[2],c=t[3],l=t[4],s=t[5],i=t[6],r=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const S="translate("+s+", "+i+")";if(e instanceof Gr){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+S:b=S,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",a),p.setAttribute("preserveAspectRatio","none"),(o||h||c!==e.width||l!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=a,y.getContext("2d")?.drawImage(e,o,h,c,l,0,0,r,a),e=y),p.setAttribute("transform",S),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const s=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=on(this.__ids);let r;return s.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),s.appendChild(r),this.__SVGdefs.appendChild(s)):t instanceof Gr&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new Oi(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},zi=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,s,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new Ro({canvas:this.canvas,width:e||this.canvas.width,height:s||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,s,i){return this.context.fillRect(t,e,s,i),this.customContext&&this.customContext.fillRect(t,e,s,i),this}fillText(t,e,s,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,s,i),this.customContext&&this.customContext.fillText(t,e,s),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,s,i){return this.context.strokeText(t,e,s,i),this.customContext&&this.customContext.strokeText(t,e,s),this}strokeRect(t,e,s,i){return this.context.strokeRect(t,e,s,i),this.customContext&&this.customContext.strokeRect(t,e,s,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,s=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,s,i),this.customContext&&this.customContext.clearRect(t,e,s,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const s=new Path2D;s.addPath(t,e),this.currentPath2D=s}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,s=0){return this.translate(e,s),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-s),this.changePath2D(),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-s,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,s,i,r,a){return this.context.arc(t,e,s,i,r,a),this.customContext&&this.customContext.arc(t,e,s,i,r,a?-1:1),this.currentPath2D.arc(t,e,s,i,r,a),this}arcTo(t,e,s,i,r){return this.context.arcTo(t,e,s,i,r),this.customContext&&this.customContext.arcTo(t,e,s,i,r),this.currentPath2D.arcTo(t,e,s,i,r),this}ellipse(t,e,s,i,r,a,o,h){return this.context.ellipse(t,e,s,i,r,a,o,h),this.currentPath2D.ellipse(t,e,s,i,r,a,o,h),this}quadraticCurveTo(t,e,s,i){return this.context.quadraticCurveTo(t,e,s,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,s,i),this.currentPath2D.quadraticCurveTo(t,e,s,i),this}bezierCurveTo(t,e,s,i,r,a){return this.context.bezierCurveTo(t,e,s,i,r,a),this.customContext&&this.customContext.bezierCurveTo(t,e,s,i,r,a),this.currentPath2D.bezierCurveTo(t,e,s,i,r,a),this}rect(t,e,s,i){return this.context.rect(t,e,s,i),this.customContext&&this.customContext.rect(t,e,s,i),this.currentPath2D.rect(t,e,s,i),this}createLinearGradient(t,e,s,i,r){const a=this.context.createLinearGradient(t,e,s,i);return r&&Object.entries(r).forEach(([o,h])=>{a.addColorStop(parseFloat(o),h)}),a}createRadialGradient(t,e,s,i,r,a,o){const h=this.context.createRadialGradient(t,e,s,i,r,a);return o&&Object.entries(o).forEach(([c,l])=>{h.addColorStop(parseFloat(c),l)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const s=e[0],i=e[1];this.context.drawImage(t,s,i)}else if(e.length===4){const s=e[0],i=e[1],r=e[2],a=e[3];this.context.drawImage(t,s,i,r,a)}else if(e.length===8){const s=e[0],i=e[1],r=e[2],a=e[3],o=e[4],h=e[5],c=e[6],l=e[7];this.context.drawImage(t,s,i,r,a,o,h,c,l)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,s=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,s,i,r)}putImageData(t,e=0,s=0){return this.context.putImageData(t,e,s)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Ni=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Ft(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:s,width:i-e,height:r-s}}else{const e=Math.sin(t),s=Math.cos(t),i=s*this.x-e*this.y,r=s*this.toX-e*this.toY,a=s*this.y+e*this.x,o=s*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(a,o),width:Math.max(i,r)-Math.min(i,r),height:Math.max(a,o)-Math.min(a,o)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,s=this.y,i=t.toX,r=t.toY,a=this.toX-e,o=t.x-i;if(!a&&!o)return null;const h=(this.toY-s)/a,c=(t.y-r)/o;if(a){if(!o)return{x:i,y:h*(i-e)+s}}else return{x:e,y:c*(e-i)+r};const l=(-c*i+r+h*e-s)/(h-c),u=h*(l-e)+s;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const Fd=class extends Ni{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,s,i,r,a,o,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,s,i,r,a,o,h,!this.sweepFlag)}convert(t,e,s,i,r,a,o,h,c){const l=o/180*Math.PI,u=(t-s)/2,d=(e-i)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,y=f*f/(r*r)+p*p/(a*a);if(y>1){const G=Math.sqrt(y);throw r=G*r,a=G*a,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${a}.`)}const v=Math.sqrt((r*r*a*a-r*r*p*p-a*a*f*f)/(r*r*p*p+a*a*f*f)),w=h!=c?1:-1,S=w*v*r*p/a,x=w*v*-a*f/r,b=(t+s)/2,M=(e+i)/2,P=Math.cos(l)*S-Math.sin(l)*x+b,R=Math.sin(l)*S+Math.cos(l)*x+M,B=(G,J,nt,K)=>(G*K>=J*nt?1:-1)*Math.acos((G*nt+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(nt*nt+K*K))),F=B(1,0,t-P,e-R)-l,V=B(t-P,e-R,s-P,i-R);return[P,R,r,a,l,F,F+V]}},Yd=class extends Ni{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,s,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let s,i,r,a;for(let c=0;c<2;++c)s=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-i/(2*s),0<a&&a<1&&[t,e][c].push(s*a*a+i*a+r));const o={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},h={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:o.x,y:o.y,width:h.x-o.x,height:h.y-o.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},me=class Ls extends Ni{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t;const a=[this.y,this.toY],o=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y}));const l=[],u=c.length;for(let p=0;p<u;p++){for(let y=p+1;y<u;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);l.push({X:c[p].X,Y:c[p].Y})}const d={x:Math.min.apply(Math,o),y:Math.min.apply(Math,a)},f={x:Math.max.apply(Math,o),y:Math.max.apply(Math,a)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:l}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,s,i,r){const a=-3*e+9*s-9*i+3*r,o=t*a+6*e-12*s+6*i;return t*o-3*e+3*s}static bezlen(t,e,s,i,r,a,o,h,c=1){c=Math.max(0,Math.min(c,1));const l=c/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=l*u[p]+l,v=this.base3(y,t,s,r,o),w=this.base3(y,e,i,a,h);f+=d[p]*Math.sqrt(v*v+w*w)}return l*f}length(t=1){return Ls.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,s=this.y,i=this.c1x,r=this.c1y,a=this.c2x,o=this.c2y,h=this.toX,c=this.toY;if(t<0||Ls.bezlen(e,s,i,r,a,o,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,f=Ls.bezlen(e,s,i,r,a,o,h,c,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=Ls.bezlen(e,s,i,r,a,o,h,c,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),s=1-e,i=Math.pow(s,3),r=Math.pow(s,2),a=e*e,o=a*e,h=i*this.x+r*3*e*this.c1x+s*3*e*e*this.c2x+o*this.toX,c=i*this.y+r*3*e*this.c1y+s*3*e*e*this.c2y+o*this.toY,l=this.x+2*e*(this.c1x-this.x)+a*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+a*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+a*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+a*(this.toY-2*this.c2y+this.c1y),p=s*this.x+e*this.c1x,y=s*this.y+e*this.c1y,v=s*this.c2x+e*this.toX,w=s*this.c2y+e*this.toY,S=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:h,y:c,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y},end:{x:v,y:w},alpha:S}}},ps=Math.PI*2;function Oo(n,t,e,s){const i=n*s-t*e<0?-1:1;let r=n*e+t*s;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Xd(n,t,e,s,i,r,a,o,h,c){const l=c*(n-e)/2+h*(t-s)/2,u=-h*(n-e)/2+c*(t-s)/2,d=a*a,f=o*o,p=l*l,y=u*u;let v=d*f-d*y-f*p;v<0&&(v=0),v/=d*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*a/o*u,S=v*-o/a*l,x=c*w-h*S+(n+e)/2,b=h*w+c*S+(t+s)/2,M=(l-w)/a,P=(u-S)/o,R=(-l-w)/a,B=(-u-S)/o,F=Oo(1,0,M,P);let V=Oo(M,P,R,B);return r===0&&V>0&&(V-=ps),r===1&&V<0&&(V+=ps),[x,b,F,V]}function Ud(n,t){const e=1.3333333333333333*Math.tan(t/4),s=Math.cos(n),i=Math.sin(n),r=Math.cos(n+t),a=Math.sin(n+t);return[s,i,s-i*e,i+s*e,r+a*e,a-r*e,r,a]}function zo(n,t,e,s,i,r,a,o,h){const c=Math.sin(h*ps/360),l=Math.cos(h*ps/360),u=l*(n-e)/2+c*(t-s)/2,d=-c*(n-e)/2+l*(t-s)/2;if(u===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const f=u*u/(a*a)+d*d/(o*o);f>1&&(a*=Math.sqrt(f),o*=Math.sqrt(f));const p=Xd(n,t,e,s,i,r,a,o,c,l),y=[];let v=p[2],w=p[3];const S=Math.max(Math.ceil(Math.abs(w)/(ps/4)),1);w/=S;for(let x=0;x<S;x++)y.push(Ud(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let M=x[b+0],P=x[b+1];M*=a,P*=o;const R=l*M-c*P,B=c*M+l*P;x[b+0]=R+p[0],x[b+1]=B+p[1]}return x})}function Bi(n,t,e,s,i,r){return[n/3+.6666666666666666*e,t/3+.6666666666666666*s,i/3+.6666666666666666*e,r/3+.6666666666666666*s,i,r]}function gs(n,t,e,s){return[n,t,e,s,e,s]}const ys={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class ke{static createSVGElement(t="path",e){const s=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&Le(s,e),s}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||E.generateUUID()})}static downloadFromSVGElement(t,e="shape"){return dn(si(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return dn(E.toBlob(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return ei(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return ke.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(s,i,r)=>{let a=i.toLowerCase();const o=E.extractAllNumbers(r);for(a=="m"&&o.length>ys[a]&&(e.push([i,...o.splice(0,ys[a])]),a="l",i=i=="m"?"l":"L");o.length;){if(o.length<ys[a])throw new Error(`parseSVGPath substring:{ ${s} } command:{ ${i} } args:{ ${o} }`);e.push([i,...o.splice(0,ys[a])])}return a=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,s=0,i=0,r=0;return t.map(function(a){const o=a[0],h=o.toUpperCase();if(o!=h)switch(a[0]=h,o){case"a":a[6]+=i,a[7]+=r;break;case"v":a[1]+=r;break;case"h":a[1]+=i;break;default:for(let c=1;c<a.length;)a[c++]+=i,a[c++]+=r}switch(h){case"Z":i=e,r=s;break;case"H":i=a[1];break;case"V":r=a[1];break;case"M":i=e=a[1],r=s=a[2];break;default:i=a[a.length-2],r=a[a.length-1]}return a})}static relativeSVGPath(t){let e=0,s=0,i=0,r=0;return t.map(function(a){const o=a[0],h=o.toLowerCase();if(o!=h)switch(a[0]=h,o){case"A":a[6]-=i,a[7]-=r;break;case"V":a[1]-=r;break;case"H":a[1]-=i;break;default:for(let c=1;c<a.length;)a[c++]-=i,a[c++]-=r}switch(h){case"z":i=e,r=s;break;case"h":i+=a[1];break;case"v":r+=a[1];break;case"m":i+=a[1],r+=a[2],e+=a[1],s+=a[2];break;default:i+=a[a.length-2],r+=a[a.length-1]}return a})}static normalizeSVGPath(t){const e=[];let s=0,i=0,r=0,a=0,o=0,h=0,c=0,l=0,u;for(let d=0,f=t.length;d<f;d++){let p=t[d];const y=p[0];switch(y){case"M":s=p[1],i=p[2];break;case"A":const v=zo(r,a,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!v.length)continue;v.forEach((x,b)=>{const[M,P,R,B,F,V,G,J]=x;p=["C",R,B,F,V,G,J],b<v.length-1&&e.push(p)});break;case"S":let w=r,S=a;(u=="C"||u=="S")&&(w+=w-c,S+=S-l),p=["C",w,S,p[1],p[2],p[3],p[4]];break;case"T":u=="Q"||u=="T"?(o=r*2-o,h=a*2-h):(o=r,h=a),p=["C",...Bi(r,a,o,h,p[1],p[2])];break;case"Q":o=p[1],h=p[2],p=["C",...Bi(r,a,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...gs(r,a,p[1],p[2])];break;case"H":p=["C",...gs(r,a,p[1],a)];break;case"V":p=["C",...gs(r,a,r,p[1])];break;case"Z":p=["C",...gs(r,a,s,i)];break}u=y,r=p[p.length-2],a=p[p.length-1],p.length>4?(c=p[p.length-4],l=p[p.length-3]):(c=r,l=a),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let s=0,i=t.length;i-2>s;s+=2){let r;s==0?r=[{x:t[s],y:t[s+1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+4],y:t[s+5]}]:i-4==s?r=[{x:t[s-2],y:t[s-1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+2],y:t[s+3]}]:r=[{x:t[s-2],y:t[s-1]},{x:t[s],y:t[s+1]},{x:t[s+2],y:t[s+3]},{x:t[s+4],y:t[s+5]}];const a=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y])}return e}static zvhToLSVGPath(t){const e=[];let s=["L",0,0],i;for(let r=0,a=t.length;r<a;r++){const o=t[r];switch(o[0]){case"M":s=["L",o[1],o[2]],e.push(o);break;case"Z":e.push(s);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",o[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],o[1]]);break;default:e.push(o)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let s,i=0,r=0;for(let a=0,o=t.length;a<o;a++){const h=t[a],c=e[h[0]];c&&(h[0]=c.to,s&&(s[0]===c.to?(i=2*Number(s[c.x+2])-Number(s[c.x]),r=2*Number(s[c.x+3])-Number(s[c.x+1])):(i=Number(s[s.length-2]),r=Number(s[s.length-1]))),h.splice(1,0,i,r)),s=h}return t}}let Vd=class oe{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(ke.parseSVGPath(t),e):t instanceof oe?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const s=ke.normalizeSVGPath(ke.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,a=s.length;r<a;r++){const o=s[r];if(o[0]=="M"){i||(i=!0,this.startPathX=o[1],this.startPathY=o[2]),this.prevPathX=o[1],this.prevPathY=o[2];continue}this.appendLine(new me({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new oe;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let s=2,i=t.length;s+5<i;s+=6)e.appendLine(new me({c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}));return e}static fromLines(t){const e=new oe;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let s=0,i=t.length;s<i;s++)e.appendLine(t[s]);return e}appendLine(t){if(t instanceof Fd){zo(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[l,u,d,f,p,y,v,w]=c;this.normalizedLines.push(new me({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}let e,s,i,r,a,o;t instanceof me?(e=t.c1x,s=t.c1y,i=t.c2x,r=t.c2y,a=t.toX,o=t.toY):t instanceof Yd?[e,s,i,r,a,o]=Bi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,i,r,a,o]=gs(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new me({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:s,c2x:i,c2y:r,toX:a,toY:o})),this.prevPathX=a,this.prevPathY=o}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,a=s.length;r<a;r++)i.push(...s[r].toSVGPathData());return i}toSVGPathD(){return ke.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:s,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,s),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],s=[];if(t.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),s.push(c.y,c.y+c.height)}),e.length==0||s.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,s),a=Math.max.apply(0,e),o=Math.max.apply(0,s);return{x:i,y:r,width:a-i,height:o-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new bt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,s=this.startPathY;({x:e,y:s}=t.transformPoint({x:e,y:s}));const i=[];return this.normalizedLines.forEach(r=>{let a=r.x,o=r.y,h=r.c1x,c=r.c1y,l=r.c2x,u=r.c2y,d=r.toX,f=r.toY;({x:a,y:o}=t.transformPoint({x:a,y:o})),{x:h,y:c}=t.transformPoint({x:h,y:c}),{x:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:f}=t.transformPoint({x:d,y:f}),i.push(new me({x:a,y:o,c1x:h,c1y:c,c2x:l,c2y:u,toX:d,toY:f}))}),{startPathX:e,startPathY:s,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,s)=>e+=s.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let s=0;const i=e.length;for(let r=0;r<i;r++){const a=e[r],o=a.length();if(s+o>=t)return a.getPointAtSegmentLength(t-s);s+=o}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:s,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:s};if(r===1)return i[0].interpolate(t);{let a=t*r,o=i[0];if(a--,a>1)for(let h=1;h<r&&(o=i[h],a>1);h++)a-=1;return o.interpolate(a)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const s=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(s,t):s}}getSubpathsAtLength(t,e,s){const{startPathX:i,startPathY:r,normalizedLines:a}=t.updateTransform();let o=null,h=0;const c=new oe;c.prevPathX=c.startPathX=i,c.prevPathY=c.startPathY=r;for(let l=0,u=a.length;l<u;l++){const d=a[l],f=d.length();if(h+f>e&&!o){const p=d.getPointAtSegmentLength(e-h);if(c.appendLine(new me({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),s)return c;o=c,c.appendLine(new me({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),h+=f;continue}h+=f,c.appendLine(d)}return c}closestPoint(t,e){const s=this.getTotalLength();let i={x:t,y:e},r=0,a=1/0,o=8;for(let c=0;c<=s;c+=o){const l=this.getPointAtLength(c),u=Ie(l.x,l.y,t,e);u<a&&(i=l,r=c,a=u)}for(o/=2;o>.5;){const c=r-o,l=this.getPointAtLength(c),u=Ie(l.x,l.y,t,e),d=r+o,f=this.getPointAtLength(d),p=Ie(f.x,f.y,t,e);c>=0&&u<a?(i=l,r=c,a=u):d<=s&&p<a?(i=f,r=d,a=p):o/=2}const h=this.getPointAtLength(r+(r===s?-.1:.1));return{point:i,rotation:r>=s?Ft(h.x,h.y,i.x,i.y):Ft(i.x,i.y,h.x,h.y),distance:Math.sqrt(a)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:s}=this.updateTransform();return[t,e].concat(s.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let s=t[e-2],i=t[e-1],r=0;for(let a=0;a<e;a+=6)r+=ds(t[a],t[a+1],s,i),s=t[a],i=t[a+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,s=e.length;let i=t-s;const r=Math.ceil(t/s),a=[];a.push(["M",e[0],e[1]]);let o=2;for(;o+5<=s-1;){const h=e[o++],c=e[o++],l=e[o++],u=e[o++],d=e[o++],f=e[o++];a.push(["C",h,c,l,u,d,f]);let p=0;for(;p<r&&i>0;)a.push(["C",d,f,d,f,d,f]),i-=6,p++}return a}static mixPoints(t,e,s){const i=t.length,r=new Array(i);for(let a=0;a<i;a++)r[a]=E.maxDotNumber(t[a]+(e[a]-t[a])*s,6);return r}static getPathInterpolator(t,e){return s=>Math.abs(s-0)<Number.EPSILON?t:Math.abs(s-1)<Number.EPSILON?e:oe.fromPolymorphPoints(oe.mixPoints(new oe({d:t}).polymorphPoints,new oe({d:e}).polymorphPoints,s)).toSVGPathData()}},$d=class extends E.EventBus{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=E.generateUUID(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const s=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",s),this.strokeDashTotalLength=E.extractAllNumbers(s).reduce((i,r)=>i+r,0)}return E.reactive(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Vd,E.watchEffect(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(s=>{const i=s.originMatrix?s.originMatrix.clone():new bt;i.translate(-t.x+s.x,-t.y+s.y),s.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new bt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,s){if(s instanceof zi)return s.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=s.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,s){if(s instanceof zi)return s.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=s.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return E.newConstructor(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([s,i])=>[E.toKebab(s),i]))):e&&(this.attrs[E.toKebab(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[E.toKebab(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[E.toKebab(t)]}distance(t){return ds(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=wt(Ft(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:i}=je(Q(this.degree),e);this.vx=s,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:i}=je(Q(this.degree),e);this.ax=s,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,s=t.y-this.y,i=e*e+s*s,r=Math.sqrt(i),a=this.mass*t.mass/i,o=a*e/r,h=a*s/r;this.vx+=o/this.mass,this.vy+=h/this.mass,t.vx-=o/t.mass,t.vy-=h/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=E.parseNumber(t?.gravity,0);this.vy+=e;const s=E.parseNumber(t?.friction,1);this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const s=E.parseNumber(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*s,this.vy=r*s,this.run(e)}runSpringTo(t,e){const s=E.parseNumber(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,a=i.y-this.cY-this.y,o=r*s,h=a*s;this.vx+=o,this.vy+=h}),this.run({friction:.9,...e})}springMassTo(t,e){const s=E.parseNumber(e?.springLength,100),i=E.parseNumber(e?.spring,1e-4),r=t.x-this.x,a=t.y-this.y,o=Math.sqrt(r*r+a*a);if(o<s){const h=r*i,c=a*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-o/s}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const s=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*s),this.getPointAtLength(e*s)}strokeDashTween(t=1e3,e){const s=this.initPathD(),i=E.maxDotNumber(s.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,a=new fs({frameDuration:t});a.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(o,h)=>{this.setAttr("strokeDashoffset",""+E.maxDotNumber(o.offset,2)),r?.(o,h)}})),a.play()}};class Gd extends $d{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,s){this.cX=t,this.cY=e,this.cZ=s}rotateX(t){({x:this.y,y:this.z}=Xt(Q(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Xt(Q(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Xt(Q(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return an(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,s=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+s*s+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y,i=this.z;return{x:s*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-s*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const cn=Gd;class Fi{_x;_y;_z;_w;constructor(t=0,e=0,s=0,i=1){this._x=t,this._y=e,this._z=s,this._w=i}static slerpFlat(t,e,s,i,r,a,o){let h=s[i+0],c=s[i+1],l=s[i+2],u=s[i+3];const d=r[a+0],f=r[a+1],p=r[a+2],y=r[a+3];if(o===0){t[e+0]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u;return}if(o===1){t[e+0]=d,t[e+1]=f,t[e+2]=p,t[e+3]=y;return}if(u!==y||h!==d||c!==f||l!==p){let v=1-o;const w=h*d+c*f+l*p+u*y,S=w>=0?1:-1,x=1-w*w;if(x>Number.EPSILON){const M=Math.sqrt(x),P=Math.atan2(M,w*S);v=Math.sin(v*P)/M,o=Math.sin(o*P)/M}const b=o*S;if(h=h*v+d*b,c=c*v+f*b,l=l*v+p*b,u=u*v+y*b,v===1-o){const M=1/Math.sqrt(h*h+c*c+l*l+u*u);h*=M,c*=M,l*=M,u*=M}}t[e]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,s,i,r,a){const o=s[i],h=s[i+1],c=s[i+2],l=s[i+3],u=r[a],d=r[a+1],f=r[a+2],p=r[a+3];return t[e]=o*p+l*u+h*f-c*d,t[e+1]=h*p+l*d+c*u-o*f,t[e+2]=c*p+l*f+o*d-h*u,t[e+3]=l*p-o*u-h*d-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,s=this._z,i=this._w){return this._x=t,this._y=e,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new Fi(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const s=t.x,i=t.y,r=t.z,a=t.order,o=Math.cos,h=Math.sin,c=o(s/2),l=o(i/2),u=o(r/2),d=h(s/2),f=h(i/2),p=h(r/2);switch(a){case"XYZ":this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case"YXZ":this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case"ZXY":this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case"ZYX":this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case"YZX":this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case"XZY":this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const s=e/2,i=Math.sin(s);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,s=e[0],i=e[4],r=e[8],a=e[1],o=e[5],h=e[9],c=e[2],l=e[6],u=e[10],d=s+o+u;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(l-h)*f,this._y=(r-c)*f,this._z=(a-i)*f}else if(s>o&&s>u){const f=2*Math.sqrt(1+s-o-u);this._w=(l-h)/f,this._x=.25*f,this._y=(i+a)/f,this._z=(r+c)/f}else if(o>u){const f=2*Math.sqrt(1+o-s-u);this._w=(r-c)/f,this._x=(i+a)/f,this._y=.25*f,this._z=(h+l)/f}else{const f=2*Math.sqrt(1+u-s-o);this._w=(a-i)/f,this._x=(r+c)/f,this._y=(h+l)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let s=t.dot(e)+1;return s<Number.EPSILON?(s=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=s):(this._x=0,this._y=-t.z,this._z=t.y,this._w=s)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=s),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(E.clamp(this.dot(t),-1,1)))}rotateTowards(t,e){const s=this.angleTo(t);if(s===0)return this;const i=Math.min(1,e/s);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const s=t._x,i=t._y,r=t._z,a=t._w,o=e._x,h=e._y,c=e._z,l=e._w;return this._x=s*l+a*o+i*c-r*h,this._y=i*l+a*h+r*o-s*c,this._z=r*l+a*c+s*h-i*o,this._w=a*l-s*o-i*h-r*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const s=this._x,i=this._y,r=this._z,a=this._w;let o=a*t._w+s*t._x+i*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=s,this._y=i,this._z=r,this;const h=1-o*o;if(h<=Number.EPSILON){const f=1-e;return this._w=f*a+e*this._w,this._x=f*s+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const c=Math.sqrt(h),l=Math.atan2(c,o),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c;return this._w=a*u+this._w*d,this._x=s*u+this._x*d,this._y=i*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,s){return this.copy(t).slerp(e,s)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),s=Math.random(),i=Math.sqrt(1-s),r=Math.sqrt(s);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ws{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new ws(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,s=this.y;return this.x=t.m11*e+t.m21*s+t.m31,this.y=t.m12*e+t.m22*s+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=E.clamp(this.x,t.x,e.x),this.y=E.clamp(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=E.clamp(this.x,t,e),this.y=E.clamp(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(E.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return No.copy(this).projectOnVector(t),this.sub(No)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(E.clamp(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y;return e*e+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const s=Math.cos(e),i=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*s-a*i+t.x,this.y=r*i+a*s+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ct{x=0;y=0;z=0;constructor(t=0,e=0,s=0){this.x=t,this.y=e,this.z=s}set(t=0,e=0,s=0){return this.x=t,this.y=e,this.z=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Ct(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Bo.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Bo.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,s=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*s+r[6]*i,this.y=r[1]*e+r[4]*s+r[7]*i,this.z=r[2]*e+r[5]*s+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,s=this.y,i=this.z,r=t.value,a=1/(r[3]*e+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*s+r[8]*i+r[12])*a,this.y=(r[1]*e+r[5]*s+r[9]*i+r[13])*a,this.z=(r[2]*e+r[6]*s+r[10]*i+r[14])*a,this}applyQuaternion(t){const e=this.x,s=this.y,i=this.z,r=t.x,a=t.y,o=t.z,h=t.w,c=2*(a*i-o*s),l=2*(o*e-r*i),u=2*(r*s-a*e);return this.x=e+h*c+a*u-o*l,this.y=s+h*l+o*c-r*u,this.z=i+h*u+r*l-a*c,this}transformDirection(t){const e=this.x,s=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*s+r[8]*i,this.y=r[1]*e+r[5]*s+r[9]*i,this.z=r[2]*e+r[6]*s+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=E.clamp(this.x,t.x,e.x),this.y=E.clamp(this.y,t.y,e.y),this.z=E.clamp(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=E.clamp(this.x,t,e),this.y=E.clamp(this.y,t,e),this.z=E.clamp(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(E.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const s=t.x,i=t.y,r=t.z,a=e.x,o=e.y,h=e.z;return this.x=i*h-r*o,this.y=r*a-s*h,this.z=s*o-i*a,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}perpendOnVector(t){return Xi.copy(this).projectOnVector(t),this.sub(Xi)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Xi.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(E.clamp(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y,i=this.z-t.z;return e*e+s*s+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),s=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=s,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,s=Math.sqrt(1-e*e);return this.x=s*Math.cos(t),this.y=e,this.z=s*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Yi{x=0;y=0;z=0;w=1;constructor(t=0,e=0,s=0,i=1){this.x=t,this.y=e,this.z=s,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,s=0,i=1){return this.x=t,this.y=e,this.z=s,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Yi(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,s=this.y,i=this.z,r=this.w,a=t.value;return this.x=a[0]*e+a[4]*s+a[8]*i+a[12]*r,this.y=a[1]*e+a[5]*s+a[9]*i+a[13]*r,this.z=a[2]*e+a[6]*s+a[10]*i+a[14]*r,this.w=a[3]*e+a[7]*s+a[11]*i+a[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,s,i,r;const h=t.value,c=h[0],l=h[4],u=h[8],d=h[1],f=h[5],p=h[9],y=h[2],v=h[6],w=h[10];if(Math.abs(l-d)<.01&&Math.abs(u-y)<.01&&Math.abs(p-v)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+y)<.1&&Math.abs(p+v)<.1&&Math.abs(c+f+w-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(c+1)/2,b=(f+1)/2,M=(w+1)/2,P=(l+d)/4,R=(u+y)/4,B=(p+v)/4;return x>b&&x>M?x<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(x),i=P/s,r=R/s):b>M?b<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),s=P/i,r=B/i):M<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(M),s=R/r,i=B/r),this.set(s,i,r,e),this}let S=Math.sqrt((v-p)*(v-p)+(u-y)*(u-y)+(d-l)*(d-l));return Math.abs(S)<.001&&(S=1),this.x=(v-p)/S,this.y=(u-y)/S,this.z=(d-l)/S,this.w=Math.acos((c+f+w-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=E.clamp(this.x,t.x,e.x),this.y=E.clamp(this.y,t.y,e.y),this.z=E.clamp(this.z,t.z,e.z),this.w=E.clamp(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=E.clamp(this.x,t,e),this.y=E.clamp(this.y,t,e),this.z=E.clamp(this.z,t,e),this.w=E.clamp(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(E.clamp(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this.w=t.w+(e.w-t.w)*s,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const No=new ws,Xi=new Ct,Bo=new Fi,xs=2e3,Ui=2001,Fo=[1,0,0,1],Yo=[1,0,0,1,0,0],Xo=[1,0,0,0,1,0,0,0,1],Uo=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Vi{value;constructor(t=Fo){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,s=0,i=1){return this.m11=t,this.m21=e,this.m12=s,this.m22=i,this}identity(){return this.value=Array.from(Fo),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Vi(this.value)}fromArray(t,e=0){for(let s=0;s<4;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const s=t.value,i=e.value,r=this.value,a=s[0],o=s[2],h=s[1],c=s[3],l=i[0],u=i[2],d=i[1],f=i[3];return r[0]=a*l+o*d,r[2]=a*u+o*f,r[1]=h*l+c*d,r[3]=h*u+c*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class He{value;constructor(t=Xo){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,s=0,i=0,r=1,a=0,o=0,h=0,c=1){const l=this.value;return l[0]=t,l[1]=i,l[2]=o,l[3]=e,l[4]=r,l[5]=h,l[6]=s,l[7]=a,l[8]=c,this}identity(){return this.value=Array.from(Xo),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new He(this.value)}fromArray(t,e=0){for(let s=0;s<9;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,s){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const s=t.value,i=e.value,r=this.value,a=s[0],o=s[3],h=s[6],c=s[1],l=s[4],u=s[7],d=s[2],f=s[5],p=s[8],y=i[0],v=i[3],w=i[6],S=i[1],x=i[4],b=i[7],M=i[2],P=i[5],R=i[8];return r[0]=a*y+o*S+h*M,r[3]=a*v+o*x+h*P,r[6]=a*w+o*b+h*R,r[1]=c*y+l*S+u*M,r[4]=c*v+l*x+u*P,r[7]=c*w+l*b+u*R,r[2]=d*y+f*S+p*M,r[5]=d*v+f*x+p*P,r[8]=d*w+f*b+p*R,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],s=t[1],i=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8];return e*a*l-e*o*c-s*r*l+s*o*h+i*r*c-i*a*h}invert(){const t=this.value,e=t[0],s=t[1],i=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8],u=l*a-o*c,d=o*h-l*r,f=c*r-a*h,p=e*u+s*d+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/p;return t[0]=u*y,t[1]=(i*c-l*s)*y,t[2]=(o*s-i*a)*y,t[3]=d*y,t[4]=(l*e-i*h)*y,t[5]=(i*r-o*e)*y,t[6]=f*y,t[7]=(s*h-c*e)*y,t[8]=(a*e-s*r)*y,this}transpose(){let t;const e=this.value;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}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,s,i,r,a,o){const h=Math.cos(r),c=Math.sin(r);return this.set(s*h,s*c,-s*(h*a+c*o)+a+t,-i*c,i*h,-i*(-c*a+h*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply($i.makeScale(t,e)),this}rotate(t){return this.premultiply($i.makeRotation(-t)),this}translate(t,e){return this.premultiply($i.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,s,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class Et{value;is3dSpecial=!1;constructor(t=Uo){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,s=0,i=0,r=0,a=1,o=0,h=0,c=0,l=0,u=1,d=0,f=0,p=0,y=0,v=1){const w=this.value;return w[0]=t,w[4]=e,w[8]=s,w[12]=i,w[1]=r,w[5]=a,w[9]=o,w[13]=h,w[2]=c,w[6]=l,w[10]=u,w[14]=d,w[3]=f,w[7]=p,w[11]=y,w[15]=v,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(Uo),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new Et(this.value)}static fromString(t){const e=new Et,s=E.regMatchAll("number",t);return s.length===16&&s.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let s=0;s<16;s++)this.value[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.value;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t[e+9]=s[9],t[e+10]=s[10],t[e+11]=s[11],t[e+12]=s[12],t[e+13]=s[13],t[e+14]=s[14],t[e+15]=s[15],t}copyPosition(t){const e=this.value,s=t.value;return e[12]=s[12],e[13]=s[13],e[14]=s[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,s){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),s.setFromMatrix4Column(this,2),this}makeBasis(t,e,s){return this.set(t.x,e.x,s.x,0,t.y,e.y,s.y,0,t.z,e.z,s.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,s=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+s*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+s*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+s*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+s*this.m44}}toMatrix(t){const{scalarX:e,scalarY:s,skewX:i,skewY:r,x:a,y:o}=this.split(),h=[e,r,i,s,a,o];return t?(t.value=h,t):new bt(h)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>E.maxDotNumber(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),s=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=wt(E.clamp(Math.asin(-this.m13),-1,1));let r=wt(Math.atan2(this.m23,this.m33));Math.cos(Q(i))===0&&(r=wt(Math.atan2(-this.m31,this.m22)));let a=wt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(a+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:s,degreeX:r,degreeY:i,degreeZ:a,skewX:wt(this.m14),skewY:wt(this.m24),skewZ:wt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,s=t.value,i=1/We.setFromMatrix4Column(t,0).length(),r=1/We.setFromMatrix4Column(t,1).length(),a=1/We.setFromMatrix4Column(t,2).length();return e[0]=s[0]*i,e[1]=s[1]*i,e[2]=s[2]*i,e[3]=0,e[4]=s[4]*r,e[5]=s[5]*r,e[6]=s[6]*r,e[7]=0,e[8]=s[8]*a,e[9]=s[9]*a,e[10]=s[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,s=t.x,i=t.y,r=t.z,a=Math.cos(s),o=Math.sin(s),h=Math.cos(i),c=Math.sin(i),l=Math.cos(r),u=Math.sin(r);if(t.order==="XYZ"){const d=a*l,f=a*u,p=o*l,y=o*u;e[0]=h*l,e[4]=-h*u,e[8]=c,e[1]=f+p*c,e[5]=d-y*c,e[9]=-o*h,e[2]=y-d*c,e[6]=p+f*c,e[10]=a*h}else if(t.order==="YXZ"){const d=h*l,f=h*u,p=c*l,y=c*u;e[0]=d+y*o,e[4]=p*o-f,e[8]=a*c,e[1]=a*u,e[5]=a*l,e[9]=-o,e[2]=f*o-p,e[6]=y+d*o,e[10]=a*h}else if(t.order==="ZXY"){const d=h*l,f=h*u,p=c*l,y=c*u;e[0]=d-y*o,e[4]=-a*u,e[8]=p+f*o,e[1]=f+p*o,e[5]=a*l,e[9]=y-d*o,e[2]=-a*c,e[6]=o,e[10]=a*h}else if(t.order==="ZYX"){const d=a*l,f=a*u,p=o*l,y=o*u;e[0]=h*l,e[4]=p*c-f,e[8]=d*c+y,e[1]=h*u,e[5]=y*c+d,e[9]=f*c-p,e[2]=-c,e[6]=o*h,e[10]=a*h}else if(t.order==="YZX"){const d=a*h,f=a*c,p=o*h,y=o*c;e[0]=h*l,e[4]=y-d*u,e[8]=p*u+f,e[1]=u,e[5]=a*l,e[9]=-o*l,e[2]=-c*l,e[6]=f*u+p,e[10]=d-y*u}else if(t.order==="XZY"){const d=a*h,f=a*c,p=o*h,y=o*c;e[0]=h*l,e[4]=-u,e[8]=c*l,e[1]=d*u+y,e[5]=a*l,e[9]=f*u-p,e[2]=p*u-f,e[6]=o*l,e[10]=y*u+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(qd,t,jd)}lookAt(t,e,s){const i=this.value;return At.subVectors(t,e),At.lengthSq()===0&&(At.z=1),At.normalize(),pe.crossVectors(s,At),pe.lengthSq()===0&&(Math.abs(s.z)===1?At.x+=1e-4:At.z+=1e-4,At.normalize(),pe.crossVectors(s,At)),pe.normalize(),ln.crossVectors(At,pe),i[0]=pe.x,i[4]=ln.x,i[8]=At.x,i[1]=pe.y,i[5]=ln.y,i[9]=At.y,i[2]=pe.z,i[6]=ln.z,i[10]=At.z,this}multiplyMatrices(t,e){const s=t.value,i=e.value,r=this.value,a=s[0],o=s[4],h=s[8],c=s[12],l=s[1],u=s[5],d=s[9],f=s[13],p=s[2],y=s[6],v=s[10],w=s[14],S=s[3],x=s[7],b=s[11],M=s[15],P=i[0],R=i[4],B=i[8],F=i[12],V=i[1],G=i[5],J=i[9],nt=i[13],K=i[2],Ut=i[6],kt=i[10],Rt=i[14],Vt=i[3],O=i[7],L=i[11],X=i[15];return r[0]=a*P+o*V+h*K+c*Vt,r[4]=a*R+o*G+h*Ut+c*O,r[8]=a*B+o*J+h*kt+c*L,r[12]=a*F+o*nt+h*Rt+c*X,r[1]=l*P+u*V+d*K+f*Vt,r[5]=l*R+u*G+d*Ut+f*O,r[9]=l*B+u*J+d*kt+f*L,r[13]=l*F+u*nt+d*Rt+f*X,r[2]=p*P+y*V+v*K+w*Vt,r[6]=p*R+y*G+v*Ut+w*O,r[10]=p*B+y*J+v*kt+w*L,r[14]=p*F+y*nt+v*Rt+w*X,r[3]=S*P+x*V+b*K+M*Vt,r[7]=S*R+x*G+b*Ut+M*O,r[11]=S*B+x*J+b*kt+M*L,r[15]=S*F+x*nt+b*Rt+M*X,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],s=t[4],i=t[8],r=t[12],a=t[1],o=t[5],h=t[9],c=t[13],l=t[2],u=t[6],d=t[10],f=t[14],p=t[3],y=t[7],v=t[11],w=t[15];return p*(+r*h*u-i*c*u-r*o*d+s*c*d+i*o*f-s*h*f)+y*(+e*h*f-e*c*d+r*a*d-i*a*f+i*c*l-r*h*l)+v*(+e*c*u-e*o*f-r*a*u+s*a*f+r*o*l-s*c*l)+w*(-i*o*l-e*h*u+e*o*d+i*a*u-s*a*d+s*h*l)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,s){const i=this.value;return t instanceof Ct?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof s=="number"&&(i[12]=t,i[13]=e,i[14]=s),this}invert(){const t=this.value,e=t[0],s=t[1],i=t[2],r=t[3],a=t[4],o=t[5],h=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],y=t[13],v=t[14],w=t[15],S=u*v*c-y*d*c+y*h*f-o*v*f-u*h*w+o*d*w,x=p*d*c-l*v*c-p*h*f+a*v*f+l*h*w-a*d*w,b=l*y*c-p*u*c+p*o*f-a*y*f-l*o*w+a*u*w,M=p*u*h-l*y*h-p*o*d+a*y*d+l*o*v-a*u*v,P=e*S+s*x+i*b+r*M;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/P;return t[0]=S*R,t[1]=(y*d*r-u*v*r-y*i*f+s*v*f+u*i*w-s*d*w)*R,t[2]=(o*v*r-y*h*r+y*i*c-s*v*c-o*i*w+s*h*w)*R,t[3]=(u*h*r-o*d*r-u*i*c+s*d*c+o*i*f-s*h*f)*R,t[4]=x*R,t[5]=(l*v*r-p*d*r+p*i*f-e*v*f-l*i*w+e*d*w)*R,t[6]=(p*h*r-a*v*r-p*i*c+e*v*c+a*i*w-e*h*w)*R,t[7]=(a*d*r-l*h*r+l*i*c-e*d*c-a*i*f+e*h*f)*R,t[8]=b*R,t[9]=(p*u*r-l*y*r-p*s*f+e*y*f+l*s*w-e*u*w)*R,t[10]=(a*y*r-p*o*r+p*s*c-e*y*c-a*s*w+e*o*w)*R,t[11]=(l*o*r-a*u*r-l*s*c+e*u*c+a*s*f-e*o*f)*R,t[12]=M*R,t[13]=(l*y*i-p*u*i+p*s*d-e*y*d-l*s*v+e*u*v)*R,t[14]=(p*o*i-a*y*i-p*s*h+e*y*h+a*s*v-e*o*v)*R,t[15]=(a*u*i-l*o*i+l*s*h-e*u*h-a*s*d+e*o*d)*R,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],s=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,s,i))}makeTranslation(t,e,s){return t instanceof Ct?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,s,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),s=Math.sin(t);return this.set(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const s=Math.cos(e),i=Math.sin(e),r=1-s,a=t.x,o=t.y,h=t.z,c=r*a,l=r*o;return this.set(c*a+s,c*o-i*h,c*h+i*o,0,c*o+i*h,l*o+s,l*h-i*a,0,c*h-i*o,l*h+i*a,r*h*h+s,0,0,0,0,1),this}makeScale(t,e,s){return this.set(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1),this}makeShear(t,e,s,i,r,a){return this.set(1,s,r,0,t,1,a,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,s,i,r,a,o=xs){const h=this.value,c=2*r/(e-t),l=2*r/(s-i),u=(e+t)/(e-t),d=(s+i)/(s-i);let f,p;if(o===xs)f=-(a+r)/(a-r),p=-2*a*r/(a-r);else if(o===Ui)f=-a/(a-r),p=-a*r/(a-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+o);return h[0]=c,h[4]=0,h[8]=u,h[12]=0,h[1]=0,h[5]=l,h[9]=d,h[13]=0,h[2]=0,h[6]=0,h[10]=f,h[14]=p,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,s,i,r,a,o=xs){const h=this.value,c=1/(e-t),l=1/(s-i),u=1/(a-r),d=(e+t)*c,f=(s+i)*l;let p,y;if(o===xs)p=(a+r)*u,y=-2*u;else if(o===Ui)p=r*u,y=-1*u;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return h[0]=2*c,h[4]=0,h[8]=0,h[12]=-d,h[1]=0,h[5]=2*l,h[9]=0,h[13]=-f,h[2]=0,h[6]=0,h[10]=y,h[14]=-p,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}compose(t,e,s){const i=this.value,r=e.x,a=e.y,o=e.z,h=e.w,c=r+r,l=a+a,u=o+o,d=r*c,f=r*l,p=r*u,y=a*l,v=a*u,w=o*u,S=h*c,x=h*l,b=h*u,M=s.x,P=s.y,R=s.z;return i[0]=(1-(y+w))*M,i[1]=(f+b)*M,i[2]=(p-x)*M,i[3]=0,i[4]=(f-b)*P,i[5]=(1-(d+w))*P,i[6]=(v+S)*P,i[7]=0,i[8]=(p+x)*R,i[9]=(v-S)*R,i[10]=(1-(d+y))*R,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,s){const i=this.value;let r=We.set(i[0],i[1],i[2]).length();const a=We.set(i[4],i[5],i[6]).length(),o=We.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Yt.copy(this);const c=1/r,l=1/a,u=1/o;return Yt.value[0]*=c,Yt.value[1]*=c,Yt.value[2]*=c,Yt.value[4]*=l,Yt.value[5]*=l,Yt.value[6]*=l,Yt.value[8]*=u,Yt.value[9]*=u,Yt.value[10]*=u,e.setFromRotationMatrix4(Yt),s.x=r,s.y=a,s.z=o,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,s=0){return this.multiply(new Et([1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1]))}scale(t=1,e=1,s=1){return this.multiply(new Et([t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1]))}scaleVector3(t){const e=this.value,s=t.x,i=t.y,r=t.z;return e[0]*=s,e[4]*=i,e[8]*=r,e[1]*=s,e[5]*=i,e[9]*=r,e[2]*=s,e[6]*=i,e[10]*=r,e[3]*=s,e[7]*=i,e[11]*=r,this}rotateX(t){const e=Q(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new Et([1,0,0,0,0,s,i,0,0,-i,s,0,0,0,0,1]))}rotateY(t){const e=Q(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new Et([s,0,-i,0,0,1,0,0,i,0,s,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=Q(t),s=Math.cos(e),i=Math.sin(e);return this.multiply(new Et([s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,s=0){return this.multiply(new Et([1,0,0,Q(t),0,1,0,Q(e),0,0,1,Q(s),0,0,0,1]))}perspective(t){return this.multiply(new Et([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,s=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,a=e+this.m31,o=s+this.m32,h=i+this.m33,c=r+this.m34;r==0&&(r=1e-4),e/=r,s/=r,i/=r,c==0&&(c=1e-4),a/=c,o/=c,h/=c;const l=h-i;if(l==0)return{x:e,y:s,z:i,mass:r};const u=-i/l;return e+=u*(a-e),s+=u*(o-s),{x:e,y:s,z:i,mass:r}}project(t){const e=t.z;let s=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),s/=r,i/=r,r<0&&(s-=this.m41,i-=this.m42,s*=1/r,i*=1/r,s+=this.m41,i+=this.m42),{x:s,y:i,z:e,mass:r}}bounds(t,e,s,i){const r=new cn({x:t,y:e}),a=new cn({x:t+s,y:e}),o=new cn({x:t+s,y:e+i}),h=new cn({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:h.x,y:h.y,z:h.z,mass:h.mass}=this.project(h);const c=Math.min(r.x,a.x,o.x,h.x),l=Math.min(r.y,a.y,o.y,h.y),u=Math.max(r.x,a.x,o.x,h.x)-c,d=Math.max(r.y,a.y,o.y,h.y)-l;return{x:c,y:l,width:u,height:d}}}class bt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Yo){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new bt,s=E.regMatchAll("number",t);return s.length===6&&s.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new Et(e)}identity(){return this.value=Array.from(Yo),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new bt(this.value)}multiply(t){const e=this.clone(),s=t instanceof bt?t:new bt(t);return this.m11=s.m11*e.m11+s.m12*e.m21+s.m13*e.m31,this.m12=s.m11*e.m12+s.m12*e.m22+s.m13*e.m32,this.m13=s.m11*e.m13+s.m12*e.m23+s.m13*e.m33,this.m21=s.m21*e.m11+s.m22*e.m21+s.m23*e.m31,this.m22=s.m21*e.m12+s.m22*e.m22+s.m23*e.m32,this.m23=s.m21*e.m13+s.m22*e.m23+s.m23*e.m33,this.m31=s.m31*e.m11+s.m32*e.m21+s.m33*e.m31,this.m32=s.m31*e.m12+s.m32*e.m22+s.m33*e.m32,this.m33=s.m31*e.m13+s.m32*e.m23+s.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,s=this.m13,i=this.m21,r=this.m22,a=this.m23,o=this.m31,h=this.m32,c=this.m33,l=c*r-a*h,u=-c*i+a*o,d=h*i-r*o;let f=t*l+e*u+s*d;return f?(f=1/f,this.m11=l*f,this.m12=(-c*e+s*h)*f,this.m13=(a*e-s*r)*f,this.m21=u*f,this.m22=(c*t-s*o)*f,this.m23=(-a*t+s*i)*f,this.m31=d*f,this.m32=(-h*t+e*o)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new bt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=wt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:wt(Math.atan2(-this.m21,this.m22)),skewY:wt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],s=this.value[1],i=this.value[2],r=this.value[3],a=this.value[4],o=this.value[5],h=t.value[0],c=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],f=t.value[5],p=h*u,y=c*l,v=(l*s-e*u)/(y-p),w=(h*s-e*c)/(p-y),S=(l*r-i*u)/(y-p),x=(h*r-i*c)/(p-y),b=(l*(o-f)+u*(d-a))/(y-p),M=(h*(o-f)+c*(d-a))/(p-y),P=[v,w,S,x,b,M];return new bt(P)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>E.maxDotNumber(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,s){return this.matrix4.translate(t,e,s),this.matrix4.toMatrix(this),this}translate3dTo(t,e,s){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,s-this.matrix4.m43),this}rotate(t,e=0,s=0){const i=Q(t),r=Math.cos(i),a=Math.sin(i);return this.translate(e,s),this.multiply([r,a,-a,r,0,0]),this.translate(-e,-s),this.toMatrix4(),this}rotateTo(t,e=0,s=0){const{degree:i}=this.split();return this.rotate(t-i,e,s),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,s){return this.matrix4.rotateX(t).rotateY(e).rotateZ(s),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,s){const{degreeX:i,degreeY:r,degreeZ:a}=this.matrix4.split();return this.rotate3d(t-i,e-r,s-a),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.multiply([t,0,0,e,0,0]),this.translate(-s,-i),this.toMatrix4(),this}scaleTo(t,e=t,s=0,i=0){return this.scale(t/this.m11,e/this.m22,s,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,s=t){return this.matrix4.scale(t,e,s),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,s=t){const{scalarX:i,scalarY:r,scalarZ:a}=this.matrix4.split();return this.scale3d(t/i,e/r,s/a),this}skew(t,e=t){return this.multiply([Math.cos(Q(e)),Math.sin(Q(e)),-Math.sin(Q(t)),Math.cos(Q(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:s,skewY:i}=this.split();return this.skew(t-s,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,s){return this}skew3dTo(t,e,s){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const qd=new Ct(0,0,0),jd=new Ct(1,1,1),pe=new Ct,ln=new Ct,At=new Ct,We=new Ct,$i=new He,Yt=new Et;function Gi(n){const t=new bt;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,s,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let a=0,o=i.length;a<o;a++)i[a].trim()&&r.push(parseFloat(""+i[a]));switch(s.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new Et(r)),t.matrix4.toMatrix(t);break}return""}),t}function Xt(n,t,e){const s=new bt;return s.rotate(wt(n)),s.transformPoint({x:t,y:e})}function qi(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,s=typeof n?.degree=="number"?n?.degree:0,i=typeof n?.scalarX=="number"?n?.scalarX:1,r=typeof n?.scalarY=="number"?n?.scalarY:1,a=Q(s),o=Math.cos(a),h=Math.sin(a),c=new DOMMatrix([o*i,h*i,-h*r,o*r,t,e]);return c.multiplySelf(new DOMMatrix(n?.originMatrix||"")),c}function Hd(n,t){const e=new Path2D(n),s=new Path2D;return s.addPath(e,qi(t)),s}function De(n,t,e){const s=Li(n);return s.props.style=s.props.style||{},t?s.props.style[t]||s.props.style[E.toCamel(t)]||s.props.style[E.toKebab(t)]||"":s.props.style}function ji(n,t,e){Ri(n,s=>{s.props.style=s.props.style||{},typeof t=="string"&&e?s.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{s.props.style[i]=t[i]})},!0)}function Hi(n){const t={};if(getComputedStyle){const e=getComputedStyle(n);for(let s=0,i=e.length;s<i;s++)t[e[s]]=e.getPropertyValue(t[s])}else{const e=n.currentStyle;for(const s in e)t[s]=e[s]}return n.style.cssText&&n.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[s,i]=e.split(":");s&&i&&(t[s.trim()]=i.trim())}),t}function Wd(n,t,e){let s=n.style[t]||"";if(!s&&getComputedStyle){t=E.toKebab(t);const i=getComputedStyle(n,e),r=i.getPropertyPriority(t);s=i.getPropertyValue(t).trim()+(r?"!"+r:"")}return s||(s=n.currentStyle[t]||""),s}function un(n,t,e){typeof t=="string"&&e?n.style.setProperty(E.toKebab(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(s=>{un(n,s,t[s])})}function Wi(n,t){typeof t=="string"?n.style.removeProperty(E.toKebab(t)):Object.keys(t).forEach(e=>{Wi(n,e)})}function Vo(n,t){let e;if(typeof t=="string"){const s=document.querySelector(t)?.shadowRoot;s?e=s:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const s=document.createElement("style");return s.innerHTML=n,e.appendChild(s),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(s)}}else{const s=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(s)}}}function Jd(n,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:De(n,"transform")||""});const s=Gi(e.transform),i={};for(const r in t){const a=t[r];switch(r){case"transform":break;case"translate":s.translate(a[0]||0,a[1]||0);break;case"translateTo":s.translateTo(a[0]||0,a[1]||0);break;case"translateX":s.translateX(a||0);break;case"translateXTo":s.translateXTo(a||0);break;case"translateY":s.translateY(a||0);break;case"translateYTo":s.translateYTo(a||0);break;case"translateZ":s.translateZ(a||0);break;case"translateZTo":s.translateZTo(a||0);break;case"translate3d":s.translate3d(a[0]||0,a[1]||0,a[2]||0);break;case"translate3dTo":s.translate3dTo(a[0]||0,a[1]||0,a[2]||0);break;case"rotate":typeof a=="number"?s.rotate(a||0):s.rotate(a[0]||0,a[1]||0,a[2]||0);break;case"rotateTo":typeof a=="number"?s.rotateTo(a||0):s.rotateTo(a[0]||0,a[1]||0,a[2]||0);break;case"rotateX":s.rotateX(a||0);break;case"rotateXTo":s.rotateXTo(a||0);break;case"rotateY":s.rotateY(a||0);break;case"rotateYTo":s.rotateYTo(a||0);break;case"rotateZ":s.rotateZ(a||0);break;case"rotateZTo":s.rotateZTo(a||0);break;case"rotate3d":s.rotate3d(a[0]||0,a[1]||0,a[2]||0);break;case"rotate3dTo":s.rotate3dTo(a[0]||0,a[1]||0,a[2]||0);break;case"scale":typeof a=="number"?s.scale(a||1):s.scale(a[0]||1,a[1]||1,a[2]||0,a[3]||0);break;case"scaleTo":typeof a=="number"?s.scaleTo(a||1):s.scaleTo(a[0]||1,a[1]||1,a[2]||0,a[3]||0);break;case"scaleX":s.scaleX(a||1);break;case"scaleXTo":s.scaleXTo(a||1);break;case"scaleY":s.scaleY(a||1);break;case"scaleYTo":s.scaleYTo(a||1);break;case"scaleZ":s.scaleZ(a||1);break;case"scaleZTo":s.scaleZTo(a||1);break;case"scale3d":typeof a=="number"?s.scale3d(a||1):s.scale3d(a[0]||1,a[1]||1,a[2]||1);break;case"scale3dTo":typeof a=="number"?s.scale3dTo(a||1):s.scale3dTo(a[0]||1,a[1]||1,a[2]||1);break;case"skew":typeof a=="number"?s.skew(a||0):s.skew(a[0]||0,a[1]||0);break;case"skewTo":typeof a=="number"?s.skewTo(a||0):s.skewTo(a[0]||0,a[1]||0);break;case"skewX":s.skewX(a||0);break;case"skewXTo":s.skewXTo(a||0);break;case"skewY":s.skewY(a||0);break;case"skewYTo":s.skewYTo(a||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":s.perspective(a||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=De(n,r)),Object.assign(i,{[r]:`${a}`});break}}return Object.assign(i,{transform:s.toString()}),i}function Le(n,t,e){if(t===void 0&&e===void 0)return Ji(n);if(typeof t=="string"&&e===void 0)return $o(n,t);let s={};typeof t=="object"?s=t:typeof t=="string"&&typeof e=="string"&&(s[t]=""+e),Ri(n,i=>{Object.entries(s).forEach(([r,a])=>{i.props[r]=""+a})})}const Zd=["-o-","-ms-","-moz-","-webkit-",""];function Ji(n){const t={};for(let e=0,s=n.attributes,i=s.length;e<i;e++){const r=s[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=Hi(n):t[r.nodeName]=r.nodeValue)}return t}function $o(n,t){return t==="style"?Hi(n):n.getAttribute(E.toKebab(t))}function Je(n,t,e){return n.setAttribute(E.toKebab(t),""+e)}function Kd(n,t){t.split(/[,\s]+/i).forEach(e=>{const s=E.toKebab(e.trim());s!=""&&n.removeAttribute(s)})}function Go(n,t){for(const e in t){const s=t[e];switch(e){case"fill":s!=="none"&&(n.fillStyle=s);break;case"stroke":s!=="none"&&(n.strokeStyle=s);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(s);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=s;break;case"stroke-linejoin":case"strokeLinejoin":switch(s){case"round":case"bevel":case"miter":n.lineJoin=s;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(s);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(s);break;case"stroke-dasharray":case"strokeDasharray":typeof s=="string"&&n.setLineDash(s.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof s=="string"&&(n.font=s);break;case"font-size":case"fontSize":n.font+=` ${s}`;break;case"font-family":case"fontFamily":n.font+=` ${s}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(s){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(s){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=s;break;default:n.textBaseline="alphabetic";break}break}}}function Qd(n,t,e,s,i){const r=t/e;let a=0,o=0;switch(n){case"aspectFit":r>=1?(a=s,o=a/r,o>i&&(o=i,a=o*r)):(o=i,a=o*r,a>s&&(a=s,o=a/r));break;case"aspectFill":r>=1?(o=i,a=o*r):(a=s,o=a/r);break;case"widthFix":a=s,o=a/r;break;case"heightFix":o=i,a=o*r;break;case"scaleToFill":default:a=s,o=i;break}return{width:a,height:o}}function qo(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const tm=n=>{const t=n.width,e=n.height,s=t*e*3,i=s+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],a=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=(4-t*3%4)%4,h=n.data;let c="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const p=l*(u-1);let y="";for(let v=0;v<t;v++){const w=v<<2;y+=d(h[p+w+2])+d(h[p+w+1])+d(h[p+w])}for(let v=0;v<o;v++)y+=String.fromCharCode(0);c+=y}while(--u);function f(p){if(!window.btoa)throw"btoa undefined";let y="";if(typeof p=="string")y=p;else for(let v=0;v<p.length;v++)y+=String.fromCharCode(p[v]);return btoa(y)}return f(r.concat(a))+f(c)};function em(n){const{width:t,height:e}=n,s=document.createElement("canvas"),i=s.getContext("2d");return s.width=t,s.height=e,i.putImageData(n,0,0,0,0,t,e),s.toDataURL("image/png")}const sm=(n,t,e)=>{const{width:s,height:i}=n,r=document.createElement("canvas"),a=r.getContext("2d");r.width=s,r.height=i,a.putImageData(n,0,0,0,0,s,i);const o=`image/${t?t.toLowerCase():"png"}`;r.toBlob(h=>{e?.(null,h)},o,1)};function nm(n,t){return createImageBitmap(n,t)}function im(n){const t=[],e=[],s=[];let i=0;for(let h=0,c=n.data.length;h<c;h+=4)t[i]=n.data[h],e[i]=n.data[h+1],s[i]=n.data[h+2],i+=1;const r=Zi(t),a=Zi(e),o=Zi(s);return"rgb("+r+","+a+","+o+")"}function Zi(n){const t={},e=[],s=[];for(let o=0;o<n.length;o++)t[n[o]]?e.push(n[o]):t[n[o]]=1;let i=0;for(let o=0;o<e.length;o++){i=0;for(let h=0;h<e.length;h++)e[o]===e[h]&&(i+=1),s[o]=i}const r=Math.max.apply(null,s);let a=0;for(;a<s.length;a++)if(s[a]===r)return;return e[a]}const rm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[(a*e+e-o-1)*4],i[h+1]=t[(a*e+e-o-1)*4+1],i[h+2]=t[(a*e+e-o-1)*4+2],i[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,e,s)},am=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[((s-a-1)*e+o)*4],i[h+1]=t[((s-a-1)*e+o)*4+1],i[h+2]=t[((s-a-1)*e+o)*4+2],i[h+3]=t[((s-a-1)*e+o)*4+3]}return new ImageData(i,e,s)},om=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<s;o++){const h=(a*s+o)*4;i[h]=t[(o*e+e-a-1)*4],i[h+1]=t[(o*e+e-a-1)*4+1],i[h+2]=t[(o*e+e-a-1)*4+2],i[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,s,e)},hm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<s;o++){const h=(a*s+o)*4;i[h]=t[((s-o-1)*e+a)*4],i[h+1]=t[((s-o-1)*e+a)*4+1],i[h+2]=t[((s-o-1)*e+a)*4+2],i[h+3]=t[((s-o-1)*e+a)*4+3]}return new ImageData(i,s,e)},cm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+1]+t[h+2])/3;i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,s)},lm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,s)},um=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,l=(t[h]+t[h+1]+t[h+2])/3>127?255:0;i[h]=l,i[h+1]=l,i[h+2]=l,i[h+3]=t[h+3]}return new ImageData(i,e,s)},fm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=255-t[h],i[h+1]=255-t[h+1],i[h+2]=255-t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,s)},dm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[h],i[h+1]=0,i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,s)},mm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,s)},pm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=0,i[h+1]=0,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,s)},gm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,s)},ym=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[h],i[h+1]=0,i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,s)},wm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,s)},xm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h+1]+t[h+2])/2;i[h]=t[h],i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,s)},bm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+2])/2;i[h]=c,i[h+1]=t[h+1],i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,s)},vm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+1])/2;i[h]=c,i[h+1]=c,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,s)},_m=n=>jo(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Sm=n=>jo(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),Em=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=t[h+2],i[h+3]=255}return new ImageData(i,e,s)},Tm=n=>{const{data:t,width:e,height:s}=n,i=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;if(t[h+3]===0)i[h]=255,i[h+1]=255,i[h+2]=255,i[h+3]=255;else{const c=Ho([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);i[h]=c[0],i[h+1]=c[1],i[h+2]=c[2],i[h+3]=c[3]}}return new ImageData(i,e,s)};function Pm(n,t,e,s,i,r=!1,a){const{data:o,width:h,height:c}=n;let l=i,u=s,d=t,f=e;if(l<0?l=0:l>h&&(l=h),u<0?u=0:u>c&&(u=c),d<1?d=1:d>h&&(d=h),f<1?f=1:f>c&&(f=c),l+d>h&&(d=h-l),u+f>c&&(f=c-u),r){const p=new Uint8ClampedArray(o.length);for(let v=0;v<c;v++)for(let w=0;w<h;w++){const S=(v*h+w)*4;w>=l&&w<=l+d&&v>=u&&v<=u+f?(p[S]=o[S],p[S+1]=o[S+1],p[S+2]=o[S+2],p[S+3]=o[S+3]):(p[S]=255,p[S+1]=255,p[S+2]=255,p[S+3]=a&&["JPG","JPEG"].includes(a.toUpperCase())?255:0)}return new ImageData(p,h,c)}else{const p=new Uint8ClampedArray(d*f*4);for(let v=u;v<=u+f;v++)for(let w=l;w<=l+d;w++){const S=((v-u)*d+w-l)*4,x=(v*h+w)*4;p[S]=o[x],p[S+1]=o[x+1],p[S+2]=o[x+2],p[S+3]=o[x+3]}return new ImageData(p,d,f)}}function Mm(n,t,e,s){const{data:i,width:r,height:a}=n;let o=t;o>Math.floor(r/2)&&(o=Math.floor(r/2)),o>Math.floor(a/2)&&(o=Math.floor(a/2)),o<0&&(o=0);const h=new Uint8ClampedArray(i.length);for(let l=0;l<a;l++)for(let u=0;u<r;u++){const d=(l*r+u)*4;let f=-1;u<o?l<o?f=Math.sqrt(Math.pow(o-u-1,2)+Math.pow(o-l-1,2)):l>a-o-1&&(f=Math.sqrt(Math.pow(o-u-1,2)+Math.pow(l-(a-o),2))):u>r-o-1&&(l<o?f=Math.sqrt(Math.pow(u-(r-o),2)+Math.pow(o-l-1,2)):l>a-o-1&&(f=Math.sqrt(Math.pow(u-(r-o),2)+Math.pow(l-(a-o),2)))),Math.round(f)>o?(h[d]=255,h[d+1]=255,h[d+2]=255,h[d+3]=s||e.toUpperCase()==="PNG"?0:255):(h[d]=i[d],h[d+1]=i[d+1],h[d+2]=i[d+2],h[d+3]=s||e.toUpperCase()==="PNG"?i[d+3]:255)}return new ImageData(h,r,a)}function Cm(n,t,e,s,i,r=1e4){const a=new Image;a.src=n;const o=document.createElement("canvas"),h=o.getContext("2d");return o.width=r,o.height=r,h.drawImage(a,0,0,t,e,0,0,s,i),h.getImageData(0,0,s,i)}function Am(n,t){const{data:e,width:s,height:i}=n,r=new Uint8ClampedArray(e.length);for(let o=0;o<i;o++)for(let h=0;h<s;h++){const c=(o*s+h)*4;r[c]=Math.max(Math.min(e[c]+t,255),0),r[c+1]=Math.max(Math.min(e[c+1]+t,255),0),r[c+2]=Math.max(Math.min(e[c+2]+t,255),0),r[c+3]=e[c+3]}return new ImageData(r,s,i)}function Im(n,t,e=!1){const{data:s,width:i,height:r}=n,a=new Uint8ClampedArray(s.length);for(let h=0;h<r;h++)for(let c=0;c<i;c++){const l=(h*i+c)*4;s[l+3]===0?(a[l]=255,a[l+1]=255,a[l+2]=255):(a[l]=s[l],a[l+1]=s[l+1],a[l+2]=s[l+2]);let u=s[l+3];e?u=Math.max(Math.min(Math.floor(255*t),255),0):u=Math.max(Math.min(Math.floor(u+255*t),255),0),a[l+3]=u}return new ImageData(a,i,r)}function km(n,t,e,s){const{data:i,width:r,height:a}=n,{data:o,width:h,height:c}=t;let l=e,u=s;e+c>a&&(l=a-c),s+h>r&&(u=r-h);const d=new Uint8ClampedArray(i.length);for(let p=0;p<a;p++)for(let y=0;y<r;y++){const v=(p*r+y)*4;if(y<u||y>u+h||p<=l||p>=l+c)d[v]=i[v],d[v+1]=i[v+1],d[v+2]=i[v+2],d[v+3]=i[v+3];else{const w=(p*r+y-((l+1)*r+(p-(l+1))*(r-h))+h-u-1)*4,S=[o[w],o[w+1],o[w+2],o[w+3]],x=[i[v],i[v+1],i[v+2],i[v+3]],b=Ho(S,x);d[v]=b[0],d[v+1]=b[1],d[v+2]=b[2],d[v+3]=b[3]}}return new ImageData(d,r,a)}function Dm(n,t,e,s,i,r=10){const{data:a,width:o,height:h}=n;let c=i,l=s,u=t,d=e;c<0?c=0:c>o&&(c=o),l<0?l=0:l>h&&(l=h),u<1?u=1:u>o&&(u=o),d<1?d=1:d>h&&(d=h),c+u>o&&(u=o-c),l+d>h&&(d=h-l);const f=new Uint8ClampedArray(a.length);for(let y=0;y<h;y++)for(let v=0;v<o;v++){const w=(y*o+v)*4;if(v>=c&&v<=c+u&&y>=l&&y<=l+d){const S=Math.floor((v-c)/r),x=Math.floor((y-l)/r);let b=Math.floor(r*(S+1)-r/2+c),M=Math.floor(r*(x+1)-r/2+l);b>o-1&&(b=o-1),M>h-1&&(M=h-1);const P=(M*o+b)*4;f[w]=a[P],f[w+1]=a[P+1],f[w+2]=a[P+2],f[w+3]=a[P+3]}else f[w]=a[w],f[w+1]=a[w+1],f[w+2]=a[w+2],f[w+3]=a[w+3]}return new ImageData(f,o,h)}function Lm(n,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:s,width:i,height:r}=n,{data:a}=t,o=new Uint8ClampedArray(s.length),{backgroundColor:h,changeIntoColor:c}=e;for(let u=0;u<r;u++)for(let d=0;d<i;d++){const f=(u*i+d)*4,p=a[f],y=a[f+1],v=a[f+2],w=a[f+3];p===h.r&&y===h.g&&v===h.b&&w===h.a&&c.a!==0?(o[f]=c.r,o[f+1]=c.g,o[f+2]=c.b,o[f+3]=c.a):(o[f]=s[f],o[f+1]=s[f+1],o[f+2]=s[f+2],o[f+3]=s[f+3])}return new ImageData(o,i,r)}return n}function jo(n,t){const{data:e,width:s,height:i}=n,r=new Uint8ClampedArray(e.length);for(let o=0;o<i;o++)for(let h=0;h<s;h++){const c=(o*s+h)*4;for(let l=0;l<3;l++){const u=c+l;h===0||h===s-1||o===0||o===i-1?r[u]=e[u]:r[u]=t[0]*e[u-s*4-4]+t[1]*e[u-s*4]+t[2]*e[u-s*4+4]+t[3]*e[u-4]+t[4]*e[u]+t[5]*e[u+4]+t[6]*e[u+s*4-4]+t[7]*e[u+s*4]+t[8]*e[u+s*4+4]}r[c+3]=e[c+3]}return new ImageData(r,s,i)}function Ho(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],s=t[3];if(e===255||s===0)return n;if(e===0)return t;{const i=e/255,r=s/255,a=Math.max(Math.min(Math.floor(n[0]*i+t[0]*r*(1-i)),255),0),o=Math.max(Math.min(Math.floor(n[1]*i+t[1]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor(n[2]*i+t[2]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[a,o,h,c]}}return[255,255,255,255]}const Ki=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,s=t.length){for(let i=0;i<s;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,s=t.length;e<s;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,s=n.length;e<s;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},Wo=function(){let n=0,t=0,e=0,s="";const i=function(a){if(!(a<0)){if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47}throw new Error("n:"+a)},r=function(a){s+=String.fromCharCode(i(a&63))};return{writeByte(a){for(n=n<<8|a&255,t+=8,e+=1;t>=6;)r(n>>>t-6),t-=6},flush(){if(t>0&&(r(n<<6-t),n=0,t=0),e%3!=0){const a=3-e%3;for(let o=0;o<a;o++)s+="="}},toString(){return s}}},Jo=function(n,t,e){const s=new Array(n*n),i=function(o){const h=o;let c=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;c+d>=8;)h.writeByte(255&(u<<c|l)),d-=8-c,u>>>=8-c,l=0,c=0;l=u<<c|l,c=c+d},flush(){c>0&&h.writeByte(l)}}},r=function(o){const h=1<<o,c=(1<<o)+1;let l=o+1;const u=a();for(let v=0;v<h;v++)u.add(String.fromCharCode(v));u.add(String.fromCharCode(h)),u.add(String.fromCharCode(c));const d=Ki(),f=i(d);f.write(h,l);let p=0,y=String.fromCharCode(s[p]);for(p+=1;p<s.length;){const v=String.fromCharCode(s[p]);p+=1,u.contains(y+v)?y=y+v:(f.write(u.indexOf(y),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(y+v)),y=v)}return f.write(u.indexOf(y),l),f.write(c,l),f.flush(),d.toByteArray()},a=function(){const o={};let h=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);o[c]=h,h+=1},size(){return h},indexOf(c){return o[c]},contains(c){return typeof o[c]<"u"}}};return{setPixel(o,h,c){s[h*n+o]=c},write(o){o.writeString("GIF87a"),o.writeShort(n),o.writeShort(n),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(E.radixStringToNumber("0x"+t[1]+t[2])),o.writeByte(E.radixStringToNumber("0x"+t[3]+t[4])),o.writeByte(E.radixStringToNumber("0x"+t[5]+t[6])),o.writeByte(E.radixStringToNumber("0x"+e[1]+e[2])),o.writeByte(E.radixStringToNumber("0x"+e[3]+e[4])),o.writeByte(E.radixStringToNumber("0x"+e[5]+e[6])),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(n),o.writeShort(n),o.writeByte(0);const h=2,c=r(h);o.writeByte(h);let l=0;for(;c.length-l>255;)o.writeByte(255),o.writeBytes(c,l,255),l+=255;o.writeByte(c.length-l),o.writeBytes(c,l,c.length-l),o.writeByte(0),o.writeString(";")}}},Zo=function(n,t,e,s){const i=Jo(n,t,e);for(let c=0;c<n;c++)for(let l=0;l<n;l++)i.setPixel(l,c,s(l,c));const r=Ki();i.write(r);const a=Wo(),o=r.toByteArray();for(let c=0,l=o.length;c<l;c++)a.writeByte(o[c]);a.flush();let h="";return h+="data:image/gif;base64,",h+=a,h},It={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},bs={M:0,L:1,H:2,Q:3},ge={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},ut={glog:function(n){if(n<1)throw new Error("glog("+n+")");return ut.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return ut.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)ut.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)ut.EXP_TABLE[n]=ut.EXP_TABLE[n-4]^ut.EXP_TABLE[n-5]^ut.EXP_TABLE[n-6]^ut.EXP_TABLE[n-8];for(let n=0;n<255;n++)ut.LOG_TABLE[ut.EXP_TABLE[n]]=n;const Z={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){let t=n<<10;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15)>=0;)t^=Z.G15<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15);return(n<<10|t)^Z.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18)>=0;)t^=Z.G18<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return Z.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case ge.PATTERN000:return(t+e)%2==0;case ge.PATTERN001:return t%2==0;case ge.PATTERN010:return e%3==0;case ge.PATTERN011:return(t+e)%3==0;case ge.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case ge.PATTERN101:return t*e%2+t*e%3==0;case ge.PATTERN110:return(t*e%2+t*e%3)%2==0;case ge.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Ze([1],0);for(let e=0;e<n;e++)t=t.multiply(new Ze([1,ut.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case It.MODE_NUMBER:return 10;case It.MODE_ALPHA_NUM:return 9;case It.MODE_8BIT_BYTE:return 8;case It.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case It.MODE_NUMBER:return 12;case It.MODE_ALPHA_NUM:return 11;case It.MODE_8BIT_BYTE:return 16;case It.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case It.MODE_NUMBER:return 14;case It.MODE_ALPHA_NUM:return 13;case It.MODE_8BIT_BYTE:return 16;case It.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let a=0;a<t;a++){let o=0;const h=n.isDark(r,a);for(let c=-1;c<=1;c++)if(!(r+c<0||t<=r+c))for(let l=-1;l<=1;l++)a+l<0||t<=a+l||c==0&&l==0||h==n.isDark(r+c,a+l)&&o++;o>5&&(e+=3+o-5)}for(let r=0;r<t-1;r++)for(let a=0;a<t-1;a++){let o=0;n.isDark(r,a)&&o++,n.isDark(r+1,a)&&o++,n.isDark(r,a+1)&&o++,n.isDark(r+1,a+1)&&o++,(o==0||o==4)&&(e+=3)}for(let r=0;r<t;r++)for(let a=0;a<t-6;a++)n.isDark(r,a)&&!n.isDark(r,a+1)&&n.isDark(r,a+2)&&n.isDark(r,a+3)&&n.isDark(r,a+4)&&!n.isDark(r,a+5)&&n.isDark(r,a+6)&&(e+=40);for(let r=0;r<t;r++)for(let a=0;a<t-6;a++)n.isDark(a,r)&&!n.isDark(a+1,r)&&n.isDark(a+2,r)&&n.isDark(a+3,r)&&n.isDark(a+4,r)&&!n.isDark(a+5,r)&&n.isDark(a+6,r)&&(e+=40);let s=0;for(let r=0;r<t;r++)for(let a=0;a<t;a++)n.isDark(a,r)&&s++;const i=Math.abs(100*s/t/t-50)/5;return e+=i*10,e}};class Ze{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let s=0;for(;s<t.length&&t[s]==0;)s++;this.num=new Array(t.length-s+e);for(let i=0;i<t.length-s;i++)this.num[i]=t[i+s]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let s=0;s<this.getLength();s++)for(let i=0;i<t.getLength();i++)e[s+i]^=ut.gexp(ut.glog(this.get(s))+ut.glog(t.get(i)));return new Ze(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=ut.glog(this.get(0))-ut.glog(t.get(0)),s=new Array(this.getLength());for(let i=0;i<this.getLength();i++)s[i]=this.get(i);for(let i=0;i<t.getLength();i++)s[i]^=ut.gexp(ut.glog(t.get(i))+e);return new Ze(s,0).mod(t)}}class Qt{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const s=Qt.getRsBlockTable(t,e);if(s==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=s.length/3,r=[];for(let a=0;a<i;a++){const o=s[a*3+0],h=s[a*3+1],c=s[a*3+2];for(let l=0;l<o;l++)r.push(new Qt(h,c))}return r}static getRsBlockTable(t,e){switch(e){case bs.L:return Qt.RS_BLOCK_TABLE[(t-1)*4+0];case bs.M:return Qt.RS_BLOCK_TABLE[(t-1)*4+1];case bs.Q:return Qt.RS_BLOCK_TABLE[(t-1)*4+2];case bs.H:return Qt.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Ko{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let s=0;s<e;s++)this.putBit((t>>>e-s-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class Rm{mode;data;constructor(t){this.mode=It.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,s=this.data.length;e<s;e++)t.put(this.data.charCodeAt(e),8)}}class ye{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=bs[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new Rm(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=Qt.getRSBlocks(t,this.errorCorrectLevel),s=new Ko;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const a=this.dataList[r];s.put(a.mode,4),s.put(a.getLength(),Z.getLengthInBits(a.mode,t)),a.write(s)}if(s.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++){this.modules[s]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[s][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=ye.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let s=-1;s<=7;s++)if(!(t+s<=-1||this.moduleCount<=t+s))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=s&&s<=6&&(i==0||i==6)||0<=i&&i<=6&&(s==0||s==6)||2<=s&&s<=4&&2<=i&&i<=4?this.modules[t+s][e+i]=!0:this.modules[t+s][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let s=0;s<8;s++){this.makeImpl(!0,s);const i=Z.getLostPoint(this);(s==0||t>i)&&(t=i,e=s)}return e}createMovieClip(t,e,s){const i=t.createEmptyMovieClip(e,s),r=1;this.make();for(let a=0;a<this.modules.length;a++){const o=a*r;for(let h=0;h<this.modules[a].length;h++){const c=h*r;this.modules[a][h]&&(i.beginFill(0,100),i.moveTo(c,o),i.lineTo(c+r,o),i.lineTo(c+r,o+r),i.lineTo(c,o+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=Z.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let s=0;s<t.length;s++){const i=t[e],r=t[s];if(this.modules[i][r]==null)for(let a=-2;a<=2;a++)for(let o=-2;o<=2;o++)a==-2||a==2||o==-2||o==2||a==0&&o==0?this.modules[i+a][r+o]=!0:this.modules[i+a][r+o]=!1}}setupTypeNumber(t){const e=Z.getBCHTypeNumber(this.typeNumber);for(let s=0;s<18;s++){const i=!t&&(e>>s&1)==1;this.modules[Math.floor(s/3)][s%3+this.moduleCount-8-3]=i}for(let s=0;s<18;s++){const i=!t&&(e>>s&1)==1;this.modules[s%3+this.moduleCount-8-3][Math.floor(s/3)]=i}}setupTypeInfo(t,e){const s=this.errorCorrectLevel<<3|e,i=Z.getBCHTypeInfo(s);for(let r=0;r<15;r++){const a=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=a:r<8?this.modules[r+1][8]=a:this.modules[this.moduleCount-15+r][8]=a}for(let r=0;r<15;r++){const a=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=a:r<9?this.modules[8][15-r-1+1]=a:this.modules[8][15-r-1]=a}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let s=-1,i=this.moduleCount-1,r=7,a=0;for(let o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(let h=0;h<2;h++)if(this.modules[i][o-h]==null){let c=!1;a<t.length&&(c=(t[a]>>>r&1)==1),Z.getMask(e,i,o-h)&&(c=!c),this.modules[i][o-h]=c,r--,r==-1&&(a++,r=7)}if(i+=s,i<0||this.moduleCount<=i){i-=s,s=-s;break}}}static createData(t,e,s){const i=Qt.getRSBlocks(t,e),r=new Ko;for(let o=0;o<s.length;o++){const h=s[o];r.put(h.mode,4),r.put(h.getLength(),Z.getLengthInBits(h.mode,t)),h.write(r)}let a=0;for(let o=0;o<i.length;o++)a+=i[o].dataCount;if(r.getLengthInBits()>a*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+a*8+")");for(r.getLengthInBits()+4<=a*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=a*8||(r.put(ye.PAD0,8),r.getLengthInBits()>=a*8));)r.put(ye.PAD1,8);return ye.createBytes(r,i)}static createBytes(t,e){let s=0,i=0,r=0;const a=new Array(e.length),o=new Array(e.length);for(let u=0;u<e.length;u++){const d=e[u].dataCount,f=e[u].totalCount-d;i=Math.max(i,d),r=Math.max(r,f),a[u]=new Array(d);for(let w=0;w<a[u].length;w++)a[u][w]=255&t.buffer[w+s];s+=d;const p=Z.getErrorCorrectPolynomial(f),v=new Ze(a[u],p.getLength()-1).mod(p);o[u]=new Array(p.getLength()-1);for(let w=0;w<o[u].length;w++){const S=w+v.getLength()-o[u].length;o[u][w]=S>=0?v.get(S):0}}let h=0;for(let u=0;u<e.length;u++)h+=e[u].totalCount;const c=new Array(h);let l=0;for(let u=0;u<i;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(c[l++]=a[d][u]);for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(c[l++]=o[d][u]);return c}}const Qo=Math.ceil,vs=Math.floor,th=Math.round;function Om(n,t){const e=E.utf16to8(n),s=t?.ecc||"H",i=t?.size||256,r=-1,a=t?.padding||0,o=t?.color||"#000000",h=t?.background||"#ffffff",c=new ye(r,s);c.addData(e),c.make();const l=c.getModuleCount(),u=(i-a*2)/l,d=a,f=i-a;return Zo(i,o,h,function(p,y){if(d<=p&&p<f&&d<=y&&y<f){const v=vs((p-d)/u),w=vs((y-d)/u);return c.isDark(w,v)?0:1}else return 1})}function zm(n,t){const e=t.x||0,s=t.y||0,i=E.utf16to8(n),r=t.ctx,a=t.ecc||"H",o=typeof t.size=="number"?vs(t.size):256,h=t.padding||0,c=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new ye(c,a);d.addData(i),d.make();const f=d.getModuleCount(),p=(o-h*2)/f;r.fillStyle=u,r.fillRect(e,s,o,o);for(let y=0;y<f;y++)for(let v=0;v<f;v++){const w=Qo((v+1)*p)-vs(v*p),S=Qo((y+1)*p)-vs(y*p);r.fillStyle=d.isDark(y,v)?l:u,r.fillRect(e+th(v*p)+h,s+th(y*p)+h,w,S)}}const fn=new ws,ht=new Ct;function te(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function W(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}class jt{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,s=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=s,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=E.cloneTypedArray(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,s){t*=this.itemSize,s*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[s+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,s=this.count;e<s;e++)fn.fromBufferAttribute(this,e),fn.applyMatrix3(t),this.setXY(e,fn.x,fn.y);else if(this.itemSize===3)for(let e=0,s=this.count;e<s;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix3(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyMatrix4(t){for(let e=0,s=this.count;e<s;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix4(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)ht.fromBufferAttribute(this,e),ht.applyNormalMatrix(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)ht.fromBufferAttribute(this,e),ht.transformDirection(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let s=this.array[t*this.itemSize+e];return this.normalized&&(s=te(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=W(s,this.array)),this.array[t*this.itemSize+e]=s,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=te(e,this.array)),e}setX(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=te(e,this.array)),e}setY(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=te(e,this.array)),e}setZ(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=te(e,this.array)),e}setW(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array)),this.array[t+0]=e,this.array[t+1]=s,this}setXYZ(t,e,s,i){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array),i=W(i,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=i,this}setXYZW(t,e,s,i,r){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array),i=W(i,this.array),r=W(r,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return E.newConstructor(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class Nm extends jt{constructor(t,e,s=!1){super(new Int8Array(t),e,s)}}class Bm extends jt{constructor(t,e,s=!1){super(new Uint8Array(t),e,s)}}class Fm extends jt{constructor(t,e,s=!1){super(new Uint8ClampedArray(t),e,s)}}class Ym extends jt{constructor(t,e,s=!1){super(new Int16Array(t),e,s)}}class Xm extends jt{constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}}class Um extends jt{constructor(t,e,s=!1){super(new Int32Array(t),e,s)}}class Vm extends jt{constructor(t,e,s=!1){super(new Uint32Array(t),e,s)}}class $m extends jt{isFloat16BufferAttribute=!0;constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}getX(t){let e=E.fromHalfFloat(this.array[t*this.itemSize]);return this.normalized&&(e=te(e,this.array)),e}setX(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize]=E.toHalfFloat(e),this}getY(t){let e=E.fromHalfFloat(this.array[t*this.itemSize+1]);return this.normalized&&(e=te(e,this.array)),e}setY(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+1]=E.toHalfFloat(e),this}getZ(t){let e=E.fromHalfFloat(this.array[t*this.itemSize+2]);return this.normalized&&(e=te(e,this.array)),e}setZ(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+2]=E.toHalfFloat(e),this}getW(t){let e=E.fromHalfFloat(this.array[t*this.itemSize+3]);return this.normalized&&(e=te(e,this.array)),e}setW(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+3]=E.toHalfFloat(e),this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array)),this.array[t+0]=E.toHalfFloat(e),this.array[t+1]=E.toHalfFloat(s),this}setXYZ(t,e,s,i){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array),i=W(i,this.array)),this.array[t+0]=E.toHalfFloat(e),this.array[t+1]=E.toHalfFloat(s),this.array[t+2]=E.toHalfFloat(i),this}setXYZW(t,e,s,i,r){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),s=W(s,this.array),i=W(i,this.array),r=W(r,this.array)),this.array[t+0]=E.toHalfFloat(e),this.array[t+1]=E.toHalfFloat(s),this.array[t+2]=E.toHalfFloat(i),this.array[t+3]=E.toHalfFloat(r),this}}class Gm extends jt{constructor(t,e,s=!1){super(new Float32Array(t),e,s)}}const eh={map:new Map,transform:function(n){if(vo)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function qm(n,t,e){const s=new OffscreenCanvas(n,t),i=s.getContext("2d");if(i)return e(i),s.transferToImageBitmap()}function jm(n,t,e){const s=n.createPattern(eh.transform(t),"no-repeat");if(s){const i=qi(e);s.setTransform(i),n.fillStyle=s}}function sh(n){return window.URL.createObjectURL(n)}function Hm(n){return window.URL.revokeObjectURL(n)}function nh(n){let t=!1,e;function s(){document.readyState==="loading"||t||(n(),e?.(),t=!0)}try{e=j(document,"DOMContentLoaded",s)}catch{e=j(window,"load",s)}return s(),()=>{t||e()}}function ih(n){return j(window,"beforeunload",t=>{n(t)})}async function Wm(n,t=6e4){return new Promise((e,s)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=a=>{clearTimeout(r),e(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(r),s(a)},i.src=n;const r=setTimeout(()=>{s("Timeout!")},t);document.body.appendChild(i)})}function dn(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function Jm(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((s,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=o=>{clearTimeout(a),s(o),r.onerror=r.onload=null},r.onerror=o=>{clearTimeout(a),i(o)},r.setAttribute("href",n);const a=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function Zm(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const s=()=>e>=t.length?(n(),!0):!1;s()||t.forEach(i=>{i.onload=()=>{e+=1,s()}})})}const rh=new E.CacheMap;async function ah(n,t=6e4){return new Promise((e,s)=>{const i=typeof n=="string"?n:sh(n),r=rh.get(i);if(r)return e(r);const a=document.createElement("img");a.onload=()=>{clearTimeout(o);const h=a.naturalWidth||a.width,c=a.naturalHeight||a.height,l={width:h,height:c,aspectRatio:h/c,element:a,imageData:qo(a)};rh.set(i,l),e(l),a.onerror=a.onload=null},a.onerror=h=>{clearTimeout(o),s(h)},a.src=i;const o=setTimeout(()=>{s("Timeout!")},t)})}async function oh(n=E.ReadInBrowserEnum.text,t=["*"]){const s=(await ni(t))[0],i=await rs(s,n);return{type:s.type,name:s.name,size:s.size,data:i}}async function Km(n=["image/*"]){const e=(await ni(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await rs(e,E.ReadInBrowserEnum.arraybuffer),i=E.toBlob(s),r=await ah(i);return{type:e.type,name:e.name,size:e.size,data:s,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function Qm(){return window.getSelection()?.toString()||""}function tp(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function ep(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function sp(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function np(n,t){window.scrollTo(n,t)}function ip(){let n=E.noop,t=E.noop;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=ih(()=>{window.history.scrollRestoration="auto"}),t=nh(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function rp(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const op=n=>n===document.activeElement&&(n.type||n.href),Qi=function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)};function hp(n){return n*Qi()}function cp(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):Qi()}const lp=n=>{let t=n;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},up=n=>n.parentElement,tr=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:tr(n.parentElement,t.concat([n]));function fp(n){const t=tr(n);for(let e=0,s=t.length;e<s;e++)if(/(auto|scroll)/.test(De(t[e],"overflow")+De(t[e],"overflow-y")+De(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const dp=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),mp=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),pp=n=>n.nextElementSibling,gp=n=>n.previousElementSibling,yp=(n,t)=>n.closest(t),wp=n=>n.shadowRoot,_s=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,er=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,xp=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,sr=n=>_s(n)&&n.getAttribute("type")==="checkbox",nr=n=>_s(n)&&n.getAttribute("type")==="radio",bp=n=>_s(n)&&n.getAttribute("type")==="text",vp=n=>_s(n)&&n.getAttribute("type")==="number";function _p(n,t){if(er(n)){const e=n.options;for(let s=0,i=e.length;s<i;s++)e[s].selected=e[s].value==t}}function Sp(n,t){if(nr(n)){const e=document.getElementsByName(n.name);for(let s=0,i=e.length;s<i;s++){const r=e[s];r.checked=r.value==t}}}function Ep(n,t){sr(n)&&(n.checked=t)}const mn=(n,t,e="append")=>{typeof t=="string"?n[e](fh(t)):n[e](t)},hh=function(n,t){if(typeof t=="string"){n.innerHTML=t;const e=dh(n);e!=n&&(n=e)}else mn(t,"replaceWith")},ch=function(n){hh(n,"")},Tp=(n,t)=>{n.textContent=t},Pp=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let s=0;for(;!t&&s<=e.length-1;)"innerText"in e[s]&&(t=e[s].innerText),s++}return t},Mp=n=>n.remove();function Cp(n,t){De(n,"display")=="none"&&t===void 0||t===!0?lh(n):uh(n)}function lh(n){ji(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function uh(n){ji(n,"display","none")}function ir(n,t,e="toggle"){const s=t.split(/[,\s]+/);if(n.classList)s.forEach(i=>{const r=i.trim();r!==""&&n.classList[e](r)});else{const i=n.className.split(/ +/);let r=!1;s.forEach(a=>{const o=a.trim();if(o!==""){const h=i.indexOf(o);switch(e){case"add":h===-1&&(i.push(o),r=!0);break;case"remove":h!==-1&&(i.splice(h,1),r=!0);break;case"toggle":h===-1?i.push(o):i.splice(h,1),r=!0;break}}}),r&&Le(n,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Ap(n,t){ir(n,t,"add")}function Ip(n,t){ir(n,t,"remove")}function kp(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)||!1}function fh(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(s=>{const i=dh(s);i!=s&&e.content.replaceChild(i,s)}),e.content}function Dp(n){return document.createElement.call(document,n)}function Lp(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function Rp(n){return document.createTextNode.call(document,n)}function dh(n){return n.tagName=="SCRIPT"&&(n=mh(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(mh(t),t)}),n}function mh(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let s=0,i=e.length;s<i;s++)t.setAttribute(e[s].name,e[s].value);return t}function Op(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function zp(n){const t=new Proxy(window,{get(e,s,i){if(typeof s=="string"&&["open","location","document"].includes(s))throw new Error(`禁止访问 key: ${s}`);return s==="window"?t:Reflect.get(e,s,i)},set(e,s,i,r){return Reflect.set(e,s,i,r)}});new Function("window",`with(window) { ${n} }`)(t,null)}function Ke(){const n={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,s){n.x=e.x,n.y=e.y,n.dx=0,n.dy=0,n.dStartX=0,n.dStartY=0,n.isDown=typeof s=="boolean"?s:!1,this.setCurrentMousePoint(e,s)},setCurrentMousePoint:(e,s)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof s=="boolean"?s:!1}}}function pn(n=document.documentElement,t=!1){return U(n,"mousemove",t)}function ph(n=document.documentElement,t=!1){return U(n,"mousedown",t)}function gh(n=document.documentElement,t=!1){return U(n,"mouseup",t)}function Np(n=document.documentElement,t=!1){return U(n,"mouseover",t)}function Bp(n=document.documentElement,t=!1){return U(n,"mouseout",t)}function Fp(n=document.documentElement,t=!1){return U(n,"mouseenter",t)}function Yp(n=document.documentElement,t=!1){return U(n,"mouseleave",t)}function Xp(n=document.documentElement,t=!1){return U(n,"click",t)}function Up(n=document.documentElement,t=!1){return U(n,"dblclick",t)}function Vp(n=document.documentElement,t=!1){return U(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function $p(n=document.documentElement,t=!1){return U(n,"contextmenu",t)}function yh(n=document.documentElement,t=!1){return U(n,"touchmove",t)}function wh(n=document.documentElement,t=!1){return U(n,"touchstart",t)}function xh(n=document.documentElement,t=!1){return U(n,"touchend",t)}function bh(n=document.documentElement,t=!1){return U(n,"touchcancel",t)}function rr(n=document.documentElement,t=!1){return U(n,"pointermove",t)}function ar(n=document.documentElement,t=!1){return U(n,"pointerdown",t)}function or(n=document.documentElement,t=!1){return U(n,"pointerup",t)}function hr(n=document.documentElement,t=!1){return U(n,"pointercancel",t)}function Gp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function qp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function jp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function Hp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function Wp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function Jp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function Zp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function Kp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function Qp(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function tg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function eg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function sg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function ng(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("press",e)},e=>{t.off("press",e)})}function ig(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function rg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function ag(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function og(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function hg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function cg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function lg(n=document.documentElement){const t=new tt(n);return st(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function ug(n=document.documentElement){const t=new tt(document.documentElement);return st(e=>{const s=i=>{!i.target||n==i.target||n.contains(i.target)||e(i)};return t.on("tap",s),s},(e,s)=>{t.off("tap",s)})}function fg(n=document.documentElement,t=!1){return U(n,"transitionstart",t)}function dg(n=document.documentElement,t=!1){return U(n,"transitionend",t)}function mg(n=document.documentElement,t=!1){return U(n,"animationstart",t)}function pg(n=document.documentElement,t=!1){return U(n,"animationend",t)}function vh(n=document.documentElement,t=!1){return U(n,"drag",t)}function _h(n=document.documentElement,t=!1){return U(n,"dragstart",t)}function Sh(n=document.documentElement,t=!1){return U(n,"dragend",t)}function Eh(n=document.documentElement,t=!1){return U(n,"drop",t)}function Th(n=document.documentElement,t=!1){return U(n,"dragenter",t)}function Ph(n=document.documentElement,t=!1){return U(n,"dragleave",t)}function Mh(n=document.documentElement,t=!1){return U(n,"dragover",t)}function Ch(n=document.documentElement,t=!1){return U(n,"keydown",t)}function Ah(n=document.documentElement,t=!1){return U(n,"keyup",t)}function gg(n=document.documentElement,t=!1){return U(n,"keypress",t)}function yg(n=document.documentElement,t){const e=t?.useMousePoint||Ke();return pn(n).pipe(rt(s=>(e.setCurrentMousePoint(lt(s,n)),e.mousePoint)))}function wg(n=document.documentElement,t){const e=t?.useMousePoint||Ke();return pn(n).pipe(Rf(ph(n).pipe(Ce(s=>{e.setStartMousePoint(lt(s,n),!0),t?.start?.(s,e.mousePoint)})),()=>gh(n).pipe(Ce(s=>{e.setCurrentMousePoint(lt(s,n),!1),t?.end?.(s,e.mousePoint)}))),kf(),rt(s=>(e.setCurrentMousePoint(lt(s,n),!0),e.mousePoint)))}function xg(n=document.documentElement,t){const e=t?.useMousePoint||Ke();return wh(n).pipe(Ce(s=>{const i=s.changedTouches[0];e.setStartMousePoint(lt(i,n),!0),t?.start?.(i,e.mousePoint)}),Ks(()=>yh(n).pipe(bi(xi(xh(n),bh(n)).pipe(Ce(s=>{const i=s.changedTouches[0];e.setCurrentMousePoint(lt(i,n),!1),t?.end?.(i,e.mousePoint)}))))),rt(s=>{const i=s.changedTouches[0];return e.setCurrentMousePoint(lt(i,n),!0),e.mousePoint}))}function Ih(n=document.documentElement,t){const e=t?.useMousePoint||Ke();return ar(n).pipe(Ce(s=>{e.setStartMousePoint(lt(s,n),!0),t?.start?.(s,e.mousePoint)}),Ks(()=>rr(n).pipe(bi(xi(or(n),hr(n)).pipe(Ce(s=>{e.setCurrentMousePoint(lt(s,n),!1),t?.end?.(s,e.mousePoint)}))))),rt(s=>(e.setCurrentMousePoint(lt(s,n),!0),e.mousePoint)))}function kh(n=document.documentElement,t){const e=t?.useMousePoint||Ke();return Pf(pn(n),ar(n)).pipe(uo(s=>s instanceof PointerEvent?(e.setStartMousePoint(lt(s,n),!0),t?.start?.(s,e.mousePoint),rr(n).pipe(bi(xi(or(n),hr(n)).pipe(Ce(i=>{e.setCurrentMousePoint(lt(i,n),!1),t?.end?.(i,e.mousePoint)}))))):s instanceof MouseEvent?ef(s):ja),rt(s=>(e.setCurrentMousePoint(lt(s,n),s instanceof PointerEvent),e.mousePoint)))}function bg(n){return new et(t=>Ih(n,{start:()=>{t.next(0)},end:(s,i)=>{t.next(i.dStartY)}}).subscribe(s=>{t.next(s.dStartY)}).unsubscribe).pipe(le())}function vg(n,t){Je(n,"draggable","true");const e=_h(n,!0).subscribe(r=>{fe(r),fo(r);const a=r.dataTransfer;a&&(a.effectAllowed="move",a.setData("text/plain","some-data")),t?.onStart?.(r)}),s=vh(n).subscribe(r=>{fe(r),t?.onDrag?.(r)}),i=Sh(n).subscribe(r=>{fe(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),s.unsubscribe(),i.unsubscribe()}}function _g(n,t){const e=Th(n).subscribe(a=>{fe(a),t?.onEnter?.(a)}),s=Mh(n).subscribe(a=>{fe(a);const o=a.dataTransfer;o&&(o.dropEffect="move"),t?.onOver?.(a)}),i=Ph(n).subscribe(a=>{fe(a),t?.onLeave?.(a)}),r=Eh(n).subscribe(a=>{fe(a);const o=a.dataTransfer;if(!o){t?.onDrop?.(a,[]);return}t?.onDrop?.(a,[...o.files])});return()=>{e.unsubscribe(),s.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function Dh(n=100){return U(document,"scroll",!0).pipe(Lf(n))}function Sg(){return U(window,"visibilitychange",!0).pipe(rt(()=>!document.hidden),le())}function Eg(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Ss(){const n=document.documentElement;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function Tg(){const n=document.body;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function Lh(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function Pg(){const{scrollWidth:n,scrollHeight:t}=Ss();return{width:n,height:t}}function cr(n){const{top:t,left:e,width:s,height:i}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=Ss();return{x:e+r,y:t+a,width:s,height:i}}function Mg(n){let t=n,e=0,s=0;for(;t!==null;)e+=t.offsetLeft,s+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:s,width:n.offsetWidth,height:n.offsetHeight}}function Rh(n){return n.getBoundingClientRect()}function Cg(n){const t=n.getBoundingClientRect();return{x:n.offsetLeft,y:n.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ag(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=Ss(),s=e-n;return s<=0?0:t/s*100}function Ig(n){if("center"in n){const t=n.center,e=Rh(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function lr(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=Ss();return{x:n.clientX+t,y:n.clientY+e}}function lt(n,t){const e={x:0,y:0};if(t){const s=lr(n),i=cr(t);e.x=E.clamp(s.x-i.x,0,i.width),e.y=E.clamp(s.y-i.y,0,i.height)}else{let s=0,i=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),a=n.target.getBoundingClientRect();s=a.left-r.left,i=a.top-r.top}if("offsetX"in n)e.x=n.offsetX+s,e.y=n.offsetY+i;else{const r=lr(n),a=cr(n.target);e.x=E.clamp(r.x-a.x+s,0,a.width),e.y=E.clamp(r.y-a.y+i,0,a.height)}}return e}function kg(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const Dg={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function Lg(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function Oh(n,t){const e=t.ctrl||!1,s=t.shift||!1,i=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&s===n.shiftKey&&i===n.altKey&&t.keys.map(r=>r.toLowerCase()).includes(n.key.toLowerCase())}function zh(n){return Ch(n.target||document||window).pipe(lo(t=>Oh(t,n)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function Rg(n){return Ah(n.target||document||window).pipe(lo(t=>Oh(t,n)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function Nh(n={keys:["o"]},t=E.ReadInBrowserEnum.text){return zh(n).pipe(Ks(async()=>await oh(t)))}async function Og(n={keys:["o"]},t=E.ReadInBrowserEnum.text){return nf(Nh(n,t))}async function Bh(n,t){return new Promise(e=>{const s=new ResizeObserver(i=>{const a=i[0].contentRect;t(a),e(()=>{s.unobserve(n)})});s.observe(n)})}function Fh(n=document.documentElement,t){return new et(e=>{const s=new ResizeObserver(i=>{const a=i[0].contentRect;e.next(a)});return s.observe(n,t),()=>{s.unobserve(n),s.disconnect()}})}function zg(n){return n(window.innerWidth,window.innerHeight),j(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,s=t.target.innerHeight;n(e,s)})}function Ng(){return U(window,"orientationchange"in window?"orientationchange":"resize").pipe(rt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),ue({width:window.innerWidth,height:window.innerHeight}))}function Bg(){const n={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,s){n.x=e.x,n.y=e.y,n.isDown=typeof s=="boolean"?s:!1,this.setCurrentMousePoint(e,s)},setCurrentMousePoint:(e,s)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof s=="boolean"?s:!1}}}function Fg(n=document.documentElement){const t=new E.EventBus,e=new tt(n);let s=[];const i=Bg(),r=i.mousePoint,a=k=>{t.emit("mouseDown",k)},o=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||i.setCurrentMousePoint(lt(k,n)),t.emit("mouseMove",k)},c=k=>{t.emit("mouseOver",k)},l=k=>{t.emit("mouseOut",k)},u=k=>{t.emit("mouseEnter",k)},d=k=>{t.emit("mouseLeave",k)},f=k=>{t.emit("mouseClick",k)},p=k=>{t.emit("mouseDoubleClick",k)},y=k=>{t.emit("mouseWheel",k)},v=k=>{t.emit("mouseContextMenu",k)},w=k=>{t.emit("touchStart",k)},S=k=>{t.emit("touchEnd",k)},x=k=>{t.emit("touchCancel",k)},b=k=>{const at=k.changedTouches[0];r.isDown||i.setCurrentMousePoint(lt(at,n)),t.emit("touchMove",k)},M=k=>{t.emit("pointerDown",k)},P=k=>{t.emit("pointerUp",k)},R=k=>{t.emit("pointerCancel",k)},B=k=>{t.emit("pointerMove",k)},F=k=>{t.emit("pan",k)},V=k=>{t.emit("panStart",k)},G=k=>{t.emit("panMove",k)},J=k=>{t.emit("panEnd",k)},nt=k=>{t.emit("panCancel",k)},K=k=>{t.emit("panLeft",k)},Ut=k=>{t.emit("panRight",k)},kt=k=>{t.emit("panUp",k)},Rt=k=>{t.emit("panDown",k)},Vt=k=>{t.emit("pinch",k)},O=k=>{t.emit("pinchin",k)},L=k=>{t.emit("pinchout",k)},X=k=>{t.emit("press",k)},H=k=>{t.emit("rotate",k)},_t=k=>{t.emit("swipe",k)},$t=k=>{t.emit("swipeLeft",k)},Cn=k=>{t.emit("swipeRight",k)},An=k=>{t.emit("swipeUp",k)},ft=k=>{t.emit("swipeDown",k)},Ht=k=>{t.emit("tap",k)},it=k=>{!k.target||n==k.target||n.contains(k.target)||t.emit("tapOutSide",k)},yt=k=>{t.emit("transitionstart",k)},ts=k=>{t.emit("transitionend",k)},Fe=k=>{t.emit("animationstart",k)},Ye=k=>{t.emit("animationend",k)};let ve={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return ve},mousePoint:r,eb:t,start:async function(){s.push(j(n,"mousedown",a)),s.push(j(n,"mouseup",o)),s.push(j(n,"mousemove",h)),s.push(j(n,"mouseover",c)),s.push(j(n,"mouseout",l)),s.push(j(n,"mouseenter",u)),s.push(j(n,"mouseleave",d)),s.push(j(n,"click",f)),s.push(j(n,"dblclick",p)),s.push(j(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",y)),s.push(j(n,"contextmenu",v)),s.push(j(n,"touchstart",w)),s.push(j(n,"touchend",S)),s.push(j(n,"touchcancel",x)),s.push(j(n,"touchmove",b)),s.push(j(n,"pointerdown",M)),s.push(j(n,"pointerup",P)),s.push(j(n,"pointercancel",R)),s.push(j(n,"pointermove",B)),e.on("pan",F),e.on("panstart",V),e.on("panmove",G),e.on("panend",J),e.on("pancancel",nt),e.on("panleft",K),e.on("panright",Ut),e.on("panup",kt),e.on("pandown",Rt),e.on("pinch",Vt),e.on("pinchin",O),e.on("pinchout",L),e.on("press",X),e.on("rotate",H),e.on("swipe",_t),e.on("swipeleft",$t),e.on("swiperight",Cn),e.on("swipeup",An),e.on("swipedown",ft),e.on("tap",Ht),s.push(j(document,"pointerdown",it)),s.push(j(n,"transitionstart",yt)),s.push(j(n,"transitionend",ts)),s.push(j(n,"animationstart",Fe)),s.push(j(n,"animationend",Ye));const k=await Bh(n,at=>{ve=at,t.emit("resize",at)});s.push(k),s.push(Yh(this,{start:at=>{i.setStartMousePoint(lt(at,n),!0)},move:at=>{i.setCurrentMousePoint(lt(at,n))},end:at=>{i.setCurrentMousePoint(lt(at,n),!1)}}))},end:()=>{t.removeAllListeners(),s.forEach(k=>k()),s=[],e.off("pan",F),e.off("panstart",V),e.off("panmove",G),e.off("panend",J),e.off("pancancel",nt),e.off("panleft",K),e.off("panright",Ut),e.off("panup",kt),e.off("pandown",Rt),e.off("pinch",Vt),e.off("pinchin",O),e.off("pinchout",L),e.off("press",X),e.off("rotate",H),e.off("swipe",_t),e.off("swipeleft",$t),e.off("swiperight",Cn),e.off("swipeup",An),e.off("swipedown",ft),e.off("tap",Ht)}}}function Yh(n,t){return Xh(n,t)}function Xh(n,t){const e=n.eb,s=a=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(a)},i=a=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(a)},r=a=>{t?.move?.(a)};return e.on("pointerDown",s),()=>e.off("pointerDown",s)}function Yg(n,t){const e=n.eb,s=a=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(a)},i=a=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(a)},r=a=>{t?.move?.(a)};return e.on("mouseDown",s),()=>e.off("mouseDown",s)}function Xg(n,t){const e=n.eb,s=a=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const o=a.changedTouches[0];t?.start?.(o)},i=a=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const o=a.changedTouches[0];t?.end?.(o)},r=a=>{const o=a.changedTouches[0];t?.move?.(o)};return e.on("touchStart",s),()=>e.off("touchStart",s)}class Ug{closed=!1;multicast;buffer;handlers=E.createExpandingRingQueue(10);constructor(t){this.buffer=t?.buffer||E.createExpandingRingQueue(10),this.multicast=typeof t?.multicast=="boolean"?t?.multicast:!1}put(t){if(!this.closed)if(this.multicast)this.handlers.flush().forEach(e=>e(t));else{if(this.handlers.length===0)return this.buffer.put(t);const e=this.handlers.take();e&&e(t)}}take(t){if(!this.multicast){const e=this.buffer.take();if(e){t(e);return}}this.closed||this.handlers.put(t)}flush(t){this.multicast||this.buffer.flush().forEach(t)}close(){this.closed||(this.closed=!0,this.handlers.clear())}}let gn=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Ft(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:s,width:i-e,height:r-s}}else{const e=Math.sin(t),s=Math.cos(t),i=s*this.x-e*this.y,r=s*this.toX-e*this.toY,a=s*this.y+e*this.x,o=s*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(a,o),width:Math.max(i,r)-Math.min(i,r),height:Math.max(a,o)-Math.min(a,o)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,s=this.y,i=t.toX,r=t.toY,a=this.toX-e,o=t.x-i;if(!a&&!o)return null;const h=(this.toY-s)/a,c=(t.y-r)/o;if(a){if(!o)return{x:i,y:h*(i-e)+s}}else return{x:e,y:c*(e-i)+r};const l=(-c*i+r+h*e-s)/(h-c),u=h*(l-e)+s;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const Uh=gn;class ur extends gn{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,s,i,r,a,o,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,s,i,r,a,o,h,!this.sweepFlag)}convert(t,e,s,i,r,a,o,h,c){const l=o/180*Math.PI,u=(t-s)/2,d=(e-i)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,y=f*f/(r*r)+p*p/(a*a);if(y>1){const G=Math.sqrt(y);throw r=G*r,a=G*a,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${a}.`)}const v=Math.sqrt((r*r*a*a-r*r*p*p-a*a*f*f)/(r*r*p*p+a*a*f*f)),w=h!=c?1:-1,S=w*v*r*p/a,x=w*v*-a*f/r,b=(t+s)/2,M=(e+i)/2,P=Math.cos(l)*S-Math.sin(l)*x+b,R=Math.sin(l)*S+Math.cos(l)*x+M,B=(G,J,nt,K)=>(G*K>=J*nt?1:-1)*Math.acos((G*nt+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(nt*nt+K*K))),F=B(1,0,t-P,e-R)-l,V=B(t-P,e-R,s-P,i-R);return[P,R,r,a,l,F,F+V]}}class Vg extends gn{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,s,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let s,i,r,a;for(let c=0;c<2;++c)s=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-i/(2*s),0<a&&a<1&&[t,e][c].push(s*a*a+i*a+r));const o={x:Math.min(0,...t),y:Math.min(0,...e)},h={x:Math.max(0,...t),y:Math.max(0,...e)};return{x:o.x,y:o.y,width:h.x-o.x,height:h.y-o.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const $g=Vg;class we extends gn{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t;const a=[this.y,this.toY],o=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*s))/2/t,r=(-e-Math.sqrt(e*e-4*t*s))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),o.push(h.x),a.push(h.y),c.push({X:h.x,Y:h.y}));const l=[],u=c.length;for(let p=0;p<u;p++){for(let y=p+1;y<u;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);l.push({X:c[p].X,Y:c[p].Y})}const d={x:Math.min(...o),y:Math.min(...a)},f={x:Math.max(...o),y:Math.max(...a)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:l}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,s,i,r){const a=-3*e+9*s-9*i+3*r,o=t*a+6*e-12*s+6*i;return t*o-3*e+3*s}static bezlen(t,e,s,i,r,a,o,h,c=1){c=Math.max(0,Math.min(c,1));const l=c/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=l*u[p]+l,v=we.base3(y,t,s,r,o),w=we.base3(y,e,i,a,h);f+=d[p]*Math.sqrt(v*v+w*w)}return l*f}length(t=1){return we.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,s=this.y,i=this.c1x,r=this.c1y,a=this.c2x,o=this.c2y,h=this.toX,c=this.toY;if(t<0||we.bezlen(e,s,i,r,a,o,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,f=we.bezlen(e,s,i,r,a,o,h,c,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=we.bezlen(e,s,i,r,a,o,h,c,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),s=1-e,i=Math.pow(s,3),r=Math.pow(s,2),a=e*e,o=a*e,h=i*this.x+r*3*e*this.c1x+s*3*e*e*this.c2x+o*this.toX,c=i*this.y+r*3*e*this.c1y+s*3*e*e*this.c2y+o*this.toY,l=this.x+2*e*(this.c1x-this.x)+a*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+a*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+a*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+a*(this.toY-2*this.c2y+this.c1y),p=s*this.x+e*this.c1x,y=s*this.y+e*this.c1y,v=s*this.c2x+e*this.toX,w=s*this.c2y+e*this.toY,S=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:h,y:c,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y},end:{x:v,y:w},alpha:S}}}const Re=we,Es=Math.PI*2;function Vh(n,t,e,s){const i=n*s-t*e<0?-1:1;let r=n*e+t*s;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Gg(n,t,e,s,i,r,a,o,h,c){const l=c*(n-e)/2+h*(t-s)/2,u=-h*(n-e)/2+c*(t-s)/2,d=a*a,f=o*o,p=l*l,y=u*u;let v=d*f-d*y-f*p;v<0&&(v=0),v/=d*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*a/o*u,S=v*-o/a*l,x=c*w-h*S+(n+e)/2,b=h*w+c*S+(t+s)/2,M=(l-w)/a,P=(u-S)/o,R=(-l-w)/a,B=(-u-S)/o,F=Vh(1,0,M,P);let V=Vh(M,P,R,B);return r===0&&V>0&&(V-=Es),r===1&&V<0&&(V+=Es),[x,b,F,V]}function qg(n,t){const e=1.3333333333333333*Math.tan(t/4),s=Math.cos(n),i=Math.sin(n),r=Math.cos(n+t),a=Math.sin(n+t);return[s,i,s-i*e,i+s*e,r+a*e,a-r*e,r,a]}function $h(n,t,e,s,i,r,a,o,h){const c=Math.sin(h*Es/360),l=Math.cos(h*Es/360),u=l*(n-e)/2+c*(t-s)/2,d=-c*(n-e)/2+l*(t-s)/2;if(u===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const f=u*u/(a*a)+d*d/(o*o);f>1&&(a*=Math.sqrt(f),o*=Math.sqrt(f));const p=Gg(n,t,e,s,i,r,a,o,c,l),y=[];let v=p[2],w=p[3];const S=Math.max(Math.ceil(Math.abs(w)/(Es/4)),1);w/=S;for(let x=0;x<S;x++)y.push(qg(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let M=x[b+0],P=x[b+1];M*=a,P*=o;const R=l*M-c*P,B=c*M+l*P;x[b+0]=R+p[0],x[b+1]=B+p[1]}return x})}function fr(n,t,e,s,i,r){return[n/3+.6666666666666666*e,t/3+.6666666666666666*s,i/3+.6666666666666666*e,r/3+.6666666666666666*s,i,r]}function Ts(n,t,e,s){return[n,t,e,s,e,s]}const yn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Gh(n="path",t){const e=document.createElementNS.call(document,"http://www.w3.org/2000/svg",n);return t&&Le(e,t),e}function jg(n,t){return Gh("path",{d:n,id:t||E.generateUUID()})}function Hg(n,t="shape"){return dn(si(n),`${t}.svg`)}function qh(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function Wg(n){return n.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function jh(n){const t=[];return qh(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,s,i)=>{let r=s.toLowerCase();const a=E.extractAllNumbers(i);for(r=="m"&&a.length>yn[r]&&(t.push([s,...a.splice(0,yn[r])]),r="l",s=s=="m"?"l":"L");a.length;){if(a.length<yn[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${s} } args:{ ${a} }`);t.push([s,...a.splice(0,yn[r])])}return r=="z"&&t.push([s]),""}),t}function Hh(n){let t=0,e=0,s=0,i=0;return n.map(function(r){const a=r[0],o=a.toUpperCase();if(a!=o)switch(r[0]=o,a){case"a":r[6]+=s,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=s;break;default:for(let h=1;h<r.length;)r[h++]+=s,r[h++]+=i}switch(o){case"Z":s=t,i=e;break;case"H":s=r[1];break;case"V":i=r[1];break;case"M":s=t=r[1],i=e=r[2];break;default:s=r[r.length-2],i=r[r.length-1]}return r})}function Jg(n){const t=[];let e=0,s=0,i=0,r=0,a=0,o=0,h=0,c=0,l;for(let u=0,d=n.length;u<d;u++){let f=n[u];const p=f[0];switch(p){case"M":e=f[1],s=f[2];break;case"A":const y=$h(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!y.length)continue;y.forEach((S,x)=>{const[b,M,P,R,B,F,V,G]=S;f=["C",P,R,B,F,V,G],x<y.length-1&&t.push(f)});break;case"S":let v=i,w=r;(l=="C"||l=="S")&&(v+=v-h,w+=w-c),f=["C",v,w,f[1],f[2],f[3],f[4]];break;case"T":l=="Q"||l=="T"?(a=i*2-a,o=r*2-o):(a=i,o=r),f=["C",...fr(i,r,a,o,f[1],f[2])];break;case"Q":a=f[1],o=f[2],f=["C",...fr(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...Ts(i,r,f[1],f[2])];break;case"H":f=["C",...Ts(i,r,f[1],r)];break;case"V":f=["C",...Ts(i,r,i,f[1])];break;case"Z":f=["C",...Ts(i,r,e,s)];break}l=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(h=f[f.length-4],c=f[f.length-3]):(h=i,c=r),t.push(f)}return t}class Ps{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),s=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",s.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(s),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Ps.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class dr extends E.EventBus{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=E.stringLength(this.source);if(t===0){this.emit("finish");return}let e,s,i=E.charAt(this.source,0);for(let r=1;r<t;r++)e=s,s=i,i=E.charAt(this.source,r),this.raw+=s,s&&this.step(s,i,e);i&&this.step(i,void 0,s),this.emit("finish")}step(t,e,s){t==`
|
|
15
|
+
`&&this.emit("newline"),this.act(t,e,s)}act(t,e,s){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":E.regTest("whitespace",t)?(this.textchunk+=Wh(this.entity),this.mode="text"):t==";"?(this.textchunk+=Wh(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(s=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(s=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,s)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&s=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!E.regTest("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,s)}break;case"close tag name start":E.regTest("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,s));break;case"close tag name":if(E.regTest("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(E.regTest("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":E.regTest("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,s));break;case"attr":if(E.regTest("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!E.regTest("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,s)}break;case"attr value":if(E.regTest("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&s!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Wh(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var Jh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function mr(n,t={}){var e=1,s=1;function i(O){var L=O.match(/\n/g);L&&(e+=L.length);var X=O.lastIndexOf(`
|
|
16
|
+
`);s=~X?O.length-X:s+O.length}function r(){var O={line:e,column:s};return function(L){return L.position=new a(O),p(),L}}function a(O){this.start=O,this.end={line:e,column:s},this.source=t.source}a.prototype.content=n;var o=[];function h(O){var L=new Error(t.source+":"+e+":"+s+": "+O);if(L.reason=O,L.filename=t.source,L.line=e,L.column=s,L.source=n,t.silent)o.push(L);else throw L}function c(){var O=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:O,parsingErrors:o}}}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var O,L=[];for(p(),y(L);n.length&&n.charAt(0)!="}"&&(O=Rt()||Vt());)O!==!1&&(L.push(O),y(L));return L}function f(O){var L=O.exec(n);if(L){var X=L[0];return i(X),n=n.slice(X.length),L}}function p(){f(/^\s*/)}function y(O){var L;for(O=O||[];L=v();)L!==!1&&O.push(L);return O}function v(){var O=r();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var L=2;n.charAt(L)!=""&&(n.charAt(L)!="*"||n.charAt(L+1)!="/");)++L;if(L+=2,n.charAt(L-1)==="")return h("End of comment missing");var X=n.slice(2,L-2);return s+=2,i(X),n=n.slice(L),s+=2,O({type:"comment",comment:X})}}function w(){var O=f(/^([^{]+)/);if(O)return ee(O[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(L){return L.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(L){return L.replace(/\u200C/g,",")})}function S(){var O=r(),L=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(L){if(L=ee(L[0]),!f(/^:\s*/))return h("property missing ':'");var X=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),H=O({type:"declaration",property:L.replace(Jh,""),value:X?ee(X[0]).replace(Jh,""):""});return f(/^[;\s]*/),H}}function x(){var O=[];if(!l())return h("missing '{'");y(O);for(var L;L=S();)L!==!1&&(O.push(L),y(O));return u()?O:h("missing '}'")}function b(){for(var O,L=[],X=r();O=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)L.push(O[1]),f(/^,\s*/);if(L.length)return X({type:"keyframe",values:L,declarations:x()})}function M(){var O=r(),L=f(/^@([-\w]+)?keyframes\s*/);if(L){var X=L[1];if(L=f(/^([-\w]+)\s*/),!L)return h("@keyframes missing name");var H=L[1];if(!l())return h("@keyframes missing '{'");for(var _t,$t=y();_t=b();)$t.push(_t),$t=$t.concat(y());return u()?O({type:"keyframes",name:H,vendor:X,keyframes:$t}):h("@keyframes missing '}'")}}function P(){var O=r(),L=f(/^@supports *([^{]+)/);if(L){var X=ee(L[1]);if(!l())return h("@supports missing '{'");var H=y().concat(d());return u()?O({type:"supports",supports:X,rules:H}):h("@supports missing '}'")}}function R(){var O=r(),L=f(/^@host\s*/);if(L){if(!l())return h("@host missing '{'");var X=y().concat(d());return u()?O({type:"host",rules:X}):h("@host missing '}'")}}function B(){var O=r(),L=f(/^@media *([^{]+)/);if(L){var X=ee(L[1]);if(!l())return h("@media missing '{'");var H=y().concat(d());return u()?O({type:"media",media:X,rules:H}):h("@media missing '}'")}}function F(){var O=r(),L=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(L)return O({type:"custom-media",name:ee(L[1]),media:ee(L[2])})}function V(){var O=r(),L=f(/^@page */);if(L){var X=w()||[];if(!l())return h("@page missing '{'");for(var H=y(),_t;_t=S();)H.push(_t),H=H.concat(y());return u()?O({type:"page",selectors:X,declarations:H}):h("@page missing '}'")}}function G(){var O=r(),L=f(/^@([-\w]+)?document *([^{]+)/);if(L){var X=ee(L[1]),H=ee(L[2]);if(!l())return h("@document missing '{'");var _t=y().concat(d());return u()?O({type:"document",document:H,vendor:X,rules:_t}):h("@document missing '}'")}}function J(){var O=r(),L=f(/^@font-face\s*/);if(L){if(!l())return h("@font-face missing '{'");for(var X=y(),H;H=S();)X.push(H),X=X.concat(y());return u()?O({type:"font-face",declarations:X}):h("@font-face missing '}'")}}var nt=kt("import"),K=kt("charset"),Ut=kt("namespace");function kt(O){var L=new RegExp("^@"+O+"\\s*([^;]+);");return function(){var X=r(),H=f(L);if(H){var _t={type:O};return _t[O]=H[1].trim(),X(_t)}}}function Rt(){if(n[0]=="@")return M()||B()||F()||P()||nt()||K()||Ut()||G()||V()||R()||J()}function Vt(){var O=r(),L=w();return L?(y(),O({type:"rule",selectors:L,declarations:x()})):h("selector missing")}return pr(c())}function ee(n){return n?n.replace(/^\s+|\s+$/g,""):""}function pr(n,t){var e=n&&typeof n.type=="string",s=e?n:t;for(var i in n){var r=n[i];Array.isArray(r)?r.forEach(function(a){pr(a,s)}):r&&typeof r=="object"&&pr(r,s)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}let Zg=class extends dr{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=mr(e);for(const i of s.stylesheet.rules)for(const r of i.declarations)for(const a of i.selectors)this.globalStyles[a]=this.globalStyles[a]||[],this.globalStyles[a].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,s)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",a="";for(const o in this.groups[i])o=="transform"?r=this.groups[i].transform:o=="class"&&this.globalStyles["."+this.groups[i][o]]?a=this.globalStyles["."+this.groups[i][o]].join(";")+";"+a:o=="id"&&this.globalStyles["#"+this.groups[i][o]]?a=this.globalStyles["#"+this.groups[i][o]].join(";")+";"+a:typeof this.currentItem[o]>"u"&&(this.currentItem[o]=this.groups[i][o]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=a:this.currentItem.style=a+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),yr(this.currentItem.style,this.currentItem,wr)}switch(this.processAttrs(e,s),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let s=[],i;switch(t){case"svg":let r="",a="";if(e.width&&e.height)r=e.width,a=e.height;else if(e.viewBox){const o=e.viewBox.split(/\s+/gi);o.length==4&&(r=String(parseFloat(o[2])-parseFloat(o[0])),a=String(parseFloat(o[3])-parseFloat(o[1])))}r&&a&&this.items.push({type:"viewbox",width:r,height:a});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&yr(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+gr(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break}for(const r in e){const a=e[r];if(wr.includes(r)&&(this.currentItem[r]=a),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&yr(a,this.currentItem,wr),r==="transform"&&(this.currentItem.transform=a+(this.currentItem.transform||" ")),r==="fill"){const o=a.match(/url\(#([^)]+)\)/);if(o){const h=o[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+a+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=a),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=a)}}addToItems(){this.items.push(this.currentItem)}};function gr(n,t,e,s,i,r){if(typeof i>"u"||typeof r>"u"){const a=n-e,o=t-s;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return gr(n,t,i,r)-gr(e,s,i,r)}function yr(n,t,e){const s=(n+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,a=s.length;r<a;r++){const o=s[r].split(":"),h=o[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=o[1].replace(i,""))}}const wr=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class Tt{startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){const e=typeof t=="string"?jh(t):t||[],s=Jg(Hh(e));let i=!1;for(let r=0,a=s.length;r<a;r++){const o=s[r];o[0]=="M"?(i||(i=!0,this.startPathX=o[1],this.startPathY=o[2]),this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Re({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(t instanceof ur){$h(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[l,u,d,f,p,y,v,w]=c;this.normalizedLines.push(new Re({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}if(t instanceof Re){this.normalizedLines.push(t),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,s,i,r,a,o;t instanceof $g?[e,s,i,r,a,o]=fr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,i,r,a,o]=Ts(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Re({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:s,c2x:i,c2y:r,toX:a,toY:o})),this.prevPathX=a,this.prevPathY=o}static fromPolymorphPoints(t){const e=new Tt;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let s=2,i=t.length;s+5<i;s+=6)e._appendLine(new Re({c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}));return e}static fromLines(t){const e=new Tt;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let s=0,i=t.length;s<i;s++)e._appendLine(t[s]);return e}clone(){return new Tt(this.toSVGPathData())}toSVGPathData(){const t=[];t.push(["M",this.startPathX,this.startPathY]);for(let e=0,s=this.normalizedLines.length;e<s;e++)t.push(...this.normalizedLines[e].toSVGPathData());return t}toSVGPathD(){return Wg(this.toSVGPathData())}toCanvasContext(t){t.beginPath(),t.moveTo(this.startPathX,this.startPathY),this.normalizedLines.forEach(e=>{e.toCanvasContext(t)})}getBoundingClientRect(){const t=[],e=[];if(this.normalizedLines.forEach(u=>{const d=u.getBoundingClientRect();t.push(d.x,d.x+d.width),e.push(d.y,d.y+d.height)}),t.length==0||e.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const s=Math.min(0,...t),i=Math.min(0,...e),r=Math.max(0,...t),a=Math.max(0,...e),o=s,h=i,c=r-s,l=a-i;return{x:o,y:h,width:c,height:l,center:{x:o+c/2,y:h+l/2}}}getTotalLength(){return this.normalizedLines.reduce((t,e)=>t+=e.length(),0)}getPointAtLength(t){let e=0;const s=this.normalizedLines.length;for(let i=0;i<s;i++){const r=this.normalizedLines[i],a=r.length();if(e+a>=t)return r.getPointAtSegmentLength(t-e);e+=a}return this.normalizedLines[s-1].getPointAtSegmentLength(1)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let s=t*e,i=this.normalizedLines[0];if(s--,s>1)for(let r=1;r<e&&(i=this.normalizedLines[r],s>1);r++)s-=1;return i.interpolate(s)}}getSubPathD(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubPathDAtLength(this,t);{const s=this.getSubPathDAtLength(this,e,1);return t?this.getSubPathDAtLength(s,t):s}}getSubPathDAtLength(t,e,s){let i=null,r=0;const a=new Tt;a.prevPathX=a.startPathX=t.startPathX,a.prevPathY=a.startPathY=t.startPathY;for(let o=0,h=this.normalizedLines.length;o<h;o++){const c=this.normalizedLines[o],l=c.length();if(r+l>e&&!i){const u=c.getPointAtSegmentLength(e-r);if(a._appendLine(new Re({c1x:u.start.x,c1y:u.start.y,c2x:u.m.x,c2y:u.m.y,toX:u.x,toY:u.y})),s)return a;i=a,a._appendLine(new Re({c1x:u.n.x,c1y:u.n.y,c2x:u.end.x,c2y:u.end.y,toX:c.x,toY:c.y})),r+=l;continue}r+=l,a._appendLine(c)}return a}closestPoint(t){const e=this.getTotalLength();let s={x:t.x,y:t.y},i=0,r=1/0,a=8;for(let h=0;h<=e;h+=a){const c=this.getPointAtLength(h),l=Ie(c.x,c.y,t.x,t.y);l<r&&(s=c,i=h,r=l)}for(a/=2;a>.5;){const h=i-a,c=this.getPointAtLength(h),l=Ie(c.x,c.y,t.x,t.y),u=i+a,d=this.getPointAtLength(u),f=Ie(d.x,d.y,t.x,t.y);h>=0&&l<r?(s=c,i=h,r=l):u<=e&&f<r?(s=d,i=u,r=f):a/=2}const o=this.getPointAtLength(i+(i===e?-.1:.1));return{point:s,rotation:i>=e?Ft(o.x,o.y,s.x,s.y):Ft(s.x,s.y,o.x,o.y),distance:Math.sqrt(r)}}getPolymorphPoints(){return[this.startPathX,this.startPathY].concat(this.normalizedLines.reduce((t,e)=>t.concat([e.c1x,e.c1y,e.c2x,e.c2y,e.toX,e.toY]),[]))}getPolymorphPointsPerimeter(){const t=this.getPolymorphPoints(),e=t.length;let s=t[e-2],i=t[e-1],r=0;for(let a=0;a<e;a+=6)r+=ds(t[a],t[a+1],s,i),s=t[a],i=t[a+1];return Math.floor(r)}getExpendedPolymorphPointsPathD(t){const e=this.getPolymorphPoints(),s=e.length;let i=t-s;const r=Math.ceil(t/s),a=[];a.push(["M",e[0],e[1]]);let o=2;for(;o+5<=s-1;){const h=e[o++],c=e[o++],l=e[o++],u=e[o++],d=e[o++],f=e[o++];a.push(["C",h,c,l,u,d,f]);let p=0;for(;p<r&&i>0;)a.push(["C",d,f,d,f,d,f]),i-=6,p++}return new Tt(a)}static getInterpolator(t,e){return s=>Math.abs(s-0)<Number.EPSILON?new Tt(t.toSVGPathD()):Math.abs(s-1)<Number.EPSILON?new Tt(e.toSVGPathD()):Tt.fromPolymorphPoints(E.lerps(t.getPolymorphPoints(),e.getPolymorphPoints(),s))}}const Zh=Kg("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Kg(n,t=10){const e={},s=n.split(",");for(let i=0;i<s.length;i+=2){const r="&"+s[i+1]+";",a=parseInt(s[i],t);e[r]="&#"+a+";"}return e["\\xa0"]=" ",e}function vt(n,t){const e=Object.keys(t);for(let s=0;s<e.length;s++)n=n.replace(new RegExp("{"+e[s]+"}","gi"),""+t[e[s]]);return n}function wn(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const s="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=s[Math.floor(Math.random()*s.length)];while(n[t]);return t}function Qg(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function t0(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Ms={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class xr{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement("stop");if(s.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(s.setAttribute("stop-color",vt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),s.setAttribute("stop-opacity",r[4]))}else s.setAttribute("stop-color",e);this.__root.appendChild(s)}}class Kh{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class xn{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:s=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=s),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ms);for(let e=0,s=t.length;e<s;e++){const i=t[e];this[i]=Ms[i].canvas}}__getStyleState(){const t={},e=Object.keys(Ms);for(let s=0,i=e.length;s<i;s++){const r=e[s];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let s=0,i=e.length;s<i;s++){const r=e[s];this[r]=t[r]}}__createElement(t,e={},s=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);s&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let a=0;a<r.length;a++){const o=r[a];i.setAttribute(o,e[o])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const s=this.__currentElementsToStyle;s&&(e.setAttribute(t,""),e=s.element,s.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Ms);for(let r=0;r<i.length;r++){const a=Ms[i[r]],o=this[i[r]];if(a.apply){if(o instanceof Kh){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const h=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,vt("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof xr)e.setAttribute(a.apply,vt("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);if(c){e.setAttribute(a.svgAttr,vt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let l=parseFloat(c[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(a.svgAttr+"-opacity",""+l)}}else{let h=a.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+a.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(Zh);for(let r=0,a=i.length;r<a;r++){const o=i[r],h=Zh[o],c=new RegExp(o,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let s=this.__currentElement.getAttribute("transform");s?s+=" ":s="",s+=t,this.__currentElement.setAttribute("transform",s)}scale(t,e){e===void 0&&(e=t),this.__addTransform(vt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(vt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(vt("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,i,r,a){this.__addTransform(vt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:s,d:i,e:r,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(vt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(vt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(vt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,i,r,a){this.__currentPosition={x:r,y:a},this.__addPathCommand(vt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:s,cp2y:i,x:r,y:a}))}quadraticCurveTo(t,e,s,i){this.__currentPosition={x:s,y:i},this.__addPathCommand(vt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:s,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,s,i,r){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(a===t&&o===e||t===s&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([a-t,o-e]),c=this.normalize([s-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const l=h[0]*c[0]+h[1]*c[1],u=Math.acos(Math.abs(l)),d=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(u/2),p=t+f*d[0],y=e+f*d[1],v=[-h[1],h[0]],w=[c[1],-c[0]],S=function(M){const P=M[0];return M[1]>=0?Math.acos(P):-Math.acos(P)},x=S(v),b=S(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,s,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+s,e),this.lineTo(t+s,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,s,i){const r=this.__createElement("rect",{x:t,y:e,width:s,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),s=this.__rootSVG.childNodes[1],i=s.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&s.removeChild(i[r]);this.__currentElement=s,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,s,i){if(t===0&&e===0&&s===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:s,height:i,fill:"#FFFFFF"},!0);r.appendChild(a)}createLinearGradient(t,e,s,i){const r=this.__createElement("linearGradient",{id:wn(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new xr(r,this)}createRadialGradient(t,e,s,i,r,a){const o=this.__createElement("radialGradient",{id:wn(this.__ids),cx:i+"px",cy:r+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new xr(o,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),s={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(s.decoration="underline"),this.__fontHref&&(s.href=this.__fontHref),s}__wrapTextLink(t,e){if(t.href){const s=this.__createElement("a");return s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),s.appendChild(e),s}return e}__applyText(t,e,s,i){const r=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:s,"text-anchor":Qg(this.textAlign),"dominant-baseline":t0(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(i),a.appendChild(this.__wrapTextLink(r,o))}fillText(t,e,s){this.__applyText(t,e,s,"fill")}strokeText(t,e,s){this.__applyText(t,e,s,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,s,i,r,a){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+s*Math.cos(r),h=e+s*Math.sin(r),c=t+s*Math.cos(i),l=e+s*Math.sin(i),u=a?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),a?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(vt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:s,ry:s,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),s=wn(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",s),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",vt("url(#{id})",{id:s})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],s,i,r,a,o=0,h=0,c,l,u,d,f,p,y,v;if(t.length===3)s=t[1],i=t[2],c=e.width,l=e.height,r=c,a=l;else if(t.length===5)s=t[1],i=t[2],r=t[3],a=t[4],c=e.width,l=e.height;else if(t.length===9)o=t[1],h=t[2],c=t[3],l=t[4],s=t[5],i=t[6],r=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const S="translate("+s+", "+i+")";if(e instanceof xn){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+S:b=S,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",a),p.setAttribute("preserveAspectRatio","none"),(o||h||c!==e.width||l!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=a,y.getContext("2d")?.drawImage(e,o,h,c,l,0,0,r,a),e=y),p.setAttribute("transform",S),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const s=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=wn(this.__ids);let r;return s.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),s.appendChild(r),this.__SVGdefs.appendChild(s)):t instanceof xn&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new Kh(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class br{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,s,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new xn({canvas:this.canvas,width:e||this.canvas.width,height:s||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,s,i){return this.context.fillRect(t,e,s,i),this.customContext&&this.customContext.fillRect(t,e,s,i),this}fillText(t,e,s,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,s,i),this.customContext&&this.customContext.fillText(t,e,s),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,s,i){return this.context.strokeText(t,e,s,i),this.customContext&&this.customContext.strokeText(t,e,s),this}strokeRect(t,e,s,i){return this.context.strokeRect(t,e,s,i),this.customContext&&this.customContext.strokeRect(t,e,s,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,s=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,s,i),this.customContext&&this.customContext.clearRect(t,e,s,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const s=new Path2D;s.addPath(t,e),this.currentPath2D=s}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,s=0){return this.translate(e,s),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-s),this.changePath2D(),this}scale(t,e=t,s=0,i=0){return this.translate(s,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-s,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,s,i,r,a){return this.context.arc(t,e,s,i,r,a),this.customContext&&this.customContext.arc(t,e,s,i,r,a?-1:1),this.currentPath2D.arc(t,e,s,i,r,a),this}arcTo(t,e,s,i,r){return this.context.arcTo(t,e,s,i,r),this.customContext&&this.customContext.arcTo(t,e,s,i,r),this.currentPath2D.arcTo(t,e,s,i,r),this}ellipse(t,e,s,i,r,a,o,h){return this.context.ellipse(t,e,s,i,r,a,o,h),this.currentPath2D.ellipse(t,e,s,i,r,a,o,h),this}quadraticCurveTo(t,e,s,i){return this.context.quadraticCurveTo(t,e,s,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,s,i),this.currentPath2D.quadraticCurveTo(t,e,s,i),this}bezierCurveTo(t,e,s,i,r,a){return this.context.bezierCurveTo(t,e,s,i,r,a),this.customContext&&this.customContext.bezierCurveTo(t,e,s,i,r,a),this.currentPath2D.bezierCurveTo(t,e,s,i,r,a),this}rect(t,e,s,i){return this.context.rect(t,e,s,i),this.customContext&&this.customContext.rect(t,e,s,i),this.currentPath2D.rect(t,e,s,i),this}createLinearGradient(t,e,s,i,r){const a=this.context.createLinearGradient(t,e,s,i);return r&&Object.entries(r).forEach(([o,h])=>{a.addColorStop(parseFloat(o),h)}),a}createRadialGradient(t,e,s,i,r,a,o){const h=this.context.createRadialGradient(t,e,s,i,r,a);return o&&Object.entries(o).forEach(([c,l])=>{h.addColorStop(parseFloat(c),l)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const s=e[0],i=e[1];this.context.drawImage(t,s,i)}else if(e.length===4){const s=e[0],i=e[1],r=e[2],a=e[3];this.context.drawImage(t,s,i,r,a)}else if(e.length===8){const s=e[0],i=e[1],r=e[2],a=e[3],o=e[4],h=e[5],c=e[6],l=e[7];this.context.drawImage(t,s,i,r,a,o,h,c,l)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,s=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,s,i,r)}putImageData(t,e=0,s=0){return this.context.putImageData(t,e,s)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}const Cs={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class Lt{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let s;if(s=/^(\w+)\(([^)]*)\)/.exec(t)){const i=s[2];let r;switch(s[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=E.clamp(parseFloat(r[1]),0,100)*255/100,this.g=E.clamp(parseFloat(r[2]),0,100)*255/100,this.b=E.clamp(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(s=/#([A-Fa-f0-9]+)/.exec(t)){const i=s[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Lt?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=E.clamp(Math.round(E.parseNumber(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=E.clamp(Math.round(E.parseNumber(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=E.clamp(Math.round(E.parseNumber(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=E.clamp(E.parseNumber(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,s=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*s+r[6]*i,this.g=r[1]*e+r[4]*s+r[7]*i,this.b=r[2]*e+r[5]*s+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${E.maxDotNumber(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=Ne){Sr.fromWorkingColorSpace(se.copy(this),t);const e=se.r,s=se.g,i=se.b;return t!==Ne?`color(${t} ${e.toFixed(3)} ${s.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Lt(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Oe(t.r),this.g=Oe(t.g),this.b=Oe(t.b),this}copyLinearToSRGB(t){return this.r=ze(t.r),this.g=ze(t.g),this.b=ze(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",s="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:s);{const{r:i,g:r,b:a}=this.color;return this.r=255-i,this.g=255-r,this.b=255-a,this}}lighten(t){t=E.clamp(t,0,1);const{r:e,g:s,b:i}=this.color;return this.r=e+(255-e)*t,this.g=s+(255-s)*t,this.b=i+(255-i)*t,this}darken(t){t=E.clamp(t,0,1);const{r:e,g:s,b:i}=this.color;return this.r=e*(1-t),this.g=s*(1-t),this.b=i*(1-t),this}lerp(t,e){e=E.clamp(e,0,1);const{r:s,g:i,b:r}=this.color;return this.r=s+(t.r-s)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,s){return s=E.clamp(s,0,1),this.r=t.r+(e.r-t.r)*s,this.g=t.g+(e.g-t.g)*s,this.b=t.b+(e.b-t.b)*s,this}static gradient(t,e,s){try{return se.lerpColors(new Lt(t),new Lt(e),s).toString()}catch{return e}}static random(){return se.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Lt.nextIndex){Lt.nextIndex=t;const e=Object.keys(Cs),s=e.length;return se.setHEX(Cs[e[Lt.nextIndex++%s]]).toString()}setColorName(t){const e=Cs[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(Cs).map(t=>se.setHEX(t).toString())}setRGB(t,e,s,i=1){return this.r=t,this.g=e,this.b=s,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,s,i=1){const r=E.euclideanModulo(t,1),a=E.clamp(e,0,1),o=E.clamp(s,0,1);if(a===0)this.r=o*255,this.g=o*255,this.b=o*255;else{const h=o<=.5?o*(1+a):o+a-o*a,c=2*o-h;this.r=Er(c,h,r+.3333333333333333)*255,this.g=Er(c,h,r)*255,this.b=Er(c,h,r-.3333333333333333)*255}return this.a=i,this}getHSL(t){const e=this.r,s=this.g,i=this.b,r=Math.max(e,s,i)/255,a=Math.min(e,s,i)/255;let o,h;const c=(a+r)/2;if(a===r)o=0,h=0;else{const l=r-a;switch(h=c<=.5?l/(r+a):l/(2-r-a),r){case e:o=(s-i)/l+(s<i?6:0);break;case s:o=(i-e)/l+2;break;case i:default:o=(e-s)/l+4;break}o/=6}return t&&t.setHSL(o,h,c,this.a),{h:o,s:h,l:c,a:this.a}}offsetHSL(t,e,s){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+s)}lerpHSL(t,e){const s=this.getHSL(),i=t.getHSL(),r=E.lerp(s.h,i.h,e),a=E.lerp(s.s,i.s,e),o=E.lerp(s.l,i.l,e);return this.setHSL(r,a,o),this}setHSV(t,e,s,i=1){const r=E.clamp(t,0,1)*360,a=E.clamp(e,0,1),o=E.clamp(s,0,1),h=Math.floor(r/60)%6,c=r/60-Math.floor(r/60),l=o*(1-a),u=o*(1-c*a),d=o*(1-(1-c)*a),f=[[o,d,l],[u,o,l],[l,o,d],[l,u,o],[d,l,o],[o,l,u]][h];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,s,i=1){this.setHSV(t,e,s,i)}getHSV(t){const{r:e,g:s,b:i,a:r}=this.color,a=Math.max(e,s,i),o=Math.min(e,s,i),h=a-o;let c;e===a?c=(s-i)/h:s===a?c=2+(i-e)/h:c=4+(e-s)/h,c/=6,c<0&&(c+=1);const l=h==0?0:c,u=a===0?0:h/a,d=a/255;return t&&t.setHSV(l,u,d,r),{h:l,s:u,v:d,a:r}}getHSB(t){const{h:e,s,v:i,a:r}=this.getHSV(t);return{h:e,s,b:i,a:r}}}const se=new Lt;function Oe(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function ze(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const Qh="",Ne="srgb",vr="srgb-linear",_r="linear",bn="srgb",tc=new He().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ec=new He().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),sc=[.64,.33,.3,.6,.15,.06],nc=[.2126,.7152,.0722],ic=[.3127,.329],Sr={enabled:!0,workingColorSpace:vr,spaces:{},convert:function(n,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===bn&&(n.r=Oe(n.r),n.g=Oe(n.g),n.b=Oe(n.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(n.applyMatrix3(this.spaces[t].toXYZ),n.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===bn&&(n.r=ze(n.r),n.g=ze(n.g),n.b=ze(n.b))),n},fromWorkingColorSpace:function(n,t){return this.convert(n,this.workingColorSpace,t)},toWorkingColorSpace:function(n,t){return this.convert(n,t,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Qh?_r:this.spaces[n].transfer},getLuminanceCoefficients:function(n,t=this.workingColorSpace){return n.fromArray(this.spaces[t].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,t,e){return n.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace}};Sr.define({[vr]:{primaries:sc,whitePoint:ic,transfer:_r,toXYZ:tc,fromXYZ:ec,luminanceCoefficients:nc,workingColorSpaceConfig:{unpackColorSpace:Ne},outputColorSpaceConfig:{drawingBufferColorSpace:Ne}},[Ne]:{primaries:sc,whitePoint:ic,transfer:bn,toXYZ:tc,fromXYZ:ec,luminanceCoefficients:nc,outputColorSpaceConfig:{drawingBufferColorSpace:Ne}}});function Er(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?n+(t-n)*6*e:e<.5?t:e<.6666666666666666?n+(t-n)*6*(.6666666666666666-e):n}class ne{id;_pathD;parent;attrs;cX;cY;x;y;degree;sX;sY;vx;vy;ax;ay;mass;followMouse;enableDrag;dragAlongPath;targetToAfterDragFree;isMouseIn=!1;isDragging=!1;el;path2D;constructor(t){this.id=E.generateUUID(),this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.cX=t?.cX||0,this.cY=t?.cY||0,this.x=t?.x||0,this.y=t?.y||0,this.degree=t?.degree||0,this.sX=1,this.sY=1,t?.scalar!==void 0&&(this.sX=t.scalar,this.sY=t.scalar),t?.sX!==void 0&&(this.sX=t.sX),t?.sY!==void 0&&(this.sY=t.sY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.followMouse=typeof t?.followMouse=="boolean"?t?.followMouse:!1,this.enableDrag=typeof t?.enableDrag=="boolean"?t?.enableDrag:!1,this.dragAlongPath=t?.dragAlongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree}pathD(){return this._pathD||(this._pathD=new Tt(this.toSVGPathData())),this._pathD}replacePathD(t){this._pathD=t instanceof Tt?t:new Tt(t)}clone(){const t=new ne({attrs:this.getAttrs()});return t.replacePathD(this.pathD()),t.cX=this.cX,t.cY=this.cY,t.x=this.x,t.y=this.y,t.degree=this.degree,t.sX=this.sX,t.sY=this.sY,t.vx=this.vx,t.vy=this.vy,t.ax=this.ax,t.ay=this.ay,t.mass=this.mass,t.followMouse=this.followMouse,t.enableDrag=this.enableDrag,t.dragAlongPath=this.dragAlongPath,t.targetToAfterDragFree=this.targetToAfterDragFree,t}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){}getBoundingClientRect(){return this.pathD().getBoundingClientRect()}isPointInPath(t,e){if(e instanceof br)return e.isPointInPath(new Path2D(this.toSVGPathD()),t.x,t.y);let s;try{s=new SVGPoint(t.x,t.y)}catch{s=e.createSVGPoint(),s.x=t.x,s.y=t.y}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{const i=this.getBoundingClientRect();return t.x>=i.x&&t.x<=i.x+i.width&&t.y>=i.y&&t.y<=i.y+i.height}}isPointInStroke(t,e){if(e instanceof br)return e.isPointInStroke(new Path2D(this.toSVGPathD()),t.x,t.y);let s;try{s=new SVGPoint(t.x,t.y)}catch{s=e.createSVGPoint(),s.x=t.x,s.y=t.y}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}setAttr(t,e){if(typeof t!="string")for(const s in t){const i=t[s];i&&(this.attrs[E.toKebab(s)]=i)}else e&&(this.attrs[E.toKebab(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[E.toKebab(t)]||e}hasAttr(t){return!!this.getAttr(t)}getAttrs(){return{...this.attrs}}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const s=t?.friction||1;this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}animateEaseTo(t,e){const s=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*s,this.vy=r*s,this.animate(e)}animateSpringTo(t,e){const s=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,a=i.y-this.y,o=r*s,h=a*s;this.vx+=o,this.vy+=h}),this.animate({friction:.9,...e})}animateSpringMassTo(t,e){const s=e?.springLength||100,i=e?.spring||1e-4,r=t.x-this.x,a=t.y-this.y,o=Math.sqrt(r*r+a*a);if(o<s){const h=r*i,c=a*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-o/s}return 0}distance(t){return ds(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=wt(Ft(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:i}=je(Q(this.degree),e);this.vx=s,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:i}=je(Q(this.degree),e);this.ax=s,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,s=t.y-this.y,i=e*e+s*s,r=Math.sqrt(i),a=this.mass*t.mass/i,o=a*e/r,h=a*s/r;this.vx+=o/this.mass,this.vy+=h/this.mass,t.vx-=o/t.mass,t.vy-=h/t.mass}checkCollision(t){}checkWall(t){}getTotalLength(){return this.pathD().getTotalLength()}interpolate(t){return this.pathD().interpolate(t)}getPointAtLength(t){return this.pathD().getPointAtLength(t)}trailPath(t=0){const e=this.getTotalLength();return{subPathD:this.pathD().getSubPathD(0,t*e),point:this.getPointAtLength(t*e)}}strokeDashTween(t=1e3,e){const s=E.maxDotNumber(this.pathD().getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const i=e?.onUpdate,r=new fs({frameDuration:t});r.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,o)=>{this.setAttr("strokeDashoffset",""+E.maxDotNumber(a.offset,2)),i?.(a,o)}})),r.play()}}class xe{shapes=[];svgWidth=0;svgHeight=0;width=0;height=0;constructor(t){if(!t?.svg)return;const e=new Zg(t.svg).parse();for(let s=0,i=e.length;s<i;s++){const r=e[s];if(r.type=="viewbox"&&r.width&&r.height){if(this.svgWidth=parseFloat(r.width),this.svgHeight=parseFloat(r.height),t.width){const l=this.svgWidth/this.svgHeight;this.width=t.width,this.height=this.width/l}else this.width=this.svgWidth,this.height=this.svgHeight;continue}if(r.type!="path"||!qh(r.path))continue;const a={};for(const l in r)l==="type"||l==="path"||l==="transform"||(a[l]=r[l]);const o=Hh(jh(r.path)),h=[];let c=[];for(let l=0,u=o.length;l<u;l++){const d=o[l];c.push(d),d[0].toLowerCase()=="z"&&(h.push(c),c=[])}c.length&&h.push(c),h.forEach(l=>{const u=new ne({...t,attrs:{...t?.attrs,...a}});if(u.replacePathD(l),r.transform){const f=Gi(r.transform).split();u.x=f.x,u.y=f.y,u.degree=f.degree,u.sX=f.scaleX,u.sY=f.scaleY}this.width&&this.svgWidth&&(u.sX=u.sX*(this.width/this.svgWidth)),this.height&&this.svgHeight&&(u.sY=u.sY*(this.height/this.svgHeight)),this.addShape(u)})}}addShape(...t){t.forEach(e=>{e.parent=this,this.shapes.push(e)})}getBoundingClientRect(){const t=[],e=[];if(this.shapes.forEach(u=>{const d=u.getBoundingClientRect();t.push(d.x,d.x+d.width),e.push(d.y,d.y+d.height)}),t.length==0||e.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const s=Math.min(0,...t),i=Math.min(0,...e),r=Math.max(0,...t),a=Math.max(0,...e),o=s,h=i,c=r-s,l=a-i;return{x:o,y:h,width:c,height:l,center:{x:o+c/2,y:h+l/2}}}comboTranslate(t,e){this.shapes.forEach(s=>{s.x+=t,s.y+=e})}comboSetAttr(t,e){typeof t!="string"?this.shapes.forEach(s=>{s.setAttr(t)}):e&&this.shapes.forEach(s=>{s.setAttr(t,e)})}sort(){this.shapes=this.shapes.map(t=>({shape:t,perimeter:t.pathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,s=this.shapes.length;if(e<s)return t.expendTo(this);for(let i=s;i<e;i++)this.addShape(t.shapes[i].clone())}strokeDashTween(t,e){const s=this.shapes.length-1;switch(e?.type){case"sequence":this.shapes.forEach((o,h)=>{o.strokeDashTween(t,{...e,delay:h,onStart:()=>{h==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{h==s&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new fs({frameDuration:t}),r={},a={};this.shapes.forEach((o,h)=>{const c=E.maxDotNumber(o.getTotalLength(),0);r[`offset_${h}`]=c,a[`offset_${h}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),i.addTween(r,a,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,h)=>{for(const c in o){const l=E.extractNumber(c).number;this.shapes[l].setAttr("strokeDashoffset",""+E.maxDotNumber(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function e0(n,t){n.forEach(s=>{s.animate(),t?.wall&&s.checkWall({wall:t.wall,bounce:t.bounce})});const e=n.length;for(let s=0,i=e-1;s<i;s++)for(let r=s+1;r<e;r++)n[s].checkCollision(n[r])}function s0(n){const t=n.length;n.forEach((e,s)=>{e.animate();for(let i=s+1;i<t;i++)e.checkCollision(n[i]),e.gravitateTo(n[i])})}function n0(n,t){n.forEach((e,s)=>{s>0&&e.animateSpringTo(n[s-1],t)})}function i0(n,t){const e=t?.springLength||100;n.forEach(s=>{s.isDragging||n.filter(i=>i.id!==s.id).forEach(i=>{const r=Ft(s.x,s.y,i.x,i.y);s.animateSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}function r0(n,t,e){const s=n.length,i=[];return n.forEach((r,a)=>{r.animate(e),r.x>t.x+t.width?r.x=t.x:r.x<t.x&&(r.x=t.x+t.width),r.y>t.y+t.height?r.y=t.y:r.y<t.y&&(r.y=t.y+t.height);for(let o=a+1;o<s;o++)i.push([r.x,r.y,n[o].x,n[o].y,r.animateSpringMassTo(n[o],e)])}),i}function Tr(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const i=n[s].pathD(),r=n[s+1].pathD(),a=Math.max(i.getPolymorphPoints().length,r.getPolymorphPoints().length);e[s]=Tt.getInterpolator(i.getExpendedPolymorphPointsPathD(a),r.getExpendedPolymorphPointsPathD(a))}return s=>{const i=E.maxDotNumber(t*s,6),r=Math.min(Math.floor(i),t-1),a=E.maxDotNumber(i-r,6),o=new ne;o.replacePathD(e[r](a));const h=n[r].getAttr("fill","none"),c=n[r+1].getAttr("fill","none");typeof h=="string"&&typeof c=="string"&&o.setAttr("fill",Lt.gradient(h,c,a).toString());const l=n[r].getAttr("stroke","none"),u=n[r+1].getAttr("stroke","none");return typeof l=="string"&&typeof u=="string"&&o.setAttr("stroke",Lt.gradient(l,u,a).toString()),o}}function rc(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t=0,e;const s=[];n.forEach(a=>{let o;a instanceof xe?(o=a,o.sort()):(o=new xe,o.addShape(a)),s.push(o),t<o.shapes.length&&(t=o.shapes.length,e=o)}),s.forEach(a=>{a!==e&&a.expendTo(e)});const i=[];s.forEach((a,o)=>{a.shapes.forEach((h,c)=>{i[c]=i[c]||[],i[c][o]=h})});const r=[];return i.forEach(a=>{r.push(Tr(a))}),a=>{const o=new xe;return r.forEach(h=>{o.addShape(h(a))}),o}}function a0(n,t=6e3,e){const s=n.findIndex(o=>o instanceof xe)>=0?rc(n):Tr(n),i=s(0),r=e?.onUpdate,a=new fs({frameDuration:t});a.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(o,h)=>{s(o.t),r?.(o,h),i instanceof ne?e?.shape?.(i):i instanceof xe&&i.shapes.forEach(c=>{e?.shape?.(c)})}})),a.play()}function o0(n,t,e,s,i){if(i==0)throw new Error("no dividing by zero, please");const r=[],a=360/i;for(let h=0;h<i;h+=1){const c=a*h*Math.PI/180,l=n+2*e*Math.cos(c),u=t+2*e*Math.sin(c);r.push(new ur({x:n,y:t,rx:e,ry:s,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),r.push(new ur({x:l,y:u,rx:e,ry:s,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1,toX:n,toY:t}))}const o=new ne;return o.replacePathD(Tt.fromLines(r)),o}function h0(n=document.documentElement){let t=null;n instanceof HTMLCanvasElement||(t=Gh("svg"),ch(n),mn(n,t));let e=null;const s={x:0,y:0,width:0,height:0},i=l=>{s.x=l.x,s.y=l.y,s.width=l.width,s.height=l.height,t&&Le(t,{viewBox:`0 0 ${s.width} ${s.height}`,width:`${s.width}`,height:`${s.height}`}),n instanceof HTMLCanvasElement&&(Le(n,{width:`${s.width}`,height:`${s.height}`}),e=new br(n,s.width,s.height,!1))};let r=[],a;const o=kh(n).subscribe(l=>{a=l;let u=!1;for(let d=0,f=r.length;d<f;d++){const p=r[d];if(t?p.isMouseIn=p.isPointInPath(l,t)||p.isPointInStroke(l,t):e&&p.path2D?p.isMouseIn=e.isPointInPath(p.path2D,l.x,l.y)||e.isPointInStroke(p.path2D,l.x,l.y):p.isMouseIn=!1,p.isDragging=!1,p.isMouseIn&&!u)if(p.enableDrag){if(n.style.cursor="grab",l.isDown){p.isDragging=!0,u=!0,n.style.cursor="grabbing";let y=l.dx,v=l.dy;if(y||v){if(p.dragAlongPath){const w=p.dragAlongPath.closestPoint(p);y=w.point.x-p.x,v=w.point.y-p.y}p.parent?p.parent?.comboTranslate(y,v):(p.x+=y,p.y+=v)}}}else n.style.cursor="pointer";else n.style.cursor="default"}}),h=l=>{l.followMouse&&(!E.withinErrorMarginNumber(l.x,a.x,5)||!E.withinErrorMarginNumber(l.y,a.y,5))&&l.followTo(a),l.targetToAfterDragFree&&(a.isDown||l.animateEaseTo({x:l.targetToAfterDragFree.targetX,y:l.targetToAfterDragFree.targetY},{easing:l.targetToAfterDragFree?.easing}))};return{rect:s,setRect:i,shapes:r,draw:(...l)=>{const u=[];l.forEach(d=>{d instanceof xe?u.push(...d.shapes):u.push(d)}),t?r.filter(d=>u.findIndex(f=>f.id==d.id)==-1).forEach(d=>{d.el&&(d.el.remove(),delete d.el)}):e&&e.clearRect(),r=u;for(const d of r){h(d);let f=d.cX,p=d.cY;if(!f&&!p){const y=d.getBoundingClientRect();if(!d.parent)f=y.center.x-y.x,p=y.center.y-y.y;else{const v=d.parent.getBoundingClientRect();f=v.center.x-y.x,p=v.center.y-y.y}}if(t){const y=d.toSVGPathD();d.el||(d.el=jg(y,d.id),mn(t,d.el));const v=new bt;v.translate(d.x,d.y),v.rotate(d.degree,f,p),v.scale(d.sX,d.sY,f,p),Le(d.el,{d:y,transform:v.toString(),...d.getAttrs()})}else e&&(e.save(),e.translate(d.x,d.y),e.rotate(Q(d.degree),f,p),e.scale(d.sX,d.sY,f,p),d.toCanvasContext(e),Go(e,d.getAttrs()),e.hasSetCustomStrokeStyle&&e.stroke(),e.hasSetCustomFillStyle&&e.fill(),d.path2D=e.currentPath2D,e.restore())}},unsubscribe:()=>{o.unsubscribe()},downloadSVG:()=>{t&&Hg(t)}}}class vn extends ne{dx;dy;constructor(t){super(t);const e=je(Q(t.lineDegree),t.lineLength);this.dx=e.dx,this.dy=e.dy}toSVGPathData(){return[["m",0,0],["l",this.dx,this.dy]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.lineTo(this.dx,this.dy)}intersection(t){const e=new Uh({x:this.x,y:this.y,toX:this.x+this.dx,toY:this.y+this.dy}),s=new Uh({x:t.x,y:t.y,toX:t.x+t.dx,toY:t.y+t.dy});return e.intersection(s)}}class c0 extends xe{constructor(t){super(t);const e=new vn({...t,lineLength:100+Math.random()*20,lineDegree:90}),s=new vn({...t,y:30+Math.random()*10,lineLength:20+Math.random()*20,lineDegree:Math.random()*180-180}),i=new vn({...t,y:30+Math.random()*10,lineLength:40+Math.random()*20,lineDegree:Math.random()*180-180});this.addShape(e,s,i)}}class l0 extends ne{radius;constructor(t){super(t),this.radius=t?.ballRadius||0}getBoundingClientRect(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2,center:{x:this.x,y:this.y}}}toSVGPathData(){return this.radius?[["m",0,-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.radius===t.radius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return an(this.x,this.y)}scalar(t){return this.x*=t,this.y*=t,this}normalize(t=1){const e=this.length();if(e){const s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y;return{x:s*t.x-e*t.y,y:e*t.y-s*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}checkCollision(t){const e=t.x-this.x,s=t.y-this.y;if(Math.sqrt(e*e+s*s)<this.radius+t.radius){const r=Math.atan2(s,e),a={x:0,y:0},o=Xt(-r,e,s),h=Xt(-r,this.vx,this.vy),c=Xt(-r,t.vx,t.vy),l=h.x-c.x;h.x=((this.mass-t.mass)*h.x+2*t.mass*c.x)/(this.mass+t.mass),c.x=l+h.x;const u=Math.abs(h.x)+Math.abs(c.x),d=this.radius+t.radius-Math.abs(a.x-o.x);a.x+=h.x/u*d,o.x+=c.x/u*d;const f=Xt(r,a.x,a.y),p=Xt(r,o.x,o.y);t.x=this.x+p.x,t.y=this.y+p.y,this.x=this.x+f.x,this.y=this.y+f.y;const y=Xt(r,h.x,h.y),v=Xt(r,c.x,c.y);this.vx=y.x,this.vy=y.y,t.vx=v.x,t.vy=v.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,s=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,a=t.wall.y+t.wall.height;this.x+this.radius>r?(this.x=r-this.radius,this.vx*=e):this.x-this.radius<s&&(this.x=s+this.radius,this.vx*=e),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=e):this.y-this.radius<i&&(this.y=i+this.radius,this.vy*=e)}}async function u0(n,t){return new Promise(e=>{new MutationObserver((i,r)=>{t(i,r),e(()=>{r.disconnect()})}).observe(n,{attributes:!0,childList:!0,subtree:!0})})}function ac(n,t={attributes:!0,childList:!0,subtree:!0}){return new et(e=>{const s=new MutationObserver(i=>{e.next(i)});return s.observe(n,t),()=>{s.disconnect()}})}async function f0(n,t,e={threshold:.5}){return new Promise(s=>{new IntersectionObserver((r,a)=>{t(r,a),s(()=>{a.unobserve(n)})},e).observe(n)})}function oc(n,t={threshold:.5}){return new et(e=>{const s=new IntersectionObserver((i,r)=>{e.next(i)},t);return s.observe(n),()=>{s.unobserve(n),s.disconnect()}})}function d0(n,t){return Dh().pipe(ue(null),rt(()=>{const{width:e,height:s}=t?.root?.getBoundingClientRect()||Lh(),{top:i,left:r,right:a,bottom:o}=n.getBoundingClientRect();return(i>=0&&i<=s||o>=0&&o<=s)&&(r>=0&&r<=e||a>=0&&a<=e)}),le())}function m0(n,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return oc(n,{threshold:e,root:t?.root}).pipe(rt(s=>{let i=s[0];if(s.length>1){const r=s.find(a=>a.isIntersecting);r&&(i=r)}return i.isIntersecting&&i.intersectionRatio>=e}),le())}let hc=!1;function p0(){hc||(hc=!0,Vo(`
|
|
13
17
|
:root {
|
|
14
18
|
--sat:env(safe-area-inset-top, 0px);
|
|
15
19
|
--sar:env(safe-area-inset-right, 0px);
|
|
@@ -22,30 +26,27 @@ var ZYZGroupCoreWeb=function(f,v){"use strict";function Xn(i){return i&&i.__esMo
|
|
|
22
26
|
--sab:env(safe-area-inset-bottom, 0px);
|
|
23
27
|
--sal:env(safe-area-inset-left, 0px);
|
|
24
28
|
}
|
|
25
|
-
`))}cu();const Ct=new v.EventBus;let Ys,Us,Xs,Vs;on(document.documentElement,()=>{setTimeout(()=>{const i=getComputedStyle(document.documentElement),t=i.getPropertyValue("--sat");t!==Ys&&Ct.emit("top",t),Ys=t;const e=i.getPropertyValue("--sar");e!==Us&&Ct.emit("right",e),Us=e;const s=i.getPropertyValue("--sab");s!==Xs&&Ct.emit("bottom",s),Xs=s;const n=i.getPropertyValue("--sal");n!==Vs&&Ct.emit("left",n),Vs=n},0)});const lu={onTop:i=>(Ys&&i(Ys),Ct.on("top",i),()=>{Ct.off("top",i)}),onRight:i=>(Us&&i(Us),Ct.on("right",i),()=>{Ct.off("right",i)}),onBottom:i=>(Xs&&i(Xs),Ct.on("bottom",i),()=>{Ct.off("bottom",i)}),onLeft:i=>(Vs&&i(Vs),Ct.on("left",i),()=>{Ct.off("left",i)})},Qe=[];let _a=v.noop;function Ea(i){return Qe.length==0&&(_a=N(document,"scroll",t=>{Qe.forEach(e=>e(t))})),Qe.push(i),()=>{v.deleteArrayItem(Qe,i),Qe.length==0&&_a()}}function uu(i,t){window.scrollTo(i,t)}function fu(){let i=v.noop,t=v.noop;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",i=xa(()=>{window.history.scrollRestoration="auto"}),t=wa(()=>{window.history.scrollRestoration="manual"})),()=>{i(),t()}}async function Ma(i,t,e={threshold:.5}){return new Promise(s=>{new IntersectionObserver((r,a)=>{t(r,a),s(()=>{a.unobserve(i)})},e).observe(i)})}function du(i,t){let e;function s(){const{width:n,height:r}=t?.root?.getBoundingClientRect()||ua(),{top:a,left:o,right:h,bottom:c}=i.getBoundingClientRect();(a>=0&&a<=r||c>=0&&c<=r)&&(o>=0&&o<=n||h>=0&&h<=n)?(e!==!0&&t?.onShow?.(),e=!0):(e!==!1&&t?.onHide?.(),e=!1)}return s(),Ea(s)}async function mu(i,t){let e;const s=typeof t.threshold=="number"?t.threshold:.5;return Ma(i,n=>{let r=n[0];if(n.length>1){const o=n.find(h=>h.isIntersecting);o&&(r=o)}const a=r.isIntersecting&&r.intersectionRatio>=s;e!==a&&(a?t?.onShow?.():t?.onHide?.()),e=a},{threshold:s,root:t.root})}function gu(i){return i(!document.hidden),N(window,"visibilitychange",()=>{i(!document.hidden)})}function pu(i,t,e,s,n){const r=t/e;let a=0,o=0;switch(i){case"aspectFit":r>=1?(a=s,o=a/r,o>n&&(o=n,a=o*r)):(o=n,a=o*r,a>s&&(a=s,o=a/r));break;case"aspectFill":r>=1?(o=n,a=o*r):(a=s,o=a/r);break;case"widthFix":a=s,o=a/r;break;case"heightFix":o=n,a=o*r;break;case"scaleToFill":default:a=s,o=n;break}return{width:a,height:o}}function Pa(i){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=i.width,t.height=i.height,e.drawImage(i,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(i.width,i.height)}}const yu=i=>{const t=i.width,e=i.height,s=t*e*3,n=s+54,r=[66,77,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,54,0,0,0],a=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=(4-t*3%4)%4,h=i.data;let c="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const g=l*(u-1);let _="";for(let E=0;E<t;E++){const b=E<<2;_+=d(h[g+b+2])+d(h[g+b+1])+d(h[g+b])}for(let E=0;E<o;E++)_+=String.fromCharCode(0);c+=_}while(--u);function m(g){if(!window.btoa)throw"btoa undefined";let _="";if(typeof g=="string")_=g;else for(let E=0;E<g.length;E++)_+=String.fromCharCode(g[E]);return btoa(_)}return m(r.concat(a))+m(c)};function wu(i){const{width:t,height:e}=i,s=document.createElement("canvas"),n=s.getContext("2d");return s.width=t,s.height=e,n.putImageData(i,0,0,0,0,t,e),s.toDataURL("image/png")}const xu=(i,t,e)=>{const{width:s,height:n}=i,r=document.createElement("canvas"),a=r.getContext("2d");r.width=s,r.height=n,a.putImageData(i,0,0,0,0,s,n);const o=`image/${t?t.toLowerCase():"png"}`;r.toBlob(h=>{e?.(null,h)},o,1)};function bu(i,t){return createImageBitmap(i,t)}function Su(i){const t=[],e=[],s=[];let n=0;for(let h=0,c=i.data.length;h<c;h+=4)t[n]=i.data[h],e[n]=i.data[h+1],s[n]=i.data[h+2],n+=1;const r=ln(t),a=ln(e),o=ln(s);return"rgb("+r+","+a+","+o+")"}function ln(i){const t={},e=[],s=[];for(let o=0;o<i.length;o++)t[i[o]]?e.push(i[o]):t[i[o]]=1;let n=0;for(let o=0;o<e.length;o++){n=0;for(let h=0;h<e.length;h++)e[o]===e[h]&&(n+=1),s[o]=n}const r=Math.max.apply(null,s);let a=0;for(;a<s.length;a++)if(s[a]===r)return;return e[a]}const vu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[(a*e+e-o-1)*4],n[h+1]=t[(a*e+e-o-1)*4+1],n[h+2]=t[(a*e+e-o-1)*4+2],n[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(n,e,s)},Tu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[((s-a-1)*e+o)*4],n[h+1]=t[((s-a-1)*e+o)*4+1],n[h+2]=t[((s-a-1)*e+o)*4+2],n[h+3]=t[((s-a-1)*e+o)*4+3]}return new ImageData(n,e,s)},_u=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<s;o++){const h=(a*s+o)*4;n[h]=t[(o*e+e-a-1)*4],n[h+1]=t[(o*e+e-a-1)*4+1],n[h+2]=t[(o*e+e-a-1)*4+2],n[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(n,s,e)},Eu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<s;o++){const h=(a*s+o)*4;n[h]=t[((s-o-1)*e+a)*4],n[h+1]=t[((s-o-1)*e+a)*4+1],n[h+2]=t[((s-o-1)*e+a)*4+2],n[h+3]=t[((s-o-1)*e+a)*4+3]}return new ImageData(n,s,e)},Mu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+1]+t[h+2])/3;n[h]=c,n[h+1]=c,n[h+2]=c,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Pu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];n[h]=c,n[h+1]=c,n[h+2]=c,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Cu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,l=(t[h]+t[h+1]+t[h+2])/3>127?255:0;n[h]=l,n[h+1]=l,n[h+2]=l,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Iu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=255-t[h],n[h+1]=255-t[h+1],n[h+2]=255-t[h+2],n[h+3]=t[h+3]}return new ImageData(n,e,s)},Au=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[h],n[h+1]=0,n[h+2]=0,n[h+3]=t[h+3]}return new ImageData(n,e,s)},ku=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=0,n[h+1]=t[h+1],n[h+2]=0,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Du=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=0,n[h+1]=0,n[h+2]=t[h+2],n[h+3]=t[h+3]}return new ImageData(n,e,s)},Ru=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[h],n[h+1]=t[h+1],n[h+2]=0,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Lu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[h],n[h+1]=0,n[h+2]=t[h+1],n[h+3]=t[h+3]}return new ImageData(n,e,s)},zu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=0,n[h+1]=t[h+1],n[h+2]=t[h+1],n[h+3]=t[h+3]}return new ImageData(n,e,s)},Ou=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h+1]+t[h+2])/2;n[h]=t[h],n[h+1]=c,n[h+2]=c,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Bu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+2])/2;n[h]=c,n[h+1]=t[h+1],n[h+2]=c,n[h+3]=t[h+3]}return new ImageData(n,e,s)},Nu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4,c=(t[h]+t[h+1])/2;n[h]=c,n[h+1]=c,n[h+2]=t[h+2],n[h+3]=t[h+3]}return new ImageData(n,e,s)},Fu=i=>Ca(i,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Yu=i=>Ca(i,[-1,-1,-1,-1,8,-1,-1,-1,-1]),Uu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;n[h]=t[h],n[h+1]=t[h+1],n[h+2]=t[h+2],n[h+3]=255}return new ImageData(n,e,s)},Xu=i=>{const{data:t,width:e,height:s}=i,n=new Uint8ClampedArray(t.length);for(let a=0;a<s;a++)for(let o=0;o<e;o++){const h=(a*e+o)*4;if(t[h+3]===0)n[h]=255,n[h+1]=255,n[h+2]=255,n[h+3]=255;else{const c=Ia([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);n[h]=c[0],n[h+1]=c[1],n[h+2]=c[2],n[h+3]=c[3]}}return new ImageData(n,e,s)};function Vu(i,t,e,s,n,r=!1,a){const{data:o,width:h,height:c}=i;let l=n,u=s,d=t,m=e;if(l<0?l=0:l>h&&(l=h),u<0?u=0:u>c&&(u=c),d<1?d=1:d>h&&(d=h),m<1?m=1:m>c&&(m=c),l+d>h&&(d=h-l),u+m>c&&(m=c-u),r){const g=new Uint8ClampedArray(o.length);for(let E=0;E<c;E++)for(let b=0;b<h;b++){const S=(E*h+b)*4;b>=l&&b<=l+d&&E>=u&&E<=u+m?(g[S]=o[S],g[S+1]=o[S+1],g[S+2]=o[S+2],g[S+3]=o[S+3]):(g[S]=255,g[S+1]=255,g[S+2]=255,g[S+3]=a&&["JPG","JPEG"].includes(a.toUpperCase())?255:0)}return new ImageData(g,h,c)}else{const g=new Uint8ClampedArray(d*m*4);for(let E=u;E<=u+m;E++)for(let b=l;b<=l+d;b++){const S=((E-u)*d+b-l)*4,y=(E*h+b)*4;g[S]=o[y],g[S+1]=o[y+1],g[S+2]=o[y+2],g[S+3]=o[y+3]}return new ImageData(g,d,m)}}function Gu(i,t,e,s){const{data:n,width:r,height:a}=i;let o=t;o>Math.floor(r/2)&&(o=Math.floor(r/2)),o>Math.floor(a/2)&&(o=Math.floor(a/2)),o<0&&(o=0);const h=new Uint8ClampedArray(n.length);for(let l=0;l<a;l++)for(let u=0;u<r;u++){const d=(l*r+u)*4;let m=-1;u<o?l<o?m=Math.sqrt(Math.pow(o-u-1,2)+Math.pow(o-l-1,2)):l>a-o-1&&(m=Math.sqrt(Math.pow(o-u-1,2)+Math.pow(l-(a-o),2))):u>r-o-1&&(l<o?m=Math.sqrt(Math.pow(u-(r-o),2)+Math.pow(o-l-1,2)):l>a-o-1&&(m=Math.sqrt(Math.pow(u-(r-o),2)+Math.pow(l-(a-o),2)))),Math.round(m)>o?(h[d]=255,h[d+1]=255,h[d+2]=255,h[d+3]=s||e.toUpperCase()==="PNG"?0:255):(h[d]=n[d],h[d+1]=n[d+1],h[d+2]=n[d+2],h[d+3]=s||e.toUpperCase()==="PNG"?n[d+3]:255)}return new ImageData(h,r,a)}function qu(i,t,e,s,n,r=1e4){const a=new Image;a.src=i;const o=document.createElement("canvas"),h=o.getContext("2d");return o.width=r,o.height=r,h.drawImage(a,0,0,t,e,0,0,s,n),h.getImageData(0,0,s,n)}function Hu(i,t){const{data:e,width:s,height:n}=i,r=new Uint8ClampedArray(e.length);for(let o=0;o<n;o++)for(let h=0;h<s;h++){const c=(o*s+h)*4;r[c]=Math.max(Math.min(e[c]+t,255),0),r[c+1]=Math.max(Math.min(e[c+1]+t,255),0),r[c+2]=Math.max(Math.min(e[c+2]+t,255),0),r[c+3]=e[c+3]}return new ImageData(r,s,n)}function ju(i,t,e=!1){const{data:s,width:n,height:r}=i,a=new Uint8ClampedArray(s.length);for(let h=0;h<r;h++)for(let c=0;c<n;c++){const l=(h*n+c)*4;s[l+3]===0?(a[l]=255,a[l+1]=255,a[l+2]=255):(a[l]=s[l],a[l+1]=s[l+1],a[l+2]=s[l+2]);let u=s[l+3];e?u=Math.max(Math.min(Math.floor(255*t),255),0):u=Math.max(Math.min(Math.floor(u+255*t),255),0),a[l+3]=u}return new ImageData(a,n,r)}function Wu(i,t,e,s){const{data:n,width:r,height:a}=i,{data:o,width:h,height:c}=t;let l=e,u=s;e+c>a&&(l=a-c),s+h>r&&(u=r-h);const d=new Uint8ClampedArray(n.length);for(let g=0;g<a;g++)for(let _=0;_<r;_++){const E=(g*r+_)*4;if(_<u||_>u+h||g<=l||g>=l+c)d[E]=n[E],d[E+1]=n[E+1],d[E+2]=n[E+2],d[E+3]=n[E+3];else{const b=(g*r+_-((l+1)*r+(g-(l+1))*(r-h))+h-u-1)*4,S=[o[b],o[b+1],o[b+2],o[b+3]],y=[n[E],n[E+1],n[E+2],n[E+3]],w=Ia(S,y);d[E]=w[0],d[E+1]=w[1],d[E+2]=w[2],d[E+3]=w[3]}}return new ImageData(d,r,a)}function $u(i,t,e,s,n,r=10){const{data:a,width:o,height:h}=i;let c=n,l=s,u=t,d=e;c<0?c=0:c>o&&(c=o),l<0?l=0:l>h&&(l=h),u<1?u=1:u>o&&(u=o),d<1?d=1:d>h&&(d=h),c+u>o&&(u=o-c),l+d>h&&(d=h-l);const m=new Uint8ClampedArray(a.length);for(let _=0;_<h;_++)for(let E=0;E<o;E++){const b=(_*o+E)*4;if(E>=c&&E<=c+u&&_>=l&&_<=l+d){const S=Math.floor((E-c)/r),y=Math.floor((_-l)/r);let w=Math.floor(r*(S+1)-r/2+c),P=Math.floor(r*(y+1)-r/2+l);w>o-1&&(w=o-1),P>h-1&&(P=h-1);const M=(P*o+w)*4;m[b]=a[M],m[b+1]=a[M+1],m[b+2]=a[M+2],m[b+3]=a[M+3]}else m[b]=a[b],m[b+1]=a[b+1],m[b+2]=a[b+2],m[b+3]=a[b+3]}return new ImageData(m,o,h)}function Ju(i,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:s,width:n,height:r}=i,{data:a}=t,o=new Uint8ClampedArray(s.length),{backgroundColor:h,changeIntoColor:c}=e;for(let u=0;u<r;u++)for(let d=0;d<n;d++){const m=(u*n+d)*4,g=a[m],_=a[m+1],E=a[m+2],b=a[m+3];g===h.r&&_===h.g&&E===h.b&&b===h.a&&c.a!==0?(o[m]=c.r,o[m+1]=c.g,o[m+2]=c.b,o[m+3]=c.a):(o[m]=s[m],o[m+1]=s[m+1],o[m+2]=s[m+2],o[m+3]=s[m+3])}return new ImageData(o,n,r)}return i}function Ca(i,t){const{data:e,width:s,height:n}=i,r=new Uint8ClampedArray(e.length);for(let o=0;o<n;o++)for(let h=0;h<s;h++){const c=(o*s+h)*4;for(let l=0;l<3;l++){const u=c+l;h===0||h===s-1||o===0||o===n-1?r[u]=e[u]:r[u]=t[0]*e[u-s*4-4]+t[1]*e[u-s*4]+t[2]*e[u-s*4+4]+t[3]*e[u-4]+t[4]*e[u]+t[5]*e[u+4]+t[6]*e[u+s*4-4]+t[7]*e[u+s*4]+t[8]*e[u+s*4+4]}r[c+3]=e[c+3]}return new ImageData(r,s,n)}function Ia(i,t){if(i&&i.length===4&&t&&t.length===4){const e=i[3],s=t[3];if(e===255||s===0)return i;if(e===0)return t;{const n=e/255,r=s/255,a=Math.max(Math.min(Math.floor(i[0]*n+t[0]*r*(1-n)),255),0),o=Math.max(Math.min(Math.floor(i[1]*n+t[1]*r*(1-n)),255),0),h=Math.max(Math.min(Math.floor(i[2]*n+t[2]*r*(1-n)),255),0),c=Math.max(Math.min(Math.floor((n+r*(1-n))*255),255),0);return[a,o,h,c]}}return[255,255,255,255]}const un=function(){const i=[];return{writeByte(t){i.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,s=t.length){for(let n=0;n<s;n++)this.writeByte(t[n+e])},writeString(t){for(let e=0,s=t.length;e<s;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return i},toString(){let t="[";for(let e=0,s=i.length;e<s;e++)e>0&&(t+=","),t+=i[e];return t+="]",t}}},Aa=function(){let i=0,t=0,e=0,s="";const n=function(a){if(!(a<0)){if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47}throw new Error("n:"+a)},r=function(a){s+=String.fromCharCode(n(a&63))};return{writeByte(a){for(i=i<<8|a&255,t+=8,e+=1;t>=6;)r(i>>>t-6),t-=6},flush(){if(t>0&&(r(i<<6-t),i=0,t=0),e%3!=0){const a=3-e%3;for(let o=0;o<a;o++)s+="="}},toString(){return s}}},ka=function(i,t,e){const s=new Array(i*i),n=function(o){const h=o;let c=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;c+d>=8;)h.writeByte(255&(u<<c|l)),d-=8-c,u>>>=8-c,l=0,c=0;l=u<<c|l,c=c+d},flush(){c>0&&h.writeByte(l)}}},r=function(o){const h=1<<o,c=(1<<o)+1;let l=o+1;const u=a();for(let E=0;E<h;E++)u.add(String.fromCharCode(E));u.add(String.fromCharCode(h)),u.add(String.fromCharCode(c));const d=un(),m=n(d);m.write(h,l);let g=0,_=String.fromCharCode(s[g]);for(g+=1;g<s.length;){const E=String.fromCharCode(s[g]);g+=1,u.contains(_+E)?_=_+E:(m.write(u.indexOf(_),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(_+E)),_=E)}return m.write(u.indexOf(_),l),m.write(c,l),m.flush(),d.toByteArray()},a=function(){const o={};let h=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);o[c]=h,h+=1},size(){return h},indexOf(c){return o[c]},contains(c){return typeof o[c]<"u"}}};return{setPixel(o,h,c){s[h*i+o]=c},write(o){o.writeString("GIF87a"),o.writeShort(i),o.writeShort(i),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(v.radixStringToNumber("0x"+t[1]+t[2])),o.writeByte(v.radixStringToNumber("0x"+t[3]+t[4])),o.writeByte(v.radixStringToNumber("0x"+t[5]+t[6])),o.writeByte(v.radixStringToNumber("0x"+e[1]+e[2])),o.writeByte(v.radixStringToNumber("0x"+e[3]+e[4])),o.writeByte(v.radixStringToNumber("0x"+e[5]+e[6])),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(i),o.writeShort(i),o.writeByte(0);const h=2,c=r(h);o.writeByte(h);let l=0;for(;c.length-l>255;)o.writeByte(255),o.writeBytes(c,l,255),l+=255;o.writeByte(c.length-l),o.writeBytes(c,l,c.length-l),o.writeByte(0),o.writeString(";")}}},Da=function(i,t,e,s){const n=ka(i,t,e);for(let c=0;c<i;c++)for(let l=0;l<i;l++)n.setPixel(l,c,s(l,c));const r=un();n.write(r);const a=Aa(),o=r.toByteArray();for(let c=0,l=o.length;c<l;c++)a.writeByte(o[c]);a.flush();let h="";return h+="data:image/gif;base64,",h+=a,h},_t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ts={M:0,L:1,H:2,Q:3},ce={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},it={glog:function(i){if(i<1)throw new Error("glog("+i+")");return it.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return it.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let i=0;i<8;i++)it.EXP_TABLE[i]=1<<i;for(let i=8;i<256;i++)it.EXP_TABLE[i]=it.EXP_TABLE[i-4]^it.EXP_TABLE[i-5]^it.EXP_TABLE[i-6]^it.EXP_TABLE[i-8];for(let i=0;i<255;i++)it.LOG_TABLE[it.EXP_TABLE[i]]=i;const J={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){let t=i<<10;for(;J.getBCHDigit(t)-J.getBCHDigit(J.G15)>=0;)t^=J.G15<<J.getBCHDigit(t)-J.getBCHDigit(J.G15);return(i<<10|t)^J.G15_MASK},getBCHTypeNumber:function(i){let t=i<<12;for(;J.getBCHDigit(t)-J.getBCHDigit(J.G18)>=0;)t^=J.G18<<J.getBCHDigit(t)-J.getBCHDigit(J.G18);return i<<12|t},getBCHDigit:function(i){let t=0;for(;i!=0;)t++,i>>>=1;return t},getPatternPosition:function(i){return J.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,t,e){switch(i){case ce.PATTERN000:return(t+e)%2==0;case ce.PATTERN001:return t%2==0;case ce.PATTERN010:return e%3==0;case ce.PATTERN011:return(t+e)%3==0;case ce.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case ce.PATTERN101:return t*e%2+t*e%3==0;case ce.PATTERN110:return(t*e%2+t*e%3)%2==0;case ce.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){let t=new Le([1],0);for(let e=0;e<i;e++)t=t.multiply(new Le([1,it.gexp(e)],0));return t},getLengthInBits:function(i,t){if(1<=t&&t<10)switch(i){case _t.MODE_NUMBER:return 10;case _t.MODE_ALPHA_NUM:return 9;case _t.MODE_8BIT_BYTE:return 8;case _t.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(t<27)switch(i){case _t.MODE_NUMBER:return 12;case _t.MODE_ALPHA_NUM:return 11;case _t.MODE_8BIT_BYTE:return 16;case _t.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(t<41)switch(i){case _t.MODE_NUMBER:return 14;case _t.MODE_ALPHA_NUM:return 13;case _t.MODE_8BIT_BYTE:return 16;case _t.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+t)},getLostPoint:function(i){const t=i.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let a=0;a<t;a++){let o=0;const h=i.isDark(r,a);for(let c=-1;c<=1;c++)if(!(r+c<0||t<=r+c))for(let l=-1;l<=1;l++)a+l<0||t<=a+l||c==0&&l==0||h==i.isDark(r+c,a+l)&&o++;o>5&&(e+=3+o-5)}for(let r=0;r<t-1;r++)for(let a=0;a<t-1;a++){let o=0;i.isDark(r,a)&&o++,i.isDark(r+1,a)&&o++,i.isDark(r,a+1)&&o++,i.isDark(r+1,a+1)&&o++,(o==0||o==4)&&(e+=3)}for(let r=0;r<t;r++)for(let a=0;a<t-6;a++)i.isDark(r,a)&&!i.isDark(r,a+1)&&i.isDark(r,a+2)&&i.isDark(r,a+3)&&i.isDark(r,a+4)&&!i.isDark(r,a+5)&&i.isDark(r,a+6)&&(e+=40);for(let r=0;r<t;r++)for(let a=0;a<t-6;a++)i.isDark(a,r)&&!i.isDark(a+1,r)&&i.isDark(a+2,r)&&i.isDark(a+3,r)&&i.isDark(a+4,r)&&!i.isDark(a+5,r)&&i.isDark(a+6,r)&&(e+=40);let s=0;for(let r=0;r<t;r++)for(let a=0;a<t;a++)i.isDark(a,r)&&s++;const n=Math.abs(100*s/t/t-50)/5;return e+=n*10,e}};class Le{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let s=0;for(;s<t.length&&t[s]==0;)s++;this.num=new Array(t.length-s+e);for(let n=0;n<t.length-s;n++)this.num[n]=t[n+s]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let s=0;s<this.getLength();s++)for(let n=0;n<t.getLength();n++)e[s+n]^=it.gexp(it.glog(this.get(s))+it.glog(t.get(n)));return new Le(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=it.glog(this.get(0))-it.glog(t.get(0)),s=new Array(this.getLength());for(let n=0;n<this.getLength();n++)s[n]=this.get(n);for(let n=0;n<t.getLength();n++)s[n]^=it.gexp(it.glog(t.get(n))+e);return new Le(s,0).mod(t)}}class Wt{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const s=Wt.getRsBlockTable(t,e);if(s==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const n=s.length/3,r=[];for(let a=0;a<n;a++){const o=s[a*3+0],h=s[a*3+1],c=s[a*3+2];for(let l=0;l<o;l++)r.push(new Wt(h,c))}return r}static getRsBlockTable(t,e){switch(e){case ts.L:return Wt.RS_BLOCK_TABLE[(t-1)*4+0];case ts.M:return Wt.RS_BLOCK_TABLE[(t-1)*4+1];case ts.Q:return Wt.RS_BLOCK_TABLE[(t-1)*4+2];case ts.H:return Wt.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Ra{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let s=0;s<e;s++)this.putBit((t>>>e-s-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class Zu{mode;data;constructor(t){this.mode=_t.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,s=this.data.length;e<s;e++)t.put(this.data.charCodeAt(e),8)}}class le{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ts[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new Zu(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=Wt.getRSBlocks(t,this.errorCorrectLevel),s=new Ra;let n=0;for(let r=0;r<e.length;r++)n+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const a=this.dataList[r];s.put(a.mode,4),s.put(a.getLength(),J.getLengthInBits(a.mode,t)),a.write(s)}if(s.getLengthInBits()<=n*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++){this.modules[s]=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++)this.modules[s][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=le.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let s=-1;s<=7;s++)if(!(t+s<=-1||this.moduleCount<=t+s))for(let n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=s&&s<=6&&(n==0||n==6)||0<=n&&n<=6&&(s==0||s==6)||2<=s&&s<=4&&2<=n&&n<=4?this.modules[t+s][e+n]=!0:this.modules[t+s][e+n]=!1)}getBestMaskPattern(){let t=0,e=0;for(let s=0;s<8;s++){this.makeImpl(!0,s);const n=J.getLostPoint(this);(s==0||t>n)&&(t=n,e=s)}return e}createMovieClip(t,e,s){const n=t.createEmptyMovieClip(e,s),r=1;this.make();for(let a=0;a<this.modules.length;a++){const o=a*r;for(let h=0;h<this.modules[a].length;h++){const c=h*r;this.modules[a][h]&&(n.beginFill(0,100),n.moveTo(c,o),n.lineTo(c+r,o),n.lineTo(c+r,o+r),n.lineTo(c,o+r),n.endFill())}}return n}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=J.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let s=0;s<t.length;s++){const n=t[e],r=t[s];if(this.modules[n][r]==null)for(let a=-2;a<=2;a++)for(let o=-2;o<=2;o++)a==-2||a==2||o==-2||o==2||a==0&&o==0?this.modules[n+a][r+o]=!0:this.modules[n+a][r+o]=!1}}setupTypeNumber(t){const e=J.getBCHTypeNumber(this.typeNumber);for(let s=0;s<18;s++){const n=!t&&(e>>s&1)==1;this.modules[Math.floor(s/3)][s%3+this.moduleCount-8-3]=n}for(let s=0;s<18;s++){const n=!t&&(e>>s&1)==1;this.modules[s%3+this.moduleCount-8-3][Math.floor(s/3)]=n}}setupTypeInfo(t,e){const s=this.errorCorrectLevel<<3|e,n=J.getBCHTypeInfo(s);for(let r=0;r<15;r++){const a=!t&&(n>>r&1)==1;r<6?this.modules[r][8]=a:r<8?this.modules[r+1][8]=a:this.modules[this.moduleCount-15+r][8]=a}for(let r=0;r<15;r++){const a=!t&&(n>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=a:r<9?this.modules[8][15-r-1+1]=a:this.modules[8][15-r-1]=a}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let s=-1,n=this.moduleCount-1,r=7,a=0;for(let o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(let h=0;h<2;h++)if(this.modules[n][o-h]==null){let c=!1;a<t.length&&(c=(t[a]>>>r&1)==1),J.getMask(e,n,o-h)&&(c=!c),this.modules[n][o-h]=c,r--,r==-1&&(a++,r=7)}if(n+=s,n<0||this.moduleCount<=n){n-=s,s=-s;break}}}static createData(t,e,s){const n=Wt.getRSBlocks(t,e),r=new Ra;for(let o=0;o<s.length;o++){const h=s[o];r.put(h.mode,4),r.put(h.getLength(),J.getLengthInBits(h.mode,t)),h.write(r)}let a=0;for(let o=0;o<n.length;o++)a+=n[o].dataCount;if(r.getLengthInBits()>a*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+a*8+")");for(r.getLengthInBits()+4<=a*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=a*8||(r.put(le.PAD0,8),r.getLengthInBits()>=a*8));)r.put(le.PAD1,8);return le.createBytes(r,n)}static createBytes(t,e){let s=0,n=0,r=0;const a=new Array(e.length),o=new Array(e.length);for(let u=0;u<e.length;u++){const d=e[u].dataCount,m=e[u].totalCount-d;n=Math.max(n,d),r=Math.max(r,m),a[u]=new Array(d);for(let b=0;b<a[u].length;b++)a[u][b]=255&t.buffer[b+s];s+=d;const g=J.getErrorCorrectPolynomial(m),E=new Le(a[u],g.getLength()-1).mod(g);o[u]=new Array(g.getLength()-1);for(let b=0;b<o[u].length;b++){const S=b+E.getLength()-o[u].length;o[u][b]=S>=0?E.get(S):0}}let h=0;for(let u=0;u<e.length;u++)h+=e[u].totalCount;const c=new Array(h);let l=0;for(let u=0;u<n;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(c[l++]=a[d][u]);for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(c[l++]=o[d][u]);return c}}const La=Math.ceil,es=Math.floor,za=Math.round;function Ku(i,t){const e=v.utf16to8(i),s=t?.ecc||"H",n=t?.size||256,r=-1,a=t?.padding||0,o=t?.color||"#000000",h=t?.background||"#ffffff",c=new le(r,s);c.addData(e),c.make();const l=c.getModuleCount(),u=(n-a*2)/l,d=a,m=n-a;return Da(n,o,h,function(g,_){if(d<=g&&g<m&&d<=_&&_<m){const E=es((g-d)/u),b=es((_-d)/u);return c.isDark(b,E)?0:1}else return 1})}function Qu(i,t){const e=t.x||0,s=t.y||0,n=v.utf16to8(i),r=t.ctx,a=t.ecc||"H",o=typeof t.size=="number"?es(t.size):256,h=t.padding||0,c=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new le(c,a);d.addData(n),d.make();const m=d.getModuleCount(),g=(o-h*2)/m;r.fillStyle=u,r.fillRect(e,s,o,o);for(let _=0;_<m;_++)for(let E=0;E<m;E++){const b=La((E+1)*g)-es(E*g),S=La((_+1)*g)-es(_*g);r.fillStyle=d.isDark(_,E)?l:u,r.fillRect(e+za(E*g)+h,s+za(_*g)+h,b,S)}}const Gs=new Je,et=new vt;function $t(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function j(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}class Xt{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,s=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=s,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=v.cloneTypedArray(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,s){t*=this.itemSize,s*=e.itemSize;for(let n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[s+n];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,s=this.count;e<s;e++)Gs.fromBufferAttribute(this,e),Gs.applyMatrix3(t),this.setXY(e,Gs.x,Gs.y);else if(this.itemSize===3)for(let e=0,s=this.count;e<s;e++)et.fromBufferAttribute(this,e),et.applyMatrix3(t),this.setXYZ(e,et.x,et.y,et.z);return this}applyMatrix4(t){for(let e=0,s=this.count;e<s;e++)et.fromBufferAttribute(this,e),et.applyMatrix4(t),this.setXYZ(e,et.x,et.y,et.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)et.fromBufferAttribute(this,e),et.applyNormalMatrix(t),this.setXYZ(e,et.x,et.y,et.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)et.fromBufferAttribute(this,e),et.transformDirection(t),this.setXYZ(e,et.x,et.y,et.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let s=this.array[t*this.itemSize+e];return this.normalized&&(s=$t(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=j(s,this.array)),this.array[t*this.itemSize+e]=s,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=$t(e,this.array)),e}setX(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=$t(e,this.array)),e}setY(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=$t(e,this.array)),e}setZ(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=$t(e,this.array)),e}setW(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array)),this.array[t+0]=e,this.array[t+1]=s,this}setXYZ(t,e,s,n){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array),n=j(n,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=n,this}setXYZW(t,e,s,n,r){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array),n=j(n,this.array),r=j(r,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=n,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return v.newConstructor(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class tf extends Xt{constructor(t,e,s=!1){super(new Int8Array(t),e,s)}}class ef extends Xt{constructor(t,e,s=!1){super(new Uint8Array(t),e,s)}}class sf extends Xt{constructor(t,e,s=!1){super(new Uint8ClampedArray(t),e,s)}}class nf extends Xt{constructor(t,e,s=!1){super(new Int16Array(t),e,s)}}class rf extends Xt{constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}}class af extends Xt{constructor(t,e,s=!1){super(new Int32Array(t),e,s)}}class of extends Xt{constructor(t,e,s=!1){super(new Uint32Array(t),e,s)}}class hf extends Xt{isFloat16BufferAttribute=!0;constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}getX(t){let e=v.fromHalfFloat(this.array[t*this.itemSize]);return this.normalized&&(e=$t(e,this.array)),e}setX(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize]=v.toHalfFloat(e),this}getY(t){let e=v.fromHalfFloat(this.array[t*this.itemSize+1]);return this.normalized&&(e=$t(e,this.array)),e}setY(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+1]=v.toHalfFloat(e),this}getZ(t){let e=v.fromHalfFloat(this.array[t*this.itemSize+2]);return this.normalized&&(e=$t(e,this.array)),e}setZ(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+2]=v.toHalfFloat(e),this}getW(t){let e=v.fromHalfFloat(this.array[t*this.itemSize+3]);return this.normalized&&(e=$t(e,this.array)),e}setW(t,e){return this.normalized&&(e=j(e,this.array)),this.array[t*this.itemSize+3]=v.toHalfFloat(e),this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array)),this.array[t+0]=v.toHalfFloat(e),this.array[t+1]=v.toHalfFloat(s),this}setXYZ(t,e,s,n){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array),n=j(n,this.array)),this.array[t+0]=v.toHalfFloat(e),this.array[t+1]=v.toHalfFloat(s),this.array[t+2]=v.toHalfFloat(n),this}setXYZW(t,e,s,n,r){return t*=this.itemSize,this.normalized&&(e=j(e,this.array),s=j(s,this.array),n=j(n,this.array),r=j(r,this.array)),this.array[t+0]=v.toHalfFloat(e),this.array[t+1]=v.toHalfFloat(s),this.array[t+2]=v.toHalfFloat(n),this.array[t+3]=v.toHalfFloat(r),this}}class cf extends Xt{constructor(t,e,s=!1){super(new Float32Array(t),e,s)}}class at extends H{shapesCountChange=!1;constructor(t){super(t)}shapeInit(){}frameStart(t){return this.shapesCountChange&&(this.shapesCountChange=!1,this.shapes.forEach(e=>{e.parent=this,e.initPathD()}),this.pathd=this.initPathD(),this.shapes.forEach(e=>{!e.forceCXY&&!e.independentTransformInGroup&&(e.cX=this.cX-e.diffXInGroup,e.cY=this.cY-e.diffYInGroup)})),super.frameStart(t)}frameUpdate(t,e){this.shapes.forEach(s=>{!s.independentTransformInGroup&&!s.isDragging&&(s.x=this.x+s.diffXInGroup,s.y=this.y+s.diffYInGroup,s.degree=this.degree+s.diffDegreeInGroup,s.scalarX=this.scalarX*s.diffScalarXInGroup,s.scalarY=this.scalarY*s.diffScalarYInGroup)}),super.frameUpdate(t,e)}addShape(t){(Array.isArray(t)?t:[t]).forEach(e=>{this.shapes.findIndex(s=>s.id==e.id)==-1&&(e.on("draging",(s,n)=>{this.enableDrag&&(this.x+=s,this.y+=n,this.emit("draging",s,n,e))}),this.shapes.push(e),this.shapesCountChange=!0)})}getBoundingClientRect(){const t=[],e=[];this.shapes.forEach(h=>{const c=h.getBoundingClientRect();c&&(t.push(c.x,c.x+c.width),e.push(c.y,c.y+c.height))});const s=this.pathd?.getBoundingClientRect();if(s&&(s.width||s.height)&&(t.push(s.x,s.x+s.width),e.push(s.y,s.y+s.height)),t.length==0||e.length==0)return null;const n=Math.min.apply(0,t),r=Math.min.apply(0,e),a=Math.max.apply(0,t),o=Math.max.apply(0,e);return{x:n,y:r,width:a-n,height:o-r}}setAttrs(t,e){typeof t!="string"?(super.setAttr(t),this.shapes.forEach(s=>{s.setAttr(t)})):e&&(super.setAttr(t,e),this.shapes.forEach(s=>{s.setAttr(t,e)}))}sortPathD(){this.shapes=this.shapes.map(t=>{const e=t.initPathD();return{shape:t,perimeter:e.perimeterPoints()}}).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendFill(t){const e=t.shapes.length,s=this.shapes.length;if(e<s)return t.expendFill(this);for(let n=s;n<e;n++){const a=t.shapes[n].initPathD().polymorphPoints,o=a[0],h=a[1],c=[["M",o,h]];for(let l=2;l+5<a.length;l+=6)c.push(["C",o,h,o,h,o,h]);this.addShape(new H({attrs:{...t.shapes[n].getAttrs()},d:c}))}}strokeDashTween(t,e){switch(e?.type){case"sequence":const s=this.shapes.length-1;this.shapes.forEach((o,h)=>{o.strokeDashTween(t,{...e,delay:h,onStart:()=>{h==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{h==s&&e?.onGroupComplete?.()}})});break;case"parallel":default:const n=new Is({frameDuration:t}),r={},a={};this.shapes.forEach((o,h)=>{const c=v.maxDotNumber(o.getTotalLength(),0);r[`offset_${h}`]=c,a[`offset_${h}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),n.addTween(r,a,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,h)=>{for(const c in o){const l=v.extractNumber(c).number;this.shapes[l].setAttr("strokeDashoffset",""+v.maxDotNumber(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),n.play();break}}}const ss={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class dt{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let s;if(s=/^(\w+)\(([^)]*)\)/.exec(t)){const n=s[2];let r;switch(s[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(n))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(n))?(this.r=v.clamp(parseFloat(r[1]),0,100)*255/100,this.g=v.clamp(parseFloat(r[2]),0,100)*255/100,this.b=v.clamp(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(n))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(n))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(s=/#([A-Fa-f0-9]+)/.exec(t)){const n=s[1],r=n.length;r===3?this.setRGB(parseInt(n.charAt(0),16),parseInt(n.charAt(1),16),parseInt(n.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(n,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof dt?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=v.clamp(Math.round(v.parseNumber(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=v.clamp(Math.round(v.parseNumber(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=v.clamp(Math.round(v.parseNumber(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=v.clamp(v.parseNumber(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,s=this.g,n=this.b,r=t.value;return this.r=r[0]*e+r[3]*s+r[6]*n,this.g=r[1]*e+r[4]*s+r[7]*n,this.b=r[2]*e+r[5]*s+r[8]*n,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${v.maxDotNumber(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=Se){mn.fromWorkingColorSpace(Ot.copy(this),t);const e=Ot.r,s=Ot.g,n=Ot.b;return t!==Se?`color(${t} ${e.toFixed(3)} ${s.toFixed(3)} ${n.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new dt(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=xe(t.r),this.g=xe(t.g),this.b=xe(t.b),this}copyLinearToSRGB(t){return this.r=be(t.r),this.g=be(t.g),this.b=be(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",s="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:s);{const{r:n,g:r,b:a}=this.color;return this.r=255-n,this.g=255-r,this.b=255-a,this}}lighten(t){t=v.clamp(t,0,1);const{r:e,g:s,b:n}=this.color;return this.r=e+(255-e)*t,this.g=s+(255-s)*t,this.b=n+(255-n)*t,this}darken(t){t=v.clamp(t,0,1);const{r:e,g:s,b:n}=this.color;return this.r=e*(1-t),this.g=s*(1-t),this.b=n*(1-t),this}lerp(t,e){e=v.clamp(e,0,1);const{r:s,g:n,b:r}=this.color;return this.r=s+(t.r-s)*e,this.g=n+(t.g-n)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,s){return s=v.clamp(s,0,1),this.r=t.r+(e.r-t.r)*s,this.g=t.g+(e.g-t.g)*s,this.b=t.b+(e.b-t.b)*s,this}static gradient(t,e,s){try{return Ot.lerpColors(new dt(t),new dt(e),s).toString()}catch{return e}}static random(){return Ot.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=dt.nextIndex){dt.nextIndex=t;const e=Object.keys(ss),s=e.length;return Ot.setHEX(ss[e[dt.nextIndex++%s]]).toString()}setColorName(t){const e=ss[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(ss).map(t=>Ot.setHEX(t).toString())}setRGB(t,e,s,n=1){return this.r=t,this.g=e,this.b=s,this.a=n,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,s,n=1){const r=v.euclideanModulo(t,1),a=v.clamp(e,0,1),o=v.clamp(s,0,1);if(a===0)this.r=o*255,this.g=o*255,this.b=o*255;else{const h=o<=.5?o*(1+a):o+a-o*a,c=2*o-h;this.r=gn(c,h,r+.3333333333333333)*255,this.g=gn(c,h,r)*255,this.b=gn(c,h,r-.3333333333333333)*255}return this.a=n,this}getHSL(t){const e=this.r,s=this.g,n=this.b,r=Math.max(e,s,n)/255,a=Math.min(e,s,n)/255;let o,h;const c=(a+r)/2;if(a===r)o=0,h=0;else{const l=r-a;switch(h=c<=.5?l/(r+a):l/(2-r-a),r){case e:o=(s-n)/l+(s<n?6:0);break;case s:o=(n-e)/l+2;break;case n:default:o=(e-s)/l+4;break}o/=6}return t&&t.setHSL(o,h,c,this.a),{h:o,s:h,l:c,a:this.a}}offsetHSL(t,e,s){const n=this.getHSL();return this.setHSL(n.h+t,n.s+e,n.l+s)}lerpHSL(t,e){const s=this.getHSL(),n=t.getHSL(),r=v.lerp(s.h,n.h,e),a=v.lerp(s.s,n.s,e),o=v.lerp(s.l,n.l,e);return this.setHSL(r,a,o),this}setHSV(t,e,s,n=1){const r=v.clamp(t,0,1)*360,a=v.clamp(e,0,1),o=v.clamp(s,0,1),h=Math.floor(r/60)%6,c=r/60-Math.floor(r/60),l=o*(1-a),u=o*(1-c*a),d=o*(1-(1-c)*a),m=[[o,d,l],[u,o,l],[l,o,d],[l,u,o],[d,l,o],[o,l,u]][h];return this.r=m[0]*255,this.g=m[1]*255,this.b=m[2]*255,this.a=n,this}setHSB(t,e,s,n=1){this.setHSV(t,e,s,n)}getHSV(t){const{r:e,g:s,b:n,a:r}=this.color,a=Math.max(e,s,n),o=Math.min(e,s,n),h=a-o;let c;e===a?c=(s-n)/h:s===a?c=2+(n-e)/h:c=4+(e-s)/h,c/=6,c<0&&(c+=1);const l=h==0?0:c,u=a===0?0:h/a,d=a/255;return t&&t.setHSV(l,u,d,r),{h:l,s:u,v:d,a:r}}getHSB(t){const{h:e,s,v:n,a:r}=this.getHSV(t);return{h:e,s,b:n,a:r}}}const Ot=new dt;function xe(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function be(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const Oa="",Se="srgb",fn="srgb-linear",dn="linear",qs="srgb",Ba=new Ae().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Na=new Ae().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),Fa=[.64,.33,.3,.6,.15,.06],Ya=[.2126,.7152,.0722],Ua=[.3127,.329],mn={enabled:!0,workingColorSpace:fn,spaces:{},convert:function(i,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===qs&&(i.r=xe(i.r),i.g=xe(i.g),i.b=xe(i.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(i.applyMatrix3(this.spaces[t].toXYZ),i.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===qs&&(i.r=be(i.r),i.g=be(i.g),i.b=be(i.b))),i},fromWorkingColorSpace:function(i,t){return this.convert(i,this.workingColorSpace,t)},toWorkingColorSpace:function(i,t){return this.convert(i,t,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Oa?dn:this.spaces[i].transfer},getLuminanceCoefficients:function(i,t=this.workingColorSpace){return i.fromArray(this.spaces[t].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,t,e){return i.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace}};mn.define({[fn]:{primaries:Fa,whitePoint:Ua,transfer:dn,toXYZ:Ba,fromXYZ:Na,luminanceCoefficients:Ya,workingColorSpaceConfig:{unpackColorSpace:Se},outputColorSpaceConfig:{drawingBufferColorSpace:Se}},[Se]:{primaries:Fa,whitePoint:Ua,transfer:qs,toXYZ:Ba,fromXYZ:Na,luminanceCoefficients:Ya,outputColorSpaceConfig:{drawingBufferColorSpace:Se}}});function gn(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?i+(t-i)*6*e:e<.5?t:e<.6666666666666666?i+(t-i)*6*(.6666666666666666-e):i}class ve extends H{toX;toY;constructor(t){super(t),this.toX=t?.toX||0,this.toY=t?.toY||0;let e=this.toX-this.x,s=this.toY-this.y;return new Proxy(this,{set(n,r,a,o){switch(r){case"x":n.toX=a+e;break;case"y":n.toY=a+s;break;case"toX":e=a-n.x;break;case"toY":s=a-n.y;break}return Reflect.set(n,r,a,o)}})}toSVGPathData(){return[["m",0,0],["l",this.toX-this.x,this.toY-this.y]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.lineTo(this.toX-this.x,this.toY-this.y)}intersection(t){const e=new ta({x:this.x,y:this.y,toX:this.toX,toY:this.toY}),s=new ta({x:t.x,y:t.y,toX:t.toX,toY:t.toY});return e.intersection(s)}}class lf extends H{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["m",0,0],["q",t-this.x,e-this.y,this.toX-this.x,this.toY-this.y]]}else return[["m",0,0],["q",this.cx-this.x,this.cy-this.y,this.toX-this.x,this.toY-this.y]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,s=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e-this.x,s-this.y,this.toX-this.x,this.toY-this.y)}else t.quadraticCurveTo(this.cx-this.x,this.cy-this.y,this.toX-this.x,this.toY-this.y)}}class is{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),s=document.createElement("video"),n=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),n.src=URL.createObjectURL(r),n.media="(min-width:10px)",s.append(n),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(s),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{is.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class Xa extends v.EventBus{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=v.stringLength(this.source);if(t===0){this.emit("finish");return}let e,s,n=v.charAt(this.source,0);for(let r=1;r<t;r++)e=s,s=n,n=v.charAt(this.source,r),this.raw+=s,s&&this.step(s,n,e);n&&this.step(n,void 0,s),this.emit("finish")}step(t,e,s){t==`
|
|
26
|
-
`&&this.emit("newline"),this.act(t,e,s)}act(t,e,s){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":v.regTest("whitespace",t)?(this.textchunk+=Va(this.entity),this.mode="text"):t==";"?(this.textchunk+=Va(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(s=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(s=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,s)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&s=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!v.regTest("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,s)}break;case"close tag name start":v.regTest("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,s));break;case"close tag name":if(v.regTest("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(v.regTest("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":v.regTest("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,s));break;case"attr":if(v.regTest("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!v.regTest("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,s)}break;case"attr value":if(v.regTest("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&s!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Va(i){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return i.charAt(0)=="#"?i.charAt(1).toLowerCase()=="x"?e=parseInt(i.substring(2),16):e=parseInt(i.substring(1),10):e=t[i],e?String.fromCharCode(e):"&"+i}var Ga=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function qa(i,t={}){var e=1,s=1;function n(z){var R=z.match(/\n/g);R&&(e+=R.length);var U=z.lastIndexOf(`
|
|
27
|
-
`);s=~U?z.length-U:s+z.length}function r(){var z={line:e,column:s};return function(R){return R.position=new a(z),g(),R}}function a(z){this.start=z,this.end={line:e,column:s},this.source=t.source}a.prototype.content=i;var o=[];function h(z){var R=new Error(t.source+":"+e+":"+s+": "+z);if(R.reason=z,R.filename=t.source,R.line=e,R.column=s,R.source=i,t.silent)o.push(R);else throw R}function c(){var z=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:z,parsingErrors:o}}}function l(){return m(/^{\s*/)}function u(){return m(/^}/)}function d(){var z,R=[];for(g(),_(R);i.length&&i.charAt(0)!="}"&&(z=It()||Nt());)z!==!1&&(R.push(z),_(R));return R}function m(z){var R=z.exec(i);if(R){var U=R[0];return n(U),i=i.slice(U.length),R}}function g(){m(/^\s*/)}function _(z){var R;for(z=z||[];R=E();)R!==!1&&z.push(R);return z}function E(){var z=r();if(!(i.charAt(0)!="/"||i.charAt(1)!="*")){for(var R=2;i.charAt(R)!=""&&(i.charAt(R)!="*"||i.charAt(R+1)!="/");)++R;if(R+=2,i.charAt(R-1)==="")return h("End of comment missing");var U=i.slice(2,R-2);return s+=2,n(U),i=i.slice(R),s+=2,z({type:"comment",comment:U})}}function b(){var z=m(/^([^{]+)/);if(z)return Jt(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function S(){var z=r(),R=m(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=Jt(R[0]),!m(/^:\s*/))return h("property missing ':'");var U=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),q=z({type:"declaration",property:R.replace(Ga,""),value:U?Jt(U[0]).replace(Ga,""):""});return m(/^[;\s]*/),q}}function y(){var z=[];if(!l())return h("missing '{'");_(z);for(var R;R=S();)R!==!1&&(z.push(R),_(z));return u()?z:h("missing '}'")}function w(){for(var z,R=[],U=r();z=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(z[1]),m(/^,\s*/);if(R.length)return U({type:"keyframe",values:R,declarations:y()})}function P(){var z=r(),R=m(/^@([-\w]+)?keyframes\s*/);if(R){var U=R[1];if(R=m(/^([-\w]+)\s*/),!R)return h("@keyframes missing name");var q=R[1];if(!l())return h("@keyframes missing '{'");for(var mt,Ft=_();mt=w();)Ft.push(mt),Ft=Ft.concat(_());return u()?z({type:"keyframes",name:q,vendor:U,keyframes:Ft}):h("@keyframes missing '}'")}}function M(){var z=r(),R=m(/^@supports *([^{]+)/);if(R){var U=Jt(R[1]);if(!l())return h("@supports missing '{'");var q=_().concat(d());return u()?z({type:"supports",supports:U,rules:q}):h("@supports missing '}'")}}function L(){var z=r(),R=m(/^@host\s*/);if(R){if(!l())return h("@host missing '{'");var U=_().concat(d());return u()?z({type:"host",rules:U}):h("@host missing '}'")}}function X(){var z=r(),R=m(/^@media *([^{]+)/);if(R){var U=Jt(R[1]);if(!l())return h("@media missing '{'");var q=_().concat(d());return u()?z({type:"media",media:U,rules:q}):h("@media missing '}'")}}function G(){var z=r(),R=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return z({type:"custom-media",name:Jt(R[1]),media:Jt(R[2])})}function W(){var z=r(),R=m(/^@page */);if(R){var U=b()||[];if(!l())return h("@page missing '{'");for(var q=_(),mt;mt=S();)q.push(mt),q=q.concat(_());return u()?z({type:"page",selectors:U,declarations:q}):h("@page missing '}'")}}function $(){var z=r(),R=m(/^@([-\w]+)?document *([^{]+)/);if(R){var U=Jt(R[1]),q=Jt(R[2]);if(!l())return h("@document missing '{'");var mt=_().concat(d());return u()?z({type:"document",document:q,vendor:U,rules:mt}):h("@document missing '}'")}}function K(){var z=r(),R=m(/^@font-face\s*/);if(R){if(!l())return h("@font-face missing '{'");for(var U=_(),q;q=S();)U.push(q),U=U.concat(_());return u()?z({type:"font-face",declarations:U}):h("@font-face missing '}'")}}var ot=Et("import"),st=Et("charset"),Bt=Et("namespace");function Et(z){var R=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var U=r(),q=m(R);if(q){var mt={type:z};return mt[z]=q[1].trim(),U(mt)}}}function It(){if(i[0]=="@")return P()||X()||G()||M()||ot()||st()||Bt()||$()||W()||L()||K()}function Nt(){var z=r(),R=b();return R?(_(),z({type:"rule",selectors:R,declarations:y()})):h("selector missing")}return pn(c())}function Jt(i){return i?i.replace(/^\s+|\s+$/g,""):""}function pn(i,t){var e=i&&typeof i.type=="string",s=e?i:t;for(var n in i){var r=i[n];Array.isArray(r)?r.forEach(function(a){pn(a,s)}):r&&typeof r=="object"&&pn(r,s)}return e&&Object.defineProperty(i,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),i}class Ha extends Xa{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=qa(e);for(const n of s.stylesheet.rules)for(const r of n.declarations)for(const a of n.selectors)this.globalStyles[a]=this.globalStyles[a]||[],this.globalStyles[a].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,s)=>{let n=this.groups.length;for(;n--;)if(this.groups[n]!=this.currentItem){let r="",a="";for(const o in this.groups[n])o=="transform"?r=this.groups[n].transform:o=="class"&&this.globalStyles["."+this.groups[n][o]]?a=this.globalStyles["."+this.groups[n][o]].join(";")+";"+a:o=="id"&&this.globalStyles["#"+this.groups[n][o]]?a=this.globalStyles["#"+this.groups[n][o]].join(";")+";"+a:typeof this.currentItem[o]>"u"&&(this.currentItem[o]=this.groups[n][o]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=a:this.currentItem.style=a+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),wn(this.currentItem.style,this.currentItem,xn)}switch(this.processAttrs(e,s),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let s=[],n;switch(t){case"svg":let r="",a="";if(e.width&&e.height)r=e.width,a=e.height;else if(e.viewBox){const o=e.viewBox.split(/\s+/gi);o.length==4&&(r=String(parseFloat(o[2])-parseFloat(o[0])),a=String(parseFloat(o[3])-parseFloat(o[1])))}r&&a&&this.items.push({type:"viewbox",width:r,height:a});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":n={},e.style&&wn(e.style,n),n.offset=n.offset||e.offset,n.color=n["stop-color"]||e["stop-color"],n.opacity=n["stop-opacity"]||e["stop-opacity"],~(n.offset+"").indexOf("%")?n.offset=parseFloat(n.offset):n.offset=parseFloat(n.offset)*100,n.offset=+n.offset.toFixed(2),this.grad.stops.push(n);break;case"linearGradient":this.grad.angle=(360+yn(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let o=0,h=this.grad.stops.length;o<h;o++)n=this.grad.stops[o],o&&o!=h-1?s.push(n.color+":"+n.offset):s.push(n.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let o=0,h=this.grad.stops.length;o<h;o++)n=this.grad.stops[o],o&&o!=h-1?s.push(n.color+":"+n.offset):s.push(n.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break}for(const r in e){const a=e[r];if(xn.includes(r)&&(this.currentItem[r]=a),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&wn(a,this.currentItem,xn),r==="transform"&&(this.currentItem.transform=a+(this.currentItem.transform||" ")),r==="fill"){const o=a.match(/url\(#([^)]+)\)/);if(o){const h=o[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+a+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=a),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=a)}}addToItems(){this.items.push(this.currentItem)}}function yn(i,t,e,s,n,r){if(typeof n>"u"||typeof r>"u"){const a=i-e,o=t-s;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return yn(i,t,n,r)-yn(e,s,n,r)}function wn(i,t,e){const s=(i+"").split(";"),n=/^\s+|\s+$/g;for(let r=0,a=s.length;r<a;r++){const o=s[r].split(":"),h=o[0].replace(n,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=o[1].replace(n,""))}}const xn=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class uf{controller;rootEl;ue;shapes=[];currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e,s){this.controller=t,this.rootEl=bt.createSVGElement("svg"),this.ue=Qt(this.rootEl);const n=Qt(this.controller.el);n.empty(),n.insert(this.rootEl),e&&s?this.setSize(e,s):(this.setSize(this.controller.rect.width,this.controller.rect.height),this.controller.eb.on("resize",r=>{this.setSize(r.width,r.height)})),he(this.controller,{start:()=>{this.dragDx=0,this.dragDy=0,this.setCursor()},end:()=>{this.dragDx=0,this.dragDy=0,this.setCursor()},move:()=>{this.currentEnableDragMouseInShape&&(this.dragDx+=this.controller.mousePoint.dx,this.dragDy+=this.controller.mousePoint.dy),this.setCursor()}}),this.controller.eb.on("tap",()=>{for(const r of this.shapes)if(this.currentMouseInShape==r){r.emit("clicked",r);let a=r.parent;for(;a;)a.emit("clicked",r),a=a.parent;break}})}setCursor(){this.currentEnableDragMouseInShape?(this.controller.el.style.cursor="grab",this.controller.mousePoint.isDown&&(this.controller.el.style.cursor="grabbing")):this.currentMouseInShape?this.controller.el.style.cursor="pointer":this.controller.el.style.cursor="default"}setSize(t,e){return oe(this.rootEl,{viewBox:`0 0 ${t} ${e}`,width:`${t}`,height:`${e}`}),this}download(){return bt.downloadFromSVGElement(this.rootEl)}_addDrawShape(t){this.shapes.findIndex(e=>e.id==t.id)===-1&&(this.shapes.push(t),t instanceof at&&t.shapes.forEach(e=>{this._addDrawShape(e)}))}path(t){(Array.isArray(t)?t:[t]).forEach(e=>{this._addDrawShape(e)}),this.controller.mousePoint.isDown&&this.currentEnableDragMouseInShape||(this.currentMouseInShape=void 0);for(const e of this.shapes){if(!e.isShow){e.el&&(e.el.remove(),delete e.el);continue}if(e.frameStart(this.controller.mousePoint),e.el||(e instanceof ns?e.el=this.text(e.text,e.x,e.y,v.filterObject(e.getAttrs(),(n,r)=>typeof r=="string")):(e.el=bt.createSvgPath(e.toSVGPathD(),e.id),this.ue.insert(e.el))),e.followMouse&&(!v.withinErrorMarginNumber(e.x,this.controller.mousePoint.x,5)||!v.withinErrorMarginNumber(e.y,this.controller.mousePoint.y,5))&&e.followTo(this.controller.mousePoint),e.targetToAfterDragFree&&(this.controller.mousePoint.isDown||e.runEaseTo({x:e.targetToAfterDragFree.targetX,y:e.targetToAfterDragFree.targetY},{easing:e.targetToAfterDragFree?.easing})),this.controller.mousePoint.isDown&&this.currentEnableDragMouseInShape==e){e.isDragging=!0;const n=this.dragDx,r=this.dragDy;if(this.dragDx=0,this.dragDy=0,n||r){if(e.x+=n,e.y+=r,e.alongPath){const a=e.alongPath.closestPoint(e.x,e.y);e.x=a.point.x-e.cX,e.y=a.point.y-e.cY}e.emit("draging",n,r)}}else e.isDragging=!1;e instanceof ns&&(e.setAttr("x",String(e.x)),e.setAttr("y",String(e.y))),e.frameUpdate(this.controller.mousePoint);const s=e.toSVGPathD();if(this.attr(e,v.filterObject(e.getAttrs(),(n,r)=>typeof r=="string")),this.attr(e,"d",s),!this.currentMouseInShape){const n=e.isPointInPath(this.controller.mousePoint.x,this.controller.mousePoint.y,this.rootEl)||e.isPointInStroke(this.controller.mousePoint.x,this.controller.mousePoint.y,this.rootEl)||!1;e.isMouseIn=n,n&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.controller.mousePoint)}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}delete(t){(Array.isArray(t)?t:[t]).forEach(e=>{e.el&&e.el.remove(),delete e.el,this.shapes=this.shapes.filter(s=>s.id!==e.id)})}clear(){this.shapes.forEach(t=>{t.el&&t.el.remove(),delete t.el}),this.ue.empty(),this.shapes=[]}attr(t,e,s){const n=t.el||t;return n instanceof SVGElement?e===void 0&&s===void 0?oe(n):typeof e=="string"&&s===void 0?oe(n,v.toKebab(e))||"":(typeof e=="object"?oe(n,e):typeof e=="string"&&s!==void 0&&oe(n,v.toKebab(e),s),this):this}circle(t,e,s){return this.path(new Zt({x:t,y:e,radius:s}))}circleEl(t,e,s){const n=bt.createSVGElement("circle",{cx:String(t),cy:String(e),r:String(s)});return this.ue.insert(n),n}ellipse(t,e,s,n){return this.path(new Wa({x:t,y:e,rx:s,ry:n}))}ellipseEl(t,e,s,n){const r=bt.createSVGElement("ellipse",{cx:String(t),cy:String(e),rx:String(s),ry:String(n)});return this.ue.insert(r),r}rect(t,e,s,n){return this.path(new Kt({x:t,y:e,width:s,height:n}))}rectEl(t,e,s,n){const r=bt.createSVGElement("rect",{x:String(t),y:String(e),width:String(s),height:String(n)});return this.ue.insert(r),r}image(t,e,s,n,r){}text(t,e,s,n){const r=bt.createSVGElement("text",{x:String(e),y:String(s)});return Qt(r).html(t),this.attr(r,Object.assign({"alignment-baseline":"middle"},n)),this.ue.insert(r),r}textWithTspan(t,e,s,n){const r=n?.["line-height"]||"1.2em",a=bt.createSVGElement("text",{x:String(e),y:String(s)});return t.split(`
|
|
28
|
-
`).forEach((o,h)=>{if(o.trim()){const c=bt.createSVGElement("tspan",{x:String(e),dy:h>0?r:"0"});Qt(c).html(o),Qt(a).insert(c),this.attr(c,Object.assign({"alignment-baseline":"middle"},n))}}),this.ue.insert(a),a}}class ff extends at{svgWidth=0;svgHeight=0;width=0;height=0;constructor(t){super(t);const e=new Ha(t.svg).parse();for(let s=0,n=e.length;s<n;s++){const r=e[s];if(r.type=="viewbox"&&r.width&&r.height){if(this.svgWidth=parseFloat(r.width),this.svgHeight=parseFloat(r.height),t.width){const l=this.svgWidth/this.svgHeight;this.width=t.width,this.height=this.width/l}else this.width=this.svgWidth,this.height=this.svgHeight;continue}if(r.type!="path"||!ye.isSVGPath(r.path))continue;const a={};for(const l in r)l==="type"||l==="path"||l==="transform"||(a[l]=r[l]);const o=ye.absolutizeSVGPath(ye.parseSVGPath(r.path)),h=[];let c=[];for(let l=0,u=o.length;l<u;l++){const d=o[l];c.push(d),d[0].toLowerCase()=="z"&&(h.push(c),c=[])}c.length&&h.push(c),h.forEach(l=>{const u=Ki(r.transform??"");u.scale(this.width&&this.svgWidth?this.width/this.svgWidth:1),this.addShape(new H({...t,attrs:{...a,...t?.attrs||{}},d:l,originMatrix:u}))})}}shapeInit(){this.trim()}}class Zt extends H{radius;constructor(t){super(t),this.radius=t?.radius||0}getBoundingClientRect(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}toSVGPathData(){return this.radius?[["m",0,-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.radius===t.radius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return ks(this.x,this.y)}scalar(t){return this.x*=t,this.y*=t,this}normalize(t=1){const e=this.length();if(e){const s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y;return{x:s*t.x-e*t.y,y:e*t.y-s*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}checkCollision(t){const e=t.x-this.x,s=t.y-this.y;if(Math.sqrt(e*e+s*s)<this.radius+t.radius){const r=Math.atan2(s,e),a={x:0,y:0},o=zt(-r,e,s),h=zt(-r,this.vx,this.vy),c=zt(-r,t.vx,t.vy),l=h.x-c.x;h.x=((this.mass-t.mass)*h.x+2*t.mass*c.x)/(this.mass+t.mass),c.x=l+h.x;const u=Math.abs(h.x)+Math.abs(c.x),d=this.radius+t.radius-Math.abs(a.x-o.x);a.x+=h.x/u*d,o.x+=c.x/u*d;const m=zt(r,a.x,a.y),g=zt(r,o.x,o.y);t.x=this.x+g.x,t.y=this.y+g.y,this.x=this.x+m.x,this.y=this.y+m.y;const _=zt(r,h.x,h.y),E=zt(r,c.x,c.y);this.vx=_.x,this.vy=_.y,t.vx=E.x,t.vy=E.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,s=t.wall.x,n=t.wall.y,r=t.wall.x+t.wall.width,a=t.wall.y+t.wall.height;this.x+this.radius>r?(this.x=r-this.radius,this.vx*=e):this.x-this.radius<s&&(this.x=s+this.radius,this.vx*=e),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=e):this.y-this.radius<n&&(this.y=n+this.radius,this.vy*=e)}}class ja extends H{points;isStraight;constructor(t){if(super(t),this.points=t.points,this.points.length<3)throw new Error("points length must >= 3");this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0}toSVGPathData(){const t=[],e=this.points.length;if(this.isStraight){t.push(["M",this.points[0].x,this.points[0].y]);for(let s=1;s<=e-1;s++)t.push(["L",this.points[s].x,this.points[s].y]);t.push(["Z"])}else{const s=(this.points[0].x+this.points[e-1].x)/2,n=(this.points[0].y+this.points[e-1].y)/2;t.push(["M",s,n]);for(let r=0;r<e-1;r++){const a=(this.points[r].x+this.points[r+1].x)/2,o=(this.points[r].y+this.points[r+1].y)/2;t.push(["Q",this.points[r].x,this.points[r].y,a,o])}t.push(["Q",this.points[e-1].x,this.points[e-1].y,s,n])}return t}toCanvasContext(t){t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let s=1;s<=e-1;s++)t.lineTo(this.points[s].x,this.points[s].y);t.closePath()}else{const s=(this.points[0].x+this.points[e-1].x)/2,n=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(s,n);for(let r=0;r<e-1;r++){const a=(this.points[r].x+this.points[r+1].x)/2,o=(this.points[r].y+this.points[r+1].y)/2;t.quadraticCurveTo(this.points[r].x,this.points[r].y,a,o)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,s,n)}}isContainPoint(t,e){const s=this.points.length;let n=!1;const r=2e-10;for(let a=0,o=s-1;a<s;o=a,a++){const h=this.points[a].x,c=this.points[a].y,l=this.points[o].x,u=this.points[o].y;if(h===t&&c===e||l===t&&u===e||e===c&&e===u)return!0;if(e>=c&&e<u||e<c&&e>=u){const d=(l-h)/(u-c),m=h+d*(e-c);if(m===t||Math.abs(m-t)<r)return!0;m>t&&(n=!n)}}return n}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}}class Kt extends H{width;height;borderRadius;constructor(t){super(t),this.width=t.width,this.height=t.height,this.borderRadius=t.borderRadius||0}static fromCubicBezier(t,e,s,n,r,a,o,h){const c=new pt({x:t,y:e,c1x:s,c1y:n,c2x:r,c2y:a,toX:o,toY:h});return new Kt(c.getBoundingClientRect())}getBoundingClientRect(){return{x:this.x,y:this.y,width:this.width,height:this.height}}toSVGPathData(){return this.borderRadius?[["m",this.borderRadius,0],["l",this.width-this.borderRadius*2,0],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,this.borderRadius],["l",0,this.height-this.borderRadius*2],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,this.borderRadius],["l",this.borderRadius*2-this.width,0],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,-this.borderRadius],["l",0,this.borderRadius*2-this.height],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,-this.borderRadius],["z"]]:[["m",0,0],["l",this.width,0],["l",0,this.height],["l",-this.width,0],["z"]]}toCanvasContext(t){t.beginPath(),this.borderRadius<=0?t.rect(0,0,this.width,this.height):(t.moveTo(0,this.borderRadius),t.lineTo(0,this.height-this.borderRadius),t.quadraticCurveTo(0,this.height,this.borderRadius,this.height),t.lineTo(this.width-this.borderRadius,this.height),t.quadraticCurveTo(this.width,this.height,this.width,this.height-this.borderRadius),t.lineTo(this.width,this.borderRadius),t.quadraticCurveTo(this.width,0,this.width-this.borderRadius,0),t.lineTo(this.borderRadius,0),t.quadraticCurveTo(0,0,0,this.borderRadius)),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.borderRadius===t.borderRadius}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}}class Wa extends H{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class df extends H{constructor(t){super(t)}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class mf extends H{constructor(t){super(t)}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class gf extends H{rx;ry;constructor(t){super(t),this.rx=t?.rx||10,this.ry=t?.ry||10}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class pf extends H{rx;ry;constructor(t){super(t),this.rx=t?.rx??50,this.ry=t?.ry??50}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class yf extends H{r;constructor(t){super(t),this.r=t?.r||20}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const s=288+e*144,n=this.r*Math.cos(Y(s)),r=this.r*Math.sin(Y(s));t.push(["l",n,r])}return t}}class wf extends H{constructor(t){super(t)}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,30],["a",15,15,0,1,1,0,-30]]}}class xf extends H{constructor(t){super(t),this.originD="m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"}}class bf extends at{constructor(t){super(t);const e=new ve({...t,x:this.x,y:this.y,toX:this.x,toY:this.y-140-Math.random()*20}),s=30+Math.random()*30,n=new ve({...t,x:this.x,y:this.y-s,diffYInGroup:-s,toX:this.x+Math.random()*80-40,toY:this.y-100-Math.random()*40}),r=60+Math.random()*40,a=new ve({...t,x:this.x,y:this.y-r,diffYInGroup:-r,toX:this.x+Math.random()*60-30,toY:this.y-110-Math.random()*20});this.addShape([e,n,a])}}class ns extends H{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.getAttrs()});const e=v.extractNumber(this.getAttr("fontSize"),10).number,s=v.extractNumber(this.getAttr("fontWeight"),400).number,n=this.measureText(this.text,e,s);this.width=n.width,this.height=n.height}getBoundingClientRect(){return null}toSVGPathData(){return[]}toCanvasContext(t){t.fillText(this.text,0,0)}measureText(t,e=12,s=400){const n=document.createElement("span");n.style.visibility="hidden",n.style.margin="0",n.style.padding="0",n.style.inset="0",n.style.whiteSpace="nowrap",n.style.overflow="visible",n.style.fontSize=e+"px",n.style.fontWeight=s.toString(),n.innerText=t,document.body.appendChild(n);const r=n.offsetWidth,a=n.offsetHeight;return document.body.removeChild(n),{width:r,height:a}}getFixedWidthText(t,e,s=12,n=400,r=!0){let a="";if(!t||e<s)return a;const o=t.split(""),h="...";let c=r?this.measureText(h,s,n).width:0;for(let l=0,u=o.length;l<u;l++)if(c+=this.measureText(o[l],s,n).width,c>e){r&&(a+=h);break}else a+=o[l];return a}}class $a extends at{text;bg;padding;offset;isShow;textShape;bgShape;constructor(t){super(t),this.text=t.text,this.bg=t.bg||"rgba(0,0,0,0.5)",this.padding=t.padding||4,this.offset=t.offset||20,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!1,this.textShape=new ns({...t,x:this.x+this.offset,y:this.y+this.offset,text:this.text,attrs:{...this.getAttrs(),fill:Ot.set(this.bg).opposite(!0).toString(),textAnchor:"start"}}),this.bgShape=new Kt({...t,x:this.textShape.x-this.padding,y:this.textShape.y-this.textShape.height/2-this.padding,width:this.textShape.width+this.padding*2,height:this.textShape.height+this.padding*2,attrs:{...this.getAttrs(),fill:this.bg}}),this.addShape([this.bgShape,this.textShape])}shapeInit(){v.watchEffect(()=>{this.textShape.x=this.x+this.offset,this.textShape.y=this.y+this.offset,this.textShape.text=this.text,this.textShape.isShow=this.isShow,this.bgShape.x=this.textShape.x-this.padding,this.bgShape.y=this.textShape.y-this.textShape.height/2-this.padding,this.bgShape.width=this.textShape.width+this.padding*2,this.bgShape.height=this.textShape.height+this.padding*2,this.bgShape.isShow=this.isShow})}}class Sf extends at{radius;expandRaidus;startDegree;endDegree;text="";defaultShowText;tip="";p1=new Zt;p1Offset=10;p2=new Zt;p2Offset=40;p3=new Zt;p3Offset=10;p4=new Zt;p4Offset=10;direction=1;sectorArc;line12;line23;textShape;tipShape;constructor(t){super(t),this.radius=t.radius,this.expandRaidus=t.expandRaidus??20,this.startDegree=t.startDegree,this.endDegree=t.endDegree,this.text=t.text||"",this.defaultShowText=typeof t?.defaultShowText=="boolean"?t.defaultShowText:!!this.text,this.tip=t.tip||"",this.sectorArc=new Ja({x:this.x,y:this.y,radius:this.radius,expandRaidus:this.expandRaidus,startDegree:this.startDegree,endDegree:this.endDegree,attrs:Object.assign({...this.getAttrs()},{strokeWidth:"0"})}),this.addShape(this.sectorArc);const e=Object.assign({...this.getAttrs()},{fill:"none"});this.line12=new ve({x:this.p1.x,y:this.p1.y,toX:this.p2.x,toY:this.p2.y,attrs:{...e},isShow:this.defaultShowText}),this.line23=new ve({x:this.p2.x,y:this.p2.y,toX:this.p3.x,toY:this.p3.y,attrs:{...e},isShow:this.defaultShowText}),this.textShape=new ns({x:this.p4.x,y:this.p4.y,text:this.text,attrs:{stroke:e.stroke,textAnchor:this.direction==1?"start":"end"},isShow:this.defaultShowText}),this.text&&(this.addShape(this.line12),this.addShape(this.line23),this.addShape(this.textShape)),this.tipShape=new $a({x:0,y:0,text:this.tip,isShow:!1}),this.tip&&this.addShape(this.tipShape)}frameUpdate(t){this.text&&!this.defaultShowText&&(this.line12.isShow=this.sectorArc.isMouseIn,this.line23.isShow=this.sectorArc.isMouseIn,this.textShape.isShow=this.sectorArc.isMouseIn);const e=this.startDegree+(this.endDegree-this.startDegree)/2,{dx:s,dy:n}=Pt(Y(e),this.sectorArc.radius+this.p1Offset);this.p1.x=this.x+s,this.p1.y=this.y+n;const{dx:r,dy:a}=Pt(Y(e),this.sectorArc.radius+this.p1Offset+this.p2Offset);this.p2.x=this.x+r,this.p2.y=this.y+a,this.line12.x=this.p1.x,this.line12.y=this.p1.y,this.line12.toX=this.p2.x,this.line12.toY=this.p2.y,this.direction=this.p1.x>this.x?1:-1,this.p3.x=this.p2.x+this.direction*this.p3Offset,this.p3.y=this.p2.y,this.p4.x=this.p3.x+this.direction*this.p4Offset,this.p4.y=this.p3.y,this.line23.x=this.p2.x,this.line23.y=this.p2.y,this.line23.toX=this.p3.x,this.line23.toY=this.p3.y,this.textShape.x=this.p4.x,this.textShape.y=this.p4.y,this.textShape.setAttr("textAnchor",this.direction==1?"start":"end"),this.sectorArc.isMouseIn?(this.tipShape.isShow=!0,this.tipShape.x=t.x,this.tipShape.y=t.y):(this.tipShape.isShow=!1,this.tipShape.x=t.x,this.tipShape.y=t.y)}}class Ja extends H{radius;realRadius;expandRaidus;startDegree;endDegree;vr;ar;bounce;durationTime;status;constructor(t){super(t),this.radius=0,this.realRadius=t.radius,this.expandRaidus=t.expandRaidus??20,this.startDegree=t.startDegree,this.endDegree=t.endDegree,this.vr=0,this.ar=.03,this.bounce=.6,this.durationTime=8.333333333333334,this.status=0}frameUpdate(){this.status==0&&this.radius<this.realRadius?(this.expand(this.realRadius),this.radius>=this.realRadius&&(this.status=1)):this.isMouseIn?this.expand(this.realRadius+this.expandRaidus):this.shrink(this.realRadius)}expand(t){this.vr+=this.ar,this.radius+=this.vr*this.durationTime,this.radius>t&&(this.radius=t,this.vr*=-this.bounce)}shrink(t){this.vr-=this.ar,this.radius+=this.vr*this.durationTime,this.radius<t&&(this.radius=t,this.vr*=-this.bounce)}toSVGPathData(){const{dx:t,dy:e}=Pt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Pt(Y(this.endDegree),this.radius);return[["m",0,0],["l",t,e],["a",this.radius,this.radius,0,Math.abs(this.endDegree-this.startDegree)>=180?1:0,1,s-t,n-e],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.arc(0,0,this.radius,Y(this.startDegree),Y(this.endDegree),!1),t.closePath()}containPoint(t,e){const s=Ds(this.x,this.y,t,e),n=lt(re(this.x,this.y,t,e));return s<=this.radius&&n>=this.startDegree&&n<=this.endDegree}}class vf extends at{showFlame;ship;flame;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t.showFlame:!1,this.ship=new H({...t,d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]}),this.addShape(this.ship),this.flame=new H({...t,isShow:this.showFlame,d:[["m",-10,-5],["l",-7.5,5],["l",7.5,5],["z"]]}),this.addShape(this.flame)}shapeInit(){v.watchEffect(()=>{this.ship.x=this.x,this.ship.y=this.y,this.flame.x=this.x,this.flame.y=this.y,this.flame.isShow=this.showFlame})}}class Tf extends at{value;backgroundRect;occupyRect;handle;constructor(t){super(t);const e=t?.min||0,s=t?.max||100,n=t?.step||1,r=v.stepNumber(e,s,n);this.value=r(typeof t?.defaultValue=="number"?v.clamp(t.defaultValue,e,s):e);const a=this.value/(s-e),o=t?.barWidth||100,h=t?.barHeight||4,c=t?.handleRadius||10,l=h*.5,u=t?.barColor||"#f5f5f5",d=t?.handleColor||ya("--xg-blue");this.backgroundRect=new Kt({x:this.x,y:this.y,width:o,height:h,borderRadius:l,attrs:{fill:u},enableDrag:!1,independentTransformInGroup:!0}),this.addShape(this.backgroundRect),this.occupyRect=new Kt({x:this.x,y:this.y,width:o*a,height:h,borderRadius:l,attrs:{fill:d},enableDrag:!1,independentTransformInGroup:!0}),this.addShape(this.occupyRect),this.handle=new Zt({x:this.x+o*a,y:this.y+l,diffXInGroup:o*a,diffYInGroup:l,radius:c,alongPath:new kl({x:this.x,y:this.y+l,d:[["m",0,0],["l",o,0]]}),attrs:{fill:d},enableDrag:!0,independentTransformInGroup:!0}),this.addShape(this.handle),this.handle.on("draging",m=>{this.occupyRect.width=v.clamp(this.occupyRect.width+m,0,o),this.value=r((this.handle.x-this.x)/o*(s-e)+e),this.emit("change",this.value)})}}class _f extends at{width;height;cornerRadius;controlPoint;mainRect;rightPoint;constructor(t){super(t),this.width=t.width,this.height=t.height,this.cornerRadius=this.height/2,this.controlPoint=new Zt({...t,x:this.x,y:this.y,radius:2}),this.forceSetCXY(this.controlPoint.cX,this.controlPoint.cY),this.mainRect=new Kt({...t,x:this.x-this.cornerRadius,y:this.y-this.cornerRadius,diffXInGroup:-this.cornerRadius,diffYInGroup:-this.cornerRadius,width:this.width+this.cornerRadius*2,height:this.height,borderRadius:this.cornerRadius}),this.rightPoint=new Zt({...t,x:this.x+this.width,y:this.y,diffXInGroup:this.width,radius:2}),this.addShape([this.mainRect,this.controlPoint,this.rightPoint])}getPin(){return{x:this.controlPoint.x+Math.cos(Y(this.controlPoint.degree))*this.width,y:this.controlPoint.y+Math.sin(Y(this.controlPoint.degree))*this.width}}}class bn extends H{extendDegree;radius;startDegree;endDegree;diffDegree;constructor(t){super(t),this.extendDegree=t?.extendDegree||0,this.x=(t.x||0)+t.width/2;const e=Math.min(t.width/2,t.height)-t.lineWidth;this.radius=Math.max(0,e-e*Math.abs(Math.sin(Y(this.extendDegree)))),this.y=(t.y||0)+t.height-t.lineWidth-this.radius*Math.abs(Math.sin(Y(this.extendDegree))),this.diffDegree=t.endDegree-t.startDegree,this.startDegree=180+t.startDegree-this.extendDegree,this.endDegree=180+t.endDegree+this.extendDegree,this.setAttr({"stroke-linecap":"round","stroke-width":String(t.lineWidth),stroke:t.color||"none"})}setPercent(t){this.endDegree=this.startDegree+(this.diffDegree+this.extendDegree*2)*t}toSVGPathData(){const{dx:t,dy:e}=Pt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Pt(Y(this.endDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.endDegree-this.startDegree)>=180?1:0,1,s-t,n-e]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,Y(this.startDegree),Y(this.endDegree),!1)}}class Ef extends at{percent=0;ringBg;ring;lines=[];bgColor;startColor;endColor;indicatorLineCount;constructor(t){super(t);const e=t?.startDegree||0,s=t?.endDegree||180,n=t?.extendDegree||15,r=t?.lineWidth||12;this.bgColor=t?.bgColor||"#B3C6E7",this.startColor=t?.startColor||"#5A82F0",this.endColor=t?.endColor||"#66B3FF",this.percent=t?.percent||0,this.indicatorLineCount=23;const a=20,o=2,h=17;this.ringBg=new bn({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:e,endDegree:s,extendDegree:n,lineWidth:r,color:this.bgColor}),this.addShape(this.ringBg),this.ring=new bn({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:e,endDegree:s,extendDegree:n,lineWidth:r}),this.addShape(this.ring);const c=this.ringBg.y-this.ringBg.radius+a;for(let l=0;l<this.indicatorLineCount;l++)this.lines.push(new ve({...t,centerX:this.ringBg.x,centerY:this.ringBg.y,x:this.ringBg.x,y:c,toX:this.ringBg.x,toY:c+h,degree:this.ringBg.startDegree+90+(s-e+n*2)/(this.indicatorLineCount-1)*l,attrs:{"stroke-linecap":"round","stroke-width":String(o),stroke:this.bgColor}}));this.addShape(this.lines)}setPercent(t){this.percent=t}shapeInit(){this.on("draging",(t,e,s)=>{this.shapes.forEach(n=>{n!=s&&(n.x+=t,n.y+=e)})})}frameUpdate(t,e){const s=this.ringBg.radius-this.ringBg.radius*Math.cos(Math.PI*this.percent),n=this.ringBg.radius*Math.sin(Math.PI*this.percent);if(e){const r=e.createLinearGradient(-this.ringBg.radius,0,-this.ringBg.radius+s,-n,{0:this.startColor,1:this.endColor});this.ring.setAttr({stroke:this.startColor==this.endColor||this.percent==1?this.startColor:r})}else this.ring.setAttr({stroke:this.startColor});this.ring.setPercent(this.percent);for(let r=0;r<this.indicatorLineCount;r++){const a=r/(this.indicatorLineCount-1)<=this.percent;this.lines[r].setAttr({stroke:a&&e?e.createLinearGradient(0,0,this.lines[r].toX-this.lines[r].x,this.lines[r].toY-this.lines[r].y,{0:this.startColor,1:this.endColor}):a?this.startColor:this.bgColor})}}}class Sn extends H{radius;startDegree;endDegree;constructor(t){super(t),this.x=(t.x||0)+t.width/2,this.y=(t.y||0)+t.height/2,this.radius=Math.max(0,Math.min(t.width/2,t.height/2)-t.lineWidth),this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree,this.setAttr({"stroke-linecap":"round","stroke-width":String(t.lineWidth),stroke:t.color||"none"})}setPercent(t){this.endDegree=this.startDegree+360*t}toSVGPathData(){const{dx:t,dy:e}=Pt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Pt(Y(this.endDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.endDegree-this.startDegree)>=180?1:0,1,s-t,n-e]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,Y(this.startDegree),Y(this.endDegree),!1)}}class Mf extends at{percent=0;ringBg;ring;bgColor;startColor;endColor;constructor(t){super(t);const e=t?.lineWidth||12;this.bgColor=t?.bgColor||"#B3C6E7",this.startColor=t?.startColor||"#5A82F0",this.endColor=t?.endColor||"#66B3FF",this.percent=t?.percent||0,this.ringBg=new Sn({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:0,endDegree:360,lineWidth:e,color:this.bgColor}),this.addShape(this.ringBg),this.ring=new Sn({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:0,endDegree:0,lineWidth:e}),this.addShape(this.ring)}setPercent(t){this.percent=t}shapeInit(){this.on("draging",(t,e,s)=>{this.shapes.forEach(n=>{n!=s&&(n.x+=t,n.y+=e)})})}frameUpdate(t,e){const s=this.ringBg.radius*Math.sin(2*Math.PI*this.percent),n=this.ringBg.radius*Math.cos(2*Math.PI*this.percent);if(e){const r=e.createLinearGradient(0,-this.ringBg.radius,s,-n,{0:this.startColor,1:this.endColor});this.ring.setAttr({stroke:this.startColor==this.endColor||this.percent==1?this.startColor:r})}else this.ring.setAttr({stroke:this.startColor});this.ring.setPercent(this.percent)}}class Pf extends H{x;y;z;brightness;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.brightness=this.setBrightness(t?.brightness||1)}setBrightness(t){return this.brightness=v.clamp(t,0,1),this.brightness}toSVGPathData(){return[]}}const Cf=Pf;class If extends H{points;light;constructor(t=[]){if(t.length<3)throw new Error("points length must >= 3");super(),this.points=t,this.light=new Cf({x:0,y:0,z:0,brightness:1})}toSVGPathData(){const t=[];t.push(["M",this.points[0].getScreenX(),this.points[0].getScreenY()]);for(let e=0,s=this.points.length;e<=s-1;e++)t.push(["L",this.points[e].getScreenX(),this.points[e].getScreenY()]);return t.push(["L",this.points[0].getScreenX(),this.points[0].getScreenY()]),t}toCanvasContext(t){t.beginPath(),t.moveTo(0,0);for(let e=0,s=this.points.length;e<=s-1;e++)t.lineTo(this.points[e].getScreenX()-this.points[0].getScreenX(),this.points[e].getScreenY()-this.points[0].getScreenY());t.lineTo(0,0)}get length(){return this.points.length}getDepth(){return Math.min(...this.points.map(t=>t.z))}isBackface(){const t=this.points[2].getScreenX()-this.points[0].getScreenX(),e=this.points[2].getScreenY()-this.points[0].getScreenY(),s=this.points[1].getScreenX()-this.points[2].getScreenX(),n=this.points[1].getScreenY()-this.points[2].getScreenY();return t*n>e*s}getLightFactor(){const t={x:this.points[0].x-this.points[1].x,y:this.points[0].y-this.points[1].y,z:this.points[0].z-this.points[1].z},e={x:this.points[1].x-this.points[2].x,y:this.points[1].y-this.points[2].y,z:this.points[1].z-this.points[2].z},s={x:t.y*e.z-t.z*e.y,y:-(t.x*e.z-t.z*e.x),z:t.x*e.y-t.y*e.x},n=s.x*this.light.x+s.y*this.light.y+s.z*this.light.z,r=Math.sqrt(s.x*s.x+s.y*s.y+s.z*s.z),a=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(n/(r*a))/Math.PI*this.light.brightness}getAdjustedColor(t){const e=Ot.set(t),s=this.getLightFactor();return e.r*=s,e.g*=s,e.b*=s,e.toString()}}class Af extends at{fettis=[];constructor(t,e,s){super();const{shape:n,x:r,y:a,particleCount:o,angle:h,spread:c,startVelocity:l,decay:u,gravity:d,drift:m,ticks:g,colors:_,scalar:E,flat:b}=Object.assign({shape:Kt,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:dt.getColors(),scalar:1,flat:!1},s||{}),S=Y(h),y=Y(c);let w=o;for(;w--;){const P=_[w%_.length],M=new n({x:t*r,y:e*a,width:10,height:10,scalar:E,attrs:{fill:P},independentTransformInGroup:!0});this.addShape(M),this.fettis.push({shape:M,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:l*.5+Math.random()*l,angle2D:-S+(.5*y-Math.random()*y),tiltAngle:(Math.random()*.5+.25)*Math.PI,tick:0,totalTicks:g,decay:u,drift:m,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:d*3,scalar:E,flat:b,color:new dt(P)})}}frameUpdate(t){this.fettis.length&&(this.fettis=this.fettis.filter(e=>{e.shape.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.shape.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.velocity*=e.decay,e.flat?(e.wobble=0,e.wobbleX=e.shape.x+10*e.scalar,e.wobbleY=e.shape.y+10*e.scalar,e.tiltSin=0,e.tiltCos=0,e.random=1):(e.wobble+=e.wobbleSpeed,e.wobbleX=e.shape.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.shape.y+10*e.scalar*Math.sin(e.wobble),e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2);const s=e.tick++/e.totalTicks,n=e.shape.x+e.random*e.tiltCos,r=e.shape.y+e.random*e.tiltSin,a=e.wobbleX+e.random*e.tiltCos,o=e.wobbleY+e.random*e.tiltSin;return e.shape.setAttr("fill",e.color.setAlpha(1-s).toString()),e.shape.degree=lt(Math.PI/10*e.wobble),e.shape.scalarX=Math.abs(a-n)*.1,e.shape.scalarY=Math.abs(o-r)*.1,e.tick<e.totalTicks}))}}class vn{shapes;constructor(t){this.shapes=t}run(t){this.shapes.forEach(s=>{s.run(),t?.wall&&s.checkWall({wall:t.wall,bounce:t.bounce})});const e=this.shapes.length;for(let s=0,n=e-1;s<n;s++)for(let r=s+1;r<e;r++)this.shapes[s].checkCollision(this.shapes[r])}gravitate(){const t=this.shapes.length;this.shapes.forEach((e,s)=>{e.run();for(let n=s+1;n<t;n++)e.checkCollision(this.shapes[n]),e.gravitateTo(this.shapes[n])})}springChain(t){this.shapes.forEach((e,s)=>{s>0&&e.runSpringTo(this.shapes[s-1],t)})}springConnect(t){const e=v.parseNumber(t?.springLength,100);this.shapes.forEach(s=>{s.isDragging||this.shapes.filter(n=>n.id!==s.id).forEach(n=>{const r=re(s.x,s.y,n.x,n.y);s.runSpringTo({x:n.x-Math.cos(r)*e,y:n.y-Math.sin(r)*e},t)})})}springMass(t,e){const s=this.shapes.length,n=[];return this.shapes.forEach((r,a)=>{r.run(e),r.x>t.x+t.width?r.x=t.x:r.x<t.x&&(r.x=t.x+t.width),r.y>t.y+t.height?r.y=t.y:r.y<t.y&&(r.y=t.y+t.height);for(let o=a+1;o<s;o++)n.push([r.x,r.y,this.shapes[o].x,this.shapes[o].y,r.springMassTo(this.shapes[o],e)])}),n}polymorph(){if(this.shapes.length<2)throw new Error("shapes个数必须大于等于2");const t=this.shapes.length-1,e=new Array(t);for(let n=0;n<t;n++){const r=this.shapes[n].initPathD();this.shapes[n].frameStart();const a=this.shapes[n+1].initPathD();this.shapes[n+1].frameStart();const o=Math.max(r.polymorphPoints.length,a.polymorphPoints.length);e[n]=St.getPathInterpolator(r.expendFill(o),a.expendFill(o))}const s=new H({d:e[0](0)});return n=>{const r=v.maxDotNumber(t*n,6),a=Math.min(Math.floor(r),t-1),o=v.maxDotNumber(r-a,6);s.originD=e[a](o);const h=this.shapes[a].getAttr("fill","none"),c=this.shapes[a+1].getAttr("fill","none");typeof h=="string"&&typeof c=="string"&&s.setAttr("fill",dt.gradient(h,c,o).toString());const l=this.shapes[a].getAttr("stroke","none"),u=this.shapes[a+1].getAttr("stroke","none");return typeof l=="string"&&typeof u=="string"&&s.setAttr("stroke",dt.gradient(l,u,o).toString()),s}}polymorphGroup(){if(this.shapes.length<2)throw new Error("shapes个数必须大于等于2");let t=0,e;const s=[];this.shapes.forEach(o=>{let h;o instanceof at?(h=o,h.sortPathD()):(h=new at,h.addShape(o)),s.push(h),t<h.shapes.length&&(t=h.shapes.length,e=h)}),s.forEach(o=>{o!==e&&o.expendFill(e)});const n=[];s.forEach((o,h)=>{o.shapes.forEach((c,l)=>{n[l]=n[l]||[],n[l][h]=c})});const r=[];n.forEach(o=>{r.push(new vn(o).polymorph())});const a=new at;return r.forEach(o=>{a.addShape(o(0))}),o=>(r.forEach(h=>{h(o)}),a)}polymorphTween(t=6e3,e){const s=this.shapes.findIndex(o=>o instanceof at)>=0?this.polymorphGroup():this.polymorph(),n=s(0),r=e?.onUpdate,a=new Is({frameDuration:t});a.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(o,h)=>{s(o.t),r?.(o,h),e?.draw?.(n)}})),a.play()}static generatePointsShape(t,e,s,n){const r=[];for(let a=0;a<n;a++){const o=a/n*2*Math.PI,{dx:h,dy:c}=Pt(o,s);r.push({x:t+h,y:e+c})}return new ja({points:r})}static generateRosettaShape(t,e,s,n,r){if(r==0)throw new Error("no dividing by zero, please");const a=[],o=360/r;for(let h=0;h<r;h+=1){const c=o*h*Math.PI/180,l=t+2*s*Math.cos(c),u=e+2*s*Math.sin(c);a.push(new Gi({x:t,y:e,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),a.push(new Gi({x:l,y:u,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new H({d:St.fromLines(a)})}}const Za={map:new Map,transform:function(i){if(Ur)return i;if(this.map.has(i))return this.map.get(i);const t=new OffscreenCanvas(i.width,i.height);return t.getContext("2d")?.drawImage(i,0,0),this.map.set(i,t),t},clear:function(){this.map.clear()}};function kf(i,t,e){const s=new OffscreenCanvas(i,t),n=s.getContext("2d");if(n)return e(n),s.transferToImageBitmap()}function Df(i,t,e){const s=i.createPattern(Za.transform(t),"no-repeat");if(s){const n=Qi(e);s.setTransform(n),i.fillStyle=s}}function Ka(i){return window.URL.createObjectURL(i)}function Rf(i){return window.URL.revokeObjectURL(i)}const Qa=new v.CacheMap;async function to(i,t=6e4){return new Promise((e,s)=>{const n=typeof i=="string"?i:Ka(i),r=Qa.get(n);if(r)return e(r);const a=document.createElement("img");a.onload=()=>{clearTimeout(o);const h=a.naturalWidth||a.width,c=a.naturalHeight||a.height,l={width:h,height:c,aspectRatio:h/c,element:a,imageData:Pa(a)};Qa.set(n,l),e(l),a.onerror=a.onload=null},a.onerror=h=>{clearTimeout(o),s(h)},a.src=n;const o=setTimeout(()=>{s("Timeout!")},t)})}async function Tn(i=v.ReadInBrowserEnum.text,t=["*"]){const s=(await Mi(t))[0],n=await Ue(s,i);return{type:s.type,name:s.name,size:s.size,data:n}}async function Lf(i=["image/*"]){const e=(await Mi(i))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await Ue(e,v.ReadInBrowserEnum.arraybuffer),n=v.toBlob(s),r=await to(n);return{type:e.type,name:e.name,size:e.size,data:s,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function zf(i,t){const e=t.ctrl||!1,s=t.shift||!1,n=t.alt||!1;return(e===i.metaKey||e===i.ctrlKey)&&s===i.shiftKey&&n===i.altKey&&t.keys.map(r=>r.toLowerCase()).includes(i.key.toLowerCase())}function _n(i,t,e){const s=i.target||document||window;let n=!1,r=!1;const a=N(s,"keydown",async h=>{r||(n=zf(h,i),n&&(h.stopPropagation(),h.preventDefault(),await t()))}),o=N(s,"keyup",async h=>{r||n&&e&&(h.stopPropagation(),h.preventDefault(),await e())});return{hotKeys:function(h){const c=[];return h.ctrl&&c.push(Ai()?"Cmd":"Ctrl"),h.shift&&c.push("Shift"),h.alt&&c.push("Alt"),c.push(...h.keys),c},destroy:()=>{a(),o()},pause:()=>r=!0,resume:()=>r=!1}}const Of={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function Bf(i){if(i.key)return i.key;if(i.keyCode)return i.keyCode;if(i.which)return i.which}async function Nf(i={keys:["o"]},t=v.ReadInBrowserEnum.text){const e=v.deferred(),s=_n(i,async()=>{try{e.resolve(await Tn(t))}catch(n){e.reject(n)}s.destroy()},()=>{});return await e.promise}function Ff(i={keys:["o"]},t=v.ReadInBrowserEnum.text){const e=new v.EventBus;return _n(i,async()=>{try{e.emit("file",await Tn(t))}catch{}},()=>{}),{on:s=>{e.on("file",s)},off:s=>{e.off("file",s)}}}async function Yf(i,t=6e4){return new Promise((e,s)=>{const n=document.createElement("script");n.type="text/javascript",n.async=!1,n.onload=a=>{clearTimeout(r),e(a),n.onerror=n.onload=null},n.onerror=a=>{clearTimeout(r),s(a)},n.src=i;const r=setTimeout(()=>{s("Timeout!")},t);document.body.appendChild(n)})}async function Uf(i,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((s,n)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=o=>{clearTimeout(a),s(o),r.onerror=r.onload=null},r.onerror=o=>{clearTimeout(a),n(o)},r.setAttribute("href",i);const a=setTimeout(()=>{n("Timeout!")},e);t.appendChild(r)})}function Xf(){return new Promise(i=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const s=()=>e>=t.length?(i(),!0):!1;s()||t.forEach(n=>{n.onload=()=>{e+=1,s()}})})}function En(i,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof i=="string"?e.href=i:e.href=window.URL.createObjectURL(i),e.click()}const Mn=new v.CacheMap;function Pn(i,t){return v.objectSignature({url:i,...t})}async function Hs(i,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=Pn(i,t),s=new AbortController;Mn.set(e,s);const{responseType:n,onProgress:r,timeout:a}={responseType:"json",timeout:6e4,...t},o=setTimeout(()=>{throw s.abort(),new Error(`${a} ms Timeout!`)},a);let h=await fetch(new Request(i,{...t,signal:s.signal}));if(Mn.delete(e),clearTimeout(o),h.status===200||h.status===0){if(h.status===0&&v.warnLog("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&h.body&&h.body.getReader&&r){const c=h.body.getReader(),l=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),u=l?parseInt(l):0,d=u!==0;let m=0;const g=new ReadableStream({start(_){function E(){c.read().then(({done:b,value:S})=>{b?_.close():(m+=S.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:m,total:u})),_.enqueue(S),E())}).catch(b=>{_.error(b)})}E()}});h=new Response(g)}switch(n){case"arraybuffer":return await h.arrayBuffer();case"blob":return await h.blob();case"json":return await h.json();case"text":default:return await h.text()}}else return Promise.reject(h)}function Vf(i,t){const e=Mn.get(Pn(i,t));e&&e.abort()}function Gf(i=3,t){return v.retry(Hs,i,t)}function qf(i=6e4){return v.cache(Hs,i)}function Hf(i=6e4,t=3,e){return v.cache(v.retry(Hs,t,e),i)}function jf(i,t,e){if(typeof t=="string"&&(t=v.toCamel(t)),(typeof t=="string"||t===void 0)&&e===void 0){const s=Object.assign({},i.dataset);return Object.keys(s).forEach(n=>{if(s[n]?.startsWith("[")||s[n]?.startsWith("{"))try{s[n]=JSON.parse(s[n]||"")}catch{}}),typeof t=="string"?s[t]:s}else{let s={};typeof t=="object"?s=t:typeof t=="string"&&(s[t]=e),Object.entries(s).forEach(([n,r])=>{r?i.dataset[n]=r instanceof Object?JSON.stringify(r):r:delete i.dataset[n]})}}function Wf(i,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete i.dataset[e.trim()]})}function Cn(i,t,e="toggle"){const s=t.split(/[,\s]+/);if(i.classList)s.forEach(n=>{const r=n.trim();r!==""&&i.classList[e](r)});else{const n=i.className.split(/ +/);let r=!1;s.forEach(a=>{const o=a.trim();if(o!==""){const h=n.indexOf(o);switch(e){case"add":h===-1&&(n.push(o),r=!0);break;case"remove":h!==-1&&(n.splice(h,1),r=!0);break;case"toggle":h===-1?n.push(o):n.splice(h,1),r=!0;break}}}),r&&oe(i,"class",n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function $f(i,t){Cn(i,t,"add")}function Jf(i,t){Cn(i,t,"remove")}function Zf(i,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(i.className)||!1}function Kf(i,t){we(i,"display")=="none"&&t===void 0||t===!0?eo(i):so(i)}function eo(i){tn(i,"display",i instanceof HTMLTableRowElement?"table-row":i instanceof HTMLTableCellElement?"table-cell":"block")}function so(i){tn(i,"display","none")}function Qt(i){return{el:i,isRoot:()=>/(html|body)/i.test(i.tagName)||i===document.documentElement,isActive:()=>i===document.activeElement&&(i.type||i.href),getRemSize:function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)},rem2px:function(t){return t*this.getRemSize()},getEmSize:function(){return i.parentElement?parseFloat(getComputedStyle(i.parentElement).fontSize):this.getRemSize()},nearestElement:()=>{let t=i;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},parent:()=>i.parentElement,parents:function(t=i,e=[]){return!t||t.parentElement===null?e:this.parents(t.parentElement,e.concat([t]))},scrollParent:function(){const t=this.parents();for(let e=0,s=t.length;e<s;e++)if(/(auto|scroll)/.test(we(t[e],"overflow")+we(t[e],"overflow-y")+we(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement},contains:t=>i.contains?i!=t&&i.contains(t):!!(i.compareDocumentPosition(t)&16),siblings:()=>Array.prototype.slice.call(i.parentElement?.children).filter(t=>t!==i),nextElementSibling:()=>i.nextElementSibling,previousElementSibling:()=>i.previousElementSibling,closest:t=>i.closest(t),shadowRoot:()=>i.shadowRoot,isInput:()=>i.tagName==="INPUT"||i instanceof HTMLInputElement,isSelect:()=>i.tagName==="SELECT"||i instanceof HTMLSelectElement,isTextArea:()=>i.tagName==="TEXTAREA"||i instanceof HTMLTextAreaElement,isInputCheckbox:function(){return this.isInput(i)&&i.getAttribute("type")==="checkbox"},isInputRadio:function(){return this.isInput(i)&&i.getAttribute("type")==="radio"},isInputText:function(){return this.isInput(i)&&i.getAttribute("type")==="text"},isInputNumber:function(){return this.isInput(i)&&i.getAttribute("type")==="number"},changeSelected:function(t){if(this.isSelect()){const e=i.options;for(let s=0,n=e.length;s<n;s++)e[s].selected=e[s].value==t}},changeRadioChecked:function(t){if(this.isInputRadio()){const e=document.getElementsByName(i.name);for(let s=0,n=e.length;s<n;s++){const r=e[s];r.checked=r.value==t}}},changeCheckboxChecked:function(t){this.isInputCheckbox()&&(i.checked=t)},insert:(t,e="append")=>{typeof t=="string"?i[e](io(t)):i[e](t)},html:function(t){if(typeof t=="string"){i.innerHTML=t;const e=no(i);e!=i&&(i=e)}else this.insert(t,"replaceWith")},empty:function(){this.html("")},text:t=>{i.textContent=t},getInnerText:()=>{if(i instanceof SVGElement)return"";let t=i.innerText;if(!t){const e=i.querySelector("slot")?.assignedNodes()||[];let s=0;for(;!t&&s<=e.length-1;)"innerText"in e[s]&&(t=e[s].innerText),s++}return t},remove:()=>i.remove()}}function io(i,t=!1){const e=document.createElement("template");return e.innerHTML=i,t&&e.content.childNodes.forEach(s=>{const n=no(s);n!=s&&e.content.replaceChild(n,s)}),e.content}function Qf(i){return document.createElement.call(document,i)}function td(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function ed(i){return document.createTextNode.call(document,i)}function no(i){return i.tagName=="SCRIPT"&&(i=ro(i)),i.querySelectorAll&&i.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(ro(t),t)}),i}function ro(i){const t=i.ownerDocument.createElement("script");t.text=i.text;const e=i.attributes;for(let s=0,n=e.length;s<n;s++)t.setAttribute(e[s].name,e[s].value);return t}function sd(i){return{shadowRoot:()=>{let t=i;for(;t;){const e=i.parentElement||i.parentNode;if(e)t=e;else break}return t}}}function id(i,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(i,t)},4e3),setTimeout(function(){e.remove()},6e3)}async function nd(i){if(navigator.clipboard)return await navigator.clipboard.writeText(i);{const t=document.createElement("textarea");return t.value=i,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function rd(){return"geolocation"in navigator?new Promise((i,t)=>{navigator.geolocation.getCurrentPosition(e=>{const s=e.coords.latitude,n=e.coords.longitude;i({latitude:s,longitude:n})},e=>{t(e)})}):Promise.reject("Geolocation is not available.")}function ad(i=200){"vibrate"in navigator?window.navigator.vibrate(i):console.error("Your device is not support vibrate on this browser.")}function od(i){const t=new Proxy(window,{get(e,s,n){if(typeof s=="string"&&["open","location","document"].includes(s))throw new Error(`禁止访问 key: ${s}`);return s==="window"?t:Reflect.get(e,s,n)},set(e,s,n,r){return Reflect.set(e,s,n,r)}});new Function("window",`with(window) { ${i} }`)(t,null)}const hd={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(i,t)=>{switch(t){case"W":return`${i}周`;default:return`${i}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(i,t)=>{const e=i*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},cd={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i=>{const t=["th","st","nd","rd"],e=i%100;return`[${i}${t[(e-20)%10]||t[e]||t[0]}]`}},ue=new v.CacheMap;let js="zh-cn";In(cd),In(hd);function In(i,t){if(!i)return ue.get(js);let e;if(typeof i=="string"){const s=i.toLowerCase();if(ue.get(s))e=s;else if(t)ue.set(s,t),e=s;else return ue.get(js)}else{const{name:s}=i;ue.set(s,i),e=s}return e&&(js=e),ue.get(e)||ue.get(js)}function Te(i,t={},e=[],s){return{tag:i,props:t,children:e,el:s}}function Ws(i){return Te(i.tagName,nn(i),Array.from(i.children).map(t=>Ws(t)),i)}function ze(i,t=document.documentElement){if(i.el)return i.el;if(i.el=document.createElement(i.tag),i.props)for(const e in i.props){const s=i.props[e];e.startsWith("on")?i.el.addEventListener(e.slice(2).toLowerCase(),s):e==="style"?Fs(i.el,i.props[e]):De(i.el,e,s)}return i.children&&(typeof i.children=="string"?i.el.appendChild(document.createTextNode(i.children)):i.children.forEach(e=>{ze(e,i.el)})),t.appendChild(i.el),i.el}function $s(i,t){if(!i.el)return;if(i.tag!==t.tag){(i.el.parentElement||document.body).replaceChild(ze(t),i.el);return}const e=t.el=i.el,s=i.props,n=t.props;for(const o in s)o in n||(o.startsWith("on")?e.removeEventListener(o.slice(2).toLowerCase(),s[o]):e.removeAttribute(o));for(const o in n){const h=s[o],c=n[o];if(c!=h)if(o.startsWith("on")){const l=o.slice(2).toLowerCase();e.removeEventListener(l,h),e.addEventListener(l,c)}else if(o==="style"){for(const l in h)l in c||sn(e,l);Fs(e,c)}else De(e,o,c)}const r=i.children||[],a=t.children||[];if(typeof a=="string")e.innerHTML=a;else if(typeof r=="string")e.innerHTML="",a.forEach(o=>{ze(o,e)});else{const o=Math.min(r.length,a.length);for(let h=0;h<o;h++)$s(r[h],a[h]);a.length>r.length&&a.slice(r.length).forEach(h=>{ze(h,e)}),a.length<r.length&&r.slice(a.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class ld{state;el;constructor(t,e){this.state=v.reactive(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const s=e;[...s.attributes].forEach(o=>{const h=o.name,c=o.value;if(h==="v-model")if(Qt(s).isInputRadio()){const l=s;v.watchEffect(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else if(Qt(s).isInputCheckbox()){const l=s;v.watchEffect(()=>{l.checked=v.isInArray(this.getStateValue(c),l.value)}),l.addEventListener("change",u=>{const d=u.target,m=d.value;d.checked?v.appendUniqueArray(this.getStateValue(c),m):v.deleteArrayItem(this.getStateValue(c),m)})}else if(Qt(s).isSelect()){const l=s;v.watchEffect(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else{const l=s;v.watchEffect(()=>{l.value=this.getStateValue(c)});const u=d=>{this.setStateValue(c,d.target.value)};l.addEventListener("input",u)}else h==="v-text"?v.watchEffect(()=>{s.innerText=this.getStateValue(c)}):h==="v-html"&&v.watchEffect(()=>{s.innerHTML=this.getStateValue(c)})}),s.childNodes.length>0&&this.compile(s);break;case 3:const n=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,a=r.exec(n);a&&a[1]&&v.watchEffect(()=>{e.textContent=n.replace(r,this.getStateValue(a[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(s=>{e=e[s]}),e}setStateValue(t,e){let s=this.state;const n=t.split("."),r=n.length;for(let a=0;a<r-1;a++)s=s[n[a]];s[n[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
29
|
+
`))}p0();function g0(){return Fh(document.documentElement).pipe(pi(fi),rt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function y0(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new et(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((s,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),s()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(s=>{t.next({longitude:s.coords.longitude,latitude:s.coords.latitude})},s=>{t.error(s)},n)}).catch(s=>{t.error(s)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function cc(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return U(t,"change").pipe(rt(e=>e.matches),ue(t.matches),le())}function lc(){return ac(document).pipe(rt(()=>location),ue(location))}function w0(){return lc().pipe(rt(n=>n.href),ue(location.href),le())}function x0(){return U(window,"hashchange").pipe(rt(n=>n.target.location.hash.replace("#","")),ue(window.location.hash.replace("#","")),le())}function b0(){return U(window,"popstate").pipe(rt(n=>n.state),ue(null),le())}function v0(n,t,e){if(typeof t=="string"&&(t=E.toCamel(t)),(typeof t=="string"||t===void 0)&&e===void 0){const s=Object.assign({},n.dataset);return Object.keys(s).forEach(i=>{if(s[i]?.startsWith("[")||s[i]?.startsWith("{"))try{s[i]=JSON.parse(s[i]||"")}catch{}}),typeof t=="string"?s[t]:s}else{let s={};typeof t=="object"?s=t:typeof t=="string"&&(s[t]=e),Object.entries(s).forEach(([i,r])=>{r?n.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete n.dataset[i]})}}function _0(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function Pr(n,t){const e=Math.max(t?.aliveInSeconds||0,0),s=Math.max(t?.aliveUntilTimestamp||0,0);function i(a,o=!1){return E.isPrimitive(a)||!E.hasYZSymbol(a,E.SYMBOL_TIMESTAMP)?{v:a,[E.SYMBOL_TIMESTAMP]:E.milliseconds()}:o?a:{...a,[E.SYMBOL_TIMESTAMP]:E.milliseconds()}}let r=i(n,!0);return{get:()=>{let a=r.v;return(e&&E.milliseconds()>r[E.SYMBOL_TIMESTAMP]+e*1e3||s&&E.milliseconds()>s)&&(a=void 0),{value:typeof a<"u"?r:void 0,rawValue:a}},set:a=>r=i(a)}}function uc(n,t){const e=typeof n=="string"?n:n.toString();let s=t?.initValue;if(typeof s>"u")try{const o=window.localStorage.getItem(e);o&&(s=E.parse(o))}catch{}const{get:i,set:r}=Pr(s,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),a=E.ref(i().value);return E.watchEffect(()=>{if(typeof a.value<"u")try{window.localStorage.setItem(e,E.stringify(a.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const o=i();return a.value=o.value,o.rawValue},set:o=>a.value=r(o)}}function S0(){window.localStorage.clear()}const{get:fc,set:E0}=uc(E.createYZSymbol("theme")),dc=new ui,T0=dc.pipe(ue(void 0));function mc(n){switch(E0(n),n){case"dark":document.documentElement.classList.add("dark"),Je(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),Je(document.documentElement,"data-theme","light");break}return dc.next(n),n}function P0(){return mc(fc()=="dark"?"light":"dark")}function M0(){return pf([T0,cc("(prefers-color-scheme: dark)")]).pipe(rt(([n,t])=>{if(n)return n;const e=fc();return e||(t?"dark":"light")}))}function C0(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function A0(n,t){document.documentElement.style.setProperty(n,t)}function I0(n,t){const e=typeof n=="string"?n:n.toString();let s=t?.initValue;if(typeof s>"u")try{const o=window.sessionStorage.getItem(e);o&&(s=E.parse(o))}catch{}const{get:i,set:r}=Pr(s,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),a=E.ref(i().value);return E.watchEffect(()=>{if(typeof a.value<"u")try{window.sessionStorage.setItem(e,E.stringify(a.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const o=i();return a.value=o.value,o.rawValue},set:o=>a.value=r(o)}}function k0(){window.sessionStorage.clear()}function D0(n,t){const e=E.ref(t?.value||"");if(!e.value){const s=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();s&&(e.value=decodeURIComponent(s))}return E.watchEffect(()=>{if(e.value&&t?.days){const s="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),i=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",a=t?.secure==!0?"; secure":"";document.cookie=n+"="+encodeURIComponent(e.value)+s+i+r+a}}),{get:()=>e.value,set:s=>e.value=s}}function L0(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const s=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=s+"/";i.length>0;)document.cookie=s+i.join("/"),i.pop();e.shift()}}}function R0(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function O0(n,t=1,e){return new Promise((s,i)=>{let r;const a=window.indexedDB.open(n,t);a.onerror=()=>{i("无法使用IndexDB!")},a.onsuccess=o=>{r=o.target.result,R0(r,e),s(r)}})}function z0(n,t,e={id:1,name:"xxx"}){return new Promise((s,i)=>{const r=n.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=o=>{s(o)},r.onerror=o=>{i(o)}})}const Mr=new E.CacheMap;function Cr(n,t){return E.objectSignature({url:n,...t})}async function _n(n,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=Cr(n,t),s=new AbortController;Mr.set(e,s);const{responseType:i,onProgress:r,timeout:a}={responseType:"json",timeout:6e4,...t},o=setTimeout(()=>{throw s.abort(),new Error(`${a} ms Timeout!`)},a);let h=await fetch(new Request(n,{...t,signal:s.signal}));if(Mr.delete(e),clearTimeout(o),h.status===200||h.status===0){if(h.status===0&&E.warnLog("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&h.body&&h.body.getReader&&r){const c=h.body.getReader(),l=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),u=l?parseInt(l):0,d=u!==0;let f=0;const p=new ReadableStream({start(y){function v(){c.read().then(({done:w,value:S})=>{w?y.close():(f+=S.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:f,total:u})),y.enqueue(S),v())}).catch(w=>{y.error(w)})}v()}});h=new Response(p)}switch(i){case"arraybuffer":return await h.arrayBuffer();case"blob":return await h.blob();case"json":return await h.json();case"text":default:return await h.text()}}else return Promise.reject(h)}function N0(n,t){const e=Mr.get(Cr(n,t));e&&e.abort()}function B0(n=3,t){return E.retry(_n,n,t)}function F0(n=6e4){return E.cache(_n,n)}function Y0(n=6e4,t=3,e){return E.cache(E.retry(_n,t,e),n)}const X0={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},U0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},be=new E.CacheMap;let Sn="zh-cn";Ar(U0),Ar(X0);function Ar(n,t){if(!n)return be.get(Sn);let e;if(typeof n=="string"){const s=n.toLowerCase();if(be.get(s))e=s;else if(t)be.set(s,t),e=s;else return be.get(Sn)}else{const{name:s}=n;be.set(s,n),e=s}return e&&(Sn=e),be.get(e)||be.get(Sn)}function Be(n,t={},e=[],s){return{tag:n,props:t,children:e,el:s}}function En(n){return Be(n.tagName,Ji(n),Array.from(n.children).map(t=>En(t)),n)}function Qe(n,t=document.documentElement){if(n.el)return n.el;if(n.el=document.createElement(n.tag),n.props)for(const e in n.props){const s=n.props[e];e.startsWith("on")?n.el.addEventListener(e.slice(2).toLowerCase(),s):e==="style"?un(n.el,n.props[e]):Je(n.el,e,s)}return n.children&&(typeof n.children=="string"?n.el.appendChild(document.createTextNode(n.children)):n.children.forEach(e=>{Qe(e,n.el)})),t.appendChild(n.el),n.el}function Tn(n,t){if(!n.el)return;if(n.tag!==t.tag){(n.el.parentElement||document.body).replaceChild(Qe(t),n.el);return}const e=t.el=n.el,s=n.props,i=t.props;for(const o in s)o in i||(o.startsWith("on")?e.removeEventListener(o.slice(2).toLowerCase(),s[o]):e.removeAttribute(o));for(const o in i){const h=s[o],c=i[o];if(c!=h)if(o.startsWith("on")){const l=o.slice(2).toLowerCase();e.removeEventListener(l,h),e.addEventListener(l,c)}else if(o==="style"){for(const l in h)l in c||Wi(e,l);un(e,c)}else Je(e,o,c)}const r=n.children||[],a=t.children||[];if(typeof a=="string")e.innerHTML=a;else if(typeof r=="string")e.innerHTML="",a.forEach(o=>{Qe(o,e)});else{const o=Math.min(r.length,a.length);for(let h=0;h<o;h++)Tn(r[h],a[h]);a.length>r.length&&a.slice(r.length).forEach(h=>{Qe(h,e)}),a.length<r.length&&r.slice(a.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class V0{state;el;constructor(t,e){this.state=E.reactive(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const s=e;[...s.attributes].forEach(o=>{const h=o.name,c=o.value;if(h==="v-model")if(nr(s)){const l=s;E.watchEffect(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else if(sr(s)){const l=s;E.watchEffect(()=>{l.checked=E.isInArray(this.getStateValue(c),l.value)}),l.addEventListener("change",u=>{const d=u.target,f=d.value;d.checked?E.appendUniqueArray(this.getStateValue(c),f):E.deleteArrayItem(this.getStateValue(c),f)})}else if(er(s)){const l=s;E.watchEffect(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else{const l=s;E.watchEffect(()=>{l.value=this.getStateValue(c)});const u=d=>{this.setStateValue(c,d.target.value)};l.addEventListener("input",u)}else h==="v-text"?E.watchEffect(()=>{s.innerText=this.getStateValue(c)}):h==="v-html"&&E.watchEffect(()=>{s.innerHTML=this.getStateValue(c)})}),s.childNodes.length>0&&this.compile(s);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,a=r.exec(i);a&&a[1]&&E.watchEffect(()=>{e.textContent=i.replace(r,this.getStateValue(a[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(s=>{e=e[s]}),e}setStateValue(t,e){let s=this.state;const i=t.split("."),r=i.length;for(let a=0;a<r-1;a++)s=s[i[a]];s[i[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
29
30
|
let output = "";
|
|
30
31
|
function echo(html){
|
|
31
32
|
output += html;
|
|
32
33
|
}
|
|
33
34
|
${t}
|
|
34
35
|
return output;
|
|
35
|
-
})`}}class
|
|
36
|
-
`)):d.send(Object.entries(r).map(([
|
|
37
|
-
Content-Type: `+
|
|
36
|
+
})`}}class $0{requestid=0;url;socket;waitings={};messageQueue=[];constructor(t){this.url=t,this._connect()}_connect(){this.socket=new WebSocket(this.url),this.socket.onopen=()=>{const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send)},this.socket.onclose=t=>{const{code:e,reason:s,wasClean:i}=t;console.log(`ws(${this.url}) closed : ${e} ${s} ${i}`)},this.socket.onerror=t=>{console.log(`ws(${this.url}) error : ${t.type}`)},this.socket.onmessage=t=>{if(typeof t.data=="string")try{const e=JSON.parse(t.data);if(Object.prototype.hasOwnProperty.call(e,"requestid")){const s=this.waitings[e.requestid];s&&s.resolve?.(e)}}catch{}else t.data instanceof ArrayBuffer||t.data instanceof Blob}}_send(t){this.socket?.readyState===WebSocket.OPEN?this.socket.send(t):(this.messageQueue.push(t),this._connect())}open(){this._connect()}close(){this.socket&&this.socket.close()}async send(t,e=5e3){this.requestid++;const s=this.waitings[this.requestid]={requestid:this.requestid};let i;t instanceof Blob||t instanceof ArrayBuffer||typeof t=="string"?i=t:i=JSON.stringify({...s,...t});const r=await new Promise((a,o)=>{s.resolve=a,this._send(i),setTimeout(()=>{o("Timeout!")},e)});return delete this.waitings[this.requestid],r}}function G0(n){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let s=100;const i=function(){const r=Math.min(t.clientWidth,n);t.dataset.width=r,t.dataset.rem=s=Math.round(100*(r/n)),t.style.fontSize=s+"px"};i(),window.rem2px=function(r){return r=parseFloat(r),r*s},window.px2rem=function(r){return r=parseFloat(r),r/s},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}function Pn(n=window.location.href){try{return new URL(n)}catch{const e="(?<protocol>https?:)",s="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",a="(?<hash>(?:#.*)?)",h=new RegExp(`^${e}//${s}${i}${r}${a}$`).exec(n);return{href:n,protocol:h?.groups?.protocol??"",host:h?.groups?.host??"",hostname:h?.groups?.hostname??"",port:h?.groups?.port??"",pathname:h?.groups?.pathname??"",search:h?.groups?.search??"",hash:h?.groups?.hash??""}}}function q0(n){const t=Pn(n);return t.protocol==="http:"||t.protocol==="https:"}function pc(n=window.location.href){const t=Pn(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function j0(n=Pn().search){n=decodeURIComponent(n).replace(/^[#?&]/,"");const t={};if(!n)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let s=e.exec(n);for(;s;)t[s[1]]=s[2],s=e.exec(n);return t}const H0=(n=window.location.href)=>JSON.parse('{"'+decodeURI(n.split("?")[1]).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');function Mn(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function gc(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function yc(n,t){return n.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function W0(n,t){return yc(n,Mn(t))}function Ir(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function J0(n,t){return Ir(n,Mn(t))}class Z0{worker;cbs={};constructor(t){if(bo)try{this.worker=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){throw typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),e}else throw new Error("Your environment do not support Worker !")}postMessage(t,e=[]){this.worker.postMessage(t,e)}onmessage(t){this.worker.addEventListener("message",t)}offmessage(t){this.worker.removeEventListener("message",t)}onmessageerror(t){this.worker.addEventListener("messageerror",t)}offmessageerror(t){this.worker.removeEventListener("messageerror",t)}postCanvas(t){const e=t.transferControlToOffscreen();this.worker.postMessage({canvas:e},[e])}postPort(t){this.worker.postMessage({port:t},[t])}postReset(){this.worker.postMessage({reset:!0});for(const t in this.cbs)this.cbs[t](),delete this.cbs[t]}fire(t,e){return new Promise(s=>{if(e){const i=Math.random().toString(36).slice(2),r=a=>{a.data.id===i&&(this.worker.removeEventListener("message",r),delete this.cbs[i],e(),s())};this.cbs[i]=r.bind(this,{data:{id:i}}),this.worker.addEventListener("message",r),this.worker.postMessage({...t,id:i})}else this.worker.postMessage(t),s()})}}class K0{port1;port2;port1MessageCbs=[];port2MessageCbs=[];port1MessageErrorCbs=[];port2MessageErrorCbs=[];constructor(){const{port1:t,port2:e}=new MessageChannel;this.port1=t,this.port2=e,this.port1.addEventListener("message",s=>{this.port1MessageCbs.forEach(i=>i(this.port1,s))}),this.port1.addEventListener("messageerror",s=>{this.port1MessageErrorCbs.forEach(i=>i(this.port1,s))}),this.port1.start(),this.port2.addEventListener("message",s=>{this.port2MessageCbs.forEach(i=>i(this.port2,s))}),this.port2.addEventListener("messageerror",s=>{this.port2MessageErrorCbs.forEach(i=>i(this.port2,s))}),this.port2.start()}close(){this.port1.close(),this.port2.close()}onPort1Message(t){this.port1MessageCbs.push(t)}onPort1MessageError(t){this.port1MessageErrorCbs.push(t)}offPort1Message(t){E.deleteArrayItem(this.port1MessageCbs,t)}offPort1MessageError(t){E.deleteArrayItem(this.port1MessageErrorCbs,t)}onPort2Message(t){this.port2MessageCbs.push(t)}onPort2MessageError(t){this.port2MessageErrorCbs.push(t)}offPort2Message(t){E.deleteArrayItem(this.port2MessageCbs,t)}offPort2MessageError(t){E.deleteArrayItem(this.port2MessageErrorCbs,t)}}function wc(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,s=t.length;e<s;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function Q0(n,t){return new Promise((e,s)=>{const{method:i="GET",data:r={},multipartFormDataString:a="",boundary:o="",headers:h={},withCredentials:c=!1,responseType:l="json",timeout:u=3e4}=t||{},d=wc();d.timeout=u,d.responseType=l,d.onreadystatechange=function(S){d.readyState===4&&(d.status===200?e(d.response):s(d.statusText))},d.ontimeout=()=>{s(`${n} is timed out for ${u}ms.`)},d.addEventListener("load",S=>t?.load?.(S,d),!1),d.addEventListener("loadstart",S=>t?.loadstart?.(S,d),!1),d.addEventListener("loadend",S=>t?.loadend?.(S,d),!1),d.addEventListener("progress",S=>{if(S.lengthComputable){const x=Math.round(S.loaded*100/S.total);t?.progress?.(S,d,x)}},!1),d.addEventListener("error",S=>t?.error?.(S,d),!1),d.addEventListener("abort",S=>t?.abort?.(S,d),!1);const f=i.toUpperCase();Object.assign(h,{Accept:"*/*"});let p=!1,y=!1,v=!1;function w(){c&&(d.withCredentials=!0);for(const S in h)E.toKebab(S).toLowerCase()=="content-type"&&h[S].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+o)):(E.toKebab(S).toLowerCase()=="content-type"&&(h[S].toLowerCase().indexOf("text/plain")>=0?y=!0:h[S].toLowerCase().indexOf("application/json")>=0&&(v=!0)),d.setRequestHeader(S,h[S]))}switch(f){case"GET":let S="";r instanceof FormData?S=gc(r):S=Mn(r),d.open("GET",Ir(n,S),!0),w(),d.send(null);break;default:d.open(f,n,!0),w(),p?d.sendAsBinary(a):v?d.send(JSON.stringify(r)):y?d.send(Object.entries(r).map(([x,b])=>`${x}=${b}`).join(`\r
|
|
37
|
+
`)):d.send(Object.entries(r).map(([x,b])=>`${encodeURIComponent(x)}=${encodeURIComponent(b)}`).join("&"));break}})}async function t1(n){const t={url:n.action||"",data:{},contentType:n.method.toLowerCase()==="post"&&n.enctype?n.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],s=t.contentType=="multipart/form-data";for(let i=0;i<n.elements.length;i++){const r=n.elements[i];if(!r.hasAttribute("name"))continue;const a=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&a?a.toUpperCase():""){case"FILE":const h=r;if(s)for(let u=0,d=h.files?.length||0;u<d;u++){const f=h.files?.[u];if(f){const p=await rs(f,E.ReadInBrowserEnum.binaryString);e.push('Content-Disposition: form-data; name="'+h.name+'"; filename="'+f.name+`"\r
|
|
38
|
+
Content-Type: `+f.type+`\r
|
|
38
39
|
\r
|
|
39
|
-
`+
|
|
40
|
+
`+p+`\r
|
|
40
41
|
`)}}break;case"RADIO":case"CHECKBOX":if(!r.checked)break;default:const l=r;s?e.push('Content-Disposition: form-data; name="'+l.name+`"\r
|
|
41
42
|
\r
|
|
42
43
|
`+l.value+`\r
|
|
43
44
|
`):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
44
45
|
`+e.join("--"+t.boundary+`\r
|
|
45
46
|
`)+"--"+t.boundary+`--\r
|
|
46
|
-
`,t}class
|
|
47
|
+
`,t}class e1 extends dr{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=mr(e);for(const i of s.stylesheet.rules)for(const r of i.declarations)for(const a of i.selectors)this.globalStyles[a]=this.globalStyles[a]||[],this.globalStyles[a].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,s)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",a="";for(const o in this.groups[i])o=="transform"?r=this.groups[i].transform:o=="class"&&this.globalStyles["."+this.groups[i][o]]?a=this.globalStyles["."+this.groups[i][o]].join(";")+";"+a:o=="id"&&this.globalStyles["#"+this.groups[i][o]]?a=this.globalStyles["#"+this.groups[i][o]].join(";")+";"+a:typeof this.currentItem[o]>"u"&&(this.currentItem[o]=this.groups[i][o]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=a:this.currentItem.style=a+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),Dr(this.currentItem.style,this.currentItem,Lr)}switch(this.processAttrs(e,s),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let s=[],i;switch(t){case"svg":let r="",a="";if(e.width&&e.height)r=e.width,a=e.height;else if(e.viewBox){const o=e.viewBox.split(/\s+/gi);o.length==4&&(r=String(parseFloat(o[2])-parseFloat(o[0])),a=String(parseFloat(o[3])-parseFloat(o[1])))}r&&a&&this.items.push({type:"viewbox",width:r,height:a});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&Dr(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+kr(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break}for(const r in e){const a=e[r];if(Lr.includes(r)&&(this.currentItem[r]=a),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&Dr(a,this.currentItem,Lr),r==="transform"&&(this.currentItem.transform=a+(this.currentItem.transform||" ")),r==="fill"){const o=a.match(/url\(#([^)]+)\)/);if(o){const h=o[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+a+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=a),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=a)}}addToItems(){this.items.push(this.currentItem)}}function kr(n,t,e,s,i,r){if(typeof i>"u"||typeof r>"u"){const a=n-e,o=t-s;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return kr(n,t,i,r)-kr(e,s,i,r)}function Dr(n,t,e){const s=(n+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,a=s.length;r<a;r++){const o=s[r].split(":"),h=o[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=o[1].replace(i,""))}}const Lr=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class s1{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Ps(t),this.remoteVideoUtil=new Ps(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(s=>{this.localVideoUtil.setSrcObject(s),t(s)}).catch(s=>{this.trace(`navigator.getUserMedia error: ${s}.`),e(s)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),s=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),s.length>0&&this.trace(`Using audio device: ${s[0].label}.`);const i=void 0,r=new RTCPeerConnection(i);this.localPeerConnection=r,this.trace("Created local peer connection object localPeerConnection."),r.addEventListener("icecandidate",this.handleConnection),r.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const a=new RTCPeerConnection(i);this.remotePeerConnection=a,this.trace("Created remote peer connection object remotePeerConnection."),a.addEventListener("icecandidate",this.handleConnection),a.addEventListener("iceconnectionstatechange",this.handleConnectionChange),a.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(s[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(o=>this.createdOffer(o)).catch(o=>this.setSessionDescriptionError(o))}handleConnection(t){const e=t.target,s=t.candidate;if(e&&s){const i=new RTCIceCandidate(s),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(a=>{this.handleConnectionFailure(e,a)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
47
48
|
${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
|
|
48
49
|
${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
|
|
49
50
|
${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
|
|
50
|
-
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const s=this.getPeerName(t);this.trace(`${s} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const s=document.createElement("div");s.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(s)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class Ed{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const lo=[],uo={};function kn(i){lo.push(i)}function Md(i,t=!1){const e=ao();if(uo[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{lo.forEach(r=>r())});const s=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],n=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(i,{debug:t,jsApiList:s,openTagList:n})),uo[e]=!0}function Pd(i){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[i],success:function(s){s.checkResult[i]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Cd(i){kn(function(){wx.updateAppMessageShareData(i)})}function Id(i){kn(function(){wx.updateTimelineShareData(i)})}function Ad(i){wx.chooseImage(i)}function kd(i){wx.previewImage(i)}function Dd(i){wx.uploadImage(i)}function Rd(i){wx.downloadImage(i)}function Ld(i){wx.getLocalImgData(i)}function zd(){wx.startRecord()}function Od(i){wx.stopRecord(i)}function Bd(i){wx.onVoiceRecordEnd(i)}function Nd(i){wx.playVoice(i)}function Fd(i){wx.pauseVoice(i)}function Yd(i){wx.stopVoice(i)}function Ud(i){wx.onVoicePlayEnd(i)}function Xd(i){wx.uploadVoice(i)}function Vd(i){wx.downloadVoice(i)}function Gd(i){wx.translateVoice(i)}function qd(i){wx.getNetworkType(i)}function Hd(i){wx.openLocation(i)}function jd(i){wx.getLocation(i)}function Wd(i){wx.scanQRCode(i)}function $d(i,t,e){function s(){WeixinJSBridge.invoke("getBrandWCPayRequest",i,function(n){n.err_msg=="get_brand_wcpay_request:ok"?t():e(n.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",s),document.attachEvent("onWeixinJSBridgeReady",s)):s()}function Jd(i,t,e="snsapi_userinfo",s=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${i}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${s}#wechat_redirect`}function Zd(i){window.AlipayJSBridge?i&&i():document.addEventListener("AlipayJSBridgeReady",i,!1)}function rs(i,t){let e="未知错误";switch(i.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${i.error}(${e}): ${i.errorMessage}`}function Kd(i,t,e){ap.tradePay(Object.assign(i,{}),function(s){let n="未知错误";switch(s.resultCode){case 9e3:return n="订单支付成功",t?.(n);case 8e3:n="正在处理中";break;case 4e3:n="订单支付失败";break;case 6001:n="用户中途取消";break;case 6002:n="网络连接出错";break;case 99:n="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(n)})}function Qd(i,t,e){ap.scan(Object.assign(i,{fail:s=>{e?.(rs(s))}}),function(s){t?.(s.code)})}function tm(i,t,e){ap.getLocation(Object.assign(i,{fail:s=>{e?.(rs(s))}}),function(s){t?.(s)})}function em(i,t,e){ap.openLocation(Object.assign(i,{fail:s=>{e?.(rs(s))}}),function(){t?.()})}function sm(i,t,e){ap.chooseImage(Object.assign(i,{fail:s=>{e?.(rs(s,"chooseImage"))}}),function(s){t?.(s)})}function im(i,t,e){ap.previewImage(Object.assign(i,{fail:s=>{e?.(rs(s))}}),function(){t?.()})}class nm{map;constructor(t,e=120.619585,s=31.299379,n=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,s),n)}}class rm{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,s){this.currentPage=s?.currentPage||0,this.itemsPerPage=s?.itemsPerPage||10,this.entriesInterval=s?.entriesInterval||5,this.entriesEdge=s?.entriesEdge||1,this.linkTo=s?.linkTo||"javascript:;",this.prevText=s?.prevText||"上一页",this.nextText=s?.nextText||"下一页",this.ellipseText=s?.ellipseText||"...",this.prevShowAlways=typeof s?.prevShowAlways=="boolean"?s?.prevShowAlways:!0,this.nextShowAlways=typeof s?.nextShowAlways=="boolean"?s?.nextShowAlways:!0,this.callback=s?.callback||(n=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),ze(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return Te("div",{class:"pagination"},[])}appendVNode(t,e,s){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const n=s?.text||String(e+1),r=s?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?Te("span",{class:`current ${r}`},n):Te("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:a=>this.selectPage(e,a)},n))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),s=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,n=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),s>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,s);for(let a=0;a<r;a++)this.appendVNode(t,a);this.entriesEdge<s&&this.ellipseText&&t.children.push(Te("span",{},this.ellipseText))}for(let r=s;r<n;r++)this.appendVNode(t,r);if(n<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>n&&this.ellipseText&&t.children.push(Te("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,n);for(let a=r;a<this.totalPages;a++)this.appendVNode(t,a)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),$s(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const s=this.callback(t);return e&&(s||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),s}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}return f.Arrow=df,f.BezierEasing=Bi,f.BufferAttribute=Xt,f.COLOR_NAMES=ss,f.CSSToJSEasing=fl,f.Clock=Yi,f.Color=dt,f.ColorManagement=mn,f.CommonKeyCode=Of,f.Confetti=Af,f.Cross=xf,f.CustomCanvasContext=qe,f.CustomCanvasGradient=zs,f.CustomCanvasPattern=Vi,f.DOMParse=Xa,f.DOMSVGUtil=ye,f.DOMToBlob=Ar,f.DOMToString=Ei,f.DOMVideo=is,f.Easing=O,f.Ellipse=Wa,f.FetchWithAxios=_i,f.FetchWithAxiosRequestCancel=Ir,f.FileUpload=dc,f.Float16BufferAttribute=hf,f.Float32BufferAttribute=cf,f.Fox=mf,f.HalfRing=bn,f.HalfRingIndicator=Ef,f.Heart=gf,f.HeartVariant=pf,f.Int16BufferAttribute=nf,f.Int32BufferAttribute=af,f.Int8BufferAttribute=tf,f.Interpolation=Ht,f.Line=ve,f.LinePicture=ff,f.LineQuadraticBezier=lf,f.LinearSRGBColorSpace=fn,f.LinearToSRGB=be,f.LinearTransfer=dn,f.Ls=ue,f.MVVM=ld,f.Matrix=wt,f.Matrix2=Ji,f.Matrix3=Ae,f.Matrix4=yt,f.NoColorSpace=Oa,f.Pagination=rm,f.Point=Zt,f.Point3D=$e,f.Point3Ds=If,f.Points=ja,f.QRCode=le,f.Rabbit=wf,f.Rect=Kt,f.Ring=Sn,f.RingIndicator=Mf,f.SRGBColorSpace=Se,f.SRGBToLinear=xe,f.SRGBTransfer=qs,f.SVGParse=Ha,f.SVGParsedPathArgsLength=We,f.Sector=Sf,f.SectorArc=Ja,f.Segment=_f,f.Shape=H,f.ShapeCombo=vn,f.ShapeGroup=at,f.Ship=vf,f.Slider=Tf,f.Star=yf,f.TWEEN=bl,f.Text=ns,f.Timeline=Is,f.Tip=$a,f.Tree=bf,f.Tween=Fi,f.Uint16BufferAttribute=rf,f.Uint32BufferAttribute=of,f.Uint8BufferAttribute=ef,f.Uint8ClampedBufferAttribute=sf,f.Vector2=Je,f.Vector3=vt,f.Vector4=ji,f.WebGLCoordinateSystem=Ze,f.WebGLRenderer=Ed,f.WebGPUCoordinateSystem=$i,f.WebRTCClient=_d,f.WebSocketClient=ud,f.YZCanvas=vd,f.YZCanvasContext=Os,f.YZMessageChannel=xd,f.YZSVG=uf,f.YZWorker=wd,f.__color=Ot,f.addClass=$f,f.addWatermark=Wu,f.addWxJsReadyFnBeforeConfig=kn,f.ajax=bd,f.aliJsChooseImage=sm,f.aliJsGetLocation=tm,f.aliJsOpenLocation=em,f.aliJsPreviewImage=im,f.aliJsReady=Zd,f.aliJsScan=Qd,f.aliJsTradePay=Kd,f.angle=re,f.appendURL=An,f.appendURLRecord=yd,f.atomReadAttribute=la,f.atomReadAttributes=nn,f.atomReadStyle=zl,f.atomReadStyles=en,f.atomRemoveAttribute=Nl,f.atomRemoveDataset=Wf,f.atomRemoveStyle=sn,f.atomWriteAttribute=De,f.atomWriteStyle=Fs,f.base64EncodeOutputStream=Aa,f.bitmapMapper=Za,f.blobToImageData=bu,f.byteArrayOutputStream=un,f.canDrawBitmap=Ur,f.canUsePaths=Wc,f.canUseWorker=Yr,f.cancelBubble=Lr,f.cancelFetch=Vf,f.changeBrightness=Hu,f.changeDiaphaneity=ju,f.changeSize=qu,f.checkWxJsApi=Pd,f.clearCookies=gc,f.clearLocalStorage=pc,f.clearSessionStorage=wc,f.combineTransformToMatrix=Ol,f.compareVersion=Rc,f.computeImageDisplayRect=pu,f.createElement=Qf,f.createElementNS=td,f.createFragment=io,f.createIndexDB=bc,f.createObjectURL=Ka,f.createRunCycleInMaxRate=Qc,f.createTextNode=ed,f.createXMLHttpRequest=co,f.distance=Ds,f.distance2=Rs,f.domPrefixes=Bl,f.drawBitmapInCanvas=Df,f.drawQRCodeToCanvas=Qu,f.easeNameToCubicBezier=Ni,f.flipSideToSide=vu,f.flipUpsideDown=Tu,f.flushURL=ho,f.flushURLRecord=pd,f.formDataToSearch=oo,f.getBitmapFromCanvas=kf,f.getBodyPosition=Xl,f.getBrowserClient=Ci,f.getBrowserClientVersion=Lc,f.getBrowserLanguage=zc,f.getCSSVar=ya,f.getDOMMatrix=Qi,f.getDirection=Tl,f.getDocumentElementPosition=Ke,f.getElementPositionInPage=rn,f.getElementPositionInPage2=Gl,f.getElementPositionInViewport=fa,f.getFetchId=Pn,f.getFileExtension=uc,f.getFileMD5Hash=Dr,f.getFileTypeFromFile=lc,f.getFormSubmitData=Sd,f.getImageData=Pa,f.getImageDataByAIData=Ju,f.getImageMainColor=Su,f.getInternetExplorerVersion=Or,f.getKeyCode=Bf,f.getMIME=fc,f.getMouseButton=kc,f.getMousePositionInElement=Re,f.getMousePositionInPage=an,f.getMousePositionInViewport=jl,f.getOperatingSystem=_s,f.getOperatingSystemVersion=Dc,f.getPageSize=Vl,f.getParameters=gd,f.getRelativeBoundingClientRect=ql,f.getScreenPosition=Ul,f.getStyle=we,f.getTheme=iu,f.getTimeZone=Oc,f.getURL=Js,f.getVerticalScrollPercentInPage=Hl,f.getViewportSize=ua,f.getVnode=Ui,f.gifImage=ka,f.h=Te,f.hFromEl=Ws,f.hasClass=Zf,f.hasDocument=qc,f.hasHistory=Hc,f.hasWindow=Fr,f.hideEl=so,f.iframePostMessage=id,f.imageDataToBitmap=yu,f.imageDataToBlob=xu,f.imageDataToDataURL=wu,f.immediateVnode=Sl,f.injectStyle=ca,f.injectWxJsConfig=Md,f.isAliBrowser=Nr,f.isAliMiniProgram=Gc,f.isAndroid=zr,f.isAppleDevice=Bc,f.isBrowserSupportFileAPI=jc,f.isElement=$c,f.isEventSupported=Ac,f.isIE=Fc,f.isIE10=Uc,f.isIE11=Xc,f.isIE9=Yc,f.isIOS=Ii,f.isMacOS=Ai,f.isMobile=Nc,f.isNative=Es,f.isTouchSupport=Zc,f.isURL=dd,f.isWxBrowser=Br,f.isWxMiniProgram=Vc,f.jpgToPng=Uu,f.leftRotate=_u,f.length=ks,f.mapTDTJSSDK=nm,f.marginSharpen=Yu,f.microTask=il,f.mosaic=$u,f.mount=ze,f.nextTick=sl,f.normalizePoint=vl,f.objectSignature=Cr,f.onBeforeUnload=xa,f.onDocumentReady=wa,f.outputGifBase64=Da,f.outputQRCodeBase64=Ku,f.parseCSS=qa,f.parseTransformToMatrix=Ki,f.patch=$s,f.pngToJpg=Xu,f.polar=Pt,f.prefixes=Jc,f.preventDefault=ie,f.radiusClip=Gu,f.readFileInBrowser=Ue,f.recordToSearch=Zs,f.rectClip=Vu,f.removeClass=Jf,f.requestAnimationFrameCycle=ki,f.reverseCSSToJSEasing=dl,f.reverseEaseNameToCubicBezier=$r,f.reverseEasing=Gr,f.revokeObjectURL=Rf,f.rightRotate=Eu,f.rotatePoint=zt,f.scheduleIdle=Xr,f.scheduleVnode=Xi,f.scheduleYZIdle=zi,f.scrollTo=uu,f.searchToRecord=md,f.selectFileInBrowser=Mi,f.setCSSVar=ru,f.setIntervalAccurate=Kc,f.setManualScroll=fu,f.setRem=fd,f.setStyle=tn,f.setTheme=cn,f.setTimeoutAccurate=Di,f.setWindowTitle=ou,f.sharpen=Fu,f.showEl=eo,f.signature=Pr,f.simulateMouseEventFromTouch=Ic,f.stringToDOM=cc,f.toBlackAndWhite=Cu,f.toBlue=Du,f.toBlueAndGreen=zu,f.toBlueAndGrey=Nu,f.toDegree=lt,f.toGreen=ku,f.toGreenAndGrey=Bu,f.toGrey=Mu,f.toGrey2=Pu,f.toOpposite=Iu,f.toRadian=Y,f.toRed=Au,f.toRedAndBlue=Lu,f.toRedAndGreen=Ru,f.toRedAndGrey=Ou,f.toggleClass=Cn,f.toggleElDisplay=Kf,f.toggleTheme=nu,f.transformPath2D=Ll,f.trimHash=ao,f.useAttribute=oe,f.useClickA=En,f.useClipboard=nd,f.useCookie=mc,f.useDataset=jf,f.useDraggable=Fl,f.useDrop=Yl,f.useElement=Qt,f.useElementEventBus=Ql,f.useEventListener=N,f.useFeRouteChange=va,f.useFetch=Hs,f.useFetchCache=qf,f.useFetchRetry=Gf,f.useFetchRetryCache=Hf,f.useFireEvent=Cc,f.useHistoryRouter=hu,f.useHotKey=_n,f.useHotKeyFileLoop=Ff,f.useHotKeyFileOnce=Nf,f.useIntersection=Ma,f.useLoadImage=to,f.useLoadLink=Uf,f.useLoadScript=Yf,f.useLocalStorage=Rr,f.useLocale=In,f.useLocation=rd,f.useMedia=pa,f.useMousePoint=da,f.useMutation=ba,f.usePressDownMove=he,f.usePressDownMoveWithMouse=Zl,f.usePressDownMoveWithPointer=ga,f.usePressDownMoveWithTouch=Kl,f.usePullDown=tu,f.usePullUp=eu,f.useResize=on,f.useRunInSandbox=od,f.useSafeArea=lu,f.useScroll=Ea,f.useSelectFile=Tn,f.useSelectFileImage=Lf,f.useSessionStorage=yc,f.useShadowRoot=sd,f.useTimestampValue=Pi,f.useVibrate=ad,f.useVisible=mu,f.useVisibleSimple=du,f.useWindow=au,f.useWindowResize=Jl,f.useWindowVisible=gu,f.waitForStyleSheetsLoaded=Xf,f.writeToIndexDB=Sc,f.wxJsChooseImage=Ad,f.wxJsDownloadImage=Rd,f.wxJsDownloadVoice=Vd,f.wxJsGetLocalImgData=Ld,f.wxJsGetLocation=jd,f.wxJsGetNetworkType=qd,f.wxJsLogin=Jd,f.wxJsOnVoicePlayEnd=Ud,f.wxJsOnVoiceRecordEnd=Bd,f.wxJsOpenLocation=Hd,f.wxJsPauseVoice=Fd,f.wxJsPay=$d,f.wxJsPlayVoice=Nd,f.wxJsPreviewImage=kd,f.wxJsScanQRCode=Wd,f.wxJsStartRecord=zd,f.wxJsStopRecord=Od,f.wxJsStopVoice=Yd,f.wxJsTranslateVoice=Gd,f.wxJsUpdateAppMessageShareData=Cd,f.wxJsUpdateTimelineShareData=Id,f.wxJsUploadImage=Dd,f.wxJsUploadVoice=Xd,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),f}({},ZYZGroupCoreCommon);
|
|
51
|
+
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const s=this.getPeerName(t);this.trace(`${s} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const s=document.createElement("div");s.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(s)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class n1{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const xc=[],bc={};function Rr(n){xc.push(n)}function i1(n,t=!1){const e=pc();if(bc[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{xc.forEach(r=>r())});const s=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:s,openTagList:i})),bc[e]=!0}function r1(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(s){s.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function a1(n){Rr(function(){wx.updateAppMessageShareData(n)})}function o1(n){Rr(function(){wx.updateTimelineShareData(n)})}function h1(n){wx.chooseImage(n)}function c1(n){wx.previewImage(n)}function l1(n){wx.uploadImage(n)}function u1(n){wx.downloadImage(n)}function f1(n){wx.getLocalImgData(n)}function d1(){wx.startRecord()}function m1(n){wx.stopRecord(n)}function p1(n){wx.onVoiceRecordEnd(n)}function g1(n){wx.playVoice(n)}function y1(n){wx.pauseVoice(n)}function w1(n){wx.stopVoice(n)}function x1(n){wx.onVoicePlayEnd(n)}function b1(n){wx.uploadVoice(n)}function v1(n){wx.downloadVoice(n)}function _1(n){wx.translateVoice(n)}function S1(n){wx.getNetworkType(n)}function E1(n){wx.openLocation(n)}function T1(n){wx.getLocation(n)}function P1(n){wx.scanQRCode(n)}function M1(n,t,e){function s(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",s,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",s),document.attachEvent("onWeixinJSBridgeReady",s)):s()}function C1(n,t,e="snsapi_userinfo",s=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${s}#wechat_redirect`}function A1(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function As(n,t){let e="未知错误";switch(n.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${n.error}(${e}): ${n.errorMessage}`}function I1(n,t,e){ap.tradePay(Object.assign(n,{}),function(s){let i="未知错误";switch(s.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function k1(n,t,e){ap.scan(Object.assign(n,{fail:s=>{e?.(As(s))}}),function(s){t?.(s.code)})}function D1(n,t,e){ap.getLocation(Object.assign(n,{fail:s=>{e?.(As(s))}}),function(s){t?.(s)})}function L1(n,t,e){ap.openLocation(Object.assign(n,{fail:s=>{e?.(As(s))}}),function(){t?.()})}function R1(n,t,e){ap.chooseImage(Object.assign(n,{fail:s=>{e?.(As(s,"chooseImage"))}}),function(s){t?.(s)})}function O1(n,t,e){ap.previewImage(Object.assign(n,{fail:s=>{e?.(As(s))}}),function(){t?.()})}class z1{map;constructor(t,e=120.619585,s=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,s),i)}}class N1{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,s){this.currentPage=s?.currentPage||0,this.itemsPerPage=s?.itemsPerPage||10,this.entriesInterval=s?.entriesInterval||5,this.entriesEdge=s?.entriesEdge||1,this.linkTo=s?.linkTo||"javascript:;",this.prevText=s?.prevText||"上一页",this.nextText=s?.nextText||"下一页",this.ellipseText=s?.ellipseText||"...",this.prevShowAlways=typeof s?.prevShowAlways=="boolean"?s?.prevShowAlways:!0,this.nextShowAlways=typeof s?.nextShowAlways=="boolean"?s?.nextShowAlways:!0,this.callback=s?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),Qe(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return Be("div",{class:"pagination"},[])}appendVNode(t,e,s){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=s?.text||String(e+1),r=s?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?Be("span",{class:`current ${r}`},i):Be("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:a=>this.selectPage(e,a)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),s=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),s>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,s);for(let a=0;a<r;a++)this.appendVNode(t,a);this.entriesEdge<s&&this.ellipseText&&t.children.push(Be("span",{},this.ellipseText))}for(let r=s;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(Be("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let a=r;a<this.totalPages;a++)this.appendVNode(t,a)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),Tn(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const s=this.callback(t);return e&&(s||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),s}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}return m.ActionChannel=Ug,m.BallShape=l0,m.BezierEasing=Ai,m.BufferAttribute=jt,m.COLOR_NAMES=Cs,m.CSSToJSEasing=Ed,m.Clock=Di,m.Color=Lt,m.ColorManagement=Sr,m.CommonKeyCode=Dg,m.CustomCanvasContext=Ro,m.CustomCanvasGradient=hn,m.CustomCanvasPattern=Oi,m.DOMParse=dr,m.DOMSVGUtil=ke,m.DOMToBlob=si,m.DOMToString=ei,m.DOMVideo=Ps,m.Easing=z,m.FetchWithAxios=ti,m.FetchWithAxiosRequestCancel=La,m.FileUpload=vu,m.Float16BufferAttribute=$m,m.Float32BufferAttribute=Gm,m.Int16BufferAttribute=Ym,m.Int32BufferAttribute=Um,m.Int8BufferAttribute=Nm,m.Interpolation=Kt,m.LineShape=vn,m.LinearSRGBColorSpace=vr,m.LinearToSRGB=ze,m.LinearTransfer=_r,m.Ls=be,m.MVVM=V0,m.Matrix=bt,m.Matrix2=Vi,m.Matrix3=He,m.Matrix4=Et,m.NoColorSpace=Qh,m.Pagination=N1,m.QRCode=ye,m.SRGBColorSpace=Ne,m.SRGBToLinear=Oe,m.SRGBTransfer=bn,m.SVGParse=e1,m.SVGParsedPathArgsLength=ys,m.Shape=ne,m.ShapeCombo=xe,m.TWEEN=Dd,m.Timeline=fs,m.TreeShapeCombo=c0,m.Tween=ki,m.Uint16BufferAttribute=Xm,m.Uint32BufferAttribute=Vm,m.Uint8BufferAttribute=Bm,m.Uint8ClampedBufferAttribute=Fm,m.Vector2=ws,m.Vector3=Ct,m.Vector4=Yi,m.WebGLCoordinateSystem=xs,m.WebGLRenderer=n1,m.WebGPUCoordinateSystem=Ui,m.WebRTCClient=s1,m.WebSocketClient=$0,m.YZCanvasContext=zi,m.YZMessageChannel=K0,m.YZWorker=Z0,m.__color=se,m.addClass=Ap,m.addWatermark=km,m.addWxJsReadyFnBeforeConfig=Rr,m.ajax=Q0,m.aliJsChooseImage=R1,m.aliJsGetLocation=D1,m.aliJsOpenLocation=L1,m.aliJsPreviewImage=O1,m.aliJsReady=A1,m.aliJsScan=k1,m.aliJsTradePay=I1,m.angle=Ft,m.animateShapes=e0,m.animateSpringChainShapes=n0,m.animateSpringConnectShapes=i0,m.animateSpringMassShapes=r0,m.animationEnd$=pg,m.animationStart$=mg,m.appendURL=Ir,m.appendURLRecord=J0,m.atomReadAttribute=$o,m.atomReadAttributes=Ji,m.atomReadStyle=Wd,m.atomReadStyles=Hi,m.atomRemoveAttribute=Kd,m.atomRemoveDataset=_0,m.atomRemoveStyle=Wi,m.atomWriteAttribute=Je,m.atomWriteStyle=un,m.base64EncodeOutputStream=Wo,m.bitmapMapper=eh,m.blobToImageData=nm,m.byteArrayOutputStream=Ki,m.canDrawBitmap=vo,m.canUsePaths=ad,m.canUseWorker=bo,m.cancelBubble=fo,m.cancelFetch=N0,m.changeBrightness=Am,m.changeCheckboxChecked=Ep,m.changeDiaphaneity=Im,m.changeRadioChecked=Sp,m.changeSelected=_p,m.changeSize=Cm,m.checkWxJsApi=r1,m.clearCookies=L0,m.clearLocalStorage=S0,m.clearSessionStorage=k0,m.closest=yp,m.combineTransformToMatrix=Jd,m.compareVersion=Gf,m.computeImageDisplayRect=Qd,m.containsChild=dp,m.createElement=Dp,m.createElementNS=Lp,m.createFragment=fh,m.createIndexDB=O0,m.createObjectURL=sh,m.createRunCycleInMaxRate=ud,m.createTextNode=Rp,m.createXMLHttpRequest=wc,m.cssAttrsToCanvasAttrs=Go,m.distance=ds,m.distance2=Ie,m.domPrefixes=Zd,m.drag$=vh,m.dragEnd$=Sh,m.dragEnter$=Th,m.dragLeave$=Ph,m.dragOver$=Mh,m.dragStart$=_h,m.drawBitmapInCanvas=jm,m.drawQRCodeToCanvas=zm,m.drop$=Eh,m.easeNameToCubicBezier=Ii,m.empty=ch,m.fireEvent=Xf,m.flipSideToSide=rm,m.flipUpsideDown=am,m.flushURL=yc,m.flushURLRecord=W0,m.formDataToSearch=gc,m.generateRosettaShape=o0,m.getBitmapFromCanvas=qm,m.getBodyPosition=Tg,m.getBrowserClient=vi,m.getBrowserClientVersion=qf,m.getBrowserLanguage=jf,m.getCSSVar=C0,m.getDOMMatrix=qi,m.getDirection=Od,m.getDocumentElementPosition=Ss,m.getElementPositionInPage=cr,m.getElementPositionInPage2=Mg,m.getElementPositionInViewport=Rh,m.getEmSize=cp,m.getFetchId=Cr,m.getFileExtension=xu,m.getFileMD5Hash=Oa,m.getFileTypeFromFile=wu,m.getFormSubmitData=t1,m.getImageData=qo,m.getImageDataByAIData=Lm,m.getImageMainColor=im,m.getInnerText=Pp,m.getInternetExplorerVersion=go,m.getKeyCode=Lg,m.getMIME=bu,m.getMouseButton=kg,m.getMousePositionInElement=lt,m.getMousePositionInPage=lr,m.getMousePositionInViewport=Ig,m.getOperatingSystem=Qs,m.getOperatingSystemVersion=$f,m.getPageSize=Pg,m.getParameters=H0,m.getPolymorphShapeCombosInterpolator=rc,m.getPolymorphShapesInterpolator=Tr,m.getRelativeBoundingClientRect=Cg,m.getRemSize=Qi,m.getScreenPosition=Eg,m.getSelectedText=Qm,m.getStyle=De,m.getTheme$=M0,m.getTimeZone=Hf,m.getURL=Pn,m.getVerticalScrollPercentInPage=Ag,m.getViewportSize=Lh,m.getVnode=Li,m.gifImage=Jo,m.gravitateShapes=s0,m.h=Be,m.hFromEl=En,m.hasClass=kp,m.hasDocument=nd,m.hasHistory=id,m.hasWindow=xo,m.hideEl=uh,m.html=hh,m.iframePostMessage=Op,m.imageDataToBitmap=tm,m.imageDataToBlob=sm,m.imageDataToDataURL=em,m.immediateVnode=Ld,m.injectStyle=Vo,m.injectWxJsConfig=i1,m.insert=mn,m.isActiveEl=op,m.isAliBrowser=wo,m.isAliMiniProgram=sd,m.isAndroid=po,m.isAppleDevice=Wf,m.isBrowserSupportFileAPI=rd,m.isElement=od,m.isEventSupported=Vf,m.isIE=Zf,m.isIE10=Qf,m.isIE11=td,m.isIE9=Kf,m.isIOS=_i,m.isInput=_s,m.isInputCheckbox=sr,m.isInputNumber=vp,m.isInputRadio=nr,m.isInputText=bp,m.isMacOS=mo,m.isMobile=Jf,m.isNative=tn,m.isRootEl=rp,m.isSelect=er,m.isTextArea=xp,m.isTouchSupport=cd,m.isURL=q0,m.isWxBrowser=yo,m.isWxMiniProgram=ed,m.jpgToPng=Em,m.keyDown$=Ch,m.keyPress$=gg,m.keyUp$=Ah,m.leftRotate=om,m.length=an,m.mapTDTJSSDK=z1,m.marginSharpen=Sm,m.microTask=pd,m.mosaic=Dm,m.mount=Qe,m.mouseClick$=Xp,m.mouseContextMenu$=$p,m.mouseDoubleClick$=Up,m.mouseDown$=ph,m.mouseEnter$=Fp,m.mouseLeave$=Yp,m.mouseMove$=pn,m.mouseOut$=Bp,m.mouseOver$=Np,m.mouseUp$=gh,m.mouseWheel$=Vp,m.nearestElement=lp,m.nextElementSibling=pp,m.nextTick=md,m.normalizePoint=Rd,m.objectSignature=Da,m.onBeforeUnload=ih,m.onDocumentReady=nh,m.outputGifBase64=Zo,m.outputQRCodeBase64=Om,m.pan$=Gp,m.panCancel$=Wp,m.panDown$=Qp,m.panEnd$=Hp,m.panLeft$=Jp,m.panMove$=qp,m.panRight$=Zp,m.panStart$=jp,m.panUp$=Kp,m.parent=up,m.parents=tr,m.parseCSS=mr,m.parseTransformToMatrix=Gi,m.patch=Tn,m.pinch$=tg,m.pinchIn$=eg,m.pinchOut$=sg,m.pngToJpg=Tm,m.pointerCancel$=hr,m.pointerDown$=ar,m.pointerMove$=rr,m.pointerUp$=or,m.polar=je,m.polymorphShapesTween=a0,m.prefixes=hd,m.press$=ng,m.preventDefault=fe,m.previousElementSibling=gp,m.radiusClip=Mm,m.readFileInBrowser=rs,m.recordToSearch=Mn,m.rectClip=Pm,m.rem2px=hp,m.remove=Mp,m.removeClass=Ip,m.requestAnimationFrameCycle=Si,m.reverseCSSToJSEasing=Td,m.reverseEaseNameToCubicBezier=Ao,m.reverseEasing=Eo,m.revokeObjectURL=Hm,m.rightRotate=hm,m.rotate$=ig,m.rotatePoint=Xt,m.scheduleIdle=_o,m.scheduleVnode=Ri,m.scheduleYZIdle=Mi,m.scrollParent=fp,m.scrollTo=np,m.searchToRecord=j0,m.selectFileInBrowser=ni,m.setCSSVar=A0,m.setIntervalAccurate=ld,m.setManualScroll=ip,m.setRem=G0,m.setStyle=ji,m.setTheme=mc,m.setTimeoutAccurate=Ei,m.setWindowTitle=tp,m.shadowRoot=wp,m.sharpen=_m,m.showEl=lh,m.siblings=mp,m.signature=ka,m.simulateMouseEventFromTouch=Uf,m.stringToDOM=yu,m.swipe$=rg,m.swipeDown$=cg,m.swipeLeft$=ag,m.swipeRight$=og,m.swipeUp$=hg,m.tap$=lg,m.tapOutSide$=ug,m.text=Tp,m.toBlackAndWhite=um,m.toBlue=pm,m.toBlueAndGreen=wm,m.toBlueAndGrey=vm,m.toDegree=wt,m.toGreen=mm,m.toGreenAndGrey=bm,m.toGrey=cm,m.toGrey2=lm,m.toOpposite=fm,m.toRadian=Q,m.toRed=dm,m.toRedAndBlue=ym,m.toRedAndGreen=gm,m.toRedAndGrey=xm,m.toggleClass=ir,m.toggleElDisplay=Cp,m.toggleTheme=P0,m.touchCancel$=bh,m.touchEnd$=xh,m.touchMove$=yh,m.touchStart$=wh,m.transformPath2D=Hd,m.transitionEnd$=dg,m.transitionStart$=fg,m.trimHash=pc,m.useAttribute=Le,m.useClickA=dn,m.useClipboard=sp,m.useCookie=D0,m.useCoords$=y0,m.useDataset=v0,m.useDraggable=vg,m.useDraw=h0,m.useDrop=_g,m.useElementEventBus=Fg,m.useEvent$=U,m.useEventListener=j,m.useFetch=_n,m.useFetchCache=F0,m.useFetchRetry=B0,m.useFetchRetryCache=Y0,m.useHashChange$=x0,m.useHotKeyDown$=zh,m.useHotKeyFile=Og,m.useHotKeyFile$=Nh,m.useHotKeyUp$=Rg,m.useIntersection=f0,m.useIntersection$=oc,m.useLoadImage=ah,m.useLoadLink=Jm,m.useLoadScript=Wm,m.useLocalStorage=uc,m.useLocale=Ar,m.useLocation$=lc,m.useMatchMedia$=cc,m.useMouseAndPointerDownMovePoint$=kh,m.useMouseDownMovePoint$=wg,m.useMouseMovePoint$=yg,m.useMousePoint=Ke,m.useMutation=u0,m.useMutation$=ac,m.usePointerDownMovePoint$=Ih,m.usePopStateChange$=b0,m.usePressDownMove=Yh,m.usePressDownMoveWithMouse=Yg,m.usePressDownMoveWithPointer=Xh,m.usePressDownMoveWithTouch=Xg,m.usePull$=bg,m.useResize=Bh,m.useResize$=Fh,m.useRunInSandbox=zp,m.useSafeArea$=g0,m.useScroll$=Dh,m.useSelectFile=oh,m.useSelectFileImage=Km,m.useSessionStorage=I0,m.useTimestampValue=Pr,m.useTouchDownMovePoint$=xg,m.useUrlChange$=w0,m.useVisible$=m0,m.useVisibleSimple$=d0,m.useWindowResize=zg,m.useWindowResize$=Ng,m.useWindowVisible$=Sg,m.vibrate=ep,m.waitForStyleSheetsLoaded=Zm,m.writeToIndexDB=z0,m.wxJsChooseImage=h1,m.wxJsDownloadImage=u1,m.wxJsDownloadVoice=v1,m.wxJsGetLocalImgData=f1,m.wxJsGetLocation=T1,m.wxJsGetNetworkType=S1,m.wxJsLogin=C1,m.wxJsOnVoicePlayEnd=x1,m.wxJsOnVoiceRecordEnd=p1,m.wxJsOpenLocation=E1,m.wxJsPauseVoice=y1,m.wxJsPay=M1,m.wxJsPlayVoice=g1,m.wxJsPreviewImage=c1,m.wxJsScanQRCode=P1,m.wxJsStartRecord=d1,m.wxJsStopRecord=m1,m.wxJsStopVoice=w1,m.wxJsTranslateVoice=_1,m.wxJsUpdateAppMessageShareData=a1,m.wxJsUpdateTimelineShareData=o1,m.wxJsUploadImage=l1,m.wxJsUploadVoice=b1,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),m}({},ZYZGroupCoreCommon);
|
|
51
52
|
//# sourceMappingURL=zyzgroup_core_web.iife.js.map
|