@zyzgroup/core-web 0.1.32 → 0.1.33
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 +13 -13
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +853 -856
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +13 -13
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -7,18 +7,18 @@ var ZYZGroupCoreWeb=function(f){"use strict";var gr=typeof document<"u"?document
|
|
|
7
7
|
|[\u{2B740}-\u{2B81D}]
|
|
8
8
|
|[\u{2B820}-\u{2CEAF}]
|
|
9
9
|
|[\u{2CEB0}-\u{2EBEF}]
|
|
10
|
-
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},te=(i,t)=>(typeof i=="string"&&(i=_s(i)||new RegExp(i)),i.test(t)),yr=(i,t)=>{typeof i=="string"&&(i=_s(i)||new RegExp(i));const e=t.match(i);return e?i.flags.toLowerCase().indexOf("g")>=0?e.map(s=>({matchIndex:-1,fullMatch:s,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},wr=(i,t)=>{typeof i=="string"&&(i=_s(i)||new RegExp(i));const e=[],s=t.matchAll(i);for(const n of s)e.push({matchIndex:typeof n.index=="number"?n.index:-1,fullMatch:n[0],groupMatchs:n.slice(1)});return e};function Ch(i){const t=i.match(/[\s\S]/gu);return t?t.length:0}function xr(i,t){const e=i.codePointAt(t);return e?String.fromCodePoint(e):void 0}function br(i=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let s="";for(let n=0;n<i;n++)s+=t[Math.floor(Math.random()*e)];return s}function Th(i){return i.replace(/(^\w)/g,t=>t.toLowerCase())}const mt=(i,t="-")=>{let e=i.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function _h(i){return i.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Sr(i){return Th(_h(i))}function vr(i){let t="";for(let e=0,s=i.length;e<s;e++){const n=i.charCodeAt(e);n>=1&&n<=127?t+=i.charAt(e):n>2047?(t+=String.fromCharCode(224|n>>12&15),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n>>0&63)):(t+=String.fromCharCode(192|n>>6&31),t+=String.fromCharCode(128|n>>0&63))}return t}function Ph(i){return i.slice(0)}function Mh(i,t=!0){const e=t?Ph(i.buffer):i.buffer;return new i.constructor(e,i.byteOffset,i.length)}const Eh="[object String]",Ah="[object Symbol]";function Cr(i){return Object.prototype.toString.call(i)}function kh(i){return i!=null}function Ih(i){return Cr(i)===Eh}function Dh(i){return i===i+0}function Rh(i){return Cr(i)===Ah}function Tr(i,...t){return new i.constructor(...t)}function _r(i,t){for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&!t(e,i[e])&&delete i[e];return i}function Lh(i,t="",e=["","sign","key"]){return Object.keys(i).filter(s=>{for(let n=0,r=e.length;n<r;n++)if(i[s]==e[n])return!1;return!0}).sort().map(s=>`${s}=${i[s]}`).join("&")+t}function zh(i){return JSON.stringify(i)}function Oh(i){for(;i.length;)i.pop()}function Te(i,t){const e=i.findIndex(s=>s===t);return e>=0&&i.splice(e,1),i}function Pr(i,t){return i.findIndex(e=>e==t)>=0}function Fh(i,...t){return t.forEach(e=>{Pr(i,e)||i.push(e)}),i}let Mr;try{Mr=Map}catch{Mr=function(){}}let Er;try{Er=Set}catch{Er=function(){}}function Bh(i){return Number.isNaN(i)}function It(i,t){const e=parseFloat(i);if(Bh(e)){if(typeof t=="number")return t;throw new Error(`parseNumber(${i}) isNaN!`)}return e}function Ps(i,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(i-t)<e}function F(i,t,e){const s=Math.min(t,e),n=Math.max(t,e);return i<s?s:i>n?n:i}function Nh(i,t){return(i%t+t)%t}function Ii(i,t,e){return(1-e)*i+e*t}const Yh=(i,t,e)=>s=>{const n=F(s,i,t);return e==0?n:t-n<e?t:Math.round(n/e)*e};function Uh(i,t=12){return It(i,0).toFixed(t)}function $t(i,t=12){return+Uh(i,t)}function Di(i,t){const e=yr("number-single",String(i));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):kh(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?i.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?i.substring(e.matchIndex+e.fullMatch.length):""}}function Ar(i){const t=yr("number",i);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const ee=Xh();function Xh(){const i=new ArrayBuffer(4),t=new Float32Array(i),e=new Uint32Array(i),s=new Uint32Array(512),n=new Uint32Array(512);for(let h=0;h<256;++h){const c=h-127;c<-27?(s[h]=0,s[h|256]=32768,n[h]=24,n[h|256]=24):c<-14?(s[h]=1024>>-c-14,s[h|256]=1024>>-c-14|32768,n[h]=-c-1,n[h|256]=-c-1):c<=15?(s[h]=c+15<<10,s[h|256]=c+15<<10|32768,n[h]=13,n[h|256]=13):c<128?(s[h]=31744,s[h|256]=64512,n[h]=24,n[h|256]=24):(s[h]=31744,s[h|256]=64512,n[h]=13,n[h|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let h=1;h<1024;++h){let c=h<<13,l=0;for(;!(c&8388608);)c<<=1,l-=8388608;c&=-8388609,l+=947912704,r[h]=c|l}for(let h=1024;h<2048;++h)r[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)a[h]=h<<23;a[31]=1199570944,a[32]=2147483648;for(let h=33;h<63;++h)a[h]=2147483648+(h-32<<23);a[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(o[h]=1024);return{floatView:t,uint32View:e,baseTable:s,shiftTable:n,mantissaTable:r,exponentTable:a,offsetTable:o}}function Ct(i){Math.abs(i)>65504&&console.warn("toHalfFloat(): Value out of range."),i=F(i,-65504,65504),ee.floatView[0]=i;const t=ee.uint32View[0],e=t>>23&511;return ee.baseTable[e]+((t&8388607)>>ee.shiftTable[e])}function Ms(i){const t=i>>10;return ee.uint32View[0]=ee.mantissaTable[ee.offsetTable[t]+(i&1023)]+ee.exponentTable[t],ee.floatView[0]}var gt=(i=>(i.UNKNOWN="",i.TEXT="text/plain",i.MD="text/plain",i.HTML="text/html",i.XML_TEXT="text/xml",i.CSS="text/css",i.JPEG="image/jpeg",i.PNG="image/png",i.GIF="image/gif",i.BMP="image/bmp",i.WEBP="image/webp",i.SVG="image/svg+xml",i.ICON="image/x-icon",i.MICROSOFT_ICON="image/vnd.microsoft.icon",i.MPEG="audio/mpeg",i.MP3="audio/mpeg",i.MP4="video/mp4",i.OGG="audio/ogg",i.WAV="audio/wav",i.MIDI="audio/midi",i.WEBM="video/webm",i.VIDEO_OGG="video/ogg",i.OCTET_STREAM="application/octet-stream",i.JAVASCRIPT="application/javascript",i.ECMASCRIPT="application/ecmascript",i.JSON="application/json",i.XML="application/xml",i.XHTML="application/xhtml+xml",i.XWWW="application/x-www-form-urlencoded",i.DOC="application/msword",i.CSV="application/x-csv",i.EXCEL="application/vnb.ms-excel",i.PPT="application/vnb.mspowerpoint",i.PDF="application/pdf",i.ZIP="application/zip",i.TGZ="application/x-gtar",i.TAR_GZ="application/x-gzip",i.EOT="appliaction/vnd.ms-fontobject",i.TTF="aplication/font-sfnt",i.PKCS12="aplication/pkcs12",i))(gt||{}),Es=(i=>(i.ascii="ascii",i.utf8="utf8",i.utf16le="utf16le",i.ucs2="ucs2",i.base64="base64",i.base64url="base64url",i.latin1="latin1",i.binary="binary",i.hex="hex",i))(Es||{}),Dt=(i=>(i.text="text",i.dataURL="dataURL",i.binaryString="binaryString",i.arraybuffer="arraybuffer",i))(Dt||{});const Xe=(i,t=16)=>{let e=i.toLowerCase();const s=e.indexOf("0b")==0,n=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(s||n||r)&&(e=e.slice(2)),s&&(t=2),n&&(t=8),r&&(t=16);const a=parseInt(e,t);if(isNaN(a))throw new Error(`radixStringToNumber(${i}, ${t}) 无法解析!`);return a};function Vh(i){return new TextEncoder().encode(i)}function Gh(i){return String.fromCharCode.apply(null,new Uint16Array(i))}const Ri=(i,t,e)=>t?e===Es.base64?new Blob([i],{type:`${t};${e}`}):e===Es.utf8?new Blob([i],{type:`${t};charset=${e}`}):new Blob([i],{type:`${t}`}):new Blob([i]),qh=i=>{let t=gt.UNKNOWN;switch(new DataView(i).getUint32(0,jh()).toString(16).toUpperCase()){case"FFD8FFDB":t=gt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=gt.JPEG;break;case"89504E47":t=gt.PNG;break;case"47494638":t=gt.GIF;break;case"52494646":t=gt.WEBP;break;case"25504446":t=gt.PDF;break;case"504B0304":t=gt.ZIP;break}return t};function jh(){const i=Uint32Array.of(305419896),t=new Uint8Array(i.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function J(){return(performance||Date).now()}function Hh(i,t=3){const e=Math.max(i.length,6);let s="";for(let r=0;r<e-4;r++)s+=i[r]||"0";const n=[s,""+(i[e-4]||"0")+(i[e-3]||"0"),""+(i[e-2]||"0")+(i[e-1]||"0")];switch(t){case 1:return n[0];case 2:return n[0]+":"+n[1];case 3:return n[0]+":"+n[1]+":"+n[2]}}function $h(i){const t=Math.max(i.length,6);let e=0;e+=(i[t-2]||0)*10+(i[t-1]||0),e+=((i[t-4]||0)*10+(i[t-3]||0))*60;let s=0;for(let n=0;n<t-4;n++)s=s*10+(i[n]||0);return e+=s*60*60,e=Math.floor(Math.max(0,e)),e}function Wh(i,t=!1){let e=0,s;typeof i=="number"?(e=i,s=[]):(s=i,e=$h(s),Oh(s));const n=e%60;s.unshift(n%10),s.unshift(Math.floor(n/10)),e=Math.floor(e/60);const r=e%60;if(s.unshift(r%10),s.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const a=e%100;for(s.unshift(a%10),s.unshift(Math.floor(a/10)),e=Math.floor(e/100);e;)s.unshift(e%10),e=Math.floor(e/10)}else{const a=e%24;s.unshift(a%10),s.unshift(Math.floor(a/10))}return s}function Jh(i,t=1,e=!1){return i[i.length-1]+=t,Wh(i,e)}class Ve{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}addListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}on(t,e){return this.addListener(t,e),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(s=>s!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(n=>{n(...e)}),this}once(t,e){const n=(()=>{let r=!1;return(...a)=>{r||(r=!0,e(...a),this.off(t,n))}})();return this.on(t,n),this}}class _e{_maps=new Map;_mapsAddedDuringUpdate=new Map;_overflow;constructor(t){this._overflow=()=>{if(!t)return!1;const e=this.length;return e==0?!1:t?.overflow?t.overflow():!!t.size&&t.size>0&&e>=t.size}}entries(){return Array.from(this._maps.entries())}keys(){return Array.from(this._maps.keys())}values(){return Array.from(this._maps.values())}json(){return this.entries().reduce((t,[e,s])=>((Ih(e)||Dh(e)||Rh(e))&&(t[e]=s),t),{})}get length(){return this.entries().length}set(t,e){for(;this._overflow();){const s=this._maps.keys().next();s.done||this.delete(s.value)}this._maps.set(t,e),this._mapsAddedDuringUpdate.set(t,e)}get(t){return this._maps.get(t)}has(t){return this._maps.has(t)}getIndex(t){const e=this.entries();if(e.length&&e[t])return e[t]}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this._mapsAddedDuringUpdate.delete(t),this._maps.delete(t)}clear(){this._maps.clear(),this._mapsAddedDuringUpdate.clear()}flush(){this.clear()}filter(t){let e=Array.from(this._maps.entries());for(;e.length>0;){this._mapsAddedDuringUpdate.clear();for(let s=0,n=e.length;s<n;s++){const[r,a]=e[s];t(r,a)===!1&&this.delete(r)}e=Array.from(this._mapsAddedDuringUpdate.entries())}}}let As=!1,Li=(i,t)=>{};function Zh(){As=!0}function Kh(){As=!1}function Qh(i){Li=i}function Pe(i){Li("info",i),As&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(i))}function tc(i){Li("warn",i),As&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(i))}const zi=()=>{};function Oi(i,t=3,e){return async function(...s){let n;for(let r=0;r<t;r++)try{return await i.call(this,...s)}catch(a){Pe(`(${i.name}) attempt ${r+1} failed, retrying...`),n=a,await new Promise(o=>setTimeout(o,typeof e=="number"?e:300*Math.pow(2,r)))}throw Pe(`(${i.name}) max retries reached. Last error: ${n.message}`),n}}function Fi(i,t=6e4){const e=new _e,s=new _e;return async function(...n){const r=Date.now();e.filter((h,c)=>r-c.timestamp<t);const a=JSON.stringify(n),o=e.get(a);if(o){if(r-o.timestamp<t)return Pe(`(${i.name}) cache hit!`),o.value;e.delete(a)}try{let h;const c=s.get(a);if(c)Pe(`(${i.name}) cache waiting previous!`),h=await c,s.delete(a),Pe(`(${i.name}) cache waited!`);else{Pe(`(${i.name}) cache miss, fetching fresh data...`);const l=i.call(this,...n);s.set(a,l),h=await l,Pe(`(${i.name}) cache settled!`)}return e.set(a,{value:h,timestamp:Date.now()}),s.delete(a),h}catch(h){throw h}}}Array.prototype.ap=function(i){return this.reduce((t,e)=>t.concat(i.map(e)),[])};let ts;function xt(i){ts=i,i(),ts=null}class ec{subscribers=new Set;add(){ts&&!this.subscribers.has(ts)&&this.subscribers.add(ts)}notify(){this.subscribers.forEach(t=>t())}}const kr=new WeakMap;function ks(i,t){let e=kr.get(i);e||(e=new Map,kr.set(i,e));let s=e.get(t);return s||(s=new ec,e.set(t,s)),s}function sc(i,t=!1){return Object.keys(i).forEach(e=>{let s=i[e];if(t&&typeof s=="object"&&s!==null)i[e]=Bi(s,t);else{const n=ks(i,e);Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){return n.add(),s},set(r){s!=r&&(s=r,n.notify())}})}}),i}function Is(i,t=!1){return sc({value:i},t)}function Bi(i,t=!1){const e={get(n,r,a){const o=Reflect.get(n,r,a);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const c=Bi(o,t);c.YZReactiveProxyParentTarget=n,c.YZReactiveProxyParentKey=r,Reflect.set(a,r,c)}return ks(n,r).add(),Reflect.get(n,r,a)},set(n,r,a,o){const h=Reflect.get(n,r,o),c=Reflect.set(n,r,a,o);return Array.isArray(n)?ks(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():h!=a&&ks(n,r).notify(),c},has(n,r){return r==="isYZReactiveProxy"||r in n}};return new Proxy(i,e)}const Ir=Bi;function ic(i=3,t){return function(e,s,n){const r=`${e.constructor.name}.${String(s)}`,a=n.value;if(typeof a!="function")throw new SyntaxError(`@Retry() can only be used on functions, not: ${r}`);const o=Oi(a,i,t);return{...n,async value(...h){return await o.apply(this,h)}}}}function nc(i=6e4){return function(t,e,s){const n=`${t.constructor.name}.${String(e)}`,r=s.value;if(typeof r!="function")throw new SyntaxError(`@Cache() can only be used on functions, not: ${n}`);const a=Fi(r,i);return{...s,async value(...o){return await a.apply(this,o)}}}}function rc(i,t=(e,s)=>e<=s){const e=i.length;let s=Math.floor(e/2);for(;s>0;){for(let n=s;n<e;n++){const r=i[n];let a=n;for(;a>=s&&!t(i[a-s],r);)i[a]=i[a-s],a-=s;i[a]=r}s=Math.floor(s/2)}}function ac(){const i={};return i.promise=new Promise((t,e)=>{i.resolve=t,i.reject=e}),i}let Dr;try{Dr=Promise}catch{Dr=function(){}}function Rr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Lr={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],_=b[3];y+=(w&P|~w&_)+S[0]-680876936|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[1]-389564586|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[2]+606105819|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[3]-1044525330|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[4]-176418897|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[5]+1200080426|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[6]-1473231341|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[7]-45705983|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[8]+1770035416|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[9]-1958414417|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[10]-42063|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[11]-1990404162|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[12]+1804603682|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[13]-40341101|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[14]-1502002290|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[15]+1236535329|0,w=(w<<22|w>>>10)+P|0,y+=(w&_|P&~_)+S[1]-165796510|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[6]-1069501632|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[11]+643717713|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[0]-373897302|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[5]-701558691|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[10]+38016083|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[15]-660478335|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[4]-405537848|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[9]+568446438|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[14]-1019803690|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[3]-187363961|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[8]+1163531501|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[13]-1444681467|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[2]-51403784|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[7]+1735328473|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[12]-1926607734|0,w=(w<<20|w>>>12)+P|0,y+=(w^P^_)+S[5]-378558|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[8]-2022574463|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[11]+1839030562|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[14]-35309556|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[1]-1530992060|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[4]+1272893353|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[7]-155497632|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[10]-1094730640|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[13]+681279174|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[0]-358537222|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[3]-722521979|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[6]+76029189|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[9]-640364487|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[12]-421815835|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[15]+530742520|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[2]-995338651|0,w=(w<<23|w>>>9)+P|0,y+=(P^(w|~_))+S[0]-198630844|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[7]+1126891415|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[14]-1416354905|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[5]-57434055|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[12]+1700485571|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[3]-1894986606|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[10]-1051523|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[1]-2054922799|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[8]+1873313359|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[15]-30611744|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[6]-1560198380|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[13]+1309151649|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[4]-145523070|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[11]-1120210379|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[2]+718787259|0,P=(P<<15|P>>>17)+_|0,w+=(_^(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]=_+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,_,R,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,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)_[w>>2]|=b.charCodeAt(w)<<(w%4<<3);if(_[w>>2]|=128<<(w%4<<3),w>55)for(n(y,_),w=0;w<16;w+=1)_[w]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(R[2],16),G=parseInt(R[1],16)||0,_[14]=X,_[15]=G,n(y,_),y}function h(b){var S=b.length,y=[1732584193,-271733879,-1732584194,271733878],w,P,_,R,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,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)_[w>>2]|=b[w]<<(w%4<<3);if(_[w>>2]|=128<<(w%4<<3),w>55)for(n(y,_),w=0;w<16;w+=1)_[w]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(R[2],16),G=parseInt(R[1],16)||0,_[14]=X,_[15]=G,n(y,_),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),_=w,R,X,G,$;return y!==e&&(_=b(y,w)),P>_?new ArrayBuffer(0):(R=_-P,X=new ArrayBuffer(R),G=new Uint8Array(X),$=new Uint8Array(this,P,R),G.set($),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),_;for(_=0;_<y;_+=1)P[_]=b.charCodeAt(_);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 v(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 C(){this.reset()}return C.prototype.append=function(b){return this.appendBinary(u(b)),this},C.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},C.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],_;for(w=0;w<y;w+=1)P[w>>2]|=S.charCodeAt(w)<<(w%4<<3);return this._finish(P,y),_=l(this._hash),b&&(_=v(_)),this.reset(),_},C.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},C.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},C.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},C.prototype._finish=function(b,S){var y=S,w,P,_;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),_=parseInt(w[1],16)||0,b[14]=P,b[15]=_,n(this._hash,b)},C.hash=function(b,S){return C.hashBinary(u(b),S)},C.hashBinary=function(b,S){var y=o(b),w=l(y);return S?v(w):w},C.ArrayBuffer=function(){this.reset()},C.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},C.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,_;for(P=0;P<y;P+=1)w[P>>2]|=S[P]<<(P%4<<3);return this._finish(w,y),_=l(this._hash),b&&(_=v(_)),this.reset(),_},C.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.ArrayBuffer.prototype.getState=function(){var b=C.prototype.getState.call(this);return b.buff=m(b.buff),b},C.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),C.prototype.setState.call(this,b)},C.ArrayBuffer.prototype.destroy=C.prototype.destroy,C.ArrayBuffer.prototype._finish=C.prototype._finish,C.ArrayBuffer.hash=function(b,S){var y=h(new Uint8Array(b)),w=l(y);return S?v(w):w},C})})(Lr);var oc=Lr.exports;const hc=Rr(oc);function zr(i,t){return function(){return i.apply(t,arguments)}}const{toString:cc}=Object.prototype,{getPrototypeOf:Ni}=Object,Ds=(i=>t=>{const e=cc.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=i=>(i=i.toLowerCase(),t=>Ds(t)===i),Rs=i=>t=>typeof t===i,{isArray:Ge}=Array,es=Rs("undefined");function lc(i){return i!==null&&!es(i)&&i.constructor!==null&&!es(i.constructor)&&Tt(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const Or=Nt("ArrayBuffer");function uc(i){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(i):t=i&&i.buffer&&Or(i.buffer),t}const fc=Rs("string"),Tt=Rs("function"),Fr=Rs("number"),Ls=i=>i!==null&&typeof i=="object",dc=i=>i===!0||i===!1,zs=i=>{if(Ds(i)!=="object")return!1;const t=Ni(i);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},mc=Nt("Date"),gc=Nt("File"),pc=Nt("Blob"),yc=Nt("FileList"),wc=i=>Ls(i)&&Tt(i.pipe),xc=i=>{let t;return i&&(typeof FormData=="function"&&i instanceof FormData||Tt(i.append)&&((t=Ds(i))==="formdata"||t==="object"&&Tt(i.toString)&&i.toString()==="[object FormData]"))},bc=Nt("URLSearchParams"),[Sc,vc,Cc,Tc]=["ReadableStream","Request","Response","Headers"].map(Nt),_c=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ss(i,t,{allOwnKeys:e=!1}={}){if(i===null||typeof i>"u")return;let s,n;if(typeof i!="object"&&(i=[i]),Ge(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 Br(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)(),Nr=i=>!es(i)&&i!==Me;function Yi(){const{caseless:i}=Nr(this)&&this||{},t={},e=(s,n)=>{const r=i&&Br(t,n)||n;zs(t[r])&&zs(s)?t[r]=Yi(t[r],s):zs(s)?t[r]=Yi({},s):Ge(s)?t[r]=s.slice():t[r]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&ss(arguments[s],e);return t}const Pc=(i,t,e,{allOwnKeys:s}={})=>(ss(t,(n,r)=>{e&&Tt(n)?i[r]=zr(n,e):i[r]=n},{allOwnKeys:s}),i),Mc=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Ec=(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)},Ac=(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&&Ni(i)}while(i&&(!e||e(i,t))&&i!==Object.prototype);return t},kc=(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},Ic=i=>{if(!i)return null;if(Ge(i))return i;let t=i.length;if(!Fr(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=i[t];return e},Dc=(i=>t=>i&&t instanceof i)(typeof Uint8Array<"u"&&Ni(Uint8Array)),Rc=(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])}},Lc=(i,t)=>{let e;const s=[];for(;(e=i.exec(t))!==null;)s.push(e);return s},zc=Nt("HTMLFormElement"),Oc=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),Yr=(({hasOwnProperty:i})=>(t,e)=>i.call(t,e))(Object.prototype),Fc=Nt("RegExp"),Ur=(i,t)=>{const e=Object.getOwnPropertyDescriptors(i),s={};ss(e,(n,r)=>{let a;(a=t(n,r,i))!==!1&&(s[r]=a||n)}),Object.defineProperties(i,s)},Bc=i=>{Ur(i,(t,e)=>{if(Tt(i)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=i[e];if(Tt(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+"'")})}})},Nc=(i,t)=>{const e={},s=n=>{n.forEach(r=>{e[r]=!0})};return Ge(i)?s(i):s(String(i).split(t)),e},Yc=()=>{},Uc=(i,t)=>i!=null&&Number.isFinite(i=+i)?i:t;function Xc(i){return!!(i&&Tt(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const Vc=i=>{const t=new Array(10),e=(s,n)=>{if(Ls(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[n]=s;const r=Ge(s)?[]:{};return ss(s,(a,o)=>{const h=e(a,n+1);!es(h)&&(r[o]=h)}),t[n]=void 0,r}}return s};return e(i,0)},Gc=Nt("AsyncFunction"),qc=i=>i&&(Ls(i)||Tt(i))&&Tt(i.then)&&Tt(i.catch),Xr=((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",Tt(Me.postMessage)),jc=typeof queueMicrotask<"u"?queueMicrotask.bind(Me):typeof process<"u"&&process.nextTick||Xr,A={isArray:Ge,isArrayBuffer:Or,isBuffer:lc,isFormData:xc,isArrayBufferView:uc,isString:fc,isNumber:Fr,isBoolean:dc,isObject:Ls,isPlainObject:zs,isReadableStream:Sc,isRequest:vc,isResponse:Cc,isHeaders:Tc,isUndefined:es,isDate:mc,isFile:gc,isBlob:pc,isRegExp:Fc,isFunction:Tt,isStream:wc,isURLSearchParams:bc,isTypedArray:Dc,isFileList:yc,forEach:ss,merge:Yi,extend:Pc,trim:_c,stripBOM:Mc,inherits:Ec,toFlatObject:Ac,kindOf:Ds,kindOfTest:Nt,endsWith:kc,toArray:Ic,forEachEntry:Rc,matchAll:Lc,isHTMLForm:zc,hasOwnProperty:Yr,hasOwnProp:Yr,reduceDescriptors:Ur,freezeMethods:Bc,toObjectSet:Nc,toCamelCase:Oc,noop:Yc,toFiniteNumber:Uc,findKey:Br,global:Me,isContextDefined:Nr,isSpecCompliantForm:Xc,toJSONObject:Vc,isAsyncFn:Gc,isThenable:qc,setImmediate:Xr,asap:jc};function N(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(N,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 Vr=N.prototype,Gr={};["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=>{Gr[i]={value:i}}),Object.defineProperties(N,Gr),Object.defineProperty(Vr,"isAxiosError",{value:!0}),N.from=(i,t,e,s,n,r)=>{const a=Object.create(Vr);return A.toFlatObject(i,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),N.call(a,i.message,t,e,s,n),a.cause=i,a.name=i.name,r&&Object.assign(a,r),a};const Hc=null;function Ui(i){return A.isPlainObject(i)||A.isArray(i)}function qr(i){return A.endsWith(i,"[]")?i.slice(0,-2):i}function jr(i,t,e){return i?i.concat(t).map(function(n,r){return n=qr(n),!e&&r?"["+n+"]":n}).join(e?".":""):t}function $c(i){return A.isArray(i)&&!i.some(Ui)}const Wc=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function Os(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(v,C){return!A.isUndefined(C[v])});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 N("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,v,C){let b=g;if(g&&!C&&typeof g=="object"){if(A.endsWith(v,"{}"))v=s?v:v.slice(0,-2),g=JSON.stringify(g);else if(A.isArray(g)&&$c(g)||(A.isFileList(g)||A.endsWith(v,"[]"))&&(b=A.toArray(g)))return v=qr(v),b.forEach(function(y,w){!(A.isUndefined(y)||y===null)&&t.append(a===!0?jr([v],w,r):a===null?v:v+"[]",c(y))}),!1}return Ui(g)?!0:(t.append(jr(C,v,r),c(g)),!1)}const u=[],d=Object.assign(Wc,{defaultVisitor:l,convertValue:c,isVisitable:Ui});function m(g,v){if(!A.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.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,v,d))===!0&&m(b,v?v.concat(S):[S])}),u.pop()}}if(!A.isObject(i))throw new TypeError("data must be an object");return m(i),t}function Hr(i){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Xi(i,t){this._pairs=[],i&&Os(i,this,t)}const $r=Xi.prototype;$r.append=function(t,e){this._pairs.push([t,e])},$r.toString=function(t){const e=t?function(s){return t.call(this,s,Hr)}:Hr;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Jc(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wr(i,t,e){if(!t)return i;const s=e&&e.encode||Jc;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 Xi(t,e).toString(s),r){const a=i.indexOf("#");a!==-1&&(i=i.slice(0,a)),i+=(i.indexOf("?")===-1?"?":"&")+r}return i}class Zc{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 Jr=Zc,Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Kc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Xi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vi=typeof window<"u"&&typeof document<"u",Gi=typeof navigator=="object"&&navigator||void 0,Qc=Vi&&(!Gi||["ReactNative","NativeScript","NS"].indexOf(Gi.product)<0),tl=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),el=Vi&&window.location.href||"http://localhost",ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserEnv:Qc,hasStandardBrowserWebWorkerEnv:tl,navigator:Gi,origin:el},Symbol.toStringTag,{value:"Module"})),...Kc};function sl(i,t){return Os(i,new ut.classes.URLSearchParams,Object.assign({visitor:function(e,s,n,r){return ut.isNode&&A.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function il(i){return A.matchAll(/\w+|\[(\w*)]/g,i).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nl(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 Kr(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]=nl(n[a])),!o)}if(A.isFormData(i)&&A.isFunction(i.entries)){const e={};return A.forEachEntry(i,(s,n)=>{t(il(s),n,e,0)}),e}return null}function rl(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 qi={transitional:Zr,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(Kr(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 sl(t,this.formSerializer).toString();if((o=A.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Os(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),rl(t)):t}],transformResponse:[function(t){const e=this.transitional||qi.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"?N.from(o,N.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:ut.classes.FormData,Blob:ut.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=>{qi.headers[i]={}});const ji=qi,al=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"]),ol=i=>{const t={};let e,s,n;return i&&i.split(`
|
|
11
|
-
`).forEach(function(a){n=a.indexOf(":"),e=a.substring(0,n).trim().toLowerCase(),s=a.substring(n+1).trim(),!(!e||t[e]&&
|
|
12
|
-
`)}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[Qr]=this[Qr]={accessors:{}}).accessors,n=this.prototype;function r(a){const o=is(a);s[o]||(ul(n,a),s[o]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}Bs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Bs.prototype,({value:i},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>i,set(s){this[e]=s}}}),A.freezeMethods(Bs);const Yt=Bs;function $i(i,t){const e=this||ji,s=t||e,n=Yt.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 ta(i){return!!(i&&i.__CANCEL__)}function qe(i,t,e){N.call(this,i??"canceled",N.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(qe,N,{__CANCEL__:!0});function ea(i,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?i(e):t(new N("Request failed with status code "+e.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function fl(i){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}function dl(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 ml(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 Ns=(i,t,e=3)=>{let s=0;const n=dl(50,250);return ml(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)},sa=(i,t)=>{const e=i!=null;return[s=>t[0]({lengthComputable:e,total:i,loaded:s}),t[1]]},ia=i=>(...t)=>A.asap(()=>i(...t)),gl=ut.hasStandardBrowserEnv?((i,t)=>e=>(e=new URL(e,ut.origin),i.protocol===e.protocol&&i.host===e.host&&(t||i.port===e.port)))(new URL(ut.origin),ut.navigator&&/(msie|trident)/i.test(ut.navigator.userAgent)):()=>!0,pl=ut.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 yl(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function wl(i,t){return t?i.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):i}function na(i,t,e){let s=!yl(t);return i&&(s||e==!1)?wl(i,t):t}const ra=i=>i instanceof Yt?{...i}:i;function Ee(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(ra(c),ra(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 aa=i=>{const t=Ee({},i);let{data:e,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:r,headers:a,auth:o}=t;t.headers=a=Yt.from(a),t.url=Wr(na(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(ut.hasStandardBrowserEnv||ut.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(ut.hasStandardBrowserEnv&&(s&&A.isFunction(s)&&(s=s(t)),s||s!==!1&&gl(t.url))){const c=n&&r&&pl.read(r);c&&a.set(n,c)}return t},xl=typeof XMLHttpRequest<"u"&&function(i){return new Promise(function(e,s){const n=aa(i);let r=n.data;const a=Yt.from(n.headers).normalize();let{responseType:o,onUploadProgress:h,onDownloadProgress:c}=n,l,u,d,m,g;function v(){m&&m(),g&&g(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let C=new XMLHttpRequest;C.open(n.method.toUpperCase(),n.url,!0),C.timeout=n.timeout;function b(){if(!C)return;const y=Yt.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),P={data:!o||o==="text"||o==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:y,config:i,request:C};ea(function(R){e(R),v()},function(R){s(R),v()},P),C=null}"onloadend"in C?C.onloadend=b:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(b)},C.onabort=function(){C&&(s(new N("Request aborted",N.ECONNABORTED,i,C)),C=null)},C.onerror=function(){s(new N("Network Error",N.ERR_NETWORK,i,C)),C=null},C.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const P=n.transitional||Zr;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),s(new N(w,P.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,i,C)),C=null},r===void 0&&a.setContentType(null),"setRequestHeader"in C&&A.forEach(a.toJSON(),function(w,P){C.setRequestHeader(P,w)}),A.isUndefined(n.withCredentials)||(C.withCredentials=!!n.withCredentials),o&&o!=="json"&&(C.responseType=n.responseType),c&&([d,g]=Ns(c,!0),C.addEventListener("progress",d)),h&&C.upload&&([u,m]=Ns(h),C.upload.addEventListener("progress",u),C.upload.addEventListener("loadend",m)),(n.cancelToken||n.signal)&&(l=y=>{C&&(s(!y||y.type?new qe(null,i,C):y),C.abort(),C=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));const S=fl(n.url);if(S&&ut.protocols.indexOf(S)===-1){s(new N("Unsupported protocol "+S+":",N.ERR_BAD_REQUEST,i));return}C.send(r||null)})},bl=(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 N?l:new qe(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,r(new N(`timeout ${t} of ms exceeded`,N.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}},Sl=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},vl=async function*(i,t){for await(const e of Cl(i))yield*Sl(e,t)},Cl=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()}},oa=(i,t,e,s)=>{const n=vl(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",ha=Ys&&typeof ReadableStream=="function",Tl=Ys&&(typeof TextEncoder=="function"?(i=>t=>i.encode(t))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),ca=(i,...t)=>{try{return!!i(...t)}catch{return!1}},_l=ha&&ca(()=>{let i=!1;const t=new Request(ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!t}),la=64*1024,Wi=ha&&ca(()=>A.isReadableStream(new Response("").body)),Us={stream:Wi&&(i=>i.body)};Ys&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Us[t]&&(Us[t]=A.isFunction(i[t])?e=>e[t]():(e,s)=>{throw new N(`Response type '${t}' is not supported`,N.ERR_NOT_SUPPORT,s)})})})(new Response);const Pl=async i=>{if(i==null)return 0;if(A.isBlob(i))return i.size;if(A.isSpecCompliantForm(i))return(await new Request(ut.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 Tl(i)).byteLength},Ml=async(i,t)=>{const e=A.toFiniteNumber(i.getContentLength());return e??Pl(t)},Ji={http:Hc,xhr:xl,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}=aa(i);c=c?(c+"").toLowerCase():"text";let m=bl([n,r&&r.toAbortSignal()],a),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let C;try{if(h&&_l&&e!=="get"&&e!=="head"&&(C=await Ml(l,s))!==0){let P=new Request(t,{method:"POST",body:s,duplex:"half"}),_;if(A.isFormData(s)&&(_=P.headers.get("content-type"))&&l.setContentType(_),P.body){const[R,X]=sa(C,Ns(ia(h)));s=oa(P.body,la,R,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=Wi&&(c==="stream"||c==="response");if(Wi&&(o||y&&v)){const P={};["status","statusText","headers"].forEach(G=>{P[G]=S[G]});const _=A.toFiniteNumber(S.headers.get("content-length")),[R,X]=o&&sa(_,Ns(ia(o),!0))||[];S=new Response(oa(S.body,la,R,()=>{X&&X(),v&&v()}),P)}c=c||"text";let w=await Us[A.findKey(Us,c)||"text"](S,i);return!y&&v&&v(),await new Promise((P,_)=>{ea(P,_,{data:w,headers:Yt.from(S.headers),status:S.status,statusText:S.statusText,config:i,request:g})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,i,g),{cause:b.cause||b}):N.from(b,b&&b.code,i,g)}})};A.forEach(Ji,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch{}Object.defineProperty(i,"adapterName",{value:t})}});const ua=i=>`- ${i}`,El=i=>A.isFunction(i)||i===null||i===!1,fa={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,!El(e)&&(s=Ji[(a=String(e)).toLowerCase()],s===void 0))throw new N(`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 :
|
|
10
|
+
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},te=(i,t)=>(typeof i=="string"&&(i=_s(i)||new RegExp(i)),i.test(t)),yr=(i,t)=>{typeof i=="string"&&(i=_s(i)||new RegExp(i));const e=t.match(i);return e?i.flags.toLowerCase().indexOf("g")>=0?e.map(s=>({matchIndex:-1,fullMatch:s,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},wr=(i,t)=>{typeof i=="string"&&(i=_s(i)||new RegExp(i));const e=[],s=t.matchAll(i);for(const n of s)e.push({matchIndex:typeof n.index=="number"?n.index:-1,fullMatch:n[0],groupMatchs:n.slice(1)});return e};function Ch(i){const t=i.match(/[\s\S]/gu);return t?t.length:0}function xr(i,t){const e=i.codePointAt(t);return e?String.fromCodePoint(e):void 0}function br(i=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let s="";for(let n=0;n<i;n++)s+=t[Math.floor(Math.random()*e)];return s}function Th(i){return i.replace(/(^\w)/g,t=>t.toLowerCase())}const mt=(i,t="-")=>{let e=i.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function _h(i){return i.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Sr(i){return Th(_h(i))}function vr(i){let t="";for(let e=0,s=i.length;e<s;e++){const n=i.charCodeAt(e);n>=1&&n<=127?t+=i.charAt(e):n>2047?(t+=String.fromCharCode(224|n>>12&15),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n>>0&63)):(t+=String.fromCharCode(192|n>>6&31),t+=String.fromCharCode(128|n>>0&63))}return t}function Ph(i){return i.slice(0)}function Mh(i,t=!0){const e=t?Ph(i.buffer):i.buffer;return new i.constructor(e,i.byteOffset,i.length)}const Eh="[object String]",Ah="[object Symbol]";function Cr(i){return Object.prototype.toString.call(i)}function kh(i){return i!=null}function Ih(i){return Cr(i)===Eh}function Dh(i){return i===i+0}function Rh(i){return Cr(i)===Ah}function Tr(i,...t){return new i.constructor(...t)}function _r(i,t){for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&!t(e,i[e])&&delete i[e];return i}function Lh(i,t="",e=["","sign","key"]){return Object.keys(i).filter(s=>{for(let n=0,r=e.length;n<r;n++)if(i[s]==e[n])return!1;return!0}).sort().map(s=>`${s}=${i[s]}`).join("&")+t}function zh(i){return JSON.stringify(i)}function Oh(i){for(;i.length;)i.pop()}function Te(i,t){const e=i.findIndex(s=>s===t);return e>=0&&i.splice(e,1),i}function Pr(i,t){return i.findIndex(e=>e==t)>=0}function Fh(i,...t){return t.forEach(e=>{Pr(i,e)||i.push(e)}),i}let Mr;try{Mr=Map}catch{Mr=function(){}}let Er;try{Er=Set}catch{Er=function(){}}function It(i,t){const e=parseFloat(i);if(Number.isNaN(e)){if(typeof t=="number")return t;throw new Error(`parseNumber(${i}) is NaN!`)}return e}function Ps(i,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(i-t)<e}function F(i,t,e){const s=Math.min(t,e),n=Math.max(t,e);return i<s?s:i>n?n:i}function Bh(i,t){return(i%t+t)%t}function Ii(i,t,e){return(1-e)*i+e*t}const Nh=(i,t,e)=>s=>{const n=F(s,i,t);return e==0?n:t-n<e?t:Math.round(n/e)*e};function Yh(i,t=12){return It(i,0).toFixed(t)}function $t(i,t=12){return+Yh(i,t)}function Di(i,t){const e=yr("number-single",String(i));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):kh(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?i.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?i.substring(e.matchIndex+e.fullMatch.length):""}}function Ar(i){const t=yr("number",i);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const ee=Uh();function Uh(){const i=new ArrayBuffer(4),t=new Float32Array(i),e=new Uint32Array(i),s=new Uint32Array(512),n=new Uint32Array(512);for(let h=0;h<256;++h){const c=h-127;c<-27?(s[h]=0,s[h|256]=32768,n[h]=24,n[h|256]=24):c<-14?(s[h]=1024>>-c-14,s[h|256]=1024>>-c-14|32768,n[h]=-c-1,n[h|256]=-c-1):c<=15?(s[h]=c+15<<10,s[h|256]=c+15<<10|32768,n[h]=13,n[h|256]=13):c<128?(s[h]=31744,s[h|256]=64512,n[h]=24,n[h|256]=24):(s[h]=31744,s[h|256]=64512,n[h]=13,n[h|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let h=1;h<1024;++h){let c=h<<13,l=0;for(;!(c&8388608);)c<<=1,l-=8388608;c&=-8388609,l+=947912704,r[h]=c|l}for(let h=1024;h<2048;++h)r[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)a[h]=h<<23;a[31]=1199570944,a[32]=2147483648;for(let h=33;h<63;++h)a[h]=2147483648+(h-32<<23);a[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(o[h]=1024);return{floatView:t,uint32View:e,baseTable:s,shiftTable:n,mantissaTable:r,exponentTable:a,offsetTable:o}}function Ct(i){Math.abs(i)>65504&&console.warn("toHalfFloat(): Value out of range."),i=F(i,-65504,65504),ee.floatView[0]=i;const t=ee.uint32View[0],e=t>>23&511;return ee.baseTable[e]+((t&8388607)>>ee.shiftTable[e])}function Ms(i){const t=i>>10;return ee.uint32View[0]=ee.mantissaTable[ee.offsetTable[t]+(i&1023)]+ee.exponentTable[t],ee.floatView[0]}var gt=(i=>(i.UNKNOWN="",i.TEXT="text/plain",i.MD="text/plain",i.HTML="text/html",i.XML_TEXT="text/xml",i.CSS="text/css",i.JPEG="image/jpeg",i.PNG="image/png",i.GIF="image/gif",i.BMP="image/bmp",i.WEBP="image/webp",i.SVG="image/svg+xml",i.ICON="image/x-icon",i.MICROSOFT_ICON="image/vnd.microsoft.icon",i.MPEG="audio/mpeg",i.MP3="audio/mpeg",i.MP4="video/mp4",i.OGG="audio/ogg",i.WAV="audio/wav",i.MIDI="audio/midi",i.WEBM="video/webm",i.VIDEO_OGG="video/ogg",i.OCTET_STREAM="application/octet-stream",i.JAVASCRIPT="application/javascript",i.ECMASCRIPT="application/ecmascript",i.JSON="application/json",i.XML="application/xml",i.XHTML="application/xhtml+xml",i.XWWW="application/x-www-form-urlencoded",i.DOC="application/msword",i.CSV="application/x-csv",i.EXCEL="application/vnb.ms-excel",i.PPT="application/vnb.mspowerpoint",i.PDF="application/pdf",i.ZIP="application/zip",i.TGZ="application/x-gtar",i.TAR_GZ="application/x-gzip",i.EOT="appliaction/vnd.ms-fontobject",i.TTF="aplication/font-sfnt",i.PKCS12="aplication/pkcs12",i))(gt||{}),Es=(i=>(i.ascii="ascii",i.utf8="utf8",i.utf16le="utf16le",i.ucs2="ucs2",i.base64="base64",i.base64url="base64url",i.latin1="latin1",i.binary="binary",i.hex="hex",i))(Es||{}),Dt=(i=>(i.text="text",i.dataURL="dataURL",i.binaryString="binaryString",i.arraybuffer="arraybuffer",i))(Dt||{});const Xe=(i,t=16)=>{let e=i.toLowerCase();const s=e.indexOf("0b")==0,n=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(s||n||r)&&(e=e.slice(2)),s&&(t=2),n&&(t=8),r&&(t=16);const a=parseInt(e,t);if(isNaN(a))throw new Error(`radixStringToNumber(${i}, ${t}) 无法解析!`);return a};function Xh(i){return new TextEncoder().encode(i)}function Vh(i){return String.fromCharCode.apply(null,new Uint16Array(i))}const Ri=(i,t,e)=>t?e===Es.base64?new Blob([i],{type:`${t};${e}`}):e===Es.utf8?new Blob([i],{type:`${t};charset=${e}`}):new Blob([i],{type:`${t}`}):new Blob([i]),Gh=i=>{let t=gt.UNKNOWN;switch(new DataView(i).getUint32(0,qh()).toString(16).toUpperCase()){case"FFD8FFDB":t=gt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=gt.JPEG;break;case"89504E47":t=gt.PNG;break;case"47494638":t=gt.GIF;break;case"52494646":t=gt.WEBP;break;case"25504446":t=gt.PDF;break;case"504B0304":t=gt.ZIP;break}return t};function qh(){const i=Uint32Array.of(305419896),t=new Uint8Array(i.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function J(){return(performance||Date).now()}function jh(i,t=3){const e=Math.max(i.length,6);let s="";for(let r=0;r<e-4;r++)s+=i[r]||"0";const n=[s,""+(i[e-4]||"0")+(i[e-3]||"0"),""+(i[e-2]||"0")+(i[e-1]||"0")];switch(t){case 1:return n[0];case 2:return n[0]+":"+n[1];case 3:return n[0]+":"+n[1]+":"+n[2]}}function Hh(i){const t=Math.max(i.length,6);let e=0;e+=(i[t-2]||0)*10+(i[t-1]||0),e+=((i[t-4]||0)*10+(i[t-3]||0))*60;let s=0;for(let n=0;n<t-4;n++)s=s*10+(i[n]||0);return e+=s*60*60,e=Math.floor(Math.max(0,e)),e}function $h(i,t=!1){let e=0,s;typeof i=="number"?(e=i,s=[]):(s=i,e=Hh(s),Oh(s));const n=e%60;s.unshift(n%10),s.unshift(Math.floor(n/10)),e=Math.floor(e/60);const r=e%60;if(s.unshift(r%10),s.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const a=e%100;for(s.unshift(a%10),s.unshift(Math.floor(a/10)),e=Math.floor(e/100);e;)s.unshift(e%10),e=Math.floor(e/10)}else{const a=e%24;s.unshift(a%10),s.unshift(Math.floor(a/10))}return s}function Wh(i,t=1,e=!1){return i[i.length-1]+=t,$h(i,e)}class Ve{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}addListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}on(t,e){return this.addListener(t,e),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(s=>s!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(n=>{n(...e)}),this}once(t,e){const n=(()=>{let r=!1;return(...a)=>{r||(r=!0,e(...a),this.off(t,n))}})();return this.on(t,n),this}}class _e{_maps=new Map;_mapsAddedDuringUpdate=new Map;_overflow;constructor(t){this._overflow=()=>{if(!t)return!1;const e=this.length;return e==0?!1:t?.overflow?t.overflow():!!t.size&&t.size>0&&e>=t.size}}entries(){return Array.from(this._maps.entries())}keys(){return Array.from(this._maps.keys())}values(){return Array.from(this._maps.values())}json(){return this.entries().reduce((t,[e,s])=>((Ih(e)||Dh(e)||Rh(e))&&(t[e]=s),t),{})}get length(){return this.entries().length}set(t,e){for(;this._overflow();){const s=this._maps.keys().next();s.done||this.delete(s.value)}this._maps.set(t,e),this._mapsAddedDuringUpdate.set(t,e)}get(t){return this._maps.get(t)}has(t){return this._maps.has(t)}getIndex(t){const e=this.entries();if(e.length&&e[t])return e[t]}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this._mapsAddedDuringUpdate.delete(t),this._maps.delete(t)}clear(){this._maps.clear(),this._mapsAddedDuringUpdate.clear()}flush(){this.clear()}filter(t){let e=Array.from(this._maps.entries());for(;e.length>0;){this._mapsAddedDuringUpdate.clear();for(let s=0,n=e.length;s<n;s++){const[r,a]=e[s];t(r,a)===!1&&this.delete(r)}e=Array.from(this._mapsAddedDuringUpdate.entries())}}}let As=!1,Li=(i,t)=>{};function Jh(){As=!0}function Zh(){As=!1}function Kh(i){Li=i}function Pe(i){Li("info",i),As&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(i))}function Qh(i){Li("warn",i),As&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(i))}const zi=()=>{};function Oi(i,t=3,e){return async function(...s){let n;for(let r=0;r<t;r++)try{return await i.call(this,...s)}catch(a){Pe(`(${i.name}) attempt ${r+1} failed, retrying...`),n=a,await new Promise(o=>setTimeout(o,typeof e=="number"?e:300*Math.pow(2,r)))}throw Pe(`(${i.name}) max retries reached. Last error: ${n.message}`),n}}function Fi(i,t=6e4){const e=new _e,s=new _e;return async function(...n){const r=Date.now();e.filter((h,c)=>r-c.timestamp<t);const a=JSON.stringify(n),o=e.get(a);if(o){if(r-o.timestamp<t)return Pe(`(${i.name}) cache hit!`),o.value;e.delete(a)}try{let h;const c=s.get(a);if(c)Pe(`(${i.name}) cache waiting previous!`),h=await c,s.delete(a),Pe(`(${i.name}) cache waited!`);else{Pe(`(${i.name}) cache miss, fetching fresh data...`);const l=i.call(this,...n);s.set(a,l),h=await l,Pe(`(${i.name}) cache settled!`)}return e.set(a,{value:h,timestamp:Date.now()}),s.delete(a),h}catch(h){throw h}}}Array.prototype.ap=function(i){return this.reduce((t,e)=>t.concat(i.map(e)),[])};let ts;function xt(i){ts=i,i(),ts=null}class tc{subscribers=new Set;add(){ts&&!this.subscribers.has(ts)&&this.subscribers.add(ts)}notify(){this.subscribers.forEach(t=>t())}}const kr=new WeakMap;function ks(i,t){let e=kr.get(i);e||(e=new Map,kr.set(i,e));let s=e.get(t);return s||(s=new tc,e.set(t,s)),s}function ec(i,t=!1){return Object.keys(i).forEach(e=>{let s=i[e];if(t&&typeof s=="object"&&s!==null)i[e]=Bi(s,t);else{const n=ks(i,e);Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){return n.add(),s},set(r){s!=r&&(s=r,n.notify())}})}}),i}function Is(i,t=!1){return ec({value:i},t)}function Bi(i,t=!1){const e={get(n,r,a){const o=Reflect.get(n,r,a);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const c=Bi(o,t);c.YZReactiveProxyParentTarget=n,c.YZReactiveProxyParentKey=r,Reflect.set(a,r,c)}return ks(n,r).add(),Reflect.get(n,r,a)},set(n,r,a,o){const h=Reflect.get(n,r,o),c=Reflect.set(n,r,a,o);return Array.isArray(n)?ks(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():h!=a&&ks(n,r).notify(),c},has(n,r){return r==="isYZReactiveProxy"||r in n}};return new Proxy(i,e)}const Ir=Bi;function sc(i=3,t){return function(e,s,n){const r=`${e.constructor.name}.${String(s)}`,a=n.value;if(typeof a!="function")throw new SyntaxError(`@Retry() can only be used on functions, not: ${r}`);const o=Oi(a,i,t);return{...n,async value(...h){return await o.apply(this,h)}}}}function ic(i=6e4){return function(t,e,s){const n=`${t.constructor.name}.${String(e)}`,r=s.value;if(typeof r!="function")throw new SyntaxError(`@Cache() can only be used on functions, not: ${n}`);const a=Fi(r,i);return{...s,async value(...o){return await a.apply(this,o)}}}}function nc(i,t=(e,s)=>e<=s){const e=i.length;let s=Math.floor(e/2);for(;s>0;){for(let n=s;n<e;n++){const r=i[n];let a=n;for(;a>=s&&!t(i[a-s],r);)i[a]=i[a-s],a-=s;i[a]=r}s=Math.floor(s/2)}}function rc(){const i={};return i.promise=new Promise((t,e)=>{i.resolve=t,i.reject=e}),i}let Dr;try{Dr=Promise}catch{Dr=function(){}}function Rr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Lr={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],_=b[3];y+=(w&P|~w&_)+S[0]-680876936|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[1]-389564586|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[2]+606105819|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[3]-1044525330|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[4]-176418897|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[5]+1200080426|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[6]-1473231341|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[7]-45705983|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[8]+1770035416|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[9]-1958414417|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[10]-42063|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[11]-1990404162|0,w=(w<<22|w>>>10)+P|0,y+=(w&P|~w&_)+S[12]+1804603682|0,y=(y<<7|y>>>25)+w|0,_+=(y&w|~y&P)+S[13]-40341101|0,_=(_<<12|_>>>20)+y|0,P+=(_&y|~_&w)+S[14]-1502002290|0,P=(P<<17|P>>>15)+_|0,w+=(P&_|~P&y)+S[15]+1236535329|0,w=(w<<22|w>>>10)+P|0,y+=(w&_|P&~_)+S[1]-165796510|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[6]-1069501632|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[11]+643717713|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[0]-373897302|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[5]-701558691|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[10]+38016083|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[15]-660478335|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[4]-405537848|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[9]+568446438|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[14]-1019803690|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[3]-187363961|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[8]+1163531501|0,w=(w<<20|w>>>12)+P|0,y+=(w&_|P&~_)+S[13]-1444681467|0,y=(y<<5|y>>>27)+w|0,_+=(y&P|w&~P)+S[2]-51403784|0,_=(_<<9|_>>>23)+y|0,P+=(_&w|y&~w)+S[7]+1735328473|0,P=(P<<14|P>>>18)+_|0,w+=(P&y|_&~y)+S[12]-1926607734|0,w=(w<<20|w>>>12)+P|0,y+=(w^P^_)+S[5]-378558|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[8]-2022574463|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[11]+1839030562|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[14]-35309556|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[1]-1530992060|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[4]+1272893353|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[7]-155497632|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[10]-1094730640|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[13]+681279174|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[0]-358537222|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[3]-722521979|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[6]+76029189|0,w=(w<<23|w>>>9)+P|0,y+=(w^P^_)+S[9]-640364487|0,y=(y<<4|y>>>28)+w|0,_+=(y^w^P)+S[12]-421815835|0,_=(_<<11|_>>>21)+y|0,P+=(_^y^w)+S[15]+530742520|0,P=(P<<16|P>>>16)+_|0,w+=(P^_^y)+S[2]-995338651|0,w=(w<<23|w>>>9)+P|0,y+=(P^(w|~_))+S[0]-198630844|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[7]+1126891415|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[14]-1416354905|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[5]-57434055|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[12]+1700485571|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[3]-1894986606|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[10]-1051523|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[1]-2054922799|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[8]+1873313359|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[15]-30611744|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[6]-1560198380|0,P=(P<<15|P>>>17)+_|0,w+=(_^(P|~y))+S[13]+1309151649|0,w=(w<<21|w>>>11)+P|0,y+=(P^(w|~_))+S[4]-145523070|0,y=(y<<6|y>>>26)+w|0,_+=(w^(y|~P))+S[11]-1120210379|0,_=(_<<10|_>>>22)+y|0,P+=(y^(_|~w))+S[2]+718787259|0,P=(P<<15|P>>>17)+_|0,w+=(_^(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]=_+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,_,R,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,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)_[w>>2]|=b.charCodeAt(w)<<(w%4<<3);if(_[w>>2]|=128<<(w%4<<3),w>55)for(n(y,_),w=0;w<16;w+=1)_[w]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(R[2],16),G=parseInt(R[1],16)||0,_[14]=X,_[15]=G,n(y,_),y}function h(b){var S=b.length,y=[1732584193,-271733879,-1732584194,271733878],w,P,_,R,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,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<P;w+=1)_[w>>2]|=b[w]<<(w%4<<3);if(_[w>>2]|=128<<(w%4<<3),w>55)for(n(y,_),w=0;w<16;w+=1)_[w]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),X=parseInt(R[2],16),G=parseInt(R[1],16)||0,_[14]=X,_[15]=G,n(y,_),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),_=w,R,X,G,$;return y!==e&&(_=b(y,w)),P>_?new ArrayBuffer(0):(R=_-P,X=new ArrayBuffer(R),G=new Uint8Array(X),$=new Uint8Array(this,P,R),G.set($),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),_;for(_=0;_<y;_+=1)P[_]=b.charCodeAt(_);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 v(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 C(){this.reset()}return C.prototype.append=function(b){return this.appendBinary(u(b)),this},C.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},C.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],_;for(w=0;w<y;w+=1)P[w>>2]|=S.charCodeAt(w)<<(w%4<<3);return this._finish(P,y),_=l(this._hash),b&&(_=v(_)),this.reset(),_},C.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},C.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},C.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},C.prototype._finish=function(b,S){var y=S,w,P,_;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),_=parseInt(w[1],16)||0,b[14]=P,b[15]=_,n(this._hash,b)},C.hash=function(b,S){return C.hashBinary(u(b),S)},C.hashBinary=function(b,S){var y=o(b),w=l(y);return S?v(w):w},C.ArrayBuffer=function(){this.reset()},C.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},C.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,_;for(P=0;P<y;P+=1)w[P>>2]|=S[P]<<(P%4<<3);return this._finish(w,y),_=l(this._hash),b&&(_=v(_)),this.reset(),_},C.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.ArrayBuffer.prototype.getState=function(){var b=C.prototype.getState.call(this);return b.buff=m(b.buff),b},C.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),C.prototype.setState.call(this,b)},C.ArrayBuffer.prototype.destroy=C.prototype.destroy,C.ArrayBuffer.prototype._finish=C.prototype._finish,C.ArrayBuffer.hash=function(b,S){var y=h(new Uint8Array(b)),w=l(y);return S?v(w):w},C})})(Lr);var ac=Lr.exports;const oc=Rr(ac);function zr(i,t){return function(){return i.apply(t,arguments)}}const{toString:hc}=Object.prototype,{getPrototypeOf:Ni}=Object,Ds=(i=>t=>{const e=hc.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=i=>(i=i.toLowerCase(),t=>Ds(t)===i),Rs=i=>t=>typeof t===i,{isArray:Ge}=Array,es=Rs("undefined");function cc(i){return i!==null&&!es(i)&&i.constructor!==null&&!es(i.constructor)&&Tt(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const Or=Nt("ArrayBuffer");function lc(i){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(i):t=i&&i.buffer&&Or(i.buffer),t}const uc=Rs("string"),Tt=Rs("function"),Fr=Rs("number"),Ls=i=>i!==null&&typeof i=="object",fc=i=>i===!0||i===!1,zs=i=>{if(Ds(i)!=="object")return!1;const t=Ni(i);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},dc=Nt("Date"),mc=Nt("File"),gc=Nt("Blob"),pc=Nt("FileList"),yc=i=>Ls(i)&&Tt(i.pipe),wc=i=>{let t;return i&&(typeof FormData=="function"&&i instanceof FormData||Tt(i.append)&&((t=Ds(i))==="formdata"||t==="object"&&Tt(i.toString)&&i.toString()==="[object FormData]"))},xc=Nt("URLSearchParams"),[bc,Sc,vc,Cc]=["ReadableStream","Request","Response","Headers"].map(Nt),Tc=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ss(i,t,{allOwnKeys:e=!1}={}){if(i===null||typeof i>"u")return;let s,n;if(typeof i!="object"&&(i=[i]),Ge(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 Br(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)(),Nr=i=>!es(i)&&i!==Me;function Yi(){const{caseless:i}=Nr(this)&&this||{},t={},e=(s,n)=>{const r=i&&Br(t,n)||n;zs(t[r])&&zs(s)?t[r]=Yi(t[r],s):zs(s)?t[r]=Yi({},s):Ge(s)?t[r]=s.slice():t[r]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&ss(arguments[s],e);return t}const _c=(i,t,e,{allOwnKeys:s}={})=>(ss(t,(n,r)=>{e&&Tt(n)?i[r]=zr(n,e):i[r]=n},{allOwnKeys:s}),i),Pc=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Mc=(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)},Ec=(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&&Ni(i)}while(i&&(!e||e(i,t))&&i!==Object.prototype);return t},Ac=(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},kc=i=>{if(!i)return null;if(Ge(i))return i;let t=i.length;if(!Fr(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=i[t];return e},Ic=(i=>t=>i&&t instanceof i)(typeof Uint8Array<"u"&&Ni(Uint8Array)),Dc=(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])}},Rc=(i,t)=>{let e;const s=[];for(;(e=i.exec(t))!==null;)s.push(e);return s},Lc=Nt("HTMLFormElement"),zc=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),Yr=(({hasOwnProperty:i})=>(t,e)=>i.call(t,e))(Object.prototype),Oc=Nt("RegExp"),Ur=(i,t)=>{const e=Object.getOwnPropertyDescriptors(i),s={};ss(e,(n,r)=>{let a;(a=t(n,r,i))!==!1&&(s[r]=a||n)}),Object.defineProperties(i,s)},Fc=i=>{Ur(i,(t,e)=>{if(Tt(i)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=i[e];if(Tt(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+"'")})}})},Bc=(i,t)=>{const e={},s=n=>{n.forEach(r=>{e[r]=!0})};return Ge(i)?s(i):s(String(i).split(t)),e},Nc=()=>{},Yc=(i,t)=>i!=null&&Number.isFinite(i=+i)?i:t;function Uc(i){return!!(i&&Tt(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const Xc=i=>{const t=new Array(10),e=(s,n)=>{if(Ls(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[n]=s;const r=Ge(s)?[]:{};return ss(s,(a,o)=>{const h=e(a,n+1);!es(h)&&(r[o]=h)}),t[n]=void 0,r}}return s};return e(i,0)},Vc=Nt("AsyncFunction"),Gc=i=>i&&(Ls(i)||Tt(i))&&Tt(i.then)&&Tt(i.catch),Xr=((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",Tt(Me.postMessage)),qc=typeof queueMicrotask<"u"?queueMicrotask.bind(Me):typeof process<"u"&&process.nextTick||Xr,A={isArray:Ge,isArrayBuffer:Or,isBuffer:cc,isFormData:wc,isArrayBufferView:lc,isString:uc,isNumber:Fr,isBoolean:fc,isObject:Ls,isPlainObject:zs,isReadableStream:bc,isRequest:Sc,isResponse:vc,isHeaders:Cc,isUndefined:es,isDate:dc,isFile:mc,isBlob:gc,isRegExp:Oc,isFunction:Tt,isStream:yc,isURLSearchParams:xc,isTypedArray:Ic,isFileList:pc,forEach:ss,merge:Yi,extend:_c,trim:Tc,stripBOM:Pc,inherits:Mc,toFlatObject:Ec,kindOf:Ds,kindOfTest:Nt,endsWith:Ac,toArray:kc,forEachEntry:Dc,matchAll:Rc,isHTMLForm:Lc,hasOwnProperty:Yr,hasOwnProp:Yr,reduceDescriptors:Ur,freezeMethods:Fc,toObjectSet:Bc,toCamelCase:zc,noop:Nc,toFiniteNumber:Yc,findKey:Br,global:Me,isContextDefined:Nr,isSpecCompliantForm:Uc,toJSONObject:Xc,isAsyncFn:Vc,isThenable:Gc,setImmediate:Xr,asap:qc};function N(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(N,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 Vr=N.prototype,Gr={};["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=>{Gr[i]={value:i}}),Object.defineProperties(N,Gr),Object.defineProperty(Vr,"isAxiosError",{value:!0}),N.from=(i,t,e,s,n,r)=>{const a=Object.create(Vr);return A.toFlatObject(i,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),N.call(a,i.message,t,e,s,n),a.cause=i,a.name=i.name,r&&Object.assign(a,r),a};const jc=null;function Ui(i){return A.isPlainObject(i)||A.isArray(i)}function qr(i){return A.endsWith(i,"[]")?i.slice(0,-2):i}function jr(i,t,e){return i?i.concat(t).map(function(n,r){return n=qr(n),!e&&r?"["+n+"]":n}).join(e?".":""):t}function Hc(i){return A.isArray(i)&&!i.some(Ui)}const $c=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function Os(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(v,C){return!A.isUndefined(C[v])});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 N("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,v,C){let b=g;if(g&&!C&&typeof g=="object"){if(A.endsWith(v,"{}"))v=s?v:v.slice(0,-2),g=JSON.stringify(g);else if(A.isArray(g)&&Hc(g)||(A.isFileList(g)||A.endsWith(v,"[]"))&&(b=A.toArray(g)))return v=qr(v),b.forEach(function(y,w){!(A.isUndefined(y)||y===null)&&t.append(a===!0?jr([v],w,r):a===null?v:v+"[]",c(y))}),!1}return Ui(g)?!0:(t.append(jr(C,v,r),c(g)),!1)}const u=[],d=Object.assign($c,{defaultVisitor:l,convertValue:c,isVisitable:Ui});function m(g,v){if(!A.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.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,v,d))===!0&&m(b,v?v.concat(S):[S])}),u.pop()}}if(!A.isObject(i))throw new TypeError("data must be an object");return m(i),t}function Hr(i){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Xi(i,t){this._pairs=[],i&&Os(i,this,t)}const $r=Xi.prototype;$r.append=function(t,e){this._pairs.push([t,e])},$r.toString=function(t){const e=t?function(s){return t.call(this,s,Hr)}:Hr;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Wc(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wr(i,t,e){if(!t)return i;const s=e&&e.encode||Wc;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 Xi(t,e).toString(s),r){const a=i.indexOf("#");a!==-1&&(i=i.slice(0,a)),i+=(i.indexOf("?")===-1?"?":"&")+r}return i}class Jc{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 Jr=Jc,Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Xi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vi=typeof window<"u"&&typeof document<"u",Gi=typeof navigator=="object"&&navigator||void 0,Kc=Vi&&(!Gi||["ReactNative","NativeScript","NS"].indexOf(Gi.product)<0),Qc=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tl=Vi&&window.location.href||"http://localhost",ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserEnv:Kc,hasStandardBrowserWebWorkerEnv:Qc,navigator:Gi,origin:tl},Symbol.toStringTag,{value:"Module"})),...Zc};function el(i,t){return Os(i,new ut.classes.URLSearchParams,Object.assign({visitor:function(e,s,n,r){return ut.isNode&&A.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function sl(i){return A.matchAll(/\w+|\[(\w*)]/g,i).map(t=>t[0]==="[]"?"":t[1]||t[0])}function il(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 Kr(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]=il(n[a])),!o)}if(A.isFormData(i)&&A.isFunction(i.entries)){const e={};return A.forEachEntry(i,(s,n)=>{t(sl(s),n,e,0)}),e}return null}function nl(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 qi={transitional:Zr,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(Kr(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 el(t,this.formSerializer).toString();if((o=A.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Os(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),nl(t)):t}],transformResponse:[function(t){const e=this.transitional||qi.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"?N.from(o,N.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:ut.classes.FormData,Blob:ut.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=>{qi.headers[i]={}});const ji=qi,rl=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"]),al=i=>{const t={};let e,s,n;return i&&i.split(`
|
|
11
|
+
`).forEach(function(a){n=a.indexOf(":"),e=a.substring(0,n).trim().toLowerCase(),s=a.substring(n+1).trim(),!(!e||t[e]&&rl[e])&&(e==="set-cookie"?t[e]?t[e].push(s):t[e]=[s]:t[e]=t[e]?t[e]+", "+s:s)}),t},Qr=Symbol("internals");function is(i){return i&&String(i).trim().toLowerCase()}function Fs(i){return i===!1||i==null?i:A.isArray(i)?i.map(Fs):String(i)}function ol(i){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=e.exec(i);)t[s[1]]=s[2];return t}const hl=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function Hi(i,t,e,s,n){if(A.isFunction(s))return s.call(this,t,e);if(n&&(t=e),!!A.isString(t)){if(A.isString(s))return t.indexOf(s)!==-1;if(A.isRegExp(s))return s.test(t)}}function cl(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,s)=>e.toUpperCase()+s)}function ll(i,t){const e=A.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(i,s+e,{value:function(n,r,a){return this[s].call(this,t,n,r,a)},configurable:!0})})}class Bs{constructor(t){t&&this.set(t)}set(t,e,s){const n=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=A.findKey(n,l);(!u||n[u]===void 0||c===!0||c===void 0&&n[u]!==!1)&&(n[u||h]=Fs(o))}const a=(o,h)=>A.forEach(o,(c,l)=>r(c,l,h));if(A.isPlainObject(t)||t instanceof this.constructor)a(t,e);else if(A.isString(t)&&(t=t.trim())&&!hl(t))a(al(t),e);else if(A.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=A.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return ol(n);if(A.isFunction(e))return e.call(this,n,s);if(A.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=is(t),t){const s=A.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||Hi(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(a){if(a=is(a),a){const o=A.findKey(s,a);o&&(!e||Hi(s,s[o],o,e))&&(delete s[o],n=!0)}}return A.isArray(t)?t.forEach(r):r(t),n}clear(t){const e=Object.keys(this);let s=e.length,n=!1;for(;s--;){const r=e[s];(!t||Hi(this,this[r],r,t,!0))&&(delete this[r],n=!0)}return n}normalize(t){const e=this,s={};return A.forEach(this,(n,r)=>{const a=A.findKey(s,r);if(a){e[a]=Fs(n),delete e[r];return}const o=t?cl(r):String(r).trim();o!==r&&delete e[r],e[o]=Fs(n),s[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return A.forEach(this,(s,n)=>{s!=null&&s!==!1&&(e[n]=t&&A.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(`
|
|
12
|
+
`)}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[Qr]=this[Qr]={accessors:{}}).accessors,n=this.prototype;function r(a){const o=is(a);s[o]||(ll(n,a),s[o]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}Bs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Bs.prototype,({value:i},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>i,set(s){this[e]=s}}}),A.freezeMethods(Bs);const Yt=Bs;function $i(i,t){const e=this||ji,s=t||e,n=Yt.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 ta(i){return!!(i&&i.__CANCEL__)}function qe(i,t,e){N.call(this,i??"canceled",N.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(qe,N,{__CANCEL__:!0});function ea(i,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?i(e):t(new N("Request failed with status code "+e.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function ul(i){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}function fl(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 dl(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 Ns=(i,t,e=3)=>{let s=0;const n=fl(50,250);return dl(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)},sa=(i,t)=>{const e=i!=null;return[s=>t[0]({lengthComputable:e,total:i,loaded:s}),t[1]]},ia=i=>(...t)=>A.asap(()=>i(...t)),ml=ut.hasStandardBrowserEnv?((i,t)=>e=>(e=new URL(e,ut.origin),i.protocol===e.protocol&&i.host===e.host&&(t||i.port===e.port)))(new URL(ut.origin),ut.navigator&&/(msie|trident)/i.test(ut.navigator.userAgent)):()=>!0,gl=ut.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 pl(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function yl(i,t){return t?i.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):i}function na(i,t,e){let s=!pl(t);return i&&(s||e==!1)?yl(i,t):t}const ra=i=>i instanceof Yt?{...i}:i;function Ee(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(ra(c),ra(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 aa=i=>{const t=Ee({},i);let{data:e,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:r,headers:a,auth:o}=t;t.headers=a=Yt.from(a),t.url=Wr(na(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(ut.hasStandardBrowserEnv||ut.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(ut.hasStandardBrowserEnv&&(s&&A.isFunction(s)&&(s=s(t)),s||s!==!1&&ml(t.url))){const c=n&&r&&gl.read(r);c&&a.set(n,c)}return t},wl=typeof XMLHttpRequest<"u"&&function(i){return new Promise(function(e,s){const n=aa(i);let r=n.data;const a=Yt.from(n.headers).normalize();let{responseType:o,onUploadProgress:h,onDownloadProgress:c}=n,l,u,d,m,g;function v(){m&&m(),g&&g(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let C=new XMLHttpRequest;C.open(n.method.toUpperCase(),n.url,!0),C.timeout=n.timeout;function b(){if(!C)return;const y=Yt.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),P={data:!o||o==="text"||o==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:y,config:i,request:C};ea(function(R){e(R),v()},function(R){s(R),v()},P),C=null}"onloadend"in C?C.onloadend=b:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(b)},C.onabort=function(){C&&(s(new N("Request aborted",N.ECONNABORTED,i,C)),C=null)},C.onerror=function(){s(new N("Network Error",N.ERR_NETWORK,i,C)),C=null},C.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const P=n.transitional||Zr;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),s(new N(w,P.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,i,C)),C=null},r===void 0&&a.setContentType(null),"setRequestHeader"in C&&A.forEach(a.toJSON(),function(w,P){C.setRequestHeader(P,w)}),A.isUndefined(n.withCredentials)||(C.withCredentials=!!n.withCredentials),o&&o!=="json"&&(C.responseType=n.responseType),c&&([d,g]=Ns(c,!0),C.addEventListener("progress",d)),h&&C.upload&&([u,m]=Ns(h),C.upload.addEventListener("progress",u),C.upload.addEventListener("loadend",m)),(n.cancelToken||n.signal)&&(l=y=>{C&&(s(!y||y.type?new qe(null,i,C):y),C.abort(),C=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));const S=ul(n.url);if(S&&ut.protocols.indexOf(S)===-1){s(new N("Unsupported protocol "+S+":",N.ERR_BAD_REQUEST,i));return}C.send(r||null)})},xl=(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 N?l:new qe(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,r(new N(`timeout ${t} of ms exceeded`,N.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}},bl=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},Sl=async function*(i,t){for await(const e of vl(i))yield*bl(e,t)},vl=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()}},oa=(i,t,e,s)=>{const n=Sl(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",ha=Ys&&typeof ReadableStream=="function",Cl=Ys&&(typeof TextEncoder=="function"?(i=>t=>i.encode(t))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),ca=(i,...t)=>{try{return!!i(...t)}catch{return!1}},Tl=ha&&ca(()=>{let i=!1;const t=new Request(ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!t}),la=64*1024,Wi=ha&&ca(()=>A.isReadableStream(new Response("").body)),Us={stream:Wi&&(i=>i.body)};Ys&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Us[t]&&(Us[t]=A.isFunction(i[t])?e=>e[t]():(e,s)=>{throw new N(`Response type '${t}' is not supported`,N.ERR_NOT_SUPPORT,s)})})})(new Response);const _l=async i=>{if(i==null)return 0;if(A.isBlob(i))return i.size;if(A.isSpecCompliantForm(i))return(await new Request(ut.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 Cl(i)).byteLength},Pl=async(i,t)=>{const e=A.toFiniteNumber(i.getContentLength());return e??_l(t)},Ji={http:jc,xhr:wl,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}=aa(i);c=c?(c+"").toLowerCase():"text";let m=xl([n,r&&r.toAbortSignal()],a),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let C;try{if(h&&Tl&&e!=="get"&&e!=="head"&&(C=await Pl(l,s))!==0){let P=new Request(t,{method:"POST",body:s,duplex:"half"}),_;if(A.isFormData(s)&&(_=P.headers.get("content-type"))&&l.setContentType(_),P.body){const[R,X]=sa(C,Ns(ia(h)));s=oa(P.body,la,R,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=Wi&&(c==="stream"||c==="response");if(Wi&&(o||y&&v)){const P={};["status","statusText","headers"].forEach(G=>{P[G]=S[G]});const _=A.toFiniteNumber(S.headers.get("content-length")),[R,X]=o&&sa(_,Ns(ia(o),!0))||[];S=new Response(oa(S.body,la,R,()=>{X&&X(),v&&v()}),P)}c=c||"text";let w=await Us[A.findKey(Us,c)||"text"](S,i);return!y&&v&&v(),await new Promise((P,_)=>{ea(P,_,{data:w,headers:Yt.from(S.headers),status:S.status,statusText:S.statusText,config:i,request:g})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,i,g),{cause:b.cause||b}):N.from(b,b&&b.code,i,g)}})};A.forEach(Ji,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch{}Object.defineProperty(i,"adapterName",{value:t})}});const ua=i=>`- ${i}`,Ml=i=>A.isFunction(i)||i===null||i===!1,fa={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,!Ml(e)&&(s=Ji[(a=String(e)).toLowerCase()],s===void 0))throw new N(`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 :
|
|
13
13
|
`+r.map(ua).join(`
|
|
14
|
-
`):" "+ua(r[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:Ji};function Zi(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new qe(null,i)}function da(i){return Zi(i),i.headers=Yt.from(i.headers),i.data=$i.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),fa.getAdapter(i.adapter||ji.adapter)(i).then(function(s){return Zi(i),s.data=$i.call(i,i.transformResponse,s),s.headers=Yt.from(s.headers),s},function(s){return ta(s)||(Zi(i),s&&s.response&&(s.response.data=$i.call(i,i.transformResponse,s.response),s.response.headers=Yt.from(s.response.headers))),Promise.reject(s)})}const ma="1.8.4",Xs={};["object","boolean","number","function","string","symbol"].forEach((i,t)=>{Xs[i]=function(s){return typeof s===i||"a"+(t<1?"n ":" ")+i}});const ga={};Xs.transitional=function(t,e,s){function n(r,a){return"[Axios v"+ma+"] Transitional option '"+r+"'"+a+(s?". "+s:"")}return(r,a,o)=>{if(t===!1)throw new N(n(a," has been removed"+(e?" in "+e:"")),N.ERR_DEPRECATED);return e&&!ga[a]&&(ga[a]=!0,console.warn(n(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,a,o):!0}},Xs.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function
|
|
15
|
-
`+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:n,headers:r}=e;s!==void 0&&Vs.assertOptions(s,{silentJSONParsing:Wt.transitional(Wt.boolean),forcedJSONParsing:Wt.transitional(Wt.boolean),clarifyTimeoutError:Wt.transitional(Wt.boolean)},!1),n!=null&&(A.isFunction(n)?e.paramsSerializer={serialize:n}:Vs.assertOptions(n,{encode:Wt.function,serialize:Wt.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Vs.assertOptions(e,{baseUrl:Wt.spelling("baseURL"),withXsrfToken:Wt.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=Yt.concat(a,r);const o=[];let h=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(e)===!1||(h=h&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let l,u=0,d;if(!h){const g=[da.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++],v=o[u++];try{m=g(m)}catch(C){v.call(this,C);break}}try{l=da.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=Ee(this.defaults,t);const e=na(t.baseURL,t.url,t.allowAbsoluteUrls);return Wr(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){Gs.prototype[t]=function(e,s){return this.request(Ee(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(Ee(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}Gs.prototype[t]=e(),Gs.prototype[t+"Form"]=e(!0)});const qs=Gs;class Ki{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 qe(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 Ki(function(n){t=n}),cancel:t}}}const kl=Ki;function Il(i){return function(e){return i.apply(null,e)}}function Dl(i){return A.isObject(i)&&i.isAxiosError===!0}const Qi={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(Qi).forEach(([i,t])=>{Qi[t]=i});const Rl=Qi;function pa(i){const t=new qs(i),e=zr(qs.prototype.request,t);return A.extend(e,qs.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return pa(Ee(i,n))},e}const et=pa(ji);et.Axios=qs,et.CanceledError=qe,et.CancelToken=kl,et.isCancel=ta,et.VERSION=ma,et.toFormData=Os,et.AxiosError=N,et.Cancel=et.CanceledError,et.all=function(t){return Promise.all(t)},et.spread=Il,et.isAxiosError=Dl,et.mergeConfig=Ee,et.AxiosHeaders=Yt,et.formToJSON=i=>Kr(A.isHTMLForm(i)?new FormData(i):i),et.getAdapter=fa.getAdapter,et.HttpStatusCode=Rl,et.default=et;const Ll=et,ya=window.crypto.subtle;ya||console.warn("Crypto API not supported");async function wa(i,t="SHA-256"){const e=await ya.digest(t,Vh(i));return Gh(e)}async function xa(i,t="SHA-256"){const e=JSON.stringify(Lh(i));return wa(e,t)}var zl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,Fl=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ol(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&&zl(t,e,n),n};class tn{instance;constructor(t){this.instance=Ll.create(t);const e=new ba;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)}}Fl([nc(6e4),ic(3)],tn.prototype,"request",1);class ba{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}async getRequestId(t){const{url:e,method:s,params:n,data:r}=t;return await xa({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 en=i=>new XMLSerializer().serializeToString(i),Bl=(i,t="text/html")=>new DOMParser().parseFromString(i,t),Sa=(i,t=gt.SVG,e=Es.utf8)=>Ri(en(i),t,e);async function sn(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 ns(i,t=Dt.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 Dt.dataURL:r.readAsDataURL(i);break;case Dt.binaryString:r.readAsBinaryString(i);break;case Dt.arraybuffer:r.readAsArrayBuffer(i);break;case Dt.text:default:r.readAsText(i)}})}async function Nl(i){const t=await ns(i,Dt.arraybuffer);return qh(t)}const Yl=i=>{let t;return i instanceof File?t=i.name:t=i,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function Ul(i){switch(i.toLowerCase()){case"jpg":case"jpeg":return gt.JPEG;case"gif":return gt.GIF;case"svg":return gt.SVG;case"pdf":return gt.PDF;case"png":default:return gt.PNG}}function va(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)va(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 Ca(i,t=1048576){return await new Promise((e,s)=>va(e,s,new hc.ArrayBuffer,i,t,0,Math.min(t,i.size)))}class Xl{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 tn({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 Ca(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(()=>{Jh(this.time,1),this.onTime?.(Hh(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function Vl(i,t){const e=Is(t?.value||"");if(!e.value){const s=`; ${document.cookie}`.split(`; ${i}=`).pop()?.split(";").shift();s&&(e.value=decodeURIComponent(s))}return xt(()=>{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}}),e}function Gl(){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 Ta(i,t){const e=Is(t||"");if(!t)try{let s=window.localStorage.getItem(i);s&&(s=JSON.parse(s),e.value=s?s.value:"")}catch{}return xt(()=>{if(e.value)try{window.localStorage.setItem(i,JSON.stringify(e))}catch{}else window.localStorage.removeItem(i)}),e}function ql(){window.localStorage.clear()}function jl(i,t){const e=Is(t||"");if(!t)try{let s=window.sessionStorage.getItem(i);s&&(s=JSON.parse(s),e.value=s?s.value:"")}catch{}return xt(()=>{if(e.value)try{window.sessionStorage.setItem(i,JSON.stringify(e))}catch{}else window.sessionStorage.removeItem(i)}),e}function Hl(i,t){let e;return i.objectStoreNames.contains(t)||(e=i.createObjectStore(t,{keyPath:"id"})),e}function $l(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,Hl(r,e),s(r)}})}function Wl(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 B(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 Jl=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Zl=["keydown","keyup","keypress"],Kl=["touchstart","touchend","touchcancel","touchmove"],Ql=["pointerdown","pointerup","pointercancel","pointermove"],tu=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],eu=["change"];function su(i,t,e={bubbles:!0,detail:{}}){if(!i)return;let s;try{Jl.includes(t)?s=new MouseEvent(t,e):Zl.includes(t)?s=new KeyboardEvent(t,e):Kl.includes(t)?s=new TouchEvent(t,e):Ql.includes(t)?s=new PointerEvent(t,e):tu.includes(t)?s=new DragEvent(t,e):eu.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 iu(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 de(i){i.preventDefault&&i.preventDefault();try{i.returnValue=!1}catch{}}function _a(i){i.stopPropagation&&i.stopPropagation();try{i.cancelBubble=!0}catch{}}function nu(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 ru(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 js=()=>{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 au(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 ou(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 nn(){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 hu=()=>{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 cu(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function lu(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function rn(){return js()==="ios"}function an(){return js()==="macos"}function uu(){return rn()|an()}function Pa(){return js()==="android"}function fu(){return rn()||Pa()}function Ma(){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 du=Ma()!==-1,mu=document.documentMode?document.documentMode===9:!1,gu=document.documentMode?document.documentMode===10:!1,pu=document.documentMode?document.documentMode===11:!1;function Ea(){return nn()==="wechat"}function Aa(){return nn()==="ali"}function yu(){return Ea()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function wu(){return Aa()&&navigator.userAgent.match(/miniprogram/i)}const xu=typeof document<"u",ka=typeof window<"u",bu=typeof history<"u",Su=ka&&window.File&&window.FileReader&&window.FileList&&window.Blob,Ia=(()=>{const i=pr();return!!(i.Worker&&i.Blob&&i.Promise&&i.OffscreenCanvas&&i.OffscreenCanvasRenderingContext2D&&i.HTMLCanvasElement&&i.HTMLCanvasElement.prototype.transferControlToOffscreen&&i.URL&&i.URL.createObjectURL)})(),vu=typeof Path2D=="function"&&typeof DOMMatrix=="function",Da=function(){if(!pr().OffscreenCanvas)return!1;const t=new OffscreenCanvas(1,1),e=t.getContext("2d");e.fillRect(0,0,1,1);const s=t.transferToImageBitmap();try{e.createPattern(s,"no-repeat")}catch{return!1}return!0}(),Cu=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},Tu="webkit moz ms o".split(" ");function Hs(i){return typeof i=="function"&&/native code/.test(i.toString())}function _u(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let i=J();window.requestAnimationFrame=function(t){const e=J(),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 on(i){let t=!1;return window.requestAnimationFrame(function e(s){!t&&i(s)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function hn(i,t=0){if(t==0)return i(J()),()=>{};{const e=J();return on(s=>s-e>=t?(i(s),!1):!0)}}function Pu(i,t=0){let e=!1,s=0;const n=J(),r=a=>{if(e)return;s++;const o=a-n-s*t;i(a,s,t<=o),hn(r,Math.max(0,t-o))};return hn(r,t),()=>{e=!0}}function Mu(i,t=20){const e=1e3/t;let s=0,n;return()=>(J()-s>=e&&(s=J(),n=i()),n)}window.requestIdleCallback=window.requestIdleCallback||function(i,t){const e=J();return setTimeout(function(){i({didTimeout:J()-e>50,timeRemaining:()=>Math.max(0,50-(J()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(i){clearTimeout(i)};function Ra(i,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?i():Ra(i,t)},{timeout:t})}const cn=new _e;let ln=!1;function un(i,t,e){i&&t&&cn.set(i,{cb:t,startTime:J(),timeout:e}),!ln&&(ln=!0,Au(s=>{ln=!1;let n=s.timeRemaining();cn.filter((r,a)=>{let o=!1;const h=J();(n>0||a.timeout&&J()-a.startTime>=a.timeout)&&(a.cb(),o=!0);const c=J();return n-=c-h,!o}),cn.length>0&&un()}))}let $s=0,Ae=33,me=33,fn;const La=new MessageChannel,Eu=La.port2;La.port1.onmessage=i=>{fn!==null&&fn({didTimeout:$s<=J(),timeRemaining:()=>Math.max(0,$s-J())})};function Au(i){return fn=i,requestAnimationFrame(t=>{let e=t-$s+me;e<me&&Ae<me?(e<8&&(e=8),me=e<Ae?Ae:e):e>me&&Ae>me?me=e<Ae?Ae:e:Ae=e,$s=t+me,Eu.postMessage(null)})}function ku(i){if(typeof setImmediate<"u"&&Hs(setImmediate))setImmediate(i);else if(typeof MessageChannel<"u"&&(Hs(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=i,t.postMessage(null)}else typeof Promise<"u"&&Hs(Promise)?Promise.resolve().then(i):setTimeout(i,0)}function Iu(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(t=>setTimeout(()=>{throw t}))}class rs{static _nextId=0;static nextId(){return rs._nextId++}}const z={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-z.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?z.Bounce.In(i*2)*.5:z.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 za(i){switch(i){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 i}}const Du=4,Ru=.001,Lu=1e-7,zu=10,as=11,Ws=1/(as-1),Ou=typeof Float32Array=="function";function Oa(i,t){return 1-3*t+3*i}function Fa(i,t){return 3*t-6*i}function Ba(i){return 3*i}function Js(i,t,e){return((Oa(t,e)*i+Fa(t,e))*i+Ba(t))*i}function Na(i,t,e){return 3*Oa(t,e)*i*i+2*Fa(t,e)*i+Ba(t)}function Fu(i,t,e,s,n){let r,a,o=0;do a=t+(e-t)/2,r=Js(a,s,n)-i,r>0?e=a:t=a;while(Math.abs(r)>Lu&&++o<zu);return a}function Bu(i,t,e,s){for(let n=0;n<Du;++n){const r=Na(t,e,s);if(r===0)return t;const a=Js(t,e,s)-i;t-=a/r}return t}function Nu(i){return i}function dn(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 Nu;const n=Ou?new Float32Array(as):new Array(as);for(let a=0;a<as;++a)n[a]=Js(a*Ws,i,e);function r(a){let o=0,h=1;const c=as-1;for(;h!==c&&n[h]<=a;++h)o+=Ws;--h;const l=(a-n[h])/(n[h+1]-n[h]),u=o+l*Ws,d=Na(u,i,e);return d>=Ru?Bu(a,u,i,e):d===0?u:Fu(a,o,o+Ws,i,e)}return a=>a===0||a===1?a:Js(r(a),t,s)}function mn(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 Ya(i){const[t,e,s,n]=mn(i);return[1-s,1-n,1-t,1-e]}function Yu(i){return dn(...mn(i))}function Uu(i){return dn(...Ya(i))}const se={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=se.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=se.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=se.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=se.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 Ua{_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=J(),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 Rt=new Ua;class gn{constructor(t,e=Rt){this._object=t,this._group=e}_id=rs.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=se.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=J()){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=J()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=J()){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=Rt){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=se.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=J(),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 Xu=rs.nextId,Vu=Rt.getAll.bind(Rt),Gu=Rt.removeAll.bind(Rt),qu=Rt.add.bind(Rt),ju=Rt.remove.bind(Rt),Hu=Rt.update.bind(Rt),$u={now:J,Sequence:rs,Easing:z,Interpolation:se,Group:Ua,Tween:gn,nextId:Xu,getAll:Vu,removeAll:Gu,add:qu,remove:ju,update:Hu};class pn{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=J(),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=J();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Zs{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){rc(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||z.Linear.None,interpolationFunction:s?.interpolationFunction||se.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 pn,s=this.frameDuration;return new Promise(n=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=on(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 gn({...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(),Te(t,c))})}const a=!!t.length;return a||(this.onGroupComplete?.(),n()),a})})}isPaused=!1;pausedClock=new pn;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=za(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 Ks=new _e,Xa=(i=!0)=>{Ks.filter((t,e)=>(e.alternate&&(yi(e,e.alternate),i&&Ks.set(t,e.alternate),e.alternate=void 0),i))};function yn(i){let t=Ks.get(i);return t||(t=pi(i),Ks.set(i,t)),t}function Va(i){const t=yn(i);return t.alternate||(t.alternate=pi(i)),t.alternate}function Wu(i,t,e=!0){t(Va(i)),Xa(e)}function wn(i,t,e=!0){t(Va(i)),un("FLUSH_DOM_ACTION",()=>Xa(e),50)}function Y(i){return i*Math.PI/180}function ft(i){return i*180/Math.PI}function Qs(i,t,e=0){return Math.sqrt(i*i+t*t+e*e)}function ti(i,t,e,s){return Qs(e-i,s-t)}function ei(i,t,e,s){const n=e-i,r=s-t;return n*n+r*r}function ge(i,t,e,s){let n=Math.atan2(s-t,e-i);return n<0&&(n+=Math.PI*2),n}function Lt(i,t){return{dx:Math.cos(i)*t,dy:Math.sin(i)*t}}function Ju(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 Zu(i,t,e,s,n=10){if(Math.abs(e-i)<n&&Math.abs(s-t)<n)return"no";const r=ft(ge(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 Ga=Ku("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 Ku(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 pt(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 si(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 Qu(i){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[i]||t.start}function tf(i){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[i]||t.alphabetic}const os={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 ii{__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",pt("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 xn{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class hs{__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(os);for(let e=0,s=t.length;e<s;e++){const n=t[e];this[n]=os[n].canvas}}__getStyleState(){const t={},e=Object.keys(os);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(os);for(let r=0;r<n.length;r++){const a=os[n[r]],o=this[n[r]];if(a.apply){if(o instanceof xn){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,pt("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof ii)e.setAttribute(a.apply,pt("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,pt("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(Ga);for(let r=0,a=n.length;r<a;r++){const o=n[r],h=Ga[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(pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,n,r,a){this.__addTransform(pt("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(pt("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(pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,n,r,a){this.__currentPosition={x:r,y:a},this.__addPathCommand(pt("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(pt("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],v=e+m*d[1],C=[-h[1],h[0]],b=[c[1],-c[0]],S=function(P){const _=P[0];return P[1]>=0?Math.acos(_):-Math.acos(_)},y=S(C),w=S(b);this.lineTo(g+C[0]*r,v+C[1]*r),this.arc(g,v,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:si(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:n+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new ii(r,this)}createRadialGradient(t,e,s,n,r,a){const o=this.__createElement("radialGradient",{id:si(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 ii(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":Qu(this.textAlign),"dominant-baseline":tf(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(pt("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=si(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",pt("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,v,C;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 hs){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)C=d.childNodes[0].getAttribute("id"),this.__ids[C]=C,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)&&(v=this.__document.createElement("canvas"),v.width=r,v.height=a,v.getContext("2d")?.drawImage(e,o,h,c,l,0,0,r,a),e=v),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=si(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 hs&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new xn(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class ni{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 hs({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 ri=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=ge(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 qa=ri;class bn extends ri{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,v=m*m/(r*r)+g*g/(a*a);if(v>1){const W=Math.sqrt(v);throw r=W*r,a=W*a,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${a}.`)}const C=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*C*r*g/a,y=b*C*-a*m/r,w=(t+s)/2,P=(e+n)/2,_=Math.cos(l)*S-Math.sin(l)*y+w,R=Math.sin(l)*S+Math.cos(l)*y+P,X=(W,Q,ct,nt)=>(W*nt>=Q*ct?1:-1)*Math.acos((W*ct+Q*nt)/(Math.sqrt(W*W+Q*Q)*Math.sqrt(ct*ct+nt*nt))),G=X(1,0,t-_,e-R)-l,$=X(t-_,e-R,s-_,n-R);return[_,R,r,a,l,G,G+$]}}class ef extends ri{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 sf=ef;class bt extends ri{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 v=g+1;v<u;v++)c[g].X===c[v].X&&c[g].Y===c[v].Y&&(v=++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 v=l*u[g]+l,C=this.base3(v,t,s,r,o),b=this.base3(v,e,n,a,h);m+=d[g]*Math.sqrt(C*C+b*b)}return l*m}length(t=1){return bt.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||bt.bezlen(e,s,n,r,a,o,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,m=bt.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=bt.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,v=s*this.y+e*this.c1y,C=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:v},end:{x:C,y:b},alpha:S}}}const cs=Math.PI*2;function ja(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 nf(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,v=u*u;let C=d*m-d*v-m*g;C<0&&(C=0),C/=d*v+m*g,C=Math.sqrt(C)*(n===r?-1:1);const b=C*a/o*u,S=C*-o/a*l,y=c*b-h*S+(i+e)/2,w=h*b+c*S+(t+s)/2,P=(l-b)/a,_=(u-S)/o,R=(-l-b)/a,X=(-u-S)/o,G=ja(1,0,P,_);let $=ja(P,_,R,X);return r===0&&$>0&&($-=cs),r===1&&$<0&&($+=cs),[y,w,G,$]}function rf(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 Ha(i,t,e,s,n,r,a,o,h){const c=Math.sin(h*cs/360),l=Math.cos(h*cs/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=nf(i,t,e,s,n,r,a,o,c,l),v=[];let C=g[2],b=g[3];const S=Math.max(Math.ceil(Math.abs(b)/(cs/4)),1);b/=S;for(let y=0;y<S;y++)v.push(rf(C,b)),C+=b;return v.map(y=>{for(let w=0;w<y.length;w+=2){let P=y[w+0],_=y[w+1];P*=a,_*=o;const R=l*P-c*_,X=c*P+l*_;y[w+0]=R+g[0],y[w+1]=X+g[1]}return y})}function Sn(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 ls(i,t,e,s){return[i,t,e,s,e,s]}const us={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&&ye(s,e),s}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||br()})}static downloadFromSVGElement(t,e="shape"){return Kn(Sa(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Kn(Ri(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return en(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,n,r)=>{let a=n.toLowerCase();const o=Ar(r);for(a=="m"&&o.length>us[a]&&(e.push([n,...o.splice(0,us[a])]),a="l",n=n=="m"?"l":"L");o.length;){if(o.length<us[a])throw new Error(`parseSVGPath substring:{ ${s} } command:{ ${n} } args:{ ${o} }`);e.push([n,...o.splice(0,us[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 v=g[0];switch(v){case"M":s=g[1],n=g[2];break;case"A":const C=Ha(r,a,g[6],g[7],g[4],g[5],g[1],g[2],g[3]);if(!C.length)continue;C.forEach((y,w)=>{const[P,_,R,X,G,$,W,Q]=y;g=["C",R,X,G,$,W,Q],w<C.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",...Sn(r,a,o,h,g[1],g[2])];break;case"Q":o=g[1],h=g[2],g=["C",...Sn(r,a,g[1],g[2],g[3],g[4])];break;case"L":g=["C",...ls(r,a,g[1],g[2])];break;case"H":g=["C",...ls(r,a,g[1],a)];break;case"V":g=["C",...ls(r,a,r,g[1])];break;case"Z":g=["C",...ls(r,a,s,n)];break}u=v,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 _t=ke;class Pt{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(_t.parseSVGPath(t),e):t instanceof Pt?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const s=_t.normalizeSVGPath(_t.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 bt({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 Pt;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 bt({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 Pt;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 bn){Ha(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,v,C,b]=c;this.normalizedLines.push(new bt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:m,c2x:g,c2y:v,toX:C,toY:b})),this.prevPathX=C,this.prevPathY=b});return}let e,s,n,r,a,o;t instanceof bt?(e=t.c1x,s=t.c1y,n=t.c2x,r=t.c2y,a=t.toX,o=t.toY):t instanceof sf?[e,s,n,r,a,o]=Sn(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,n,r,a,o]=ls(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new bt({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 _t.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 vt;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 bt({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 Pt;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 bt({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 bt({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=ei(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=ei(l.x,l.y,t,e),d=r+o,m=this.getPointAtLength(d),g=ei(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?ge(h.x,h.y,n.x,n.y):ge(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+=ti(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]=$t(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:Pt.fromPolymorphPoints(Pt.mixPoints(new Pt({d:t}).polymorphPoints,new Pt({d:e}).polymorphPoints,s)).toSVGPathData()}}const af=Pt;class j extends Ve{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=br(),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=Ar(s).reduce((n,r)=>n+r,0)}return Ir(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Pt,xt(()=>{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 vt;n.translate(-t.x+s.x,-t.y+s.y),s.originMatrix=n});const e=this.originMatrix?this.originMatrix.clone():new vt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,s){if(s instanceof ni)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 ni)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 Tr(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])=>[mt(s),n]))):e&&(this.attrs[mt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[mt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[mt(t)]}distance(t){return ti(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=ft(ge(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:n}=Lt(Y(this.degree),e);this.vx=s,this.vy=n,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:n}=Lt(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=It(t?.gravity,0);this.vy+=e;const s=It(t?.friction,1);this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const s=It(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=It(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=It(e?.springLength,100),n=It(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=$t(s.getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const r=e?.onUpdate,a=new Zs({frameDuration:t});a.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,h)=>{this.setAttr("strokeDashoffset",""+$t(o.offset,2)),r?.(o,h)}})),a.play()}}class fs extends j{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(Y(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Xt(Y(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Xt(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 Qs(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 vn{_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],v=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]=v;return}if(u!==v||h!==d||c!==m||l!==g){let C=1-o;const b=h*d+c*m+l*g+u*v,S=b>=0?1:-1,y=1-b*b;if(y>Number.EPSILON){const P=Math.sqrt(y),_=Math.atan2(P,b*S);C=Math.sin(C*_)/P,o=Math.sin(o*_)/P}const w=o*S;if(h=h*C+d*w,c=c*C+m*w,l=l*C+g*w,u=u*C+v*w,C===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 vn(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(F(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 ds{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 ds(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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 $a.copy(this).projectOnVector(t),this.sub($a)}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(F(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 Mt{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 Mt(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(Wa.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Wa.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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this.z=F(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this.z=F(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 Tn.copy(this).projectOnVector(t),this.sub(Tn)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Tn.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(F(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 Cn{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 Cn(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],v=h[2],C=h[6],b=h[10];if(Math.abs(l-d)<.01&&Math.abs(u-v)<.01&&Math.abs(g-C)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+v)<.1&&Math.abs(g+C)<.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,_=(l+d)/4,R=(u+v)/4,X=(g+C)/4;return y>w&&y>P?y<.01?(s=0,n=.707106781,r=.707106781):(s=Math.sqrt(y),n=_/s,r=R/s):w>P?w<.01?(s=.707106781,n=0,r=.707106781):(n=Math.sqrt(w),s=_/n,r=X/n):P<.01?(s=.707106781,n=.707106781,r=0):(r=Math.sqrt(P),s=R/r,n=X/r),this.set(s,n,r,e),this}let S=Math.sqrt((C-g)*(C-g)+(u-v)*(u-v)+(d-l)*(d-l));return Math.abs(S)<.001&&(S=1),this.x=(C-g)/S,this.y=(u-v)/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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this.z=F(this.z,t.z,e.z),this.w=F(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this.z=F(this.z,t,e),this.w=F(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 $a=new ds,Tn=new Mt,Wa=new vn,ms=2e3,_n=2001,Ja=[1,0,0,1],Za=[1,0,0,1,0,0],Ka=[1,0,0,0,1,0,0,0,1],Qa=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Pn{value;constructor(t=Ja){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(Ja),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 Pn(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 je{value;constructor(t=Ka){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(Ka),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 je(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],v=n[0],C=n[3],b=n[6],S=n[1],y=n[4],w=n[7],P=n[2],_=n[5],R=n[8];return r[0]=a*v+o*S+h*P,r[3]=a*C+o*y+h*_,r[6]=a*b+o*w+h*R,r[1]=c*v+l*S+u*P,r[4]=c*C+l*y+u*_,r[7]=c*b+l*w+u*R,r[2]=d*v+m*S+g*P,r[5]=d*C+m*y+g*_,r[8]=d*b+m*w+g*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],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 v=1/g;return t[0]=u*v,t[1]=(n*c-l*s)*v,t[2]=(o*s-n*a)*v,t[3]=d*v,t[4]=(l*e-n*h)*v,t[5]=(n*r-o*e)*v,t[6]=m*v,t[7]=(s*h-c*e)*v,t[8]=(a*e-s*r)*v,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(Mn.makeScale(t,e)),this}rotate(t){return this.premultiply(Mn.makeRotation(-t)),this}translate(t,e){return this.premultiply(Mn.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 St{value;is3dSpecial=!1;constructor(t=Qa){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,v=0,C=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]=v,b[15]=C,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(Qa),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 St(this.value)}static fromString(t){const e=new St,s=wr("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 vt(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`matrix4(${this.value.map(e=>$t(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=ft(F(Math.asin(-this.m13),-1,1));let r=ft(Math.atan2(this.m23,this.m33));Math.cos(Y(n))===0&&(r=ft(Math.atan2(-this.m31,this.m22)));let a=ft(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:ft(this.m14),skewY:ft(this.m24),skewZ:ft(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,s=t.value,n=1/He.setFromMatrix4Column(t,0).length(),r=1/He.setFromMatrix4Column(t,1).length(),a=1/He.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,v=o*u;e[0]=h*l,e[4]=-h*u,e[8]=c,e[1]=m+g*c,e[5]=d-v*c,e[9]=-o*h,e[2]=v-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,v=c*u;e[0]=d+v*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]=v+d*o,e[10]=a*h}else if(t.order==="ZXY"){const d=h*l,m=h*u,g=c*l,v=c*u;e[0]=d-v*o,e[4]=-a*u,e[8]=g+m*o,e[1]=m+g*o,e[5]=a*l,e[9]=v-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,v=o*u;e[0]=h*l,e[4]=g*c-m,e[8]=d*c+v,e[1]=h*u,e[5]=v*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,v=o*c;e[0]=h*l,e[4]=v-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-v*u}else if(t.order==="XZY"){const d=a*h,m=a*c,g=o*h,v=o*c;e[0]=h*l,e[4]=-u,e[8]=c*l,e[1]=d*u+v,e[5]=a*l,e[9]=m*u-g,e[2]=g*u-m,e[6]=o*l,e[10]=v*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(of,t,hf)}lookAt(t,e,s){const n=this.value;return Et.subVectors(t,e),Et.lengthSq()===0&&(Et.z=1),Et.normalize(),pe.crossVectors(s,Et),pe.lengthSq()===0&&(Math.abs(s.z)===1?Et.x+=1e-4:Et.z+=1e-4,Et.normalize(),pe.crossVectors(s,Et)),pe.normalize(),ai.crossVectors(Et,pe),n[0]=pe.x,n[4]=ai.x,n[8]=Et.x,n[1]=pe.y,n[5]=ai.y,n[9]=Et.y,n[2]=pe.z,n[6]=ai.z,n[10]=Et.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],v=s[6],C=s[10],b=s[14],S=s[3],y=s[7],w=s[11],P=s[15],_=n[0],R=n[4],X=n[8],G=n[12],$=n[1],W=n[5],Q=n[9],ct=n[13],nt=n[2],Gt=n[6],kt=n[10],Ot=n[14],qt=n[3],L=n[7],D=n[11],U=n[15];return r[0]=a*_+o*$+h*nt+c*qt,r[4]=a*R+o*W+h*Gt+c*L,r[8]=a*X+o*Q+h*kt+c*D,r[12]=a*G+o*ct+h*Ot+c*U,r[1]=l*_+u*$+d*nt+m*qt,r[5]=l*R+u*W+d*Gt+m*L,r[9]=l*X+u*Q+d*kt+m*D,r[13]=l*G+u*ct+d*Ot+m*U,r[2]=g*_+v*$+C*nt+b*qt,r[6]=g*R+v*W+C*Gt+b*L,r[10]=g*X+v*Q+C*kt+b*D,r[14]=g*G+v*ct+C*Ot+b*U,r[3]=S*_+y*$+w*nt+P*qt,r[7]=S*R+y*W+w*Gt+P*L,r[11]=S*X+y*Q+w*kt+P*D,r[15]=S*G+y*ct+w*Ot+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],v=t[7],C=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)+v*(+e*h*m-e*c*d+r*a*d-n*a*m+n*c*l-r*h*l)+C*(+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 Mt?(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],v=t[13],C=t[14],b=t[15],S=u*C*c-v*d*c+v*h*m-o*C*m-u*h*b+o*d*b,y=g*d*c-l*C*c-g*h*m+a*C*m+l*h*b-a*d*b,w=l*v*c-g*u*c+g*o*m-a*v*m-l*o*b+a*u*b,P=g*u*h-l*v*h-g*o*d+a*v*d+l*o*C-a*u*C,_=e*S+s*y+n*w+r*P;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/_;return t[0]=S*R,t[1]=(v*d*r-u*C*r-v*n*m+s*C*m+u*n*b-s*d*b)*R,t[2]=(o*C*r-v*h*r+v*n*c-s*C*c-o*n*b+s*h*b)*R,t[3]=(u*h*r-o*d*r-u*n*c+s*d*c+o*n*m-s*h*m)*R,t[4]=y*R,t[5]=(l*C*r-g*d*r+g*n*m-e*C*m-l*n*b+e*d*b)*R,t[6]=(g*h*r-a*C*r-g*n*c+e*C*c+a*n*b-e*h*b)*R,t[7]=(a*d*r-l*h*r+l*n*c-e*d*c-a*n*m+e*h*m)*R,t[8]=w*R,t[9]=(g*u*r-l*v*r-g*s*m+e*v*m+l*s*b-e*u*b)*R,t[10]=(a*v*r-g*o*r+g*s*c-e*v*c-a*s*b+e*o*b)*R,t[11]=(l*o*r-a*u*r-l*s*c+e*u*c+a*s*m-e*o*m)*R,t[12]=P*R,t[13]=(l*v*n-g*u*n+g*s*d-e*v*d-l*s*C+e*u*C)*R,t[14]=(g*o*n-a*v*n-g*s*h+e*v*h+a*s*C-e*o*C)*R,t[15]=(a*u*n-l*o*n+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],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 Mt?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=ms){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===ms)m=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===_n)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=ms){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,v;if(o===ms)g=(a+r)*u,v=-2*u;else if(o===_n)g=r*u,v=-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]=v,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,v=a*l,C=a*u,b=o*u,S=h*c,y=h*l,w=h*u,P=s.x,_=s.y,R=s.z;return n[0]=(1-(v+b))*P,n[1]=(m+w)*P,n[2]=(g-y)*P,n[3]=0,n[4]=(m-w)*_,n[5]=(1-(d+b))*_,n[6]=(C+S)*_,n[7]=0,n[8]=(g+y)*R,n[9]=(C-S)*R,n[10]=(1-(d+v))*R,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=He.set(n[0],n[1],n[2]).length();const a=He.set(n[4],n[5],n[6]).length(),o=He.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],Ut.copy(this);const c=1/r,l=1/a,u=1/o;return Ut.value[0]*=c,Ut.value[1]*=c,Ut.value[2]*=c,Ut.value[4]*=l,Ut.value[5]*=l,Ut.value[6]*=l,Ut.value[8]*=u,Ut.value[9]*=u,Ut.value[10]*=u,e.setFromRotationMatrix4(Ut),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 St([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 St([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 St([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 St([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 St([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 St([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 St([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 fs({x:t,y:e}),a=new fs({x:t+s,y:e}),o=new fs({x:t+s,y:e+n}),h=new fs({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 vt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Za){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 vt,s=wr("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 St(e)}identity(){return this.value=Array.from(Za),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 vt(this.value)}multiply(t){const e=this.clone(),s=t instanceof vt?t:new vt(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 vt;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=ft(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:ft(Math.atan2(-this.m21,this.m22)),skewY:ft(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,v=c*l,C=(l*s-e*u)/(v-g),b=(h*s-e*c)/(g-v),S=(l*r-n*u)/(v-g),y=(h*r-n*c)/(g-v),w=(l*(o-m)+u*(d-a))/(v-g),P=(h*(o-m)+c*(d-a))/(g-v),_=[C,b,S,y,w,P];return new vt(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>$t(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 of=new Mt(0,0,0),hf=new Mt(1,1,1),pe=new Mt,ai=new Mt,Et=new Mt,He=new Mt,Mn=new je,Ut=new St;function En(i){const t=new vt;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 St(r)),t.matrix4.toMatrix(t);break}return""}),t}function Xt(i,t,e){const s=new vt;return s.rotate(ft(i)),s.transformPoint({x:t,y:e})}function An(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 cf(i,t){const e=new Path2D(i),s=new Path2D;return s.addPath(e,An(t)),s}function Ie(i,t,e){const s=yn(i);return s.props.style=s.props.style||{},t?s.props.style[t]||s.props.style[Sr(t)]||s.props.style[mt(t)]||"":s.props.style}function kn(i,t,e){wn(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 In(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 lf(i,t,e){let s=i.style[t]||"";if(!s&&getComputedStyle){t=mt(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 oi(i,t,e){typeof t=="string"&&e?i.style.setProperty(mt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(s=>{oi(i,s,t[s])})}function Dn(i,t){typeof t=="string"?i.style.removeProperty(mt(t)):Object.keys(t).forEach(e=>{Dn(i,e)})}function to(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 uf(i,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:Ie(i,"transform")||""});const s=En(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]=Ie(i,r)),Object.assign(n,{[r]:`${a}`});break}}return Object.assign(n,{transform:s.toString()}),n}function ye(i,t,e){if(t===void 0&&e===void 0)return Rn(i);if(typeof t=="string"&&e===void 0)return eo(i,t);let s={};typeof t=="object"?s=t:typeof t=="string"&&typeof e=="string"&&(s[t]=""+e),wn(i,n=>{Object.entries(s).forEach(([r,a])=>{n.props[r]=""+a})})}const ff=["-o-","-ms-","-moz-","-webkit-",""];function Rn(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]=In(i):t[r.nodeName]=r.nodeValue)}return t}function eo(i,t){return t==="style"?In(i):i.getAttribute(mt(t))}function $e(i,t,e){return i.setAttribute(mt(t),""+e)}function df(i,t){t.split(/[,\s]+/i).forEach(e=>{const s=mt(e.trim());s!=""&&i.removeAttribute(s)})}function mf(i,t){$e(i,"draggable","true");const e=[];return e.push(B(i,"dragstart",s=>{de(s),_a(s);const n=s.dataTransfer;n&&(n.effectAllowed="move",n.setData("text/plain","some-data")),t?.onStart?.(s)},!0)),e.push(B(i,"drag",s=>{de(s),t?.onDrag?.(s)})),e.push(B(i,"dragend",s=>{de(s),t?.onEnd?.(s)})),()=>{e.forEach(s=>s())}}function gf(i,t){const e=[];return e.push(B(i,"dragenter",s=>{de(s),t?.onEnter?.(s)})),e.push(B(i,"dragover",s=>{de(s);const n=s.dataTransfer;n&&(n.dropEffect="move"),t?.onOver?.(s)})),e.push(B(i,"dragleave",s=>{de(s),t?.onLeave?.(s)})),e.push(B(i,"drop",s=>{de(s);const n=s.dataTransfer;if(!n){t?.onDrop?.(s,[]);return}t?.onDrop?.(s,[...n.files])})),()=>{e.forEach(s=>s())}}function pf(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function gs(){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 yf(){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 so(){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 wf(){const{scrollWidth:i,scrollHeight:t}=gs();return{width:i,height:t}}function Ln(i){const{top:t,left:e,width:s,height:n}=i.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=gs();return{x:e+r,y:t+a,width:s,height:n}}function xf(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 io(i){return i.getBoundingClientRect()}function bf(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 Sf(){const{clientHeight:i,scrollTop:t,scrollHeight:e}=gs(),s=e-i;return s<=0?0:t/s*100}function no(){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 vf(i){if("center"in i){const t=i.center,e=io(i.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:i.clientX,y:i.clientY}}function zn(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}=gs();return{x:i.clientX+t,y:i.clientY+e}}function We(i,t){const e={x:0,y:0};if(t){const s=zn(i),n=Ln(t);e.x=F(s.x-n.x,0,n.width),e.y=F(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=zn(i),a=Ln(i.target);e.x=F(r.x-a.x+s,0,a.width),e.y=F(r.y-a.y+n,0,a.height)}}return e}var ro={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
14
|
+
`):" "+ua(r[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:Ji};function Zi(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new qe(null,i)}function da(i){return Zi(i),i.headers=Yt.from(i.headers),i.data=$i.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),fa.getAdapter(i.adapter||ji.adapter)(i).then(function(s){return Zi(i),s.data=$i.call(i,i.transformResponse,s),s.headers=Yt.from(s.headers),s},function(s){return ta(s)||(Zi(i),s&&s.response&&(s.response.data=$i.call(i,i.transformResponse,s.response),s.response.headers=Yt.from(s.response.headers))),Promise.reject(s)})}const ma="1.8.4",Xs={};["object","boolean","number","function","string","symbol"].forEach((i,t)=>{Xs[i]=function(s){return typeof s===i||"a"+(t<1?"n ":" ")+i}});const ga={};Xs.transitional=function(t,e,s){function n(r,a){return"[Axios v"+ma+"] Transitional option '"+r+"'"+a+(s?". "+s:"")}return(r,a,o)=>{if(t===!1)throw new N(n(a," has been removed"+(e?" in "+e:"")),N.ERR_DEPRECATED);return e&&!ga[a]&&(ga[a]=!0,console.warn(n(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,a,o):!0}},Xs.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function El(i,t,e){if(typeof i!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const s=Object.keys(i);let n=s.length;for(;n-- >0;){const r=s[n],a=t[r];if(a){const o=i[r],h=o===void 0||a(o,r,i);if(h!==!0)throw new N("option "+r+" must be "+h,N.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new N("Unknown option "+r,N.ERR_BAD_OPTION)}}const Vs={assertOptions:El,validators:Xs},Wt=Vs.validators;class Gs{constructor(t){this.defaults=t,this.interceptors={request:new Jr,response:new Jr}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const r=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
15
|
+
`+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:n,headers:r}=e;s!==void 0&&Vs.assertOptions(s,{silentJSONParsing:Wt.transitional(Wt.boolean),forcedJSONParsing:Wt.transitional(Wt.boolean),clarifyTimeoutError:Wt.transitional(Wt.boolean)},!1),n!=null&&(A.isFunction(n)?e.paramsSerializer={serialize:n}:Vs.assertOptions(n,{encode:Wt.function,serialize:Wt.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Vs.assertOptions(e,{baseUrl:Wt.spelling("baseURL"),withXsrfToken:Wt.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=Yt.concat(a,r);const o=[];let h=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(e)===!1||(h=h&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let l,u=0,d;if(!h){const g=[da.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++],v=o[u++];try{m=g(m)}catch(C){v.call(this,C);break}}try{l=da.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=Ee(this.defaults,t);const e=na(t.baseURL,t.url,t.allowAbsoluteUrls);return Wr(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){Gs.prototype[t]=function(e,s){return this.request(Ee(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(Ee(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}Gs.prototype[t]=e(),Gs.prototype[t+"Form"]=e(!0)});const qs=Gs;class Ki{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 qe(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 Ki(function(n){t=n}),cancel:t}}}const Al=Ki;function kl(i){return function(e){return i.apply(null,e)}}function Il(i){return A.isObject(i)&&i.isAxiosError===!0}const Qi={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(Qi).forEach(([i,t])=>{Qi[t]=i});const Dl=Qi;function pa(i){const t=new qs(i),e=zr(qs.prototype.request,t);return A.extend(e,qs.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return pa(Ee(i,n))},e}const et=pa(ji);et.Axios=qs,et.CanceledError=qe,et.CancelToken=Al,et.isCancel=ta,et.VERSION=ma,et.toFormData=Os,et.AxiosError=N,et.Cancel=et.CanceledError,et.all=function(t){return Promise.all(t)},et.spread=kl,et.isAxiosError=Il,et.mergeConfig=Ee,et.AxiosHeaders=Yt,et.formToJSON=i=>Kr(A.isHTMLForm(i)?new FormData(i):i),et.getAdapter=fa.getAdapter,et.HttpStatusCode=Dl,et.default=et;const Rl=et,ya=window.crypto.subtle;ya||console.warn("Crypto API not supported");async function wa(i,t="SHA-256"){const e=await ya.digest(t,Xh(i));return Vh(e)}async function xa(i,t="SHA-256"){const e=JSON.stringify(Lh(i));return wa(e,t)}var Ll=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Ol=(i,t,e,s)=>{for(var n=s>1?void 0:s?zl(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&&Ll(t,e,n),n};class tn{instance;constructor(t){this.instance=Rl.create(t);const e=new ba;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)}}Ol([ic(6e4),sc(3)],tn.prototype,"request",1);class ba{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}async getRequestId(t){const{url:e,method:s,params:n,data:r}=t;return await xa({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 en=i=>new XMLSerializer().serializeToString(i),Fl=(i,t="text/html")=>new DOMParser().parseFromString(i,t),Sa=(i,t=gt.SVG,e=Es.utf8)=>Ri(en(i),t,e);async function sn(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 ns(i,t=Dt.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 Dt.dataURL:r.readAsDataURL(i);break;case Dt.binaryString:r.readAsBinaryString(i);break;case Dt.arraybuffer:r.readAsArrayBuffer(i);break;case Dt.text:default:r.readAsText(i)}})}async function Bl(i){const t=await ns(i,Dt.arraybuffer);return Gh(t)}const Nl=i=>{let t;return i instanceof File?t=i.name:t=i,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function Yl(i){switch(i.toLowerCase()){case"jpg":case"jpeg":return gt.JPEG;case"gif":return gt.GIF;case"svg":return gt.SVG;case"pdf":return gt.PDF;case"png":default:return gt.PNG}}function va(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)va(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 Ca(i,t=1048576){return await new Promise((e,s)=>va(e,s,new oc.ArrayBuffer,i,t,0,Math.min(t,i.size)))}class Ul{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 tn({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 Ca(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(()=>{Wh(this.time,1),this.onTime?.(jh(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function Xl(i,t){const e=Is(t?.value||"");if(!e.value){const s=`; ${document.cookie}`.split(`; ${i}=`).pop()?.split(";").shift();s&&(e.value=decodeURIComponent(s))}return xt(()=>{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}}),e}function Vl(){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 Ta(i,t){const e=Is(t||"");if(!t)try{let s=window.localStorage.getItem(i);s&&(s=JSON.parse(s),e.value=s?s.value:"")}catch{}return xt(()=>{if(e.value)try{window.localStorage.setItem(i,JSON.stringify(e))}catch{}else window.localStorage.removeItem(i)}),e}function Gl(){window.localStorage.clear()}function ql(i,t){const e=Is(t||"");if(!t)try{let s=window.sessionStorage.getItem(i);s&&(s=JSON.parse(s),e.value=s?s.value:"")}catch{}return xt(()=>{if(e.value)try{window.sessionStorage.setItem(i,JSON.stringify(e))}catch{}else window.sessionStorage.removeItem(i)}),e}function jl(i,t){let e;return i.objectStoreNames.contains(t)||(e=i.createObjectStore(t,{keyPath:"id"})),e}function Hl(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,jl(r,e),s(r)}})}function $l(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 B(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 Wl=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Jl=["keydown","keyup","keypress"],Zl=["touchstart","touchend","touchcancel","touchmove"],Kl=["pointerdown","pointerup","pointercancel","pointermove"],Ql=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],tu=["change"];function eu(i,t,e={bubbles:!0,detail:{}}){if(!i)return;let s;try{Wl.includes(t)?s=new MouseEvent(t,e):Jl.includes(t)?s=new KeyboardEvent(t,e):Zl.includes(t)?s=new TouchEvent(t,e):Kl.includes(t)?s=new PointerEvent(t,e):Ql.includes(t)?s=new DragEvent(t,e):tu.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 su(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 de(i){i.preventDefault&&i.preventDefault();try{i.returnValue=!1}catch{}}function _a(i){i.stopPropagation&&i.stopPropagation();try{i.cancelBubble=!0}catch{}}function iu(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 nu(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 js=()=>{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 ru(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 au(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 nn(){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 ou=()=>{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 hu(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function cu(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function rn(){return js()==="ios"}function an(){return js()==="macos"}function lu(){return rn()|an()}function Pa(){return js()==="android"}function uu(){return rn()||Pa()}function Ma(){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 fu=Ma()!==-1,du=document.documentMode?document.documentMode===9:!1,mu=document.documentMode?document.documentMode===10:!1,gu=document.documentMode?document.documentMode===11:!1;function Ea(){return nn()==="wechat"}function Aa(){return nn()==="ali"}function pu(){return Ea()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function yu(){return Aa()&&navigator.userAgent.match(/miniprogram/i)}const wu=typeof document<"u",ka=typeof window<"u",xu=typeof history<"u",bu=ka&&window.File&&window.FileReader&&window.FileList&&window.Blob,Ia=(()=>{const i=pr();return!!(i.Worker&&i.Blob&&i.Promise&&i.OffscreenCanvas&&i.OffscreenCanvasRenderingContext2D&&i.HTMLCanvasElement&&i.HTMLCanvasElement.prototype.transferControlToOffscreen&&i.URL&&i.URL.createObjectURL)})(),Su=typeof Path2D=="function"&&typeof DOMMatrix=="function",Da=function(){if(!pr().OffscreenCanvas)return!1;const t=new OffscreenCanvas(1,1),e=t.getContext("2d");e.fillRect(0,0,1,1);const s=t.transferToImageBitmap();try{e.createPattern(s,"no-repeat")}catch{return!1}return!0}(),vu=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},Cu="webkit moz ms o".split(" ");function Hs(i){return typeof i=="function"&&/native code/.test(i.toString())}function Tu(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let i=J();window.requestAnimationFrame=function(t){const e=J(),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 on(i){let t=!1;return window.requestAnimationFrame(function e(s){!t&&i(s)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function hn(i,t=0){if(t==0)return i(J()),()=>{};{const e=J();return on(s=>s-e>=t?(i(s),!1):!0)}}function _u(i,t=0){let e=!1,s=0;const n=J(),r=a=>{if(e)return;s++;const o=a-n-s*t;i(a,s,t<=o),hn(r,Math.max(0,t-o))};return hn(r,t),()=>{e=!0}}function Pu(i,t=20){const e=1e3/t;let s=0,n;return()=>(J()-s>=e&&(s=J(),n=i()),n)}window.requestIdleCallback=window.requestIdleCallback||function(i,t){const e=J();return setTimeout(function(){i({didTimeout:J()-e>50,timeRemaining:()=>Math.max(0,50-(J()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(i){clearTimeout(i)};function Ra(i,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?i():Ra(i,t)},{timeout:t})}const cn=new _e;let ln=!1;function un(i,t,e){i&&t&&cn.set(i,{cb:t,startTime:J(),timeout:e}),!ln&&(ln=!0,Eu(s=>{ln=!1;let n=s.timeRemaining();cn.filter((r,a)=>{let o=!1;const h=J();(n>0||a.timeout&&J()-a.startTime>=a.timeout)&&(a.cb(),o=!0);const c=J();return n-=c-h,!o}),cn.length>0&&un()}))}let $s=0,Ae=33,me=33,fn;const La=new MessageChannel,Mu=La.port2;La.port1.onmessage=i=>{fn!==null&&fn({didTimeout:$s<=J(),timeRemaining:()=>Math.max(0,$s-J())})};function Eu(i){return fn=i,requestAnimationFrame(t=>{let e=t-$s+me;e<me&&Ae<me?(e<8&&(e=8),me=e<Ae?Ae:e):e>me&&Ae>me?me=e<Ae?Ae:e:Ae=e,$s=t+me,Mu.postMessage(null)})}function Au(i){if(typeof setImmediate<"u"&&Hs(setImmediate))setImmediate(i);else if(typeof MessageChannel<"u"&&(Hs(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=i,t.postMessage(null)}else typeof Promise<"u"&&Hs(Promise)?Promise.resolve().then(i):setTimeout(i,0)}function ku(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(t=>setTimeout(()=>{throw t}))}class rs{static _nextId=0;static nextId(){return rs._nextId++}}const z={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-z.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?z.Bounce.In(i*2)*.5:z.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 za(i){switch(i){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 i}}const Iu=4,Du=.001,Ru=1e-7,Lu=10,as=11,Ws=1/(as-1),zu=typeof Float32Array=="function";function Oa(i,t){return 1-3*t+3*i}function Fa(i,t){return 3*t-6*i}function Ba(i){return 3*i}function Js(i,t,e){return((Oa(t,e)*i+Fa(t,e))*i+Ba(t))*i}function Na(i,t,e){return 3*Oa(t,e)*i*i+2*Fa(t,e)*i+Ba(t)}function Ou(i,t,e,s,n){let r,a,o=0;do a=t+(e-t)/2,r=Js(a,s,n)-i,r>0?e=a:t=a;while(Math.abs(r)>Ru&&++o<Lu);return a}function Fu(i,t,e,s){for(let n=0;n<Iu;++n){const r=Na(t,e,s);if(r===0)return t;const a=Js(t,e,s)-i;t-=a/r}return t}function Bu(i){return i}function dn(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 Bu;const n=zu?new Float32Array(as):new Array(as);for(let a=0;a<as;++a)n[a]=Js(a*Ws,i,e);function r(a){let o=0,h=1;const c=as-1;for(;h!==c&&n[h]<=a;++h)o+=Ws;--h;const l=(a-n[h])/(n[h+1]-n[h]),u=o+l*Ws,d=Na(u,i,e);return d>=Du?Fu(a,u,i,e):d===0?u:Ou(a,o,o+Ws,i,e)}return a=>a===0||a===1?a:Js(r(a),t,s)}function mn(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 Ya(i){const[t,e,s,n]=mn(i);return[1-s,1-n,1-t,1-e]}function Nu(i){return dn(...mn(i))}function Yu(i){return dn(...Ya(i))}const se={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=se.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=se.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=se.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=se.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 Ua{_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=J(),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 Rt=new Ua;class gn{constructor(t,e=Rt){this._object=t,this._group=e}_id=rs.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=se.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=J()){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=J()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=J()){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=Rt){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=se.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=J(),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 Uu=rs.nextId,Xu=Rt.getAll.bind(Rt),Vu=Rt.removeAll.bind(Rt),Gu=Rt.add.bind(Rt),qu=Rt.remove.bind(Rt),ju=Rt.update.bind(Rt),Hu={now:J,Sequence:rs,Easing:z,Interpolation:se,Group:Ua,Tween:gn,nextId:Uu,getAll:Xu,removeAll:Vu,add:Gu,remove:qu,update:ju};class pn{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=J(),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=J();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Zs{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){nc(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||z.Linear.None,interpolationFunction:s?.interpolationFunction||se.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 pn,s=this.frameDuration;return new Promise(n=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=on(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 gn({...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(),Te(t,c))})}const a=!!t.length;return a||(this.onGroupComplete?.(),n()),a})})}isPaused=!1;pausedClock=new pn;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=za(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 Ks=new _e,Xa=(i=!0)=>{Ks.filter((t,e)=>(e.alternate&&(yi(e,e.alternate),i&&Ks.set(t,e.alternate),e.alternate=void 0),i))};function yn(i){let t=Ks.get(i);return t||(t=pi(i),Ks.set(i,t)),t}function Va(i){const t=yn(i);return t.alternate||(t.alternate=pi(i)),t.alternate}function $u(i,t,e=!0){t(Va(i)),Xa(e)}function wn(i,t,e=!0){t(Va(i)),un("FLUSH_DOM_ACTION",()=>Xa(e),50)}function Y(i){return i*Math.PI/180}function ft(i){return i*180/Math.PI}function Qs(i,t,e=0){return Math.sqrt(i*i+t*t+e*e)}function ti(i,t,e,s){return Qs(e-i,s-t)}function ei(i,t,e,s){const n=e-i,r=s-t;return n*n+r*r}function ge(i,t,e,s){let n=Math.atan2(s-t,e-i);return n<0&&(n+=Math.PI*2),n}function Lt(i,t){return{dx:Math.cos(i)*t,dy:Math.sin(i)*t}}function Wu(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 Ju(i,t,e,s,n=10){if(Math.abs(e-i)<n&&Math.abs(s-t)<n)return"no";const r=ft(ge(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 Ga=Zu("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 Zu(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 pt(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 si(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 Ku(i){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[i]||t.start}function Qu(i){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[i]||t.alphabetic}const os={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 ii{__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",pt("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 xn{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class hs{__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(os);for(let e=0,s=t.length;e<s;e++){const n=t[e];this[n]=os[n].canvas}}__getStyleState(){const t={},e=Object.keys(os);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(os);for(let r=0;r<n.length;r++){const a=os[n[r]],o=this[n[r]];if(a.apply){if(o instanceof xn){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,pt("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof ii)e.setAttribute(a.apply,pt("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,pt("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(Ga);for(let r=0,a=n.length;r<a;r++){const o=n[r],h=Ga[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(pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,s,n,r,a){this.__addTransform(pt("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(pt("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(pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,s,n,r,a){this.__currentPosition={x:r,y:a},this.__addPathCommand(pt("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(pt("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],v=e+m*d[1],C=[-h[1],h[0]],b=[c[1],-c[0]],S=function(P){const _=P[0];return P[1]>=0?Math.acos(_):-Math.acos(_)},y=S(C),w=S(b);this.lineTo(g+C[0]*r,v+C[1]*r),this.arc(g,v,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:si(this.__ids),x1:t+"px",x2:s+"px",y1:e+"px",y2:n+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new ii(r,this)}createRadialGradient(t,e,s,n,r,a){const o=this.__createElement("radialGradient",{id:si(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 ii(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":Ku(this.textAlign),"dominant-baseline":Qu(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(pt("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=si(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",pt("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,v,C;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 hs){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)C=d.childNodes[0].getAttribute("id"),this.__ids[C]=C,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)&&(v=this.__document.createElement("canvas"),v.width=r,v.height=a,v.getContext("2d")?.drawImage(e,o,h,c,l,0,0,r,a),e=v),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=si(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 hs&&(s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(s)),new xn(s,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class ni{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 hs({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 ri=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=ge(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 qa=ri;class bn extends ri{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,v=m*m/(r*r)+g*g/(a*a);if(v>1){const W=Math.sqrt(v);throw r=W*r,a=W*a,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${a}.`)}const C=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*C*r*g/a,y=b*C*-a*m/r,w=(t+s)/2,P=(e+n)/2,_=Math.cos(l)*S-Math.sin(l)*y+w,R=Math.sin(l)*S+Math.cos(l)*y+P,X=(W,Q,ct,nt)=>(W*nt>=Q*ct?1:-1)*Math.acos((W*ct+Q*nt)/(Math.sqrt(W*W+Q*Q)*Math.sqrt(ct*ct+nt*nt))),G=X(1,0,t-_,e-R)-l,$=X(t-_,e-R,s-_,n-R);return[_,R,r,a,l,G,G+$]}}class tf extends ri{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 ef=tf;class bt extends ri{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 v=g+1;v<u;v++)c[g].X===c[v].X&&c[g].Y===c[v].Y&&(v=++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 v=l*u[g]+l,C=this.base3(v,t,s,r,o),b=this.base3(v,e,n,a,h);m+=d[g]*Math.sqrt(C*C+b*b)}return l*m}length(t=1){return bt.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||bt.bezlen(e,s,n,r,a,o,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,m=bt.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=bt.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,v=s*this.y+e*this.c1y,C=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:v},end:{x:C,y:b},alpha:S}}}const cs=Math.PI*2;function ja(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 sf(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,v=u*u;let C=d*m-d*v-m*g;C<0&&(C=0),C/=d*v+m*g,C=Math.sqrt(C)*(n===r?-1:1);const b=C*a/o*u,S=C*-o/a*l,y=c*b-h*S+(i+e)/2,w=h*b+c*S+(t+s)/2,P=(l-b)/a,_=(u-S)/o,R=(-l-b)/a,X=(-u-S)/o,G=ja(1,0,P,_);let $=ja(P,_,R,X);return r===0&&$>0&&($-=cs),r===1&&$<0&&($+=cs),[y,w,G,$]}function nf(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 Ha(i,t,e,s,n,r,a,o,h){const c=Math.sin(h*cs/360),l=Math.cos(h*cs/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=sf(i,t,e,s,n,r,a,o,c,l),v=[];let C=g[2],b=g[3];const S=Math.max(Math.ceil(Math.abs(b)/(cs/4)),1);b/=S;for(let y=0;y<S;y++)v.push(nf(C,b)),C+=b;return v.map(y=>{for(let w=0;w<y.length;w+=2){let P=y[w+0],_=y[w+1];P*=a,_*=o;const R=l*P-c*_,X=c*P+l*_;y[w+0]=R+g[0],y[w+1]=X+g[1]}return y})}function Sn(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 ls(i,t,e,s){return[i,t,e,s,e,s]}const us={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&&ye(s,e),s}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||br()})}static downloadFromSVGElement(t,e="shape"){return Kn(Sa(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Kn(Ri(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return en(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,n,r)=>{let a=n.toLowerCase();const o=Ar(r);for(a=="m"&&o.length>us[a]&&(e.push([n,...o.splice(0,us[a])]),a="l",n=n=="m"?"l":"L");o.length;){if(o.length<us[a])throw new Error(`parseSVGPath substring:{ ${s} } command:{ ${n} } args:{ ${o} }`);e.push([n,...o.splice(0,us[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 v=g[0];switch(v){case"M":s=g[1],n=g[2];break;case"A":const C=Ha(r,a,g[6],g[7],g[4],g[5],g[1],g[2],g[3]);if(!C.length)continue;C.forEach((y,w)=>{const[P,_,R,X,G,$,W,Q]=y;g=["C",R,X,G,$,W,Q],w<C.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",...Sn(r,a,o,h,g[1],g[2])];break;case"Q":o=g[1],h=g[2],g=["C",...Sn(r,a,g[1],g[2],g[3],g[4])];break;case"L":g=["C",...ls(r,a,g[1],g[2])];break;case"H":g=["C",...ls(r,a,g[1],a)];break;case"V":g=["C",...ls(r,a,r,g[1])];break;case"Z":g=["C",...ls(r,a,s,n)];break}u=v,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 _t=ke;class Pt{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(_t.parseSVGPath(t),e):t instanceof Pt?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const s=_t.normalizeSVGPath(_t.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 bt({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 Pt;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 bt({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 Pt;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 bn){Ha(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,v,C,b]=c;this.normalizedLines.push(new bt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:m,c2x:g,c2y:v,toX:C,toY:b})),this.prevPathX=C,this.prevPathY=b});return}let e,s,n,r,a,o;t instanceof bt?(e=t.c1x,s=t.c1y,n=t.c2x,r=t.c2y,a=t.toX,o=t.toY):t instanceof ef?[e,s,n,r,a,o]=Sn(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,s,n,r,a,o]=ls(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new bt({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 _t.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 vt;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 bt({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 Pt;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 bt({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 bt({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=ei(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=ei(l.x,l.y,t,e),d=r+o,m=this.getPointAtLength(d),g=ei(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?ge(h.x,h.y,n.x,n.y):ge(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+=ti(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]=$t(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:Pt.fromPolymorphPoints(Pt.mixPoints(new Pt({d:t}).polymorphPoints,new Pt({d:e}).polymorphPoints,s)).toSVGPathData()}}const rf=Pt;class j extends Ve{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=br(),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=Ar(s).reduce((n,r)=>n+r,0)}return Ir(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Pt,xt(()=>{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 vt;n.translate(-t.x+s.x,-t.y+s.y),s.originMatrix=n});const e=this.originMatrix?this.originMatrix.clone():new vt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,s){if(s instanceof ni)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 ni)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 Tr(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])=>[mt(s),n]))):e&&(this.attrs[mt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[mt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[mt(t)]}distance(t){return ti(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=ft(ge(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:s,dy:n}=Lt(Y(this.degree),e);this.vx=s,this.vy=n,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:s,dy:n}=Lt(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=It(t?.gravity,0);this.vy+=e;const s=It(t?.friction,1);this.vx*=s,this.vy*=s,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const s=It(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=It(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=It(e?.springLength,100),n=It(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=$t(s.getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const r=e?.onUpdate,a=new Zs({frameDuration:t});a.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,h)=>{this.setAttr("strokeDashoffset",""+$t(o.offset,2)),r?.(o,h)}})),a.play()}}class fs extends j{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(Y(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Xt(Y(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Xt(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 Qs(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 vn{_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],v=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]=v;return}if(u!==v||h!==d||c!==m||l!==g){let C=1-o;const b=h*d+c*m+l*g+u*v,S=b>=0?1:-1,y=1-b*b;if(y>Number.EPSILON){const P=Math.sqrt(y),_=Math.atan2(P,b*S);C=Math.sin(C*_)/P,o=Math.sin(o*_)/P}const w=o*S;if(h=h*C+d*w,c=c*C+m*w,l=l*C+g*w,u=u*C+v*w,C===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 vn(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(F(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 ds{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 ds(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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 $a.copy(this).projectOnVector(t),this.sub($a)}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(F(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 Mt{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 Mt(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(Wa.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Wa.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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this.z=F(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this.z=F(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 Tn.copy(this).projectOnVector(t),this.sub(Tn)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Tn.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(F(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 Cn{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 Cn(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],v=h[2],C=h[6],b=h[10];if(Math.abs(l-d)<.01&&Math.abs(u-v)<.01&&Math.abs(g-C)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+v)<.1&&Math.abs(g+C)<.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,_=(l+d)/4,R=(u+v)/4,X=(g+C)/4;return y>w&&y>P?y<.01?(s=0,n=.707106781,r=.707106781):(s=Math.sqrt(y),n=_/s,r=R/s):w>P?w<.01?(s=.707106781,n=0,r=.707106781):(n=Math.sqrt(w),s=_/n,r=X/n):P<.01?(s=.707106781,n=.707106781,r=0):(r=Math.sqrt(P),s=R/r,n=X/r),this.set(s,n,r,e),this}let S=Math.sqrt((C-g)*(C-g)+(u-v)*(u-v)+(d-l)*(d-l));return Math.abs(S)<.001&&(S=1),this.x=(C-g)/S,this.y=(u-v)/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=F(this.x,t.x,e.x),this.y=F(this.y,t.y,e.y),this.z=F(this.z,t.z,e.z),this.w=F(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=F(this.x,t,e),this.y=F(this.y,t,e),this.z=F(this.z,t,e),this.w=F(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(F(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 $a=new ds,Tn=new Mt,Wa=new vn,ms=2e3,_n=2001,Ja=[1,0,0,1],Za=[1,0,0,1,0,0],Ka=[1,0,0,0,1,0,0,0,1],Qa=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Pn{value;constructor(t=Ja){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(Ja),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 Pn(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 je{value;constructor(t=Ka){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(Ka),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 je(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],v=n[0],C=n[3],b=n[6],S=n[1],y=n[4],w=n[7],P=n[2],_=n[5],R=n[8];return r[0]=a*v+o*S+h*P,r[3]=a*C+o*y+h*_,r[6]=a*b+o*w+h*R,r[1]=c*v+l*S+u*P,r[4]=c*C+l*y+u*_,r[7]=c*b+l*w+u*R,r[2]=d*v+m*S+g*P,r[5]=d*C+m*y+g*_,r[8]=d*b+m*w+g*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],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 v=1/g;return t[0]=u*v,t[1]=(n*c-l*s)*v,t[2]=(o*s-n*a)*v,t[3]=d*v,t[4]=(l*e-n*h)*v,t[5]=(n*r-o*e)*v,t[6]=m*v,t[7]=(s*h-c*e)*v,t[8]=(a*e-s*r)*v,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(Mn.makeScale(t,e)),this}rotate(t){return this.premultiply(Mn.makeRotation(-t)),this}translate(t,e){return this.premultiply(Mn.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 St{value;is3dSpecial=!1;constructor(t=Qa){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,v=0,C=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]=v,b[15]=C,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(Qa),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 St(this.value)}static fromString(t){const e=new St,s=wr("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 vt(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`matrix4(${this.value.map(e=>$t(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=ft(F(Math.asin(-this.m13),-1,1));let r=ft(Math.atan2(this.m23,this.m33));Math.cos(Y(n))===0&&(r=ft(Math.atan2(-this.m31,this.m22)));let a=ft(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:ft(this.m14),skewY:ft(this.m24),skewZ:ft(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,s=t.value,n=1/He.setFromMatrix4Column(t,0).length(),r=1/He.setFromMatrix4Column(t,1).length(),a=1/He.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,v=o*u;e[0]=h*l,e[4]=-h*u,e[8]=c,e[1]=m+g*c,e[5]=d-v*c,e[9]=-o*h,e[2]=v-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,v=c*u;e[0]=d+v*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]=v+d*o,e[10]=a*h}else if(t.order==="ZXY"){const d=h*l,m=h*u,g=c*l,v=c*u;e[0]=d-v*o,e[4]=-a*u,e[8]=g+m*o,e[1]=m+g*o,e[5]=a*l,e[9]=v-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,v=o*u;e[0]=h*l,e[4]=g*c-m,e[8]=d*c+v,e[1]=h*u,e[5]=v*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,v=o*c;e[0]=h*l,e[4]=v-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-v*u}else if(t.order==="XZY"){const d=a*h,m=a*c,g=o*h,v=o*c;e[0]=h*l,e[4]=-u,e[8]=c*l,e[1]=d*u+v,e[5]=a*l,e[9]=m*u-g,e[2]=g*u-m,e[6]=o*l,e[10]=v*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(af,t,of)}lookAt(t,e,s){const n=this.value;return Et.subVectors(t,e),Et.lengthSq()===0&&(Et.z=1),Et.normalize(),pe.crossVectors(s,Et),pe.lengthSq()===0&&(Math.abs(s.z)===1?Et.x+=1e-4:Et.z+=1e-4,Et.normalize(),pe.crossVectors(s,Et)),pe.normalize(),ai.crossVectors(Et,pe),n[0]=pe.x,n[4]=ai.x,n[8]=Et.x,n[1]=pe.y,n[5]=ai.y,n[9]=Et.y,n[2]=pe.z,n[6]=ai.z,n[10]=Et.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],v=s[6],C=s[10],b=s[14],S=s[3],y=s[7],w=s[11],P=s[15],_=n[0],R=n[4],X=n[8],G=n[12],$=n[1],W=n[5],Q=n[9],ct=n[13],nt=n[2],Gt=n[6],kt=n[10],Ot=n[14],qt=n[3],L=n[7],D=n[11],U=n[15];return r[0]=a*_+o*$+h*nt+c*qt,r[4]=a*R+o*W+h*Gt+c*L,r[8]=a*X+o*Q+h*kt+c*D,r[12]=a*G+o*ct+h*Ot+c*U,r[1]=l*_+u*$+d*nt+m*qt,r[5]=l*R+u*W+d*Gt+m*L,r[9]=l*X+u*Q+d*kt+m*D,r[13]=l*G+u*ct+d*Ot+m*U,r[2]=g*_+v*$+C*nt+b*qt,r[6]=g*R+v*W+C*Gt+b*L,r[10]=g*X+v*Q+C*kt+b*D,r[14]=g*G+v*ct+C*Ot+b*U,r[3]=S*_+y*$+w*nt+P*qt,r[7]=S*R+y*W+w*Gt+P*L,r[11]=S*X+y*Q+w*kt+P*D,r[15]=S*G+y*ct+w*Ot+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],v=t[7],C=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)+v*(+e*h*m-e*c*d+r*a*d-n*a*m+n*c*l-r*h*l)+C*(+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 Mt?(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],v=t[13],C=t[14],b=t[15],S=u*C*c-v*d*c+v*h*m-o*C*m-u*h*b+o*d*b,y=g*d*c-l*C*c-g*h*m+a*C*m+l*h*b-a*d*b,w=l*v*c-g*u*c+g*o*m-a*v*m-l*o*b+a*u*b,P=g*u*h-l*v*h-g*o*d+a*v*d+l*o*C-a*u*C,_=e*S+s*y+n*w+r*P;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/_;return t[0]=S*R,t[1]=(v*d*r-u*C*r-v*n*m+s*C*m+u*n*b-s*d*b)*R,t[2]=(o*C*r-v*h*r+v*n*c-s*C*c-o*n*b+s*h*b)*R,t[3]=(u*h*r-o*d*r-u*n*c+s*d*c+o*n*m-s*h*m)*R,t[4]=y*R,t[5]=(l*C*r-g*d*r+g*n*m-e*C*m-l*n*b+e*d*b)*R,t[6]=(g*h*r-a*C*r-g*n*c+e*C*c+a*n*b-e*h*b)*R,t[7]=(a*d*r-l*h*r+l*n*c-e*d*c-a*n*m+e*h*m)*R,t[8]=w*R,t[9]=(g*u*r-l*v*r-g*s*m+e*v*m+l*s*b-e*u*b)*R,t[10]=(a*v*r-g*o*r+g*s*c-e*v*c-a*s*b+e*o*b)*R,t[11]=(l*o*r-a*u*r-l*s*c+e*u*c+a*s*m-e*o*m)*R,t[12]=P*R,t[13]=(l*v*n-g*u*n+g*s*d-e*v*d-l*s*C+e*u*C)*R,t[14]=(g*o*n-a*v*n-g*s*h+e*v*h+a*s*C-e*o*C)*R,t[15]=(a*u*n-l*o*n+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],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 Mt?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=ms){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===ms)m=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===_n)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=ms){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,v;if(o===ms)g=(a+r)*u,v=-2*u;else if(o===_n)g=r*u,v=-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]=v,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,v=a*l,C=a*u,b=o*u,S=h*c,y=h*l,w=h*u,P=s.x,_=s.y,R=s.z;return n[0]=(1-(v+b))*P,n[1]=(m+w)*P,n[2]=(g-y)*P,n[3]=0,n[4]=(m-w)*_,n[5]=(1-(d+b))*_,n[6]=(C+S)*_,n[7]=0,n[8]=(g+y)*R,n[9]=(C-S)*R,n[10]=(1-(d+v))*R,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=He.set(n[0],n[1],n[2]).length();const a=He.set(n[4],n[5],n[6]).length(),o=He.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],Ut.copy(this);const c=1/r,l=1/a,u=1/o;return Ut.value[0]*=c,Ut.value[1]*=c,Ut.value[2]*=c,Ut.value[4]*=l,Ut.value[5]*=l,Ut.value[6]*=l,Ut.value[8]*=u,Ut.value[9]*=u,Ut.value[10]*=u,e.setFromRotationMatrix4(Ut),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 St([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 St([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 St([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 St([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 St([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 St([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 St([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 fs({x:t,y:e}),a=new fs({x:t+s,y:e}),o=new fs({x:t+s,y:e+n}),h=new fs({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 vt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Za){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 vt,s=wr("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 St(e)}identity(){return this.value=Array.from(Za),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 vt(this.value)}multiply(t){const e=this.clone(),s=t instanceof vt?t:new vt(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 vt;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=ft(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:ft(Math.atan2(-this.m21,this.m22)),skewY:ft(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,v=c*l,C=(l*s-e*u)/(v-g),b=(h*s-e*c)/(g-v),S=(l*r-n*u)/(v-g),y=(h*r-n*c)/(g-v),w=(l*(o-m)+u*(d-a))/(v-g),P=(h*(o-m)+c*(d-a))/(g-v),_=[C,b,S,y,w,P];return new vt(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>$t(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 af=new Mt(0,0,0),of=new Mt(1,1,1),pe=new Mt,ai=new Mt,Et=new Mt,He=new Mt,Mn=new je,Ut=new St;function En(i){const t=new vt;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 St(r)),t.matrix4.toMatrix(t);break}return""}),t}function Xt(i,t,e){const s=new vt;return s.rotate(ft(i)),s.transformPoint({x:t,y:e})}function An(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 hf(i,t){const e=new Path2D(i),s=new Path2D;return s.addPath(e,An(t)),s}function Ie(i,t,e){const s=yn(i);return s.props.style=s.props.style||{},t?s.props.style[t]||s.props.style[Sr(t)]||s.props.style[mt(t)]||"":s.props.style}function kn(i,t,e){wn(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 In(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 cf(i,t,e){let s=i.style[t]||"";if(!s&&getComputedStyle){t=mt(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 oi(i,t,e){typeof t=="string"&&e?i.style.setProperty(mt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(s=>{oi(i,s,t[s])})}function Dn(i,t){typeof t=="string"?i.style.removeProperty(mt(t)):Object.keys(t).forEach(e=>{Dn(i,e)})}function to(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 lf(i,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:Ie(i,"transform")||""});const s=En(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]=Ie(i,r)),Object.assign(n,{[r]:`${a}`});break}}return Object.assign(n,{transform:s.toString()}),n}function ye(i,t,e){if(t===void 0&&e===void 0)return Rn(i);if(typeof t=="string"&&e===void 0)return eo(i,t);let s={};typeof t=="object"?s=t:typeof t=="string"&&typeof e=="string"&&(s[t]=""+e),wn(i,n=>{Object.entries(s).forEach(([r,a])=>{n.props[r]=""+a})})}const uf=["-o-","-ms-","-moz-","-webkit-",""];function Rn(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]=In(i):t[r.nodeName]=r.nodeValue)}return t}function eo(i,t){return t==="style"?In(i):i.getAttribute(mt(t))}function $e(i,t,e){return i.setAttribute(mt(t),""+e)}function ff(i,t){t.split(/[,\s]+/i).forEach(e=>{const s=mt(e.trim());s!=""&&i.removeAttribute(s)})}function df(i,t){$e(i,"draggable","true");const e=[];return e.push(B(i,"dragstart",s=>{de(s),_a(s);const n=s.dataTransfer;n&&(n.effectAllowed="move",n.setData("text/plain","some-data")),t?.onStart?.(s)},!0)),e.push(B(i,"drag",s=>{de(s),t?.onDrag?.(s)})),e.push(B(i,"dragend",s=>{de(s),t?.onEnd?.(s)})),()=>{e.forEach(s=>s())}}function mf(i,t){const e=[];return e.push(B(i,"dragenter",s=>{de(s),t?.onEnter?.(s)})),e.push(B(i,"dragover",s=>{de(s);const n=s.dataTransfer;n&&(n.dropEffect="move"),t?.onOver?.(s)})),e.push(B(i,"dragleave",s=>{de(s),t?.onLeave?.(s)})),e.push(B(i,"drop",s=>{de(s);const n=s.dataTransfer;if(!n){t?.onDrop?.(s,[]);return}t?.onDrop?.(s,[...n.files])})),()=>{e.forEach(s=>s())}}function gf(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function gs(){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 pf(){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 so(){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 yf(){const{scrollWidth:i,scrollHeight:t}=gs();return{width:i,height:t}}function Ln(i){const{top:t,left:e,width:s,height:n}=i.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=gs();return{x:e+r,y:t+a,width:s,height:n}}function wf(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 io(i){return i.getBoundingClientRect()}function xf(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 bf(){const{clientHeight:i,scrollTop:t,scrollHeight:e}=gs(),s=e-i;return s<=0?0:t/s*100}function no(){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 Sf(i){if("center"in i){const t=i.center,e=io(i.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:i.clientX,y:i.clientY}}function zn(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}=gs();return{x:i.clientX+t,y:i.clientY+e}}function We(i,t){const e={x:0,y:0};if(t){const s=zn(i),n=Ln(t);e.x=F(s.x-n.x,0,n.width),e.y=F(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=zn(i),a=Ln(i.target);e.x=F(r.x-a.x+s,0,a.width),e.y=F(r.y-a.y+n,0,a.height)}}return e}var ro={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
16
16
|
* http://hammerjs.github.io/
|
|
17
17
|
*
|
|
18
18
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
19
19
|
* Licensed under the MIT license */(function(i){(function(t,e,s,n){var r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",h=Math.round,c=Math.abs,l=Date.now;function u(p,x,M){return setTimeout(y(p,M),x)}function d(p,x,M){return Array.isArray(p)?(m(p,M[x],M),!0):!1}function m(p,x,M){var E;if(p)if(p.forEach)p.forEach(x,M);else if(p.length!==n)for(E=0;E<p.length;)x.call(M,p[E],E,p),E++;else for(E in p)p.hasOwnProperty(E)&&x.call(M,p[E],E,p)}function g(p,x,M){var E="DEPRECATED METHOD: "+x+`
|
|
20
20
|
`+M+` AT
|
|
21
|
-
`;return function(){var I=new Error("get-stack-trace"),O=I&&I.stack?I.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,E,O),p.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(x){if(x===n||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(x),E=1;E<arguments.length;E++){var I=arguments[E];if(I!==n&&I!==null)for(var O in I)I.hasOwnProperty(O)&&(M[O]=I[O])}return M}:v=Object.assign;var C=g(function(x,M,E){for(var I=Object.keys(M),O=0;O<I.length;)(!E||E&&x[I[O]]===n)&&(x[I[O]]=M[I[O]]),O++;return x},"extend","Use `assign`."),b=g(function(x,M){return C(x,M,!0)},"merge","Use `assign`.");function S(p,x,M){var E=x.prototype,I;I=p.prototype=Object.create(E),I.constructor=p,I._super=E,M&&v(I,M)}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 _(p,x,M){m($(x),function(E){p.addEventListener(E,M,!1)})}function R(p,x,M){m($(x),function(E){p.removeEventListener(E,M,!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 $(p){return p.trim().split(/\s+/g)}function W(p,x,M){if(p.indexOf&&!M)return p.indexOf(x);for(var E=0;E<p.length;){if(M&&p[E][M]==x||!M&&p[E]===x)return E;E++}return-1}function Q(p){return Array.prototype.slice.call(p,0)}function ct(p,x,M){for(var E=[],I=[],O=0;O<p.length;){var V=x?p[O][x]:p[O];W(I,V)<0&&E.push(p[O]),I[O]=V,O++}return M&&(x?E=E.sort(function(lt,wt){return lt[x]>wt[x]}):E=E.sort()),E}function nt(p,x){for(var M,E,I=x[0].toUpperCase()+x.slice(1),O=0;O<r.length;){if(M=r[O],E=M?M+I:x,E in p)return E;O++}return n}var Gt=1;function kt(){return Gt++}function Ot(p){var x=p.ownerDocument||p;return x.defaultView||x.parentWindow||t}var qt=/mobile|tablet|ip(ad|hone|od)|android/i,L="ontouchstart"in t,D=nt(t,"PointerEvent")!==n,U=L&&qt.test(navigator.userAgent),q="touch",yt="pen",jt="mouse",bi="kinect",Si=25,at=1,Zt=2,K=4,dt=8,Ke=1,Be=2,Ne=4,ve=8,k=16,tt=Be|Ne,Ye=ve|k,nh=tt|Ye,rh=["x","y"],vi=["clientX","clientY"];function Ft(p,x){var M=this;this.manager=p,this.callback=x,this.element=p.element,this.target=p.options.inputTarget,this.domHandler=function(E){w(p.options.enable,[p])&&M.handler(E)},this.init()}Ft.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(Ot(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(Ot(this.element),this.evWin,this.domHandler)}};function Og(p){var x,M=p.options.inputClass;return M?x=M:D?x=ar:U?x=_i:L?x=or:x=Ti,new x(p,Fg)}function Fg(p,x,M){var E=M.pointers.length,I=M.changedPointers.length,O=x&at&&E-I===0,V=x&(K|dt)&&E-I===0;M.isFirst=!!O,M.isFinal=!!V,O&&(p.session={}),M.eventType=x,Bg(p,M),p.emit("hammer.input",M),p.recognize(M),p.session.prevInput=M}function Bg(p,x){var M=p.session,E=x.pointers,I=E.length;M.firstInput||(M.firstInput=ah(x)),I>1&&!M.firstMultiple?M.firstMultiple=ah(x):I===1&&(M.firstMultiple=!1);var O=M.firstInput,V=M.firstMultiple,ot=V?V.center:O.center,lt=x.center=oh(E);x.timeStamp=l(),x.deltaTime=x.timeStamp-O.timeStamp,x.angle=rr(ot,lt),x.distance=Ci(ot,lt),Ng(M,x),x.offsetDirection=ch(x.deltaX,x.deltaY);var wt=hh(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=wt.x,x.overallVelocityY=wt.y,x.overallVelocity=c(wt.x)>c(wt.y)?wt.x:wt.y,x.scale=V?Xg(V.pointers,E):1,x.rotation=V?Ug(V.pointers,E):0,x.maxPointers=M.prevInput?x.pointers.length>M.prevInput.maxPointers?x.pointers.length:M.prevInput.maxPointers:x.pointers.length,Yg(M,x);var Qt=p.element;X(x.srcEvent.target,Qt)&&(Qt=x.srcEvent.target),x.target=Qt}function Ng(p,x){var M=x.center,E=p.offsetDelta||{},I=p.prevDelta||{},O=p.prevInput||{};(x.eventType===at||O.eventType===K)&&(I=p.prevDelta={x:O.deltaX||0,y:O.deltaY||0},E=p.offsetDelta={x:M.x,y:M.y}),x.deltaX=I.x+(M.x-E.x),x.deltaY=I.y+(M.y-E.y)}function Yg(p,x){var M=p.lastInterval||x,E=x.timeStamp-M.timeStamp,I,O,V,ot;if(x.eventType!=dt&&(E>Si||M.velocity===n)){var lt=x.deltaX-M.deltaX,wt=x.deltaY-M.deltaY,Qt=hh(E,lt,wt);O=Qt.x,V=Qt.y,I=c(Qt.x)>c(Qt.y)?Qt.x:Qt.y,ot=ch(lt,wt),p.lastInterval=x}else I=M.velocity,O=M.velocityX,V=M.velocityY,ot=M.direction;x.velocity=I,x.velocityX=O,x.velocityY=V,x.direction=ot}function ah(p){for(var x=[],M=0;M<p.pointers.length;)x[M]={clientX:h(p.pointers[M].clientX),clientY:h(p.pointers[M].clientY)},M++;return{timeStamp:l(),pointers:x,center:oh(x),deltaX:p.deltaX,deltaY:p.deltaY}}function oh(p){var x=p.length;if(x===1)return{x:h(p[0].clientX),y:h(p[0].clientY)};for(var M=0,E=0,I=0;I<x;)M+=p[I].clientX,E+=p[I].clientY,I++;return{x:h(M/x),y:h(E/x)}}function hh(p,x,M){return{x:x/p||0,y:M/p||0}}function ch(p,x){return p===x?Ke:c(p)>=c(x)?p<0?Be:Ne:x<0?ve:k}function Ci(p,x,M){M||(M=rh);var E=x[M[0]]-p[M[0]],I=x[M[1]]-p[M[1]];return Math.sqrt(E*E+I*I)}function rr(p,x,M){M||(M=rh);var E=x[M[0]]-p[M[0]],I=x[M[1]]-p[M[1]];return Math.atan2(I,E)*180/Math.PI}function Ug(p,x){return rr(x[1],x[0],vi)+rr(p[1],p[0],vi)}function Xg(p,x){return Ci(x[0],x[1],vi)/Ci(p[0],p[1],vi)}var Vg={mousedown:at,mousemove:Zt,mouseup:K},Gg="mousedown",qg="mousemove mouseup";function Ti(){this.evEl=Gg,this.evWin=qg,this.pressed=!1,Ft.apply(this,arguments)}S(Ti,Ft,{handler:function(x){var M=Vg[x.type];M&at&&x.button===0&&(this.pressed=!0),M&Zt&&x.which!==1&&(M=K),this.pressed&&(M&K&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[x],changedPointers:[x],pointerType:jt,srcEvent:x}))}});var jg={pointerdown:at,pointermove:Zt,pointerup:K,pointercancel:dt,pointerout:dt},Hg={2:q,3:yt,4:jt,5:bi},lh="pointerdown",uh="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(lh="MSPointerDown",uh="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=lh,this.evWin=uh,Ft.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}S(ar,Ft,{handler:function(x){var M=this.store,E=!1,I=x.type.toLowerCase().replace("ms",""),O=jg[I],V=Hg[x.pointerType]||x.pointerType,ot=V==q,lt=W(M,x.pointerId,"pointerId");O&at&&(x.button===0||ot)?lt<0&&(M.push(x),lt=M.length-1):O&(K|dt)&&(E=!0),!(lt<0)&&(M[lt]=x,this.callback(this.manager,O,{pointers:M,changedPointers:[x],pointerType:V,srcEvent:x}),E&&M.splice(lt,1))}});var $g={touchstart:at,touchmove:Zt,touchend:K,touchcancel:dt},Wg="touchstart",Jg="touchstart touchmove touchend touchcancel";function fh(){this.evTarget=Wg,this.evWin=Jg,this.started=!1,Ft.apply(this,arguments)}S(fh,Ft,{handler:function(x){var M=$g[x.type];if(M===at&&(this.started=!0),!!this.started){var E=Zg.call(this,x,M);M&(K|dt)&&E[0].length-E[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:E[0],changedPointers:E[1],pointerType:q,srcEvent:x})}}});function Zg(p,x){var M=Q(p.touches),E=Q(p.changedTouches);return x&(K|dt)&&(M=ct(M.concat(E),"identifier",!0)),[M,E]}var Kg={touchstart:at,touchmove:Zt,touchend:K,touchcancel:dt},Qg="touchstart touchmove touchend touchcancel";function _i(){this.evTarget=Qg,this.targetIds={},Ft.apply(this,arguments)}S(_i,Ft,{handler:function(x){var M=Kg[x.type],E=tp.call(this,x,M);E&&this.callback(this.manager,M,{pointers:E[0],changedPointers:E[1],pointerType:q,srcEvent:x})}});function tp(p,x){var M=Q(p.touches),E=this.targetIds;if(x&(at|Zt)&&M.length===1)return E[M[0].identifier]=!0,[M,M];var I,O,V=Q(p.changedTouches),ot=[],lt=this.target;if(O=M.filter(function(wt){return X(wt.target,lt)}),x===at)for(I=0;I<O.length;)E[O[I].identifier]=!0,I++;for(I=0;I<V.length;)E[V[I].identifier]&&ot.push(V[I]),x&(K|dt)&&delete E[V[I].identifier],I++;if(ot.length)return[ct(O.concat(ot),"identifier",!0),ot]}var ep=2500,dh=25;function or(){Ft.apply(this,arguments);var p=y(this.handler,this);this.touch=new _i(this.manager,p),this.mouse=new Ti(this.manager,p),this.primaryTouch=null,this.lastTouches=[]}S(or,Ft,{handler:function(x,M,E){var I=E.pointerType==q,O=E.pointerType==jt;if(!(O&&E.sourceCapabilities&&E.sourceCapabilities.firesTouchEvents)){if(I)sp.call(this,M,E);else if(O&&ip.call(this,E))return;this.callback(x,M,E)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function sp(p,x){p&at?(this.primaryTouch=x.changedPointers[0].identifier,mh.call(this,x)):p&(K|dt)&&mh.call(this,x)}function mh(p){var x=p.changedPointers[0];if(x.identifier===this.primaryTouch){var M={x:x.clientX,y:x.clientY};this.lastTouches.push(M);var E=this.lastTouches,I=function(){var O=E.indexOf(M);O>-1&&E.splice(O,1)};setTimeout(I,ep)}}function ip(p){for(var x=p.srcEvent.clientX,M=p.srcEvent.clientY,E=0;E<this.lastTouches.length;E++){var I=this.lastTouches[E],O=Math.abs(x-I.x),V=Math.abs(M-I.y);if(O<=dh&&V<=dh)return!0}return!1}var gh=nt(a.style,"touchAction"),ph=gh!==n,yh="compute",wh="auto",hr="manipulation",Ue="none",vs="pan-x",Cs="pan-y",Pi=rp();function cr(p,x){this.manager=p,this.set(x)}cr.prototype={set:function(p){p==yh&&(p=this.compute()),ph&&this.manager.element.style&&Pi[p]&&(this.manager.element.style[gh]=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()))}),np(p.join(" "))},preventDefaults:function(p){var x=p.srcEvent,M=p.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var E=this.actions,I=G(E,Ue)&&!Pi[Ue],O=G(E,Cs)&&!Pi[Cs],V=G(E,vs)&&!Pi[vs];if(I){var ot=p.pointers.length===1,lt=p.distance<2,wt=p.deltaTime<250;if(ot&<&&wt)return}if(!(V&&O)&&(I||O&&M&tt||V&&M&Ye))return this.preventSrc(x)},preventSrc:function(p){this.manager.session.prevented=!0,p.preventDefault()}};function np(p){if(G(p,Ue))return Ue;var x=G(p,vs),M=G(p,Cs);return x&&M?Ue:x||M?x?vs:Cs:G(p,hr)?hr:wh}function rp(){if(!ph)return!1;var p={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){p[M]=x?t.CSS.supports("touch-action",M):!0}),p}var Mi=1,Bt=2,Qe=4,Ce=8,le=Ce,Ts=16,Kt=32;function ue(p){this.options=v({},this.defaults,p||{}),this.id=kt(),this.manager=null,this.options.enable=P(this.options.enable,!0),this.state=Mi,this.simultaneous={},this.requireFail=[]}ue.prototype={defaults:{},set:function(p){return v(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=Ei(p,this),x[p.id]||(x[p.id]=p,p.recognizeWith(this)),this},dropRecognizeWith:function(p){return d(p,"dropRecognizeWith",this)?this:(p=Ei(p,this),delete this.simultaneous[p.id],this)},requireFailure:function(p){if(d(p,"requireFailure",this))return this;var x=this.requireFail;return p=Ei(p,this),W(x,p)===-1&&(x.push(p),p.requireFailure(this)),this},dropRequireFailure:function(p){if(d(p,"dropRequireFailure",this))return this;p=Ei(p,this);var x=W(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,M=this.state;function E(I){x.manager.emit(I,p)}M<Ce&&E(x.options.event+xh(M)),E(x.options.event),p.additionalEvent&&E(p.additionalEvent),M>=Ce&&E(x.options.event+xh(M))},tryEmit:function(p){if(this.canEmit())return this.emit(p);this.state=Kt},canEmit:function(){for(var p=0;p<this.requireFail.length;){if(!(this.requireFail[p].state&(Kt|Mi)))return!1;p++}return!0},recognize:function(p){var x=v({},p);if(!w(this.options.enable,[this,x])){this.reset(),this.state=Kt;return}this.state&(le|Ts|Kt)&&(this.state=Mi),this.state=this.process(x),this.state&(Bt|Qe|Ce|Ts)&&this.tryEmit(x)},process:function(p){},getTouchAction:function(){},reset:function(){}};function xh(p){return p&Ts?"cancel":p&Ce?"end":p&Qe?"move":p&Bt?"start":""}function bh(p){return p==k?"down":p==ve?"up":p==Be?"left":p==Ne?"right":""}function Ei(p,x){var M=x.manager;return M?M.get(p):p}function Ht(){ue.apply(this,arguments)}S(Ht,ue,{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,M=p.eventType,E=x&(Bt|Qe),I=this.attrTest(p);return E&&(M&dt||!I)?x|Ts:E||I?M&K?x|Ce:x&Bt?x|Qe:Bt:Kt}});function Ai(){Ht.apply(this,arguments),this.pX=null,this.pY=null}S(Ai,Ht,{defaults:{event:"pan",threshold:10,pointers:1,direction:nh},getTouchAction:function(){var p=this.options.direction,x=[];return p&tt&&x.push(Cs),p&Ye&&x.push(vs),x},directionTest:function(p){var x=this.options,M=!0,E=p.distance,I=p.direction,O=p.deltaX,V=p.deltaY;return I&x.direction||(x.direction&tt?(I=O===0?Ke:O<0?Be:Ne,M=O!=this.pX,E=Math.abs(p.deltaX)):(I=V===0?Ke:V<0?ve:k,M=V!=this.pY,E=Math.abs(p.deltaY))),p.direction=I,M&&E>x.threshold&&I&x.direction},attrTest:function(p){return Ht.prototype.attrTest.call(this,p)&&(this.state&Bt||!(this.state&Bt)&&this.directionTest(p))},emit:function(p){this.pX=p.deltaX,this.pY=p.deltaY;var x=bh(p.direction);x&&(p.additionalEvent=this.options.event+x),this._super.emit.call(this,p)}});function lr(){Ht.apply(this,arguments)}S(lr,Ht,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.scale-1)>this.options.threshold||this.state&Bt)},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 ur(){ue.apply(this,arguments),this._timer=null,this._input=null}S(ur,ue,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[wh]},process:function(p){var x=this.options,M=p.pointers.length===x.pointers,E=p.distance<x.threshold,I=p.deltaTime>x.time;if(this._input=p,!E||!M||p.eventType&(K|dt)&&!I)this.reset();else if(p.eventType&at)this.reset(),this._timer=u(function(){this.state=le,this.tryEmit()},x.time,this);else if(p.eventType&K)return le;return Kt},reset:function(){clearTimeout(this._timer)},emit:function(p){this.state===le&&(p&&p.eventType&K?this.manager.emit(this.options.event+"up",p):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function fr(){Ht.apply(this,arguments)}S(fr,Ht,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.rotation)>this.options.threshold||this.state&Bt)}});function dr(){Ht.apply(this,arguments)}S(dr,Ht,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:tt|Ye,pointers:1},getTouchAction:function(){return Ai.prototype.getTouchAction.call(this)},attrTest:function(p){var x=this.options.direction,M;return x&(tt|Ye)?M=p.overallVelocity:x&tt?M=p.overallVelocityX:x&Ye&&(M=p.overallVelocityY),this._super.attrTest.call(this,p)&&x&p.offsetDirection&&p.distance>this.options.threshold&&p.maxPointers==this.options.pointers&&c(M)>this.options.velocity&&p.eventType&K},emit:function(p){var x=bh(p.offsetDirection);x&&this.manager.emit(this.options.event+x,p),this.manager.emit(this.options.event,p)}});function ki(){ue.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}S(ki,ue,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[hr]},process:function(p){var x=this.options,M=p.pointers.length===x.pointers,E=p.distance<x.threshold,I=p.deltaTime<x.time;if(this.reset(),p.eventType&at&&this.count===0)return this.failTimeout();if(E&&I&&M){if(p.eventType!=K)return this.failTimeout();var O=this.pTime?p.timeStamp-this.pTime<x.interval:!0,V=!this.pCenter||Ci(this.pCenter,p.center)<x.posThreshold;this.pTime=p.timeStamp,this.pCenter=p.center,!V||!O?this.count=1:this.count+=1,this._input=p;var ot=this.count%x.taps;if(ot===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=le,this.tryEmit()},x.interval,this),Bt):le}return Kt},failTimeout:function(){return this._timer=u(function(){this.state=Kt},this.options.interval,this),Kt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==le&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function fe(p,x){return x=x||{},x.recognizers=P(x.recognizers,fe.defaults.preset),new mr(p,x)}fe.VERSION="2.0.7",fe.defaults={domEvents:!1,touchAction:yh,enable:!0,inputTarget:null,inputClass:null,preset:[[fr,{enable:!1}],[lr,{enable:!1},["rotate"]],[dr,{direction:tt}],[Ai,{direction:tt},["swipe"]],[ki],[ki,{event:"doubletap",taps:2},["tap"]],[ur]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var op=1,Sh=2;function mr(p,x){this.options=v({},fe.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||p,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=p,this.input=Og(this),this.touchAction=new cr(this,this.options.touchAction),vh(this,!0),m(this.options.recognizers,function(M){var E=this.add(new M[0](M[1]));M[2]&&E.recognizeWith(M[2]),M[3]&&E.requireFailure(M[3])},this)}mr.prototype={set:function(p){return v(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?Sh:op},recognize:function(p){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(p);var M,E=this.recognizers,I=x.curRecognizer;(!I||I&&I.state&le)&&(I=x.curRecognizer=null);for(var O=0;O<E.length;)M=E[O],x.stopped!==Sh&&(!I||M==I||M.canRecognizeWith(I))?M.recognize(p):M.reset(),!I&&M.state&(Bt|Qe|Ce)&&(I=x.curRecognizer=M),O++}},get:function(p){if(p instanceof ue)return p;for(var x=this.recognizers,M=0;M<x.length;M++)if(x[M].options.event==p)return x[M];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,M=W(x,p);M!==-1&&(x.splice(M,1),this.touchAction.update())}return this},on:function(p,x){if(p!==n&&x!==n){var M=this.handlers;return m($(p),function(E){M[E]=M[E]||[],M[E].push(x)}),this}},off:function(p,x){if(p!==n){var M=this.handlers;return m($(p),function(E){x?M[E]&&M[E].splice(W(M[E],x),1):delete M[E]}),this}},emit:function(p,x){this.options.domEvents&&hp(p,x);var M=this.handlers[p]&&this.handlers[p].slice();if(!(!M||!M.length)){x.type=p,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var E=0;E<M.length;)M[E](x),E++}},destroy:function(){this.element&&vh(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function vh(p,x){var M=p.element;if(M.style){var E;m(p.options.cssProps,function(I,O){E=nt(M.style,O),x?(p.oldCssProps[E]=M.style[E],M.style[E]=I):M.style[E]=p.oldCssProps[E]||""}),x||(p.oldCssProps={})}}function hp(p,x){var M=e.createEvent("Event");M.initEvent(p,!0,!0),M.gesture=x,x.target.dispatchEvent(M)}v(fe,{INPUT_START:at,INPUT_MOVE:Zt,INPUT_END:K,INPUT_CANCEL:dt,STATE_POSSIBLE:Mi,STATE_BEGAN:Bt,STATE_CHANGED:Qe,STATE_ENDED:Ce,STATE_RECOGNIZED:le,STATE_CANCELLED:Ts,STATE_FAILED:Kt,DIRECTION_NONE:Ke,DIRECTION_LEFT:Be,DIRECTION_RIGHT:Ne,DIRECTION_UP:ve,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:tt,DIRECTION_VERTICAL:Ye,DIRECTION_ALL:nh,Manager:mr,Input:Ft,TouchAction:cr,TouchInput:_i,MouseInput:Ti,PointerEventInput:ar,TouchMouseInput:or,SingleTouchInput:fh,Recognizer:ue,AttrRecognizer:Ht,Tap:ki,Pan:Ai,Swipe:dr,Pinch:lr,Rotate:fr,Press:ur,on:_,off:R,each:m,merge:b,extend:C,assign:v,inherit:S,bindFn:y,prefixed:nt});var cp=typeof t<"u"?t:typeof self<"u"?self:{};cp.Hammer=fe,typeof n=="function"&&n.amd?n(function(){return fe}):i.exports?i.exports=fe:t[s]=fe})(window,document,"Hammer")})(ro);var Cf=ro.exports;const Tf=Rr(Cf);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 _f(i){return i(window.innerWidth,window.innerHeight),B(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,s=t.target.innerHeight;i(e,s)})}function we(i,t){return ao(i,t)}function ao(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 Pf(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 Mf(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 Ef(i=document.documentElement){const t=new Ve,e=new Tf(i);let s=[];const n=no(),r=n.mousePoint,a=k=>{t.emit("mouseDown",k)},o=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||n.setCurrentMousePoint(We(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)},v=k=>{t.emit("mouseWheel",k)},C=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 tt=k.changedTouches[0];r.isDown||n.setCurrentMousePoint(We(tt,i)),t.emit("touchMove",k)},P=k=>{t.emit("pointerDown",k)},_=k=>{t.emit("pointerUp",k)},R=k=>{t.emit("pointerCancel",k)},X=k=>{t.emit("pointerMove",k)},G=k=>{t.emit("pan",k)},$=k=>{t.emit("panStart",k)},W=k=>{t.emit("panMove",k)},Q=k=>{t.emit("panEnd",k)},ct=k=>{t.emit("panCancel",k)},nt=k=>{t.emit("panLeft",k)},Gt=k=>{t.emit("panRight",k)},kt=k=>{t.emit("panUp",k)},Ot=k=>{t.emit("panDown",k)},qt=k=>{t.emit("pinch",k)},L=k=>{t.emit("pinchin",k)},D=k=>{t.emit("pinchout",k)},U=k=>{t.emit("press",k)},q=k=>{t.emit("rotate",k)},yt=k=>{t.emit("swipe",k)},jt=k=>{t.emit("swipeLeft",k)},bi=k=>{t.emit("swipeRight",k)},Si=k=>{t.emit("swipeUp",k)},at=k=>{t.emit("swipeDown",k)},Zt=k=>{t.emit("tap",k)},K=k=>{!k.target||i==k.target||i.contains(k.target)||t.emit("tapOutSide",k)},dt=k=>{t.emit("transitionstart",k)},Ke=k=>{t.emit("transitionend",k)},Be=k=>{t.emit("animationstart",k)},Ne=k=>{t.emit("animationend",k)};let ve={...i.getBoundingClientRect(),width:i.offsetWidth,height:i.offsetHeight};return{el:i,get rect(){return ve},mousePoint:r,eb:t,start:async function(){s.push(B(i,"mousedown",a)),s.push(B(i,"mouseup",o)),s.push(B(i,"mousemove",h)),s.push(B(i,"mouseover",c)),s.push(B(i,"mouseout",l)),s.push(B(i,"mouseenter",u)),s.push(B(i,"mouseleave",d)),s.push(B(i,"click",m)),s.push(B(i,"dblclick",g)),s.push(B(i,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",v)),s.push(B(i,"contextmenu",C)),s.push(B(i,"touchstart",b)),s.push(B(i,"touchend",S)),s.push(B(i,"touchcancel",y)),s.push(B(i,"touchmove",w)),s.push(B(i,"pointerdown",P)),s.push(B(i,"pointerup",_)),s.push(B(i,"pointercancel",R)),s.push(B(i,"pointermove",X)),e.on("pan",G),e.on("panstart",$),e.on("panmove",W),e.on("panend",Q),e.on("pancancel",ct),e.on("panleft",nt),e.on("panright",Gt),e.on("panup",kt),e.on("pandown",Ot),e.on("pinch",qt),e.on("pinchin",L),e.on("pinchout",D),e.on("press",U),e.on("rotate",q),e.on("swipe",yt),e.on("swipeleft",jt),e.on("swiperight",bi),e.on("swipeup",Si),e.on("swipedown",at),e.on("tap",Zt),s.push(B(document,"pointerdown",K)),s.push(B(i,"transitionstart",dt)),s.push(B(i,"transitionend",Ke)),s.push(B(i,"animationstart",Be)),s.push(B(i,"animationend",Ne));const k=await On(i,tt=>{ve=tt,t.emit("resize",tt)});s.push(k),s.push(we(this,{start:tt=>{n.setStartMousePoint(We(tt,i),!0)},move:tt=>{n.setCurrentMousePoint(We(tt,i))},end:tt=>{n.setCurrentMousePoint(We(tt,i),!1)}}))},end:()=>{t.removeAllListeners(),s.forEach(k=>k()),s=[],e.off("pan",G),e.off("panstart",$),e.off("panmove",W),e.off("panend",Q),e.off("pancancel",ct),e.off("panleft",nt),e.off("panright",Gt),e.off("panup",kt),e.off("pandown",Ot),e.off("pinch",qt),e.off("pinchin",L),e.off("pinchout",D),e.off("press",U),e.off("rotate",q),e.off("swipe",yt),e.off("swipeleft",jt),e.off("swiperight",bi),e.off("swipeup",Si),e.off("swipedown",at),e.off("tap",Zt)}}}function Af(i,t,e=50){return we(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function kf(i,t,e=50){return we(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function oo(i="(prefers-color-scheme: dark)"){const t=window.matchMedia(i),e=Is(t.matches);return B(t,"change",s=>{e.value=s.matches}),e}const De=Ta("__yz_theme__");if(!De.value){const i=oo("(prefers-color-scheme: dark)");De.value=i.value?"dark":"light"}xt(()=>{switch(De.value){case"dark":document.documentElement.classList.add("dark"),$e(document.documentElement,"data-theme","dark");break;default:document.documentElement.classList.remove("dark"),$e(document.documentElement,"data-theme","light");break}});function If(i){De.value=i}function Df(){switch(De.value){case"dark":return"dark";default:return"light"}}function Rf(){De.value=De.value=="dark"?"light":"dark"}function ho(i,t=""){return getComputedStyle(document.documentElement).getPropertyValue(i)||t}function Lf(i,t){document.documentElement.style.setProperty(i,t)}const zf={getSelectedText:()=>window.getSelection()?.toString()||""};function Of(i){document.getElementsByTagName("title")[0].innerText=i,document.title=i}function co(i){let t=!1,e;function s(){document.readyState==="loading"||t||(i(),e?.(),t=!0)}try{e=B(document,"DOMContentLoaded",s)}catch{e=B(window,"load",s)}return s(),e}function lo(i){return B(window,"beforeunload",t=>{i(t)})}async function uo(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 ie=new Ve;let fo="";uo(document,()=>{location.href!==fo&&(fo=location.href,ie.emit("urlchange",location.href))}),B(window,"hashchange",()=>{ie.emit("hashchange",location.hash)}),B(window,"popstate",i=>{ie.emit("popstate",i.state)});const mo={onUrlChange:i=>(ie.on("urlchange",i),()=>{ie.off("urlchange",i)}),onHashChange:i=>(ie.on("hashchange",i),()=>{ie.off("hashchange",i)}),goto:(i,t=null)=>{history.pushState(t,"",i)},replace:(i,t=null)=>{history.replaceState(t,"",i)},onPopState:i=>(ie.on("popstate",i),()=>{ie.off("popstate",i)})};function Ff(i){return mo.onPopState(()=>{const{pathname:t,search:e}=location;i[t]?.()})}let go=!1;function Bf(){go||(go=!0,to(`
|
|
21
|
+
`;return function(){var I=new Error("get-stack-trace"),O=I&&I.stack?I.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,E,O),p.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(x){if(x===n||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(x),E=1;E<arguments.length;E++){var I=arguments[E];if(I!==n&&I!==null)for(var O in I)I.hasOwnProperty(O)&&(M[O]=I[O])}return M}:v=Object.assign;var C=g(function(x,M,E){for(var I=Object.keys(M),O=0;O<I.length;)(!E||E&&x[I[O]]===n)&&(x[I[O]]=M[I[O]]),O++;return x},"extend","Use `assign`."),b=g(function(x,M){return C(x,M,!0)},"merge","Use `assign`.");function S(p,x,M){var E=x.prototype,I;I=p.prototype=Object.create(E),I.constructor=p,I._super=E,M&&v(I,M)}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 _(p,x,M){m($(x),function(E){p.addEventListener(E,M,!1)})}function R(p,x,M){m($(x),function(E){p.removeEventListener(E,M,!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 $(p){return p.trim().split(/\s+/g)}function W(p,x,M){if(p.indexOf&&!M)return p.indexOf(x);for(var E=0;E<p.length;){if(M&&p[E][M]==x||!M&&p[E]===x)return E;E++}return-1}function Q(p){return Array.prototype.slice.call(p,0)}function ct(p,x,M){for(var E=[],I=[],O=0;O<p.length;){var V=x?p[O][x]:p[O];W(I,V)<0&&E.push(p[O]),I[O]=V,O++}return M&&(x?E=E.sort(function(lt,wt){return lt[x]>wt[x]}):E=E.sort()),E}function nt(p,x){for(var M,E,I=x[0].toUpperCase()+x.slice(1),O=0;O<r.length;){if(M=r[O],E=M?M+I:x,E in p)return E;O++}return n}var Gt=1;function kt(){return Gt++}function Ot(p){var x=p.ownerDocument||p;return x.defaultView||x.parentWindow||t}var qt=/mobile|tablet|ip(ad|hone|od)|android/i,L="ontouchstart"in t,D=nt(t,"PointerEvent")!==n,U=L&&qt.test(navigator.userAgent),q="touch",yt="pen",jt="mouse",bi="kinect",Si=25,at=1,Zt=2,K=4,dt=8,Ke=1,Be=2,Ne=4,ve=8,k=16,tt=Be|Ne,Ye=ve|k,nh=tt|Ye,rh=["x","y"],vi=["clientX","clientY"];function Ft(p,x){var M=this;this.manager=p,this.callback=x,this.element=p.element,this.target=p.options.inputTarget,this.domHandler=function(E){w(p.options.enable,[p])&&M.handler(E)},this.init()}Ft.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(Ot(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(Ot(this.element),this.evWin,this.domHandler)}};function zg(p){var x,M=p.options.inputClass;return M?x=M:D?x=ar:U?x=_i:L?x=or:x=Ti,new x(p,Og)}function Og(p,x,M){var E=M.pointers.length,I=M.changedPointers.length,O=x&at&&E-I===0,V=x&(K|dt)&&E-I===0;M.isFirst=!!O,M.isFinal=!!V,O&&(p.session={}),M.eventType=x,Fg(p,M),p.emit("hammer.input",M),p.recognize(M),p.session.prevInput=M}function Fg(p,x){var M=p.session,E=x.pointers,I=E.length;M.firstInput||(M.firstInput=ah(x)),I>1&&!M.firstMultiple?M.firstMultiple=ah(x):I===1&&(M.firstMultiple=!1);var O=M.firstInput,V=M.firstMultiple,ot=V?V.center:O.center,lt=x.center=oh(E);x.timeStamp=l(),x.deltaTime=x.timeStamp-O.timeStamp,x.angle=rr(ot,lt),x.distance=Ci(ot,lt),Bg(M,x),x.offsetDirection=ch(x.deltaX,x.deltaY);var wt=hh(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=wt.x,x.overallVelocityY=wt.y,x.overallVelocity=c(wt.x)>c(wt.y)?wt.x:wt.y,x.scale=V?Ug(V.pointers,E):1,x.rotation=V?Yg(V.pointers,E):0,x.maxPointers=M.prevInput?x.pointers.length>M.prevInput.maxPointers?x.pointers.length:M.prevInput.maxPointers:x.pointers.length,Ng(M,x);var Qt=p.element;X(x.srcEvent.target,Qt)&&(Qt=x.srcEvent.target),x.target=Qt}function Bg(p,x){var M=x.center,E=p.offsetDelta||{},I=p.prevDelta||{},O=p.prevInput||{};(x.eventType===at||O.eventType===K)&&(I=p.prevDelta={x:O.deltaX||0,y:O.deltaY||0},E=p.offsetDelta={x:M.x,y:M.y}),x.deltaX=I.x+(M.x-E.x),x.deltaY=I.y+(M.y-E.y)}function Ng(p,x){var M=p.lastInterval||x,E=x.timeStamp-M.timeStamp,I,O,V,ot;if(x.eventType!=dt&&(E>Si||M.velocity===n)){var lt=x.deltaX-M.deltaX,wt=x.deltaY-M.deltaY,Qt=hh(E,lt,wt);O=Qt.x,V=Qt.y,I=c(Qt.x)>c(Qt.y)?Qt.x:Qt.y,ot=ch(lt,wt),p.lastInterval=x}else I=M.velocity,O=M.velocityX,V=M.velocityY,ot=M.direction;x.velocity=I,x.velocityX=O,x.velocityY=V,x.direction=ot}function ah(p){for(var x=[],M=0;M<p.pointers.length;)x[M]={clientX:h(p.pointers[M].clientX),clientY:h(p.pointers[M].clientY)},M++;return{timeStamp:l(),pointers:x,center:oh(x),deltaX:p.deltaX,deltaY:p.deltaY}}function oh(p){var x=p.length;if(x===1)return{x:h(p[0].clientX),y:h(p[0].clientY)};for(var M=0,E=0,I=0;I<x;)M+=p[I].clientX,E+=p[I].clientY,I++;return{x:h(M/x),y:h(E/x)}}function hh(p,x,M){return{x:x/p||0,y:M/p||0}}function ch(p,x){return p===x?Ke:c(p)>=c(x)?p<0?Be:Ne:x<0?ve:k}function Ci(p,x,M){M||(M=rh);var E=x[M[0]]-p[M[0]],I=x[M[1]]-p[M[1]];return Math.sqrt(E*E+I*I)}function rr(p,x,M){M||(M=rh);var E=x[M[0]]-p[M[0]],I=x[M[1]]-p[M[1]];return Math.atan2(I,E)*180/Math.PI}function Yg(p,x){return rr(x[1],x[0],vi)+rr(p[1],p[0],vi)}function Ug(p,x){return Ci(x[0],x[1],vi)/Ci(p[0],p[1],vi)}var Xg={mousedown:at,mousemove:Zt,mouseup:K},Vg="mousedown",Gg="mousemove mouseup";function Ti(){this.evEl=Vg,this.evWin=Gg,this.pressed=!1,Ft.apply(this,arguments)}S(Ti,Ft,{handler:function(x){var M=Xg[x.type];M&at&&x.button===0&&(this.pressed=!0),M&Zt&&x.which!==1&&(M=K),this.pressed&&(M&K&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[x],changedPointers:[x],pointerType:jt,srcEvent:x}))}});var qg={pointerdown:at,pointermove:Zt,pointerup:K,pointercancel:dt,pointerout:dt},jg={2:q,3:yt,4:jt,5:bi},lh="pointerdown",uh="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(lh="MSPointerDown",uh="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=lh,this.evWin=uh,Ft.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}S(ar,Ft,{handler:function(x){var M=this.store,E=!1,I=x.type.toLowerCase().replace("ms",""),O=qg[I],V=jg[x.pointerType]||x.pointerType,ot=V==q,lt=W(M,x.pointerId,"pointerId");O&at&&(x.button===0||ot)?lt<0&&(M.push(x),lt=M.length-1):O&(K|dt)&&(E=!0),!(lt<0)&&(M[lt]=x,this.callback(this.manager,O,{pointers:M,changedPointers:[x],pointerType:V,srcEvent:x}),E&&M.splice(lt,1))}});var Hg={touchstart:at,touchmove:Zt,touchend:K,touchcancel:dt},$g="touchstart",Wg="touchstart touchmove touchend touchcancel";function fh(){this.evTarget=$g,this.evWin=Wg,this.started=!1,Ft.apply(this,arguments)}S(fh,Ft,{handler:function(x){var M=Hg[x.type];if(M===at&&(this.started=!0),!!this.started){var E=Jg.call(this,x,M);M&(K|dt)&&E[0].length-E[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:E[0],changedPointers:E[1],pointerType:q,srcEvent:x})}}});function Jg(p,x){var M=Q(p.touches),E=Q(p.changedTouches);return x&(K|dt)&&(M=ct(M.concat(E),"identifier",!0)),[M,E]}var Zg={touchstart:at,touchmove:Zt,touchend:K,touchcancel:dt},Kg="touchstart touchmove touchend touchcancel";function _i(){this.evTarget=Kg,this.targetIds={},Ft.apply(this,arguments)}S(_i,Ft,{handler:function(x){var M=Zg[x.type],E=Qg.call(this,x,M);E&&this.callback(this.manager,M,{pointers:E[0],changedPointers:E[1],pointerType:q,srcEvent:x})}});function Qg(p,x){var M=Q(p.touches),E=this.targetIds;if(x&(at|Zt)&&M.length===1)return E[M[0].identifier]=!0,[M,M];var I,O,V=Q(p.changedTouches),ot=[],lt=this.target;if(O=M.filter(function(wt){return X(wt.target,lt)}),x===at)for(I=0;I<O.length;)E[O[I].identifier]=!0,I++;for(I=0;I<V.length;)E[V[I].identifier]&&ot.push(V[I]),x&(K|dt)&&delete E[V[I].identifier],I++;if(ot.length)return[ct(O.concat(ot),"identifier",!0),ot]}var tp=2500,dh=25;function or(){Ft.apply(this,arguments);var p=y(this.handler,this);this.touch=new _i(this.manager,p),this.mouse=new Ti(this.manager,p),this.primaryTouch=null,this.lastTouches=[]}S(or,Ft,{handler:function(x,M,E){var I=E.pointerType==q,O=E.pointerType==jt;if(!(O&&E.sourceCapabilities&&E.sourceCapabilities.firesTouchEvents)){if(I)ep.call(this,M,E);else if(O&&sp.call(this,E))return;this.callback(x,M,E)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function ep(p,x){p&at?(this.primaryTouch=x.changedPointers[0].identifier,mh.call(this,x)):p&(K|dt)&&mh.call(this,x)}function mh(p){var x=p.changedPointers[0];if(x.identifier===this.primaryTouch){var M={x:x.clientX,y:x.clientY};this.lastTouches.push(M);var E=this.lastTouches,I=function(){var O=E.indexOf(M);O>-1&&E.splice(O,1)};setTimeout(I,tp)}}function sp(p){for(var x=p.srcEvent.clientX,M=p.srcEvent.clientY,E=0;E<this.lastTouches.length;E++){var I=this.lastTouches[E],O=Math.abs(x-I.x),V=Math.abs(M-I.y);if(O<=dh&&V<=dh)return!0}return!1}var gh=nt(a.style,"touchAction"),ph=gh!==n,yh="compute",wh="auto",hr="manipulation",Ue="none",vs="pan-x",Cs="pan-y",Pi=np();function cr(p,x){this.manager=p,this.set(x)}cr.prototype={set:function(p){p==yh&&(p=this.compute()),ph&&this.manager.element.style&&Pi[p]&&(this.manager.element.style[gh]=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()))}),ip(p.join(" "))},preventDefaults:function(p){var x=p.srcEvent,M=p.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var E=this.actions,I=G(E,Ue)&&!Pi[Ue],O=G(E,Cs)&&!Pi[Cs],V=G(E,vs)&&!Pi[vs];if(I){var ot=p.pointers.length===1,lt=p.distance<2,wt=p.deltaTime<250;if(ot&<&&wt)return}if(!(V&&O)&&(I||O&&M&tt||V&&M&Ye))return this.preventSrc(x)},preventSrc:function(p){this.manager.session.prevented=!0,p.preventDefault()}};function ip(p){if(G(p,Ue))return Ue;var x=G(p,vs),M=G(p,Cs);return x&&M?Ue:x||M?x?vs:Cs:G(p,hr)?hr:wh}function np(){if(!ph)return!1;var p={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){p[M]=x?t.CSS.supports("touch-action",M):!0}),p}var Mi=1,Bt=2,Qe=4,Ce=8,le=Ce,Ts=16,Kt=32;function ue(p){this.options=v({},this.defaults,p||{}),this.id=kt(),this.manager=null,this.options.enable=P(this.options.enable,!0),this.state=Mi,this.simultaneous={},this.requireFail=[]}ue.prototype={defaults:{},set:function(p){return v(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=Ei(p,this),x[p.id]||(x[p.id]=p,p.recognizeWith(this)),this},dropRecognizeWith:function(p){return d(p,"dropRecognizeWith",this)?this:(p=Ei(p,this),delete this.simultaneous[p.id],this)},requireFailure:function(p){if(d(p,"requireFailure",this))return this;var x=this.requireFail;return p=Ei(p,this),W(x,p)===-1&&(x.push(p),p.requireFailure(this)),this},dropRequireFailure:function(p){if(d(p,"dropRequireFailure",this))return this;p=Ei(p,this);var x=W(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,M=this.state;function E(I){x.manager.emit(I,p)}M<Ce&&E(x.options.event+xh(M)),E(x.options.event),p.additionalEvent&&E(p.additionalEvent),M>=Ce&&E(x.options.event+xh(M))},tryEmit:function(p){if(this.canEmit())return this.emit(p);this.state=Kt},canEmit:function(){for(var p=0;p<this.requireFail.length;){if(!(this.requireFail[p].state&(Kt|Mi)))return!1;p++}return!0},recognize:function(p){var x=v({},p);if(!w(this.options.enable,[this,x])){this.reset(),this.state=Kt;return}this.state&(le|Ts|Kt)&&(this.state=Mi),this.state=this.process(x),this.state&(Bt|Qe|Ce|Ts)&&this.tryEmit(x)},process:function(p){},getTouchAction:function(){},reset:function(){}};function xh(p){return p&Ts?"cancel":p&Ce?"end":p&Qe?"move":p&Bt?"start":""}function bh(p){return p==k?"down":p==ve?"up":p==Be?"left":p==Ne?"right":""}function Ei(p,x){var M=x.manager;return M?M.get(p):p}function Ht(){ue.apply(this,arguments)}S(Ht,ue,{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,M=p.eventType,E=x&(Bt|Qe),I=this.attrTest(p);return E&&(M&dt||!I)?x|Ts:E||I?M&K?x|Ce:x&Bt?x|Qe:Bt:Kt}});function Ai(){Ht.apply(this,arguments),this.pX=null,this.pY=null}S(Ai,Ht,{defaults:{event:"pan",threshold:10,pointers:1,direction:nh},getTouchAction:function(){var p=this.options.direction,x=[];return p&tt&&x.push(Cs),p&Ye&&x.push(vs),x},directionTest:function(p){var x=this.options,M=!0,E=p.distance,I=p.direction,O=p.deltaX,V=p.deltaY;return I&x.direction||(x.direction&tt?(I=O===0?Ke:O<0?Be:Ne,M=O!=this.pX,E=Math.abs(p.deltaX)):(I=V===0?Ke:V<0?ve:k,M=V!=this.pY,E=Math.abs(p.deltaY))),p.direction=I,M&&E>x.threshold&&I&x.direction},attrTest:function(p){return Ht.prototype.attrTest.call(this,p)&&(this.state&Bt||!(this.state&Bt)&&this.directionTest(p))},emit:function(p){this.pX=p.deltaX,this.pY=p.deltaY;var x=bh(p.direction);x&&(p.additionalEvent=this.options.event+x),this._super.emit.call(this,p)}});function lr(){Ht.apply(this,arguments)}S(lr,Ht,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.scale-1)>this.options.threshold||this.state&Bt)},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 ur(){ue.apply(this,arguments),this._timer=null,this._input=null}S(ur,ue,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[wh]},process:function(p){var x=this.options,M=p.pointers.length===x.pointers,E=p.distance<x.threshold,I=p.deltaTime>x.time;if(this._input=p,!E||!M||p.eventType&(K|dt)&&!I)this.reset();else if(p.eventType&at)this.reset(),this._timer=u(function(){this.state=le,this.tryEmit()},x.time,this);else if(p.eventType&K)return le;return Kt},reset:function(){clearTimeout(this._timer)},emit:function(p){this.state===le&&(p&&p.eventType&K?this.manager.emit(this.options.event+"up",p):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function fr(){Ht.apply(this,arguments)}S(fr,Ht,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ue]},attrTest:function(p){return this._super.attrTest.call(this,p)&&(Math.abs(p.rotation)>this.options.threshold||this.state&Bt)}});function dr(){Ht.apply(this,arguments)}S(dr,Ht,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:tt|Ye,pointers:1},getTouchAction:function(){return Ai.prototype.getTouchAction.call(this)},attrTest:function(p){var x=this.options.direction,M;return x&(tt|Ye)?M=p.overallVelocity:x&tt?M=p.overallVelocityX:x&Ye&&(M=p.overallVelocityY),this._super.attrTest.call(this,p)&&x&p.offsetDirection&&p.distance>this.options.threshold&&p.maxPointers==this.options.pointers&&c(M)>this.options.velocity&&p.eventType&K},emit:function(p){var x=bh(p.offsetDirection);x&&this.manager.emit(this.options.event+x,p),this.manager.emit(this.options.event,p)}});function ki(){ue.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}S(ki,ue,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[hr]},process:function(p){var x=this.options,M=p.pointers.length===x.pointers,E=p.distance<x.threshold,I=p.deltaTime<x.time;if(this.reset(),p.eventType&at&&this.count===0)return this.failTimeout();if(E&&I&&M){if(p.eventType!=K)return this.failTimeout();var O=this.pTime?p.timeStamp-this.pTime<x.interval:!0,V=!this.pCenter||Ci(this.pCenter,p.center)<x.posThreshold;this.pTime=p.timeStamp,this.pCenter=p.center,!V||!O?this.count=1:this.count+=1,this._input=p;var ot=this.count%x.taps;if(ot===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=le,this.tryEmit()},x.interval,this),Bt):le}return Kt},failTimeout:function(){return this._timer=u(function(){this.state=Kt},this.options.interval,this),Kt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==le&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function fe(p,x){return x=x||{},x.recognizers=P(x.recognizers,fe.defaults.preset),new mr(p,x)}fe.VERSION="2.0.7",fe.defaults={domEvents:!1,touchAction:yh,enable:!0,inputTarget:null,inputClass:null,preset:[[fr,{enable:!1}],[lr,{enable:!1},["rotate"]],[dr,{direction:tt}],[Ai,{direction:tt},["swipe"]],[ki],[ki,{event:"doubletap",taps:2},["tap"]],[ur]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var rp=1,Sh=2;function mr(p,x){this.options=v({},fe.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||p,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=p,this.input=zg(this),this.touchAction=new cr(this,this.options.touchAction),vh(this,!0),m(this.options.recognizers,function(M){var E=this.add(new M[0](M[1]));M[2]&&E.recognizeWith(M[2]),M[3]&&E.requireFailure(M[3])},this)}mr.prototype={set:function(p){return v(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?Sh:rp},recognize:function(p){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(p);var M,E=this.recognizers,I=x.curRecognizer;(!I||I&&I.state&le)&&(I=x.curRecognizer=null);for(var O=0;O<E.length;)M=E[O],x.stopped!==Sh&&(!I||M==I||M.canRecognizeWith(I))?M.recognize(p):M.reset(),!I&&M.state&(Bt|Qe|Ce)&&(I=x.curRecognizer=M),O++}},get:function(p){if(p instanceof ue)return p;for(var x=this.recognizers,M=0;M<x.length;M++)if(x[M].options.event==p)return x[M];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,M=W(x,p);M!==-1&&(x.splice(M,1),this.touchAction.update())}return this},on:function(p,x){if(p!==n&&x!==n){var M=this.handlers;return m($(p),function(E){M[E]=M[E]||[],M[E].push(x)}),this}},off:function(p,x){if(p!==n){var M=this.handlers;return m($(p),function(E){x?M[E]&&M[E].splice(W(M[E],x),1):delete M[E]}),this}},emit:function(p,x){this.options.domEvents&&op(p,x);var M=this.handlers[p]&&this.handlers[p].slice();if(!(!M||!M.length)){x.type=p,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var E=0;E<M.length;)M[E](x),E++}},destroy:function(){this.element&&vh(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function vh(p,x){var M=p.element;if(M.style){var E;m(p.options.cssProps,function(I,O){E=nt(M.style,O),x?(p.oldCssProps[E]=M.style[E],M.style[E]=I):M.style[E]=p.oldCssProps[E]||""}),x||(p.oldCssProps={})}}function op(p,x){var M=e.createEvent("Event");M.initEvent(p,!0,!0),M.gesture=x,x.target.dispatchEvent(M)}v(fe,{INPUT_START:at,INPUT_MOVE:Zt,INPUT_END:K,INPUT_CANCEL:dt,STATE_POSSIBLE:Mi,STATE_BEGAN:Bt,STATE_CHANGED:Qe,STATE_ENDED:Ce,STATE_RECOGNIZED:le,STATE_CANCELLED:Ts,STATE_FAILED:Kt,DIRECTION_NONE:Ke,DIRECTION_LEFT:Be,DIRECTION_RIGHT:Ne,DIRECTION_UP:ve,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:tt,DIRECTION_VERTICAL:Ye,DIRECTION_ALL:nh,Manager:mr,Input:Ft,TouchAction:cr,TouchInput:_i,MouseInput:Ti,PointerEventInput:ar,TouchMouseInput:or,SingleTouchInput:fh,Recognizer:ue,AttrRecognizer:Ht,Tap:ki,Pan:Ai,Swipe:dr,Pinch:lr,Rotate:fr,Press:ur,on:_,off:R,each:m,merge:b,extend:C,assign:v,inherit:S,bindFn:y,prefixed:nt});var hp=typeof t<"u"?t:typeof self<"u"?self:{};hp.Hammer=fe,typeof n=="function"&&n.amd?n(function(){return fe}):i.exports?i.exports=fe:t[s]=fe})(window,document,"Hammer")})(ro);var vf=ro.exports;const Cf=Rr(vf);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 Tf(i){return i(window.innerWidth,window.innerHeight),B(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,s=t.target.innerHeight;i(e,s)})}function we(i,t){return ao(i,t)}function ao(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 _f(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 Pf(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 Mf(i=document.documentElement){const t=new Ve,e=new Cf(i);let s=[];const n=no(),r=n.mousePoint,a=k=>{t.emit("mouseDown",k)},o=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||n.setCurrentMousePoint(We(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)},v=k=>{t.emit("mouseWheel",k)},C=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 tt=k.changedTouches[0];r.isDown||n.setCurrentMousePoint(We(tt,i)),t.emit("touchMove",k)},P=k=>{t.emit("pointerDown",k)},_=k=>{t.emit("pointerUp",k)},R=k=>{t.emit("pointerCancel",k)},X=k=>{t.emit("pointerMove",k)},G=k=>{t.emit("pan",k)},$=k=>{t.emit("panStart",k)},W=k=>{t.emit("panMove",k)},Q=k=>{t.emit("panEnd",k)},ct=k=>{t.emit("panCancel",k)},nt=k=>{t.emit("panLeft",k)},Gt=k=>{t.emit("panRight",k)},kt=k=>{t.emit("panUp",k)},Ot=k=>{t.emit("panDown",k)},qt=k=>{t.emit("pinch",k)},L=k=>{t.emit("pinchin",k)},D=k=>{t.emit("pinchout",k)},U=k=>{t.emit("press",k)},q=k=>{t.emit("rotate",k)},yt=k=>{t.emit("swipe",k)},jt=k=>{t.emit("swipeLeft",k)},bi=k=>{t.emit("swipeRight",k)},Si=k=>{t.emit("swipeUp",k)},at=k=>{t.emit("swipeDown",k)},Zt=k=>{t.emit("tap",k)},K=k=>{!k.target||i==k.target||i.contains(k.target)||t.emit("tapOutSide",k)},dt=k=>{t.emit("transitionstart",k)},Ke=k=>{t.emit("transitionend",k)},Be=k=>{t.emit("animationstart",k)},Ne=k=>{t.emit("animationend",k)};let ve={...i.getBoundingClientRect(),width:i.offsetWidth,height:i.offsetHeight};return{el:i,get rect(){return ve},mousePoint:r,eb:t,start:async function(){s.push(B(i,"mousedown",a)),s.push(B(i,"mouseup",o)),s.push(B(i,"mousemove",h)),s.push(B(i,"mouseover",c)),s.push(B(i,"mouseout",l)),s.push(B(i,"mouseenter",u)),s.push(B(i,"mouseleave",d)),s.push(B(i,"click",m)),s.push(B(i,"dblclick",g)),s.push(B(i,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",v)),s.push(B(i,"contextmenu",C)),s.push(B(i,"touchstart",b)),s.push(B(i,"touchend",S)),s.push(B(i,"touchcancel",y)),s.push(B(i,"touchmove",w)),s.push(B(i,"pointerdown",P)),s.push(B(i,"pointerup",_)),s.push(B(i,"pointercancel",R)),s.push(B(i,"pointermove",X)),e.on("pan",G),e.on("panstart",$),e.on("panmove",W),e.on("panend",Q),e.on("pancancel",ct),e.on("panleft",nt),e.on("panright",Gt),e.on("panup",kt),e.on("pandown",Ot),e.on("pinch",qt),e.on("pinchin",L),e.on("pinchout",D),e.on("press",U),e.on("rotate",q),e.on("swipe",yt),e.on("swipeleft",jt),e.on("swiperight",bi),e.on("swipeup",Si),e.on("swipedown",at),e.on("tap",Zt),s.push(B(document,"pointerdown",K)),s.push(B(i,"transitionstart",dt)),s.push(B(i,"transitionend",Ke)),s.push(B(i,"animationstart",Be)),s.push(B(i,"animationend",Ne));const k=await On(i,tt=>{ve=tt,t.emit("resize",tt)});s.push(k),s.push(we(this,{start:tt=>{n.setStartMousePoint(We(tt,i),!0)},move:tt=>{n.setCurrentMousePoint(We(tt,i))},end:tt=>{n.setCurrentMousePoint(We(tt,i),!1)}}))},end:()=>{t.removeAllListeners(),s.forEach(k=>k()),s=[],e.off("pan",G),e.off("panstart",$),e.off("panmove",W),e.off("panend",Q),e.off("pancancel",ct),e.off("panleft",nt),e.off("panright",Gt),e.off("panup",kt),e.off("pandown",Ot),e.off("pinch",qt),e.off("pinchin",L),e.off("pinchout",D),e.off("press",U),e.off("rotate",q),e.off("swipe",yt),e.off("swipeleft",jt),e.off("swiperight",bi),e.off("swipeup",Si),e.off("swipedown",at),e.off("tap",Zt)}}}function Ef(i,t,e=50){return we(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function Af(i,t,e=50){return we(i,{move:()=>{i.mousePoint.dStartY>0&&i.mousePoint.dStartY<e},end:()=>{i.mousePoint.dStartY>=e&&t()}})}function oo(i="(prefers-color-scheme: dark)"){const t=window.matchMedia(i),e=Is(t.matches);return B(t,"change",s=>{e.value=s.matches}),e}const De=Ta("__yz_theme__");if(!De.value){const i=oo("(prefers-color-scheme: dark)");De.value=i.value?"dark":"light"}xt(()=>{switch(De.value){case"dark":document.documentElement.classList.add("dark"),$e(document.documentElement,"data-theme","dark");break;default:document.documentElement.classList.remove("dark"),$e(document.documentElement,"data-theme","light");break}});function kf(i){De.value=i}function If(){switch(De.value){case"dark":return"dark";default:return"light"}}function Df(){De.value=De.value=="dark"?"light":"dark"}function ho(i,t=""){return getComputedStyle(document.documentElement).getPropertyValue(i)||t}function Rf(i,t){document.documentElement.style.setProperty(i,t)}const Lf={getSelectedText:()=>window.getSelection()?.toString()||""};function zf(i){document.getElementsByTagName("title")[0].innerText=i,document.title=i}function co(i){let t=!1,e;function s(){document.readyState==="loading"||t||(i(),e?.(),t=!0)}try{e=B(document,"DOMContentLoaded",s)}catch{e=B(window,"load",s)}return s(),e}function lo(i){return B(window,"beforeunload",t=>{i(t)})}async function uo(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 ie=new Ve;let fo="";uo(document,()=>{location.href!==fo&&(fo=location.href,ie.emit("urlchange",location.href))}),B(window,"hashchange",()=>{ie.emit("hashchange",location.hash)}),B(window,"popstate",i=>{ie.emit("popstate",i.state)});const mo={onUrlChange:i=>(ie.on("urlchange",i),()=>{ie.off("urlchange",i)}),onHashChange:i=>(ie.on("hashchange",i),()=>{ie.off("hashchange",i)}),goto:(i,t=null)=>{history.pushState(t,"",i)},replace:(i,t=null)=>{history.replaceState(t,"",i)},onPopState:i=>(ie.on("popstate",i),()=>{ie.off("popstate",i)})};function Of(i){return mo.onPopState(()=>{const{pathname:t,search:e}=location;i[t]?.()})}let go=!1;function Ff(){go||(go=!0,to(`
|
|
22
22
|
:root {
|
|
23
23
|
--sat:env(safe-area-inset-top, 0px);
|
|
24
24
|
--sar:env(safe-area-inset-right, 0px);
|
|
@@ -31,18 +31,18 @@ var ZYZGroupCoreWeb=function(f){"use strict";var gr=typeof document<"u"?document
|
|
|
31
31
|
--sab:env(safe-area-inset-bottom, 0px);
|
|
32
32
|
--sal:env(safe-area-inset-left, 0px);
|
|
33
33
|
}
|
|
34
|
-
`))}Bf();const zt=new Ve;let hi,ci,li,ui;On(document.documentElement,()=>{setTimeout(()=>{const i=getComputedStyle(document.documentElement),t=i.getPropertyValue("--sat");t!==hi&&zt.emit("top",t),hi=t;const e=i.getPropertyValue("--sar");e!==ci&&zt.emit("right",e),ci=e;const s=i.getPropertyValue("--sab");s!==li&&zt.emit("bottom",s),li=s;const n=i.getPropertyValue("--sal");n!==ui&&zt.emit("left",n),ui=n},0)});const Nf={onTop:i=>(hi&&i(hi),zt.on("top",i),()=>{zt.off("top",i)}),onRight:i=>(ci&&i(ci),zt.on("right",i),()=>{zt.off("right",i)}),onBottom:i=>(li&&i(li),zt.on("bottom",i),()=>{zt.off("bottom",i)}),onLeft:i=>(ui&&i(ui),zt.on("left",i),()=>{zt.off("left",i)})},ps=[];let po=zi;function yo(i){return ps.length==0&&(po=B(document,"scroll",t=>{ps.forEach(e=>e(t))})),ps.push(i),()=>{Te(ps,i),ps.length==0&&po()}}function Yf(i,t){window.scrollTo(i,t)}function Uf(){let i=zi,t=zi;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",i=lo(()=>{window.history.scrollRestoration="auto"}),t=co(()=>{window.history.scrollRestoration="manual"})),()=>{i(),t()}}async function wo(i,t,e={threshold:.5}){return new Promise(s=>{new IntersectionObserver((r,a)=>{t(r,a),s(()=>{a.unobserve(i)})},e).observe(i)})}function Xf(i,t){let e;function s(){const{width:n,height:r}=t?.root?.getBoundingClientRect()||so(),{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(),yo(s)}async function Vf(i,t){let e;const s=typeof t.threshold=="number"?t.threshold:.5;return wo(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 Gf(i){return i(!document.hidden),B(window,"visibilitychange",()=>{i(!document.hidden)})}function qf(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 xo(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 jf=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 v="";for(let C=0;C<t;C++){const b=C<<2;v+=d(h[g+b+2])+d(h[g+b+1])+d(h[g+b])}for(let C=0;C<o;C++)v+=String.fromCharCode(0);c+=v}while(--u);function m(g){if(!window.btoa)throw"btoa undefined";let v="";if(typeof g=="string")v=g;else for(let C=0;C<g.length;C++)v+=String.fromCharCode(g[C]);return btoa(v)}return m(r.concat(a))+m(c)},Hf=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")},$f=(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 Wf(i,t){return createImageBitmap(i,t)}function Jf(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=Fn(t),a=Fn(e),o=Fn(s);return"rgb("+r+","+a+","+o+")"}function Fn(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 Zf=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)},Kf=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)},Qf=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)},td=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)},ed=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)},sd=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)},id=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)},nd=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)},rd=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)},ad=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)},od=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)},hd=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)},cd=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)},ld=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)},ud=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)},fd=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)},dd=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)},md=i=>bo(i,[-1,-1,-1,-1,9,-1,-1,-1,-1]),gd=i=>bo(i,[-1,-1,-1,-1,8,-1,-1,-1,-1]),pd=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)},yd=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=So([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 wd(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 C=0;C<c;C++)for(let b=0;b<h;b++){const S=(C*h+b)*4;b>=l&&b<=l+d&&C>=u&&C<=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 C=u;C<=u+m;C++)for(let b=l;b<=l+d;b++){const S=((C-u)*d+b-l)*4,y=(C*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 xd(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 bd(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 Sd(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 vd(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 Cd(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 v=0;v<r;v++){const C=(g*r+v)*4;if(v<u||v>u+h||g<=l||g>=l+c)d[C]=n[C],d[C+1]=n[C+1],d[C+2]=n[C+2],d[C+3]=n[C+3];else{const b=(g*r+v-((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[C],n[C+1],n[C+2],n[C+3]],w=So(S,y);d[C]=w[0],d[C+1]=w[1],d[C+2]=w[2],d[C+3]=w[3]}}return new ImageData(d,r,a)}function Td(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 v=0;v<h;v++)for(let C=0;C<o;C++){const b=(v*o+C)*4;if(C>=c&&C<=c+u&&v>=l&&v<=l+d){const S=Math.floor((C-c)/r),y=Math.floor((v-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 _=(P*o+w)*4;m[b]=a[_],m[b+1]=a[_+1],m[b+2]=a[_+2],m[b+3]=a[_+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 _d(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],v=a[m+1],C=a[m+2],b=a[m+3];g===h.r&&v===h.g&&C===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 bo(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 So(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 Bn=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}}},vo=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}}},Co=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 C=0;C<h;C++)u.add(String.fromCharCode(C));u.add(String.fromCharCode(h)),u.add(String.fromCharCode(c));const d=Bn(),m=n(d);m.write(h,l);let g=0,v=String.fromCharCode(s[g]);for(g+=1;g<s.length;){const C=String.fromCharCode(s[g]);g+=1,u.contains(v+C)?v=v+C:(m.write(u.indexOf(v),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(v+C)),v=C)}return m.write(u.indexOf(v),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(Xe("0x"+t[1]+t[2])),o.writeByte(Xe("0x"+t[3]+t[4])),o.writeByte(Xe("0x"+t[5]+t[6])),o.writeByte(Xe("0x"+e[1]+e[2])),o.writeByte(Xe("0x"+e[3]+e[4])),o.writeByte(Xe("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(";")}}},To=function(i,t,e,s){const n=Co(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=Bn();n.write(r);const a=vo(),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},At={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ys={M:0,L:1,H:2,Q:3},xe={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},rt={glog:function(i){if(i<1)throw new Error("glog("+i+")");return rt.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return rt.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let i=0;i<8;i++)rt.EXP_TABLE[i]=1<<i;for(let i=8;i<256;i++)rt.EXP_TABLE[i]=rt.EXP_TABLE[i-4]^rt.EXP_TABLE[i-5]^rt.EXP_TABLE[i-6]^rt.EXP_TABLE[i-8];for(let i=0;i<255;i++)rt.LOG_TABLE[rt.EXP_TABLE[i]]=i;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(i){let t=i<<10;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15)>=0;)t^=Z.G15<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15);return(i<<10|t)^Z.G15_MASK},getBCHTypeNumber:function(i){let t=i<<12;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18)>=0;)t^=Z.G18<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18);return i<<12|t},getBCHDigit:function(i){let t=0;for(;i!=0;)t++,i>>>=1;return t},getPatternPosition:function(i){return Z.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,t,e){switch(i){case xe.PATTERN000:return(t+e)%2==0;case xe.PATTERN001:return t%2==0;case xe.PATTERN010:return e%3==0;case xe.PATTERN011:return(t+e)%3==0;case xe.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case xe.PATTERN101:return t*e%2+t*e%3==0;case xe.PATTERN110:return(t*e%2+t*e%3)%2==0;case xe.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){let t=new Je([1],0);for(let e=0;e<i;e++)t=t.multiply(new Je([1,rt.gexp(e)],0));return t},getLengthInBits:function(i,t){if(1<=t&&t<10)switch(i){case At.MODE_NUMBER:return 10;case At.MODE_ALPHA_NUM:return 9;case At.MODE_8BIT_BYTE:return 8;case At.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(t<27)switch(i){case At.MODE_NUMBER:return 12;case At.MODE_ALPHA_NUM:return 11;case At.MODE_8BIT_BYTE:return 16;case At.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(t<41)switch(i){case At.MODE_NUMBER:return 14;case At.MODE_ALPHA_NUM:return 13;case At.MODE_8BIT_BYTE:return 16;case At.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 Je{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]^=rt.gexp(rt.glog(this.get(s))+rt.glog(t.get(n)));return new Je(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=rt.glog(this.get(0))-rt.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]^=rt.gexp(rt.glog(t.get(n))+e);return new Je(s,0).mod(t)}}class ne{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=ne.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 ne(h,c))}return r}static getRsBlockTable(t,e){switch(e){case ys.L:return ne.RS_BLOCK_TABLE[(t-1)*4+0];case ys.M:return ne.RS_BLOCK_TABLE[(t-1)*4+1];case ys.Q:return ne.RS_BLOCK_TABLE[(t-1)*4+2];case ys.H:return ne.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class _o{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 Pd{mode;data;constructor(t){this.mode=At.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 be{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ys[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new Pd(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=ne.getRSBlocks(t,this.errorCorrectLevel),s=new _o;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(),Z.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=be.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=Z.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=Z.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=Z.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=Z.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),Z.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=ne.getRSBlocks(t,e),r=new _o;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<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(be.PAD0,8),r.getLengthInBits()>=a*8));)r.put(be.PAD1,8);return be.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=Z.getErrorCorrectPolynomial(m),C=new Je(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+C.getLength()-o[u].length;o[u][b]=S>=0?C.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 Po=Math.ceil,ws=Math.floor,Mo=Math.round;function Md(i,t){const e=vr(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 be(r,s);c.addData(e),c.make();const l=c.getModuleCount(),u=(n-a*2)/l,d=a,m=n-a;return To(n,o,h,function(g,v){if(d<=g&&g<m&&d<=v&&v<m){const C=ws((g-d)/u),b=ws((v-d)/u);return c.isDark(b,C)?0:1}else return 1})}function Ed(i,t){const e=t.x||0,s=t.y||0,n=vr(i),r=t.ctx,a=t.ecc||"H",o=typeof t.size=="number"?ws(t.size):256,h=t.padding||0,c=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new be(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 v=0;v<m;v++)for(let C=0;C<m;C++){const b=Po((C+1)*g)-ws(C*g),S=Po((v+1)*g)-ws(v*g);r.fillStyle=d.isDark(v,C)?l:u,r.fillRect(e+Mo(C*g)+h,s+Mo(v*g)+h,b,S)}}const fi=new ds,st=new Mt;function re(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 H(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 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=Mh(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++)fi.fromBufferAttribute(this,e),fi.applyMatrix3(t),this.setXY(e,fi.x,fi.y);else if(this.itemSize===3)for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyMatrix3(t),this.setXYZ(e,st.x,st.y,st.z);return this}applyMatrix4(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyMatrix4(t),this.setXYZ(e,st.x,st.y,st.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyNormalMatrix(t),this.setXYZ(e,st.x,st.y,st.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.transformDirection(t),this.setXYZ(e,st.x,st.y,st.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=re(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=H(s,this.array)),this.array[t*this.itemSize+e]=s,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=re(e,this.array)),e}setX(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=re(e,this.array)),e}setY(t,e){return this.normalized&&(e=H(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=re(e,this.array)),e}setZ(t,e){return this.normalized&&(e=H(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=re(e,this.array)),e}setW(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(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=H(e,this.array),s=H(s,this.array),n=H(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=H(e,this.array),s=H(s,this.array),n=H(n,this.array),r=H(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 Tr(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 Ad extends Jt{constructor(t,e,s=!1){super(new Int8Array(t),e,s)}}class kd extends Jt{constructor(t,e,s=!1){super(new Uint8Array(t),e,s)}}class Id extends Jt{constructor(t,e,s=!1){super(new Uint8ClampedArray(t),e,s)}}class Dd extends Jt{constructor(t,e,s=!1){super(new Int16Array(t),e,s)}}class Rd extends Jt{constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}}class Ld extends Jt{constructor(t,e,s=!1){super(new Int32Array(t),e,s)}}class zd extends Jt{constructor(t,e,s=!1){super(new Uint32Array(t),e,s)}}class Od extends Jt{isFloat16BufferAttribute=!0;constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}getX(t){let e=Ms(this.array[t*this.itemSize]);return this.normalized&&(e=re(e,this.array)),e}setX(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize]=Ct(e),this}getY(t){let e=Ms(this.array[t*this.itemSize+1]);return this.normalized&&(e=re(e,this.array)),e}setY(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+1]=Ct(e),this}getZ(t){let e=Ms(this.array[t*this.itemSize+2]);return this.normalized&&(e=re(e,this.array)),e}setZ(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+2]=Ct(e),this}getW(t){let e=Ms(this.array[t*this.itemSize+3]);return this.normalized&&(e=re(e,this.array)),e}setW(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+3]=Ct(e),this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this}setXYZ(t,e,s,n){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array),n=H(n,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this.array[t+2]=Ct(n),this}setXYZW(t,e,s,n,r){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array),n=H(n,this.array),r=H(r,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this.array[t+2]=Ct(n),this.array[t+3]=Ct(r),this}}class Fd extends Jt{constructor(t,e,s=!1){super(new Float32Array(t),e,s)}}class ht extends j{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 j({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 Zs({frameDuration:t}),r={},a={};this.shapes.forEach((o,h)=>{const c=$t(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=Di(c).number;this.shapes[l].setAttr("strokeDashoffset",""+$t(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),n.play();break}}}const Bd={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,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 it{static NAMES=Bd;_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=F(parseFloat(r[1]),0,100)*255/100,this.g=F(parseFloat(r[2]),0,100)*255/100,this.b=F(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 it?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=F(Math.round(It(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=F(Math.round(It(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=F(Math.round(It(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=F(It(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},${$t(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=ze){Un.fromWorkingColorSpace(Vt.copy(this),t);const e=Vt.r,s=Vt.g,n=Vt.b;return t!==ze?`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 it(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Re(t.r),this.g=Re(t.g),this.b=Re(t.b),this}copyLinearToSRGB(t){return this.r=Le(t.r),this.g=Le(t.g),this.b=Le(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=F(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=F(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=F(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=F(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 Vt.lerpColors(new it(t),new it(e),s).toString()}catch{return e}}static random(){return Vt.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=it.nextIndex){it.nextIndex=t;const e=Object.keys(it.NAMES),s=e.length;return Vt.setHEX(it.NAMES[e[it.nextIndex++%s]]).toString()}setColorName(t){const e=it.NAMES[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(it.NAMES).map(t=>Vt.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=Nh(t,1),a=F(e,0,1),o=F(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=Xn(c,h,r+.3333333333333333)*255,this.g=Xn(c,h,r)*255,this.b=Xn(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=Ii(s.h,n.h,e),a=Ii(s.s,n.s,e),o=Ii(s.l,n.l,e);return this.setHSL(r,a,o),this}setHSV(t,e,s,n=1){const r=F(t,0,1)*360,a=F(e,0,1),o=F(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 Vt=new it;function Re(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Le(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const Eo="",ze="srgb",Nn="srgb-linear",Yn="linear",di="srgb",Ao=new je().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ko=new je().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),Io=[.64,.33,.3,.6,.15,.06],Do=[.2126,.7152,.0722],Ro=[.3127,.329],Un={enabled:!0,workingColorSpace:Nn,spaces:{},convert:function(i,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===di&&(i.r=Re(i.r),i.g=Re(i.g),i.b=Re(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===di&&(i.r=Le(i.r),i.g=Le(i.g),i.b=Le(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===Eo?Yn: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}};Un.define({[Nn]:{primaries:Io,whitePoint:Ro,transfer:Yn,toXYZ:Ao,fromXYZ:ko,luminanceCoefficients:Do,workingColorSpaceConfig:{unpackColorSpace:ze},outputColorSpaceConfig:{drawingBufferColorSpace:ze}},[ze]:{primaries:Io,whitePoint:Ro,transfer:di,toXYZ:Ao,fromXYZ:ko,luminanceCoefficients:Do,outputColorSpaceConfig:{drawingBufferColorSpace:ze}}});function Xn(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 Oe extends j{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 qa({x:this.x,y:this.y,toX:this.toX,toY:this.toY}),s=new qa({x:t.x,y:t.y,toX:t.toX,toY:t.toY});return e.intersection(s)}}class Nd extends j{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 xs{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(()=>{xs.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 Lo extends Ve{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ch(this.source);if(t===0){this.emit("finish");return}let e,s,n=xr(this.source,0);for(let r=1;r<t;r++)e=s,s=n,n=xr(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==`
|
|
34
|
+
`))}Ff();const zt=new Ve;let hi,ci,li,ui;On(document.documentElement,()=>{setTimeout(()=>{const i=getComputedStyle(document.documentElement),t=i.getPropertyValue("--sat");t!==hi&&zt.emit("top",t),hi=t;const e=i.getPropertyValue("--sar");e!==ci&&zt.emit("right",e),ci=e;const s=i.getPropertyValue("--sab");s!==li&&zt.emit("bottom",s),li=s;const n=i.getPropertyValue("--sal");n!==ui&&zt.emit("left",n),ui=n},0)});const Bf={onTop:i=>(hi&&i(hi),zt.on("top",i),()=>{zt.off("top",i)}),onRight:i=>(ci&&i(ci),zt.on("right",i),()=>{zt.off("right",i)}),onBottom:i=>(li&&i(li),zt.on("bottom",i),()=>{zt.off("bottom",i)}),onLeft:i=>(ui&&i(ui),zt.on("left",i),()=>{zt.off("left",i)})},ps=[];let po=zi;function yo(i){return ps.length==0&&(po=B(document,"scroll",t=>{ps.forEach(e=>e(t))})),ps.push(i),()=>{Te(ps,i),ps.length==0&&po()}}function Nf(i,t){window.scrollTo(i,t)}function Yf(){let i=zi,t=zi;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",i=lo(()=>{window.history.scrollRestoration="auto"}),t=co(()=>{window.history.scrollRestoration="manual"})),()=>{i(),t()}}async function wo(i,t,e={threshold:.5}){return new Promise(s=>{new IntersectionObserver((r,a)=>{t(r,a),s(()=>{a.unobserve(i)})},e).observe(i)})}function Uf(i,t){let e;function s(){const{width:n,height:r}=t?.root?.getBoundingClientRect()||so(),{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(),yo(s)}async function Xf(i,t){let e;const s=typeof t.threshold=="number"?t.threshold:.5;return wo(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 Vf(i){return i(!document.hidden),B(window,"visibilitychange",()=>{i(!document.hidden)})}function Gf(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 xo(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 qf=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 v="";for(let C=0;C<t;C++){const b=C<<2;v+=d(h[g+b+2])+d(h[g+b+1])+d(h[g+b])}for(let C=0;C<o;C++)v+=String.fromCharCode(0);c+=v}while(--u);function m(g){if(!window.btoa)throw"btoa undefined";let v="";if(typeof g=="string")v=g;else for(let C=0;C<g.length;C++)v+=String.fromCharCode(g[C]);return btoa(v)}return m(r.concat(a))+m(c)},jf=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")},Hf=(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 $f(i,t){return createImageBitmap(i,t)}function Wf(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=Fn(t),a=Fn(e),o=Fn(s);return"rgb("+r+","+a+","+o+")"}function Fn(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 Jf=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)},Zf=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)},Kf=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)},Qf=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)},td=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)},ed=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)},sd=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)},id=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)},nd=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)},rd=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)},ad=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)},od=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)},hd=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)},cd=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)},ld=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)},ud=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)},fd=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)},dd=i=>bo(i,[-1,-1,-1,-1,9,-1,-1,-1,-1]),md=i=>bo(i,[-1,-1,-1,-1,8,-1,-1,-1,-1]),gd=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)},pd=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=So([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 yd(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 C=0;C<c;C++)for(let b=0;b<h;b++){const S=(C*h+b)*4;b>=l&&b<=l+d&&C>=u&&C<=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 C=u;C<=u+m;C++)for(let b=l;b<=l+d;b++){const S=((C-u)*d+b-l)*4,y=(C*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 wd(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 xd(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 bd(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 Sd(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 vd(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 v=0;v<r;v++){const C=(g*r+v)*4;if(v<u||v>u+h||g<=l||g>=l+c)d[C]=n[C],d[C+1]=n[C+1],d[C+2]=n[C+2],d[C+3]=n[C+3];else{const b=(g*r+v-((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[C],n[C+1],n[C+2],n[C+3]],w=So(S,y);d[C]=w[0],d[C+1]=w[1],d[C+2]=w[2],d[C+3]=w[3]}}return new ImageData(d,r,a)}function Cd(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 v=0;v<h;v++)for(let C=0;C<o;C++){const b=(v*o+C)*4;if(C>=c&&C<=c+u&&v>=l&&v<=l+d){const S=Math.floor((C-c)/r),y=Math.floor((v-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 _=(P*o+w)*4;m[b]=a[_],m[b+1]=a[_+1],m[b+2]=a[_+2],m[b+3]=a[_+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 Td(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],v=a[m+1],C=a[m+2],b=a[m+3];g===h.r&&v===h.g&&C===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 bo(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 So(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 Bn=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}}},vo=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}}},Co=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 C=0;C<h;C++)u.add(String.fromCharCode(C));u.add(String.fromCharCode(h)),u.add(String.fromCharCode(c));const d=Bn(),m=n(d);m.write(h,l);let g=0,v=String.fromCharCode(s[g]);for(g+=1;g<s.length;){const C=String.fromCharCode(s[g]);g+=1,u.contains(v+C)?v=v+C:(m.write(u.indexOf(v),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(v+C)),v=C)}return m.write(u.indexOf(v),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(Xe("0x"+t[1]+t[2])),o.writeByte(Xe("0x"+t[3]+t[4])),o.writeByte(Xe("0x"+t[5]+t[6])),o.writeByte(Xe("0x"+e[1]+e[2])),o.writeByte(Xe("0x"+e[3]+e[4])),o.writeByte(Xe("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(";")}}},To=function(i,t,e,s){const n=Co(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=Bn();n.write(r);const a=vo(),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},At={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ys={M:0,L:1,H:2,Q:3},xe={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},rt={glog:function(i){if(i<1)throw new Error("glog("+i+")");return rt.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return rt.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let i=0;i<8;i++)rt.EXP_TABLE[i]=1<<i;for(let i=8;i<256;i++)rt.EXP_TABLE[i]=rt.EXP_TABLE[i-4]^rt.EXP_TABLE[i-5]^rt.EXP_TABLE[i-6]^rt.EXP_TABLE[i-8];for(let i=0;i<255;i++)rt.LOG_TABLE[rt.EXP_TABLE[i]]=i;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(i){let t=i<<10;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15)>=0;)t^=Z.G15<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G15);return(i<<10|t)^Z.G15_MASK},getBCHTypeNumber:function(i){let t=i<<12;for(;Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18)>=0;)t^=Z.G18<<Z.getBCHDigit(t)-Z.getBCHDigit(Z.G18);return i<<12|t},getBCHDigit:function(i){let t=0;for(;i!=0;)t++,i>>>=1;return t},getPatternPosition:function(i){return Z.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,t,e){switch(i){case xe.PATTERN000:return(t+e)%2==0;case xe.PATTERN001:return t%2==0;case xe.PATTERN010:return e%3==0;case xe.PATTERN011:return(t+e)%3==0;case xe.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case xe.PATTERN101:return t*e%2+t*e%3==0;case xe.PATTERN110:return(t*e%2+t*e%3)%2==0;case xe.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){let t=new Je([1],0);for(let e=0;e<i;e++)t=t.multiply(new Je([1,rt.gexp(e)],0));return t},getLengthInBits:function(i,t){if(1<=t&&t<10)switch(i){case At.MODE_NUMBER:return 10;case At.MODE_ALPHA_NUM:return 9;case At.MODE_8BIT_BYTE:return 8;case At.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(t<27)switch(i){case At.MODE_NUMBER:return 12;case At.MODE_ALPHA_NUM:return 11;case At.MODE_8BIT_BYTE:return 16;case At.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(t<41)switch(i){case At.MODE_NUMBER:return 14;case At.MODE_ALPHA_NUM:return 13;case At.MODE_8BIT_BYTE:return 16;case At.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 Je{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]^=rt.gexp(rt.glog(this.get(s))+rt.glog(t.get(n)));return new Je(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=rt.glog(this.get(0))-rt.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]^=rt.gexp(rt.glog(t.get(n))+e);return new Je(s,0).mod(t)}}class ne{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=ne.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 ne(h,c))}return r}static getRsBlockTable(t,e){switch(e){case ys.L:return ne.RS_BLOCK_TABLE[(t-1)*4+0];case ys.M:return ne.RS_BLOCK_TABLE[(t-1)*4+1];case ys.Q:return ne.RS_BLOCK_TABLE[(t-1)*4+2];case ys.H:return ne.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class _o{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 _d{mode;data;constructor(t){this.mode=At.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 be{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ys[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new _d(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=ne.getRSBlocks(t,this.errorCorrectLevel),s=new _o;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(),Z.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=be.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=Z.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=Z.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=Z.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=Z.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),Z.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=ne.getRSBlocks(t,e),r=new _o;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<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(be.PAD0,8),r.getLengthInBits()>=a*8));)r.put(be.PAD1,8);return be.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=Z.getErrorCorrectPolynomial(m),C=new Je(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+C.getLength()-o[u].length;o[u][b]=S>=0?C.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 Po=Math.ceil,ws=Math.floor,Mo=Math.round;function Pd(i,t){const e=vr(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 be(r,s);c.addData(e),c.make();const l=c.getModuleCount(),u=(n-a*2)/l,d=a,m=n-a;return To(n,o,h,function(g,v){if(d<=g&&g<m&&d<=v&&v<m){const C=ws((g-d)/u),b=ws((v-d)/u);return c.isDark(b,C)?0:1}else return 1})}function Md(i,t){const e=t.x||0,s=t.y||0,n=vr(i),r=t.ctx,a=t.ecc||"H",o=typeof t.size=="number"?ws(t.size):256,h=t.padding||0,c=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new be(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 v=0;v<m;v++)for(let C=0;C<m;C++){const b=Po((C+1)*g)-ws(C*g),S=Po((v+1)*g)-ws(v*g);r.fillStyle=d.isDark(v,C)?l:u,r.fillRect(e+Mo(C*g)+h,s+Mo(v*g)+h,b,S)}}const fi=new ds,st=new Mt;function re(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 H(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 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=Mh(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++)fi.fromBufferAttribute(this,e),fi.applyMatrix3(t),this.setXY(e,fi.x,fi.y);else if(this.itemSize===3)for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyMatrix3(t),this.setXYZ(e,st.x,st.y,st.z);return this}applyMatrix4(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyMatrix4(t),this.setXYZ(e,st.x,st.y,st.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.applyNormalMatrix(t),this.setXYZ(e,st.x,st.y,st.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)st.fromBufferAttribute(this,e),st.transformDirection(t),this.setXYZ(e,st.x,st.y,st.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=re(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=H(s,this.array)),this.array[t*this.itemSize+e]=s,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=re(e,this.array)),e}setX(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=re(e,this.array)),e}setY(t,e){return this.normalized&&(e=H(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=re(e,this.array)),e}setZ(t,e){return this.normalized&&(e=H(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=re(e,this.array)),e}setW(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(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=H(e,this.array),s=H(s,this.array),n=H(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=H(e,this.array),s=H(s,this.array),n=H(n,this.array),r=H(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 Tr(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 Ed extends Jt{constructor(t,e,s=!1){super(new Int8Array(t),e,s)}}class Ad extends Jt{constructor(t,e,s=!1){super(new Uint8Array(t),e,s)}}class kd extends Jt{constructor(t,e,s=!1){super(new Uint8ClampedArray(t),e,s)}}class Id extends Jt{constructor(t,e,s=!1){super(new Int16Array(t),e,s)}}class Dd extends Jt{constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}}class Rd extends Jt{constructor(t,e,s=!1){super(new Int32Array(t),e,s)}}class Ld extends Jt{constructor(t,e,s=!1){super(new Uint32Array(t),e,s)}}class zd extends Jt{isFloat16BufferAttribute=!0;constructor(t,e,s=!1){super(new Uint16Array(t),e,s)}getX(t){let e=Ms(this.array[t*this.itemSize]);return this.normalized&&(e=re(e,this.array)),e}setX(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize]=Ct(e),this}getY(t){let e=Ms(this.array[t*this.itemSize+1]);return this.normalized&&(e=re(e,this.array)),e}setY(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+1]=Ct(e),this}getZ(t){let e=Ms(this.array[t*this.itemSize+2]);return this.normalized&&(e=re(e,this.array)),e}setZ(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+2]=Ct(e),this}getW(t){let e=Ms(this.array[t*this.itemSize+3]);return this.normalized&&(e=re(e,this.array)),e}setW(t,e){return this.normalized&&(e=H(e,this.array)),this.array[t*this.itemSize+3]=Ct(e),this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this}setXYZ(t,e,s,n){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array),n=H(n,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this.array[t+2]=Ct(n),this}setXYZW(t,e,s,n,r){return t*=this.itemSize,this.normalized&&(e=H(e,this.array),s=H(s,this.array),n=H(n,this.array),r=H(r,this.array)),this.array[t+0]=Ct(e),this.array[t+1]=Ct(s),this.array[t+2]=Ct(n),this.array[t+3]=Ct(r),this}}class Od extends Jt{constructor(t,e,s=!1){super(new Float32Array(t),e,s)}}class ht extends j{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 j({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 Zs({frameDuration:t}),r={},a={};this.shapes.forEach((o,h)=>{const c=$t(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=Di(c).number;this.shapes[l].setAttr("strokeDashoffset",""+$t(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),n.play();break}}}const Fd={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,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 it{static NAMES=Fd;_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=F(parseFloat(r[1]),0,100)*255/100,this.g=F(parseFloat(r[2]),0,100)*255/100,this.b=F(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 it?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=F(Math.round(It(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=F(Math.round(It(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=F(Math.round(It(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=F(It(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},${$t(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=ze){Un.fromWorkingColorSpace(Vt.copy(this),t);const e=Vt.r,s=Vt.g,n=Vt.b;return t!==ze?`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 it(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Re(t.r),this.g=Re(t.g),this.b=Re(t.b),this}copyLinearToSRGB(t){return this.r=Le(t.r),this.g=Le(t.g),this.b=Le(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=F(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=F(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=F(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=F(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 Vt.lerpColors(new it(t),new it(e),s).toString()}catch{return e}}static random(){return Vt.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=it.nextIndex){it.nextIndex=t;const e=Object.keys(it.NAMES),s=e.length;return Vt.setHEX(it.NAMES[e[it.nextIndex++%s]]).toString()}setColorName(t){const e=it.NAMES[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(it.NAMES).map(t=>Vt.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=Bh(t,1),a=F(e,0,1),o=F(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=Xn(c,h,r+.3333333333333333)*255,this.g=Xn(c,h,r)*255,this.b=Xn(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=Ii(s.h,n.h,e),a=Ii(s.s,n.s,e),o=Ii(s.l,n.l,e);return this.setHSL(r,a,o),this}setHSV(t,e,s,n=1){const r=F(t,0,1)*360,a=F(e,0,1),o=F(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 Vt=new it;function Re(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Le(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const Eo="",ze="srgb",Nn="srgb-linear",Yn="linear",di="srgb",Ao=new je().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ko=new je().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),Io=[.64,.33,.3,.6,.15,.06],Do=[.2126,.7152,.0722],Ro=[.3127,.329],Un={enabled:!0,workingColorSpace:Nn,spaces:{},convert:function(i,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===di&&(i.r=Re(i.r),i.g=Re(i.g),i.b=Re(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===di&&(i.r=Le(i.r),i.g=Le(i.g),i.b=Le(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===Eo?Yn: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}};Un.define({[Nn]:{primaries:Io,whitePoint:Ro,transfer:Yn,toXYZ:Ao,fromXYZ:ko,luminanceCoefficients:Do,workingColorSpaceConfig:{unpackColorSpace:ze},outputColorSpaceConfig:{drawingBufferColorSpace:ze}},[ze]:{primaries:Io,whitePoint:Ro,transfer:di,toXYZ:Ao,fromXYZ:ko,luminanceCoefficients:Do,outputColorSpaceConfig:{drawingBufferColorSpace:ze}}});function Xn(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 Oe extends j{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 qa({x:this.x,y:this.y,toX:this.toX,toY:this.toY}),s=new qa({x:t.x,y:t.y,toX:t.toX,toY:t.toY});return e.intersection(s)}}class Bd extends j{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 xs{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(()=>{xs.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 Lo extends Ve{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ch(this.source);if(t===0){this.emit("finish");return}let e,s,n=xr(this.source,0);for(let r=1;r<t;r++)e=s,s=n,n=xr(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==`
|
|
35
35
|
`&&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":te("whitespace",t)?(this.textchunk+=zo(this.entity),this.mode="text"):t==";"?(this.textchunk+=zo(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(!te("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":te("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,s));break;case"close tag name":if(te("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(te("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":te("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,s));break;case"attr":if(te("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(!te("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(te("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 zo(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 Oo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Fo(i,t={}){var e=1,s=1;function n(L){var D=L.match(/\n/g);D&&(e+=D.length);var U=L.lastIndexOf(`
|
|
36
|
-
`);s=~U?L.length-U:s+L.length}function r(){var L={line:e,column:s};return function(D){return D.position=new a(L),g(),D}}function a(L){this.start=L,this.end={line:e,column:s},this.source=t.source}a.prototype.content=i;var o=[];function h(L){var D=new Error(t.source+":"+e+":"+s+": "+L);if(D.reason=L,D.filename=t.source,D.line=e,D.column=s,D.source=i,t.silent)o.push(D);else throw D}function c(){var L=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:L,parsingErrors:o}}}function l(){return m(/^{\s*/)}function u(){return m(/^}/)}function d(){var L,D=[];for(g(),v(D);i.length&&i.charAt(0)!="}"&&(L=Ot()||qt());)L!==!1&&(D.push(L),v(D));return D}function m(L){var D=L.exec(i);if(D){var U=D[0];return n(U),i=i.slice(U.length),D}}function g(){m(/^\s*/)}function v(L){var D;for(L=L||[];D=C();)D!==!1&&L.push(D);return L}function C(){var L=r();if(!(i.charAt(0)!="/"||i.charAt(1)!="*")){for(var D=2;i.charAt(D)!=""&&(i.charAt(D)!="*"||i.charAt(D+1)!="/");)++D;if(D+=2,i.charAt(D-1)==="")return h("End of comment missing");var U=i.slice(2,D-2);return s+=2,n(U),i=i.slice(D),s+=2,L({type:"comment",comment:U})}}function b(){var L=m(/^([^{]+)/);if(L)return ae(L[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(D){return D.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(D){return D.replace(/\u200C/g,",")})}function S(){var L=r(),D=m(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(D){if(D=ae(D[0]),!m(/^:\s*/))return h("property missing ':'");var U=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),q=L({type:"declaration",property:D.replace(Oo,""),value:U?ae(U[0]).replace(Oo,""):""});return m(/^[;\s]*/),q}}function y(){var L=[];if(!l())return h("missing '{'");v(L);for(var D;D=S();)D!==!1&&(L.push(D),v(L));return u()?L:h("missing '}'")}function w(){for(var L,D=[],U=r();L=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)D.push(L[1]),m(/^,\s*/);if(D.length)return U({type:"keyframe",values:D,declarations:y()})}function P(){var L=r(),D=m(/^@([-\w]+)?keyframes\s*/);if(D){var U=D[1];if(D=m(/^([-\w]+)\s*/),!D)return h("@keyframes missing name");var q=D[1];if(!l())return h("@keyframes missing '{'");for(var yt,jt=v();yt=w();)jt.push(yt),jt=jt.concat(v());return u()?L({type:"keyframes",name:q,vendor:U,keyframes:jt}):h("@keyframes missing '}'")}}function _(){var L=r(),D=m(/^@supports *([^{]+)/);if(D){var U=ae(D[1]);if(!l())return h("@supports missing '{'");var q=v().concat(d());return u()?L({type:"supports",supports:U,rules:q}):h("@supports missing '}'")}}function R(){var L=r(),D=m(/^@host\s*/);if(D){if(!l())return h("@host missing '{'");var U=v().concat(d());return u()?L({type:"host",rules:U}):h("@host missing '}'")}}function X(){var L=r(),D=m(/^@media *([^{]+)/);if(D){var U=ae(D[1]);if(!l())return h("@media missing '{'");var q=v().concat(d());return u()?L({type:"media",media:U,rules:q}):h("@media missing '}'")}}function G(){var L=r(),D=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(D)return L({type:"custom-media",name:ae(D[1]),media:ae(D[2])})}function $(){var L=r(),D=m(/^@page */);if(D){var U=b()||[];if(!l())return h("@page missing '{'");for(var q=v(),yt;yt=S();)q.push(yt),q=q.concat(v());return u()?L({type:"page",selectors:U,declarations:q}):h("@page missing '}'")}}function W(){var L=r(),D=m(/^@([-\w]+)?document *([^{]+)/);if(D){var U=ae(D[1]),q=ae(D[2]);if(!l())return h("@document missing '{'");var yt=v().concat(d());return u()?L({type:"document",document:q,vendor:U,rules:yt}):h("@document missing '}'")}}function Q(){var L=r(),D=m(/^@font-face\s*/);if(D){if(!l())return h("@font-face missing '{'");for(var U=v(),q;q=S();)U.push(q),U=U.concat(v());return u()?L({type:"font-face",declarations:U}):h("@font-face missing '}'")}}var ct=kt("import"),nt=kt("charset"),Gt=kt("namespace");function kt(L){var D=new RegExp("^@"+L+"\\s*([^;]+);");return function(){var U=r(),q=m(D);if(q){var yt={type:L};return yt[L]=q[1].trim(),U(yt)}}}function Ot(){if(i[0]=="@")return P()||X()||G()||_()||ct()||nt()||Gt()||W()||$()||R()||Q()}function qt(){var L=r(),D=b();return D?(v(),L({type:"rule",selectors:D,declarations:y()})):h("selector missing")}return Vn(c())}function ae(i){return i?i.replace(/^\s+|\s+$/g,""):""}function Vn(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){Vn(a,s)}):r&&typeof r=="object"&&Vn(r,s)}return e&&Object.defineProperty(i,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),i}class Bo extends Lo{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=Fo(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),qn(this.currentItem.style,this.currentItem,jn)}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&&qn(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+Gn(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(jn.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"&&qn(a,this.currentItem,jn),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 Gn(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 Gn(i,t,n,r)-Gn(e,s,n,r)}function qn(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 jn=["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 Yd{controller;rootEl;ue;shapes=[];currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e,s){this.controller=t,this.rootEl=_t.createSVGElement("svg"),this.ue=ce(this.rootEl);const n=ce(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)})),we(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 ye(this.rootEl,{viewBox:`0 0 ${t} ${e}`,width:`${t}`,height:`${e}`}),this}download(){return _t.downloadFromSVGElement(this.rootEl)}_addDrawShape(t){this.shapes.findIndex(e=>e.id==t.id)===-1&&(this.shapes.push(t),t instanceof ht&&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 bs?e.el=this.text(e.text,e.x,e.y,_r(e.getAttrs(),(n,r)=>typeof r=="string")):(e.el=_t.createSvgPath(e.toSVGPathD(),e.id),this.ue.insert(e.el))),e.followMouse&&(!Ps(e.x,this.controller.mousePoint.x,5)||!Ps(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 bs&&(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,_r(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?ye(n):typeof e=="string"&&s===void 0?ye(n,mt(e))||"":(typeof e=="object"?ye(n,e):typeof e=="string"&&s!==void 0&&ye(n,mt(e),s),this):this}circle(t,e,s){return this.path(new oe({x:t,y:e,radius:s}))}circleEl(t,e,s){const n=_t.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 Yo({x:t,y:e,rx:s,ry:n}))}ellipseEl(t,e,s,n){const r=_t.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 he({x:t,y:e,width:s,height:n}))}rectEl(t,e,s,n){const r=_t.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=_t.createSVGElement("text",{x:String(e),y:String(s)});return ce(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=_t.createSVGElement("text",{x:String(e),y:String(s)});return t.split(`
|
|
37
|
-
`).forEach((o,h)=>{if(o.trim()){const c=_t.createSVGElement("tspan",{x:String(e),dy:h>0?r:"0"});ce(c).html(o),ce(a).insert(c),this.attr(c,Object.assign({"alignment-baseline":"middle"},n))}}),this.ue.insert(a),a}}class Ud extends ht{svgWidth=0;svgHeight=0;width=0;height=0;constructor(t){super(t);const e=new Bo(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"||!ke.isSVGPath(r.path))continue;const a={};for(const l in r)l==="type"||l==="path"||l==="transform"||(a[l]=r[l]);const o=ke.absolutizeSVGPath(ke.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=En(r.transform??"");u.scale(this.width&&this.svgWidth?this.width/this.svgWidth:1),this.addShape(new j({...t,attrs:{...a,...t?.attrs||{}},d:l,originMatrix:u}))})}}shapeInit(){this.trim()}}class oe extends j{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 Qs(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 m=Xt(r,a.x,a.y),g=Xt(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 v=Xt(r,h.x,h.y),C=Xt(r,c.x,c.y);this.vx=v.x,this.vy=v.y,t.vx=C.x,t.vy=C.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 No extends j{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 he extends j{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 bt({x:t,y:e,c1x:s,c1y:n,c2x:r,c2y:a,toX:o,toY:h});return new he(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 Yo extends j{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 Xd extends j{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 Vd extends j{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 Gd extends j{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 qd extends j{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 jd extends j{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 Hd extends j{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 $d extends j{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 Wd extends ht{constructor(t){super(t);const e=new Oe({...t,x:this.x,y:this.y,toX:this.x,toY:this.y-140-Math.random()*20}),s=30+Math.random()*30,n=new Oe({...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 Oe({...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 bs extends j{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=Di(this.getAttr("fontSize"),10).number,s=Di(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 Uo extends ht{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 bs({...t,x:this.x+this.offset,y:this.y+this.offset,text:this.text,attrs:{...this.getAttrs(),fill:Vt.set(this.bg).opposite(!0).toString(),textAnchor:"start"}}),this.bgShape=new he({...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(){xt(()=>{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 Jd extends ht{radius;expandRaidus;startDegree;endDegree;text="";defaultShowText;tip="";p1=new oe;p1Offset=10;p2=new oe;p2Offset=40;p3=new oe;p3Offset=10;p4=new oe;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 Xo({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 Oe({x:this.p1.x,y:this.p1.y,toX:this.p2.x,toY:this.p2.y,attrs:{...e},isShow:this.defaultShowText}),this.line23=new Oe({x:this.p2.x,y:this.p2.y,toX:this.p3.x,toY:this.p3.y,attrs:{...e},isShow:this.defaultShowText}),this.textShape=new bs({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 Uo({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}=Lt(Y(e),this.sectorArc.radius+this.p1Offset);this.p1.x=this.x+s,this.p1.y=this.y+n;const{dx:r,dy:a}=Lt(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 Xo extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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=ti(this.x,this.y,t,e),n=ft(ge(this.x,this.y,t,e));return s<=this.radius&&n>=this.startDegree&&n<=this.endDegree}}class Zd extends ht{showFlame;ship;flame;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t.showFlame:!1,this.ship=new j({...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 j({...t,isShow:this.showFlame,d:[["m",-10,-5],["l",-7.5,5],["l",7.5,5],["z"]]}),this.addShape(this.flame)}shapeInit(){xt(()=>{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 Kd extends ht{value;backgroundRect;occupyRect;handle;constructor(t){super(t);const e=t?.min||0,s=t?.max||100,n=t?.step||1,r=Yh(e,s,n);this.value=r(typeof t?.defaultValue=="number"?F(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||ho("--xg-blue");this.backgroundRect=new he({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 he({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 oe({x:this.x+o*a,y:this.y+l,diffXInGroup:o*a,diffYInGroup:l,radius:c,alongPath:new af({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=F(this.occupyRect.width+m,0,o),this.value=r((this.handle.x-this.x)/o*(s-e)+e),this.emit("change",this.value)})}}class Qd extends ht{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 oe({...t,x:this.x,y:this.y,radius:2}),this.forceSetCXY(this.controlPoint.cX,this.controlPoint.cY),this.mainRect=new he({...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 oe({...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 Hn extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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 tm extends ht{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 Hn({...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 Hn({...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 Oe({...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 $n extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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 em extends ht{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 $n({...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 $n({...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 sm extends j{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=F(t,0,1),this.brightness}toSVGPathData(){return[]}}const im=sm;class nm extends j{points;light;constructor(t=[]){if(t.length<3)throw new Error("points length must >= 3");super(),this.points=t,this.light=new im({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=Vt.set(t),s=this.getLightFactor();return e.r*=s,e.g*=s,e.b*=s,e.toString()}}class rm extends ht{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:v,scalar:C,flat:b}=Object.assign({shape:he,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:it.getColors(),scalar:1,flat:!1},s||{}),S=Y(h),y=Y(c);let w=o;for(;w--;){const P=v[w%v.length],_=new n({x:t*r,y:e*a,width:10,height:10,scalar:C,attrs:{fill:P},independentTransformInGroup:!0});this.addShape(_),this.fettis.push({shape:_,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:C,flat:b,color:new it(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=ft(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 Wn{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=It(t?.springLength,100);this.shapes.forEach(s=>{s.isDragging||this.shapes.filter(n=>n.id!==s.id).forEach(n=>{const r=ge(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]=Pt.getPathInterpolator(r.expendFill(o),a.expendFill(o))}const s=new j({d:e[0](0)});return n=>{const r=$t(t*n,6),a=Math.min(Math.floor(r),t-1),o=$t(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",it.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",it.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 ht?(h=o,h.sortPathD()):(h=new ht,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 Wn(o).polymorph())});const a=new ht;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 ht)>=0?this.polymorphGroup():this.polymorph(),n=s(0),r=e?.onUpdate,a=new Zs({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}=Lt(o,s);r.push({x:t+h,y:e+c})}return new No({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 bn({x:t,y:e,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),a.push(new bn({x:l,y:u,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new j({d:Pt.fromLines(a)})}}const Vo={map:new Map,transform:function(i){if(Da)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 am(i,t,e){const s=new OffscreenCanvas(i,t),n=s.getContext("2d");if(n)return e(n),s.transferToImageBitmap()}function om(i,t,e){const s=i.createPattern(Vo.transform(t),"no-repeat");if(s){const n=An(e);s.setTransform(n),i.fillStyle=s}}function Go(i){return window.URL.createObjectURL(i)}function hm(i){return window.URL.revokeObjectURL(i)}const qo=new _e;async function jo(i,t=6e4){return new Promise((e,s)=>{const n=typeof i=="string"?i:Go(i),r=qo.get(n);if(r)return e(r);const a=document.createElement("img");a.onload=h=>{clearTimeout(o);const c=a.naturalWidth||a.width,l=a.naturalHeight||a.height,u={width:c,height:l,aspectRatio:c/l,element:a,imageData:xo(a)};qo.set(n,u),e(u),a.onerror=a.onload=null},a.onerror=h=>{clearTimeout(o),s(h)},a.src=n;const o=setTimeout(()=>{s("Timeout!")},t)})}async function Jn(i=Dt.text,t=["*"]){const s=(await sn(t))[0],n=await ns(s,i);return{type:s.type,name:s.name,size:s.size,data:n}}async function cm(i=["image/*"]){const e=(await sn(i))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await ns(e,Dt.arraybuffer),n=Ri(s),r=await jo(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 lm(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 Zn(i,t,e){const s=i.target||document||window;let n=!1,r=!1;const a=B(s,"keydown",async h=>{r||(n=lm(h,i),n&&(h.stopPropagation(),h.preventDefault(),await t()))}),o=B(s,"keyup",async h=>{r||n&&e&&(h.stopPropagation(),h.preventDefault(),await e())});return{hotKeys:function(h){const c=[];return h.ctrl&&c.push(an()?"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 um={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 fm(i){if(i.key)return i.key;if(i.keyCode)return i.keyCode;if(i.which)return i.which}async function dm(i={keys:["o"]},t=Dt.text){const e=ac(),s=Zn(i,async()=>{try{e.resolve(await Jn(t))}catch(n){e.reject(n)}s.destroy()},()=>{});return await e.promise}function mm(i={keys:["o"]},t=Dt.text){const e=new Ve;return Zn(i,async()=>{try{e.emit("file",await Jn(t))}catch{}},()=>{}),{on:s=>{e.on("file",s)},off:s=>{e.off("file",s)}}}async function gm(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 pm(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 ym(){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 Kn(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 Qn=new _e;function tr(i,t){return zh({url:i,...t})}async function mi(i,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=tr(i,t),s=new AbortController;Qn.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(Qn.delete(e),clearTimeout(o),h.status===200||h.status===0){if(h.status===0&&tc("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(v){function C(){c.read().then(({done:b,value:S})=>{b?v.close():(m+=S.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:m,total:u})),v.enqueue(S),C())}).catch(b=>{v.error(b)})}C()}});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 wm(i,t){const e=Qn.get(tr(i,t));e&&e.abort()}function xm(i=3,t){return Oi(mi,i,t)}function bm(i=6e4){return Fi(mi,i)}function Sm(i=6e4,t=3,e){return Fi(Oi(mi,t,e),i)}function vm(i,t,e){if(typeof t=="string"&&(t=Sr(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 Cm(i,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete i.dataset[e.trim()]})}function er(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&&ye(i,"class",n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Tm(i,t){er(i,t,"add")}function _m(i,t){er(i,t,"remove")}function Pm(i,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(i.className)||!1}function Mm(i,t){Ie(i,"display")=="none"&&t===void 0||t===!0?Ho(i):$o(i)}function Ho(i){kn(i,"display",i instanceof HTMLTableRowElement?"table-row":i instanceof HTMLTableCellElement?"table-cell":"block")}function $o(i){kn(i,"display","none")}function ce(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(Ie(t[e],"overflow")+Ie(t[e],"overflow-y")+Ie(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](Wo(t)):i[e](t)},html:function(t){if(typeof t=="string"){i.innerHTML=t;const e=Jo(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 Wo(i,t=!1){const e=document.createElement("template");return e.innerHTML=i,t&&e.content.childNodes.forEach(s=>{const n=Jo(s);n!=s&&e.content.replaceChild(n,s)}),e.content}function Em(i){return document.createElement.call(document,i)}function Am(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function km(i){return document.createTextNode.call(document,i)}function Jo(i){return i.tagName=="SCRIPT"&&(i=Zo(i)),i.querySelectorAll&&i.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Zo(t),t)}),i}function Zo(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 Im(i){return{shadowRoot:()=>{let t=i;for(;t;){const e=i.parentElement||i.parentNode;if(e)t=e;else break}return t}}}function Dm(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 Rm(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 Lm(){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 zm(i=200){"vibrate"in navigator?window.navigator.vibrate(i):console.error("Your device is not support vibrate on this browser.")}function Om(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 Fm={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?"下午":"晚上"}},Bm={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]}]`}},Se=new _e;let gi="zh-cn";sr(Bm),sr(Fm);function sr(i,t){if(!i)return Se.get(gi);let e;if(typeof i=="string"){const s=i.toLowerCase();if(Se.get(s))e=s;else if(t)Se.set(s,t),e=s;else return Se.get(gi)}else{const{name:s}=i;Se.set(s,i),e=s}return e&&(gi=e),Se.get(e)||Se.get(gi)}function Fe(i,t={},e=[],s){return{tag:i,props:t,children:e,el:s}}function pi(i){return Fe(i.tagName,Rn(i),Array.from(i.children).map(t=>pi(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"?oi(i.el,i.props[e]):$e(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 yi(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||Dn(e,l);oi(e,c)}else $e(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++)yi(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 Nm{state;el;constructor(t,e){this.state=Ir(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(ce(s).isInputRadio()){const l=s;xt(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else if(ce(s).isInputCheckbox()){const l=s;xt(()=>{l.checked=Pr(this.getStateValue(c),l.value)}),l.addEventListener("change",u=>{const d=u.target,m=d.value;d.checked?Fh(this.getStateValue(c),m):Te(this.getStateValue(c),m)})}else if(ce(s).isSelect()){const l=s;xt(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else{const l=s;xt(()=>{l.value=this.getStateValue(c)});const u=d=>{this.setStateValue(c,d.target.value)};l.addEventListener("input",u)}else h==="v-text"?xt(()=>{s.innerText=this.getStateValue(c)}):h==="v-html"&&xt(()=>{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]&&xt(()=>{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){
|
|
36
|
+
`);s=~U?L.length-U:s+L.length}function r(){var L={line:e,column:s};return function(D){return D.position=new a(L),g(),D}}function a(L){this.start=L,this.end={line:e,column:s},this.source=t.source}a.prototype.content=i;var o=[];function h(L){var D=new Error(t.source+":"+e+":"+s+": "+L);if(D.reason=L,D.filename=t.source,D.line=e,D.column=s,D.source=i,t.silent)o.push(D);else throw D}function c(){var L=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:L,parsingErrors:o}}}function l(){return m(/^{\s*/)}function u(){return m(/^}/)}function d(){var L,D=[];for(g(),v(D);i.length&&i.charAt(0)!="}"&&(L=Ot()||qt());)L!==!1&&(D.push(L),v(D));return D}function m(L){var D=L.exec(i);if(D){var U=D[0];return n(U),i=i.slice(U.length),D}}function g(){m(/^\s*/)}function v(L){var D;for(L=L||[];D=C();)D!==!1&&L.push(D);return L}function C(){var L=r();if(!(i.charAt(0)!="/"||i.charAt(1)!="*")){for(var D=2;i.charAt(D)!=""&&(i.charAt(D)!="*"||i.charAt(D+1)!="/");)++D;if(D+=2,i.charAt(D-1)==="")return h("End of comment missing");var U=i.slice(2,D-2);return s+=2,n(U),i=i.slice(D),s+=2,L({type:"comment",comment:U})}}function b(){var L=m(/^([^{]+)/);if(L)return ae(L[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(D){return D.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(D){return D.replace(/\u200C/g,",")})}function S(){var L=r(),D=m(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(D){if(D=ae(D[0]),!m(/^:\s*/))return h("property missing ':'");var U=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),q=L({type:"declaration",property:D.replace(Oo,""),value:U?ae(U[0]).replace(Oo,""):""});return m(/^[;\s]*/),q}}function y(){var L=[];if(!l())return h("missing '{'");v(L);for(var D;D=S();)D!==!1&&(L.push(D),v(L));return u()?L:h("missing '}'")}function w(){for(var L,D=[],U=r();L=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)D.push(L[1]),m(/^,\s*/);if(D.length)return U({type:"keyframe",values:D,declarations:y()})}function P(){var L=r(),D=m(/^@([-\w]+)?keyframes\s*/);if(D){var U=D[1];if(D=m(/^([-\w]+)\s*/),!D)return h("@keyframes missing name");var q=D[1];if(!l())return h("@keyframes missing '{'");for(var yt,jt=v();yt=w();)jt.push(yt),jt=jt.concat(v());return u()?L({type:"keyframes",name:q,vendor:U,keyframes:jt}):h("@keyframes missing '}'")}}function _(){var L=r(),D=m(/^@supports *([^{]+)/);if(D){var U=ae(D[1]);if(!l())return h("@supports missing '{'");var q=v().concat(d());return u()?L({type:"supports",supports:U,rules:q}):h("@supports missing '}'")}}function R(){var L=r(),D=m(/^@host\s*/);if(D){if(!l())return h("@host missing '{'");var U=v().concat(d());return u()?L({type:"host",rules:U}):h("@host missing '}'")}}function X(){var L=r(),D=m(/^@media *([^{]+)/);if(D){var U=ae(D[1]);if(!l())return h("@media missing '{'");var q=v().concat(d());return u()?L({type:"media",media:U,rules:q}):h("@media missing '}'")}}function G(){var L=r(),D=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(D)return L({type:"custom-media",name:ae(D[1]),media:ae(D[2])})}function $(){var L=r(),D=m(/^@page */);if(D){var U=b()||[];if(!l())return h("@page missing '{'");for(var q=v(),yt;yt=S();)q.push(yt),q=q.concat(v());return u()?L({type:"page",selectors:U,declarations:q}):h("@page missing '}'")}}function W(){var L=r(),D=m(/^@([-\w]+)?document *([^{]+)/);if(D){var U=ae(D[1]),q=ae(D[2]);if(!l())return h("@document missing '{'");var yt=v().concat(d());return u()?L({type:"document",document:q,vendor:U,rules:yt}):h("@document missing '}'")}}function Q(){var L=r(),D=m(/^@font-face\s*/);if(D){if(!l())return h("@font-face missing '{'");for(var U=v(),q;q=S();)U.push(q),U=U.concat(v());return u()?L({type:"font-face",declarations:U}):h("@font-face missing '}'")}}var ct=kt("import"),nt=kt("charset"),Gt=kt("namespace");function kt(L){var D=new RegExp("^@"+L+"\\s*([^;]+);");return function(){var U=r(),q=m(D);if(q){var yt={type:L};return yt[L]=q[1].trim(),U(yt)}}}function Ot(){if(i[0]=="@")return P()||X()||G()||_()||ct()||nt()||Gt()||W()||$()||R()||Q()}function qt(){var L=r(),D=b();return D?(v(),L({type:"rule",selectors:D,declarations:y()})):h("selector missing")}return Vn(c())}function ae(i){return i?i.replace(/^\s+|\s+$/g,""):""}function Vn(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){Vn(a,s)}):r&&typeof r=="object"&&Vn(r,s)}return e&&Object.defineProperty(i,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),i}class Bo extends Lo{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=Fo(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),qn(this.currentItem.style,this.currentItem,jn)}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&&qn(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+Gn(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(jn.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"&&qn(a,this.currentItem,jn),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 Gn(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 Gn(i,t,n,r)-Gn(e,s,n,r)}function qn(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 jn=["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 Nd{controller;rootEl;ue;shapes=[];currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e,s){this.controller=t,this.rootEl=_t.createSVGElement("svg"),this.ue=ce(this.rootEl);const n=ce(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)})),we(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 ye(this.rootEl,{viewBox:`0 0 ${t} ${e}`,width:`${t}`,height:`${e}`}),this}download(){return _t.downloadFromSVGElement(this.rootEl)}_addDrawShape(t){this.shapes.findIndex(e=>e.id==t.id)===-1&&(this.shapes.push(t),t instanceof ht&&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 bs?e.el=this.text(e.text,e.x,e.y,_r(e.getAttrs(),(n,r)=>typeof r=="string")):(e.el=_t.createSvgPath(e.toSVGPathD(),e.id),this.ue.insert(e.el))),e.followMouse&&(!Ps(e.x,this.controller.mousePoint.x,5)||!Ps(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 bs&&(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,_r(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?ye(n):typeof e=="string"&&s===void 0?ye(n,mt(e))||"":(typeof e=="object"?ye(n,e):typeof e=="string"&&s!==void 0&&ye(n,mt(e),s),this):this}circle(t,e,s){return this.path(new oe({x:t,y:e,radius:s}))}circleEl(t,e,s){const n=_t.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 Yo({x:t,y:e,rx:s,ry:n}))}ellipseEl(t,e,s,n){const r=_t.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 he({x:t,y:e,width:s,height:n}))}rectEl(t,e,s,n){const r=_t.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=_t.createSVGElement("text",{x:String(e),y:String(s)});return ce(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=_t.createSVGElement("text",{x:String(e),y:String(s)});return t.split(`
|
|
37
|
+
`).forEach((o,h)=>{if(o.trim()){const c=_t.createSVGElement("tspan",{x:String(e),dy:h>0?r:"0"});ce(c).html(o),ce(a).insert(c),this.attr(c,Object.assign({"alignment-baseline":"middle"},n))}}),this.ue.insert(a),a}}class Yd extends ht{svgWidth=0;svgHeight=0;width=0;height=0;constructor(t){super(t);const e=new Bo(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"||!ke.isSVGPath(r.path))continue;const a={};for(const l in r)l==="type"||l==="path"||l==="transform"||(a[l]=r[l]);const o=ke.absolutizeSVGPath(ke.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=En(r.transform??"");u.scale(this.width&&this.svgWidth?this.width/this.svgWidth:1),this.addShape(new j({...t,attrs:{...a,...t?.attrs||{}},d:l,originMatrix:u}))})}}shapeInit(){this.trim()}}class oe extends j{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 Qs(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 m=Xt(r,a.x,a.y),g=Xt(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 v=Xt(r,h.x,h.y),C=Xt(r,c.x,c.y);this.vx=v.x,this.vy=v.y,t.vx=C.x,t.vy=C.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 No extends j{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 he extends j{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 bt({x:t,y:e,c1x:s,c1y:n,c2x:r,c2y:a,toX:o,toY:h});return new he(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 Yo extends j{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 Ud extends j{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 Xd extends j{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 Vd extends j{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 Gd extends j{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 qd extends j{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 jd extends j{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 Hd extends j{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 $d extends ht{constructor(t){super(t);const e=new Oe({...t,x:this.x,y:this.y,toX:this.x,toY:this.y-140-Math.random()*20}),s=30+Math.random()*30,n=new Oe({...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 Oe({...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 bs extends j{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=Di(this.getAttr("fontSize"),10).number,s=Di(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 Uo extends ht{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 bs({...t,x:this.x+this.offset,y:this.y+this.offset,text:this.text,attrs:{...this.getAttrs(),fill:Vt.set(this.bg).opposite(!0).toString(),textAnchor:"start"}}),this.bgShape=new he({...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(){xt(()=>{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 Wd extends ht{radius;expandRaidus;startDegree;endDegree;text="";defaultShowText;tip="";p1=new oe;p1Offset=10;p2=new oe;p2Offset=40;p3=new oe;p3Offset=10;p4=new oe;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 Xo({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 Oe({x:this.p1.x,y:this.p1.y,toX:this.p2.x,toY:this.p2.y,attrs:{...e},isShow:this.defaultShowText}),this.line23=new Oe({x:this.p2.x,y:this.p2.y,toX:this.p3.x,toY:this.p3.y,attrs:{...e},isShow:this.defaultShowText}),this.textShape=new bs({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 Uo({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}=Lt(Y(e),this.sectorArc.radius+this.p1Offset);this.p1.x=this.x+s,this.p1.y=this.y+n;const{dx:r,dy:a}=Lt(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 Xo extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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=ti(this.x,this.y,t,e),n=ft(ge(this.x,this.y,t,e));return s<=this.radius&&n>=this.startDegree&&n<=this.endDegree}}class Jd extends ht{showFlame;ship;flame;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t.showFlame:!1,this.ship=new j({...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 j({...t,isShow:this.showFlame,d:[["m",-10,-5],["l",-7.5,5],["l",7.5,5],["z"]]}),this.addShape(this.flame)}shapeInit(){xt(()=>{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 Zd extends ht{value;backgroundRect;occupyRect;handle;constructor(t){super(t);const e=t?.min||0,s=t?.max||100,n=t?.step||1,r=Nh(e,s,n);this.value=r(typeof t?.defaultValue=="number"?F(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||ho("--xg-blue");this.backgroundRect=new he({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 he({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 oe({x:this.x+o*a,y:this.y+l,diffXInGroup:o*a,diffYInGroup:l,radius:c,alongPath:new rf({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=F(this.occupyRect.width+m,0,o),this.value=r((this.handle.x-this.x)/o*(s-e)+e),this.emit("change",this.value)})}}class Kd extends ht{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 oe({...t,x:this.x,y:this.y,radius:2}),this.forceSetCXY(this.controlPoint.cX,this.controlPoint.cY),this.mainRect=new he({...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 oe({...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 Hn extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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 Qd extends ht{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 Hn({...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 Hn({...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 Oe({...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 $n extends j{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}=Lt(Y(this.startDegree),this.radius),{dx:s,dy:n}=Lt(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 tm extends ht{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 $n({...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 $n({...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 em extends j{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=F(t,0,1),this.brightness}toSVGPathData(){return[]}}const sm=em;class im extends j{points;light;constructor(t=[]){if(t.length<3)throw new Error("points length must >= 3");super(),this.points=t,this.light=new sm({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=Vt.set(t),s=this.getLightFactor();return e.r*=s,e.g*=s,e.b*=s,e.toString()}}class nm extends ht{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:v,scalar:C,flat:b}=Object.assign({shape:he,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:it.getColors(),scalar:1,flat:!1},s||{}),S=Y(h),y=Y(c);let w=o;for(;w--;){const P=v[w%v.length],_=new n({x:t*r,y:e*a,width:10,height:10,scalar:C,attrs:{fill:P},independentTransformInGroup:!0});this.addShape(_),this.fettis.push({shape:_,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:C,flat:b,color:new it(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=ft(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 Wn{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=It(t?.springLength,100);this.shapes.forEach(s=>{s.isDragging||this.shapes.filter(n=>n.id!==s.id).forEach(n=>{const r=ge(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]=Pt.getPathInterpolator(r.expendFill(o),a.expendFill(o))}const s=new j({d:e[0](0)});return n=>{const r=$t(t*n,6),a=Math.min(Math.floor(r),t-1),o=$t(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",it.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",it.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 ht?(h=o,h.sortPathD()):(h=new ht,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 Wn(o).polymorph())});const a=new ht;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 ht)>=0?this.polymorphGroup():this.polymorph(),n=s(0),r=e?.onUpdate,a=new Zs({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}=Lt(o,s);r.push({x:t+h,y:e+c})}return new No({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 bn({x:t,y:e,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),a.push(new bn({x:l,y:u,rx:s,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new j({d:Pt.fromLines(a)})}}const Vo={map:new Map,transform:function(i){if(Da)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 rm(i,t,e){const s=new OffscreenCanvas(i,t),n=s.getContext("2d");if(n)return e(n),s.transferToImageBitmap()}function am(i,t,e){const s=i.createPattern(Vo.transform(t),"no-repeat");if(s){const n=An(e);s.setTransform(n),i.fillStyle=s}}function Go(i){return window.URL.createObjectURL(i)}function om(i){return window.URL.revokeObjectURL(i)}const qo=new _e;async function jo(i,t=6e4){return new Promise((e,s)=>{const n=typeof i=="string"?i:Go(i),r=qo.get(n);if(r)return e(r);const a=document.createElement("img");a.onload=h=>{clearTimeout(o);const c=a.naturalWidth||a.width,l=a.naturalHeight||a.height,u={width:c,height:l,aspectRatio:c/l,element:a,imageData:xo(a)};qo.set(n,u),e(u),a.onerror=a.onload=null},a.onerror=h=>{clearTimeout(o),s(h)},a.src=n;const o=setTimeout(()=>{s("Timeout!")},t)})}async function Jn(i=Dt.text,t=["*"]){const s=(await sn(t))[0],n=await ns(s,i);return{type:s.type,name:s.name,size:s.size,data:n}}async function hm(i=["image/*"]){const e=(await sn(i))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await ns(e,Dt.arraybuffer),n=Ri(s),r=await jo(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 cm(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 Zn(i,t,e){const s=i.target||document||window;let n=!1,r=!1;const a=B(s,"keydown",async h=>{r||(n=cm(h,i),n&&(h.stopPropagation(),h.preventDefault(),await t()))}),o=B(s,"keyup",async h=>{r||n&&e&&(h.stopPropagation(),h.preventDefault(),await e())});return{hotKeys:function(h){const c=[];return h.ctrl&&c.push(an()?"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 lm={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 um(i){if(i.key)return i.key;if(i.keyCode)return i.keyCode;if(i.which)return i.which}async function fm(i={keys:["o"]},t=Dt.text){const e=rc(),s=Zn(i,async()=>{try{e.resolve(await Jn(t))}catch(n){e.reject(n)}s.destroy()},()=>{});return await e.promise}function dm(i={keys:["o"]},t=Dt.text){const e=new Ve;return Zn(i,async()=>{try{e.emit("file",await Jn(t))}catch{}},()=>{}),{on:s=>{e.on("file",s)},off:s=>{e.off("file",s)}}}async function mm(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 gm(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 pm(){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 Kn(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 Qn=new _e;function tr(i,t){return zh({url:i,...t})}async function mi(i,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=tr(i,t),s=new AbortController;Qn.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(Qn.delete(e),clearTimeout(o),h.status===200||h.status===0){if(h.status===0&&Qh("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(v){function C(){c.read().then(({done:b,value:S})=>{b?v.close():(m+=S.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:m,total:u})),v.enqueue(S),C())}).catch(b=>{v.error(b)})}C()}});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 ym(i,t){const e=Qn.get(tr(i,t));e&&e.abort()}function wm(i=3,t){return Oi(mi,i,t)}function xm(i=6e4){return Fi(mi,i)}function bm(i=6e4,t=3,e){return Fi(Oi(mi,t,e),i)}function Sm(i,t,e){if(typeof t=="string"&&(t=Sr(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 vm(i,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete i.dataset[e.trim()]})}function er(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&&ye(i,"class",n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Cm(i,t){er(i,t,"add")}function Tm(i,t){er(i,t,"remove")}function _m(i,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(i.className)||!1}function Pm(i,t){Ie(i,"display")=="none"&&t===void 0||t===!0?Ho(i):$o(i)}function Ho(i){kn(i,"display",i instanceof HTMLTableRowElement?"table-row":i instanceof HTMLTableCellElement?"table-cell":"block")}function $o(i){kn(i,"display","none")}function ce(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(Ie(t[e],"overflow")+Ie(t[e],"overflow-y")+Ie(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](Wo(t)):i[e](t)},html:function(t){if(typeof t=="string"){i.innerHTML=t;const e=Jo(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 Wo(i,t=!1){const e=document.createElement("template");return e.innerHTML=i,t&&e.content.childNodes.forEach(s=>{const n=Jo(s);n!=s&&e.content.replaceChild(n,s)}),e.content}function Mm(i){return document.createElement.call(document,i)}function Em(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Am(i){return document.createTextNode.call(document,i)}function Jo(i){return i.tagName=="SCRIPT"&&(i=Zo(i)),i.querySelectorAll&&i.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Zo(t),t)}),i}function Zo(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 km(i){return{shadowRoot:()=>{let t=i;for(;t;){const e=i.parentElement||i.parentNode;if(e)t=e;else break}return t}}}function Im(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 Dm(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 Rm(){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 Lm(i=200){"vibrate"in navigator?window.navigator.vibrate(i):console.error("Your device is not support vibrate on this browser.")}function zm(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 Om={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?"下午":"晚上"}},Fm={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]}]`}},Se=new _e;let gi="zh-cn";sr(Fm),sr(Om);function sr(i,t){if(!i)return Se.get(gi);let e;if(typeof i=="string"){const s=i.toLowerCase();if(Se.get(s))e=s;else if(t)Se.set(s,t),e=s;else return Se.get(gi)}else{const{name:s}=i;Se.set(s,i),e=s}return e&&(gi=e),Se.get(e)||Se.get(gi)}function Fe(i,t={},e=[],s){return{tag:i,props:t,children:e,el:s}}function pi(i){return Fe(i.tagName,Rn(i),Array.from(i.children).map(t=>pi(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"?oi(i.el,i.props[e]):$e(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 yi(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||Dn(e,l);oi(e,c)}else $e(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++)yi(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 Bm{state;el;constructor(t,e){this.state=Ir(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(ce(s).isInputRadio()){const l=s;xt(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else if(ce(s).isInputCheckbox()){const l=s;xt(()=>{l.checked=Pr(this.getStateValue(c),l.value)}),l.addEventListener("change",u=>{const d=u.target,m=d.value;d.checked?Fh(this.getStateValue(c),m):Te(this.getStateValue(c),m)})}else if(ce(s).isSelect()){const l=s;xt(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else{const l=s;xt(()=>{l.value=this.getStateValue(c)});const u=d=>{this.setStateValue(c,d.target.value)};l.addEventListener("input",u)}else h==="v-text"?xt(()=>{s.innerText=this.getStateValue(c)}):h==="v-html"&&xt(()=>{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]&&xt(()=>{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){
|
|
38
38
|
let output = "";
|
|
39
39
|
function echo(html){
|
|
40
40
|
output += html;
|
|
41
41
|
}
|
|
42
42
|
${t}
|
|
43
43
|
return output;
|
|
44
|
-
})`}}class
|
|
45
|
-
`)):d.send(Object.entries(r).map(([y,w])=>`${encodeURIComponent(y)}=${encodeURIComponent(w)}`).join("&"));break}})}async function
|
|
44
|
+
})`}}class Nm{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:n}=t;console.log(`ws(${this.url}) closed : ${e} ${s} ${n}`)},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 n;t instanceof Blob||t instanceof ArrayBuffer||typeof t=="string"?n=t:n=JSON.stringify({...s,...t});const r=await new Promise((a,o)=>{s.resolve=a,this._send(n),setTimeout(()=>{o("Timeout!")},e)});return delete this.waitings[this.requestid],r}}function Ym(i){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let s=100;const n=function(){const r=Math.min(t.clientWidth,i);t.dataset.width=r,t.dataset.rem=s=Math.round(100*(r/i)),t.style.fontSize=s+"px"};n(),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",n,!1)}function Um(i,t=gr&&gr.src||new URL("zyzgroup_core_web.iife.js",document.baseURI).href){return new URL(i,t)}function wi(i=window.location.href){try{return new URL(i)}catch{const e="(?<protocol>https?:)",s="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",n="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",a="(?<hash>(?:#.*)?)",h=new RegExp(`^${e}//${s}${n}${r}${a}$`).exec(i);return{href:i,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 Xm(i){const t=wi(i);return t.protocol==="http:"||t.protocol==="https:"}function Ko(i=window.location.href){const t=wi(i),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Vm(i=wi().search){i=decodeURIComponent(i).replace(/^[#?&]/,"");const t={};if(!i)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let s=e.exec(i);for(;s;)t[s[1]]=s[2],s=e.exec(i);return t}const Gm=(i=window.location.href)=>JSON.parse('{"'+decodeURI(i.split("?")[1]).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');function xi(i){return"?"+Object.entries(i).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Qo(i){return"?"+[...i.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function th(i,t){return i.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function qm(i,t){return th(i,xi(t))}function ir(i,t){return i+t.replace(/^[&?]/,i.indexOf("?")>=0?"&":"?")}function jm(i,t){return ir(i,xi(t))}class Hm{worker;cbs={};constructor(t){if(Ia)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 n=Math.random().toString(36).slice(2),r=a=>{a.data.id===n&&(this.worker.removeEventListener("message",r),delete this.cbs[n],e(),s())};this.cbs[n]=r.bind(this,{data:{id:n}}),this.worker.addEventListener("message",r),this.worker.postMessage({...t,id:n})}else this.worker.postMessage(t),s()})}}class $m{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(n=>n(this.port1,s))}),this.port1.addEventListener("messageerror",s=>{this.port1MessageErrorCbs.forEach(n=>n(this.port1,s))}),this.port1.start(),this.port2.addEventListener("message",s=>{this.port2MessageCbs.forEach(n=>n(this.port2,s))}),this.port2.addEventListener("messageerror",s=>{this.port2MessageErrorCbs.forEach(n=>n(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){Te(this.port1MessageCbs,t)}offPort1MessageError(t){Te(this.port1MessageErrorCbs,t)}onPort2Message(t){this.port2MessageCbs.push(t)}onPort2MessageError(t){this.port2MessageErrorCbs.push(t)}offPort2Message(t){Te(this.port2MessageCbs,t)}offPort2MessageError(t){Te(this.port2MessageErrorCbs,t)}}function eh(){let i=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{i=new window.ActiveXObject(t[e]);break}catch{continue}}else i=new XMLHttpRequest;return i}function Wm(i,t){return new Promise((e,s)=>{const{method:n="GET",data:r={},multipartFormDataString:a="",boundary:o="",headers:h={},withCredentials:c=!1,responseType:l="json",timeout:u=3e4}=t||{},d=eh();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(`${i} 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 y=Math.round(S.loaded*100/S.total);t?.progress?.(S,d,y)}},!1),d.addEventListener("error",S=>t?.error?.(S,d),!1),d.addEventListener("abort",S=>t?.abort?.(S,d),!1);const m=n.toUpperCase();Object.assign(h,{Accept:"*/*"});let g=!1,v=!1,C=!1;function b(){c&&(d.withCredentials=!0);for(const S in h)mt(S).toLowerCase()=="content-type"&&h[S].toLowerCase()=="multipart/form-data"?(g=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+o)):(mt(S).toLowerCase()=="content-type"&&(h[S].toLowerCase().indexOf("text/plain")>=0?v=!0:h[S].toLowerCase().indexOf("application/json")>=0&&(C=!0)),d.setRequestHeader(S,h[S]))}switch(m){case"GET":let S="";r instanceof FormData?S=Qo(r):S=xi(r),d.open("GET",ir(i,S),!0),b(),d.send(null);break;default:d.open(m,i,!0),b(),g?d.sendAsBinary(a):C?d.send(JSON.stringify(r)):v?d.send(Object.entries(r).map(([y,w])=>`${y}=${w}`).join(`\r
|
|
45
|
+
`)):d.send(Object.entries(r).map(([y,w])=>`${encodeURIComponent(y)}=${encodeURIComponent(w)}`).join("&"));break}})}async function Jm(i){const t={url:i.action||"",data:{},contentType:i.method.toLowerCase()==="post"&&i.enctype?i.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],s=t.contentType=="multipart/form-data";for(let n=0;n<i.elements.length;n++){const r=i.elements[n];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 m=h.files?.[u];if(m){const g=await ns(m,Dt.binaryString);e.push('Content-Disposition: form-data; name="'+h.name+'"; filename="'+m.name+`"\r
|
|
46
46
|
Content-Type: `+m.type+`\r
|
|
47
47
|
\r
|
|
48
48
|
`+g+`\r
|
|
@@ -52,9 +52,9 @@ Content-Type: `+m.type+`\r
|
|
|
52
52
|
`):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
53
53
|
`+e.join("--"+t.boundary+`\r
|
|
54
54
|
`)+"--"+t.boundary+`--\r
|
|
55
|
-
`,t}class
|
|
55
|
+
`,t}class Zm{controller;ctx;shapes=[];currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e=!1){if(this.controller=t,!(this.controller.el instanceof HTMLCanvasElement))throw new Error("el 应该为 HTMLCanvasElement!");this.ctx=new ni(this.controller.el,this.controller.rect.width,this.controller.rect.height,e),we(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 s of this.shapes)if(this.currentMouseInShape==s){s.emit("clicked",s);let n=s.parent;for(;n;)n.emit("clicked",s),n=n.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"}transformCtxBaseOnShape(t){t.usePathDtoCanvasContext||(this.ctx.translate(t.x,t.y),this.ctx.rotate(Y(t.degree),t.cX,t.cY),this.ctx.scale(t.scalarX,t.scalarY,t.cX,t.cY))}_addDrawShape(t){this.shapes.push(t),t instanceof ht&&t.shapes.forEach(e=>{this._addDrawShape(e)})}draw(t=[]){this.shapes=[],(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)continue;if(this.ctx.save(),e.frameStart(this.controller.mousePoint),Km(this.ctx,e.getAttrs()),e.followMouse&&(!Ps(e.x,this.controller.mousePoint.x,5)||!Ps(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.frameUpdate(this.controller.mousePoint,this.ctx),this.transformCtxBaseOnShape(e),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill();const s=this.ctx.currentPath2D;if(!this.currentMouseInShape){const n=this.ctx.isPointInPath(s,this.controller.mousePoint.x,this.controller.mousePoint.y)||this.ctx.isPointInStroke(s,this.controller.mousePoint.x,this.controller.mousePoint.y)||!1;e.isMouseIn=n,n&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.controller.mousePoint),this.ctx.restore()}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}drawMouseMoveLine(t="line",e){switch(t){case"brush":const s=e?.brushSize??10,n=e?.brushDensity??50,r=e?.brushColor??"#000000",a=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),o=a.data,h=new it(r);we(this.controller,{move:c=>{for(let l=0;l<n;l++){const u=Math.random()*Math.PI*2,d=Math.random()*s,m=this.controller.mousePoint.x+Math.cos(u)*d|0,g=this.controller.mousePoint.y+Math.sin(u)*d|0,v=(m+g*a.width)*4;o[v]=h.r,o[v+1]=h.g,o[v+2]=h.b,o[v+3]=255}this.ctx.putImageData(a)}});break;case"line":default:we(this.controller,{start:()=>{this.ctx.beginPath(),this.ctx.moveTo(this.controller.mousePoint.x,this.controller.mousePoint.y)},end:()=>{this.ctx.closePath()},move:()=>{this.ctx.lineTo(this.controller.mousePoint.x,this.controller.mousePoint.y),this.ctx.stroke()}})}}}function Km(i,t){for(const e in t){const s=t[e];switch(e){case"fill":s!=="none"&&(i.fillStyle=s);break;case"stroke":s!=="none"&&(i.strokeStyle=s);break;case"stroke-width":case"strokeWidth":i.lineWidth=Number(s);break;case"stroke-linecap":case"strokeLinecap":i.lineCap=s;break;case"stroke-linejoin":case"strokeLinejoin":switch(s){case"round":case"bevel":case"miter":i.lineJoin=s;break;default:i.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":i.miterLimit=Number(s);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":i.lineDashOffset=Number(s);break;case"stroke-dasharray":case"strokeDasharray":typeof s=="string"&&i.setLineDash(s.split(/\s+/).map(n=>Number(n)));break;case"cursor":break;case"font":typeof s=="string"&&(i.font=s);break;case"font-size":case"fontSize":i.font+=` ${s}`;break;case"font-family":case"fontFamily":i.font+=` ${s}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(s){case"middle":i.textAlign="center";break;case"end":i.textAlign="end";break;case"start":i.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(s){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":i.textBaseline=s;break;default:i.textBaseline="alphabetic";break}break}}}class Qm{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new xs(t),this.remoteVideoUtil=new xs(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 n=void 0,r=new RTCPeerConnection(n);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(n);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 n=new RTCIceCandidate(s),r=this.getOtherPeer(e);r&&(r.addIceCandidate(n).then(()=>{this.handleConnectionSuccess(e)}).catch(a=>{this.handleConnectionFailure(e,a)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
56
56
|
${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:
|
|
57
57
|
${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:
|
|
58
58
|
${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:
|
|
59
|
-
${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 eg{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 sh=[],ih={};function nr(i){sh.push(i)}function sg(i,t=!1){const e=Ko();if(ih[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{sh.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})),ih[e]=!0}function ig(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 ng(i){nr(function(){wx.updateAppMessageShareData(i)})}function rg(i){nr(function(){wx.updateTimelineShareData(i)})}function ag(i){wx.chooseImage(i)}function og(i){wx.previewImage(i)}function hg(i){wx.uploadImage(i)}function cg(i){wx.downloadImage(i)}function lg(i){wx.getLocalImgData(i)}function ug(){wx.startRecord()}function fg(i){wx.stopRecord(i)}function dg(i){wx.onVoiceRecordEnd(i)}function mg(i){wx.playVoice(i)}function gg(i){wx.pauseVoice(i)}function pg(i){wx.stopVoice(i)}function yg(i){wx.onVoicePlayEnd(i)}function wg(i){wx.uploadVoice(i)}function xg(i){wx.downloadVoice(i)}function bg(i){wx.translateVoice(i)}function Sg(i){wx.getNetworkType(i)}function vg(i){wx.openLocation(i)}function Cg(i){wx.getLocation(i)}function Tg(i){wx.scanQRCode(i)}function _g(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 Pg(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 Mg(i){window.AlipayJSBridge?i&&i():document.addEventListener("AlipayJSBridgeReady",i,!1)}function Ss(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 Eg(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 Ag(i,t,e){ap.scan(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(s){t?.(s.code)})}function kg(i,t,e){ap.getLocation(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(s){t?.(s)})}function Ig(i,t,e){ap.openLocation(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(){t?.()})}function Dg(i,t,e){ap.chooseImage(Object.assign(i,{fail:s=>{e?.(Ss(s,"chooseImage"))}}),function(s){t?.(s)})}function Rg(i,t,e){ap.previewImage(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(){t?.()})}class Lg{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 zg{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 Fe("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?Fe("span",{class:`current ${r}`},n):Fe("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(Fe("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(Fe("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"}),yi(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=Xd,f.BezierEasing=dn,f.BufferAttribute=Jt,f.CSSToJSEasing=Yu,f.Clock=pn,f.Color=it,f.ColorManagement=Un,f.CommonKeyCode=um,f.Confetti=rm,f.Cross=$d,f.CustomCanvasContext=hs,f.CustomCanvasGradient=ii,f.CustomCanvasPattern=xn,f.DOMParse=Lo,f.DOMSVGUtil=ke,f.DOMToBlob=Sa,f.DOMToString=en,f.DOMVideo=xs,f.Easing=z,f.Ellipse=Yo,f.FetchWithAxios=tn,f.FetchWithAxiosRequestCancel=ba,f.FileUpload=Xl,f.Float16BufferAttribute=Od,f.Float32BufferAttribute=Fd,f.Fox=Vd,f.HalfRing=Hn,f.HalfRingIndicator=tm,f.Heart=Gd,f.HeartVariant=qd,f.Int16BufferAttribute=Dd,f.Int32BufferAttribute=Ld,f.Int8BufferAttribute=Ad,f.Interpolation=se,f.Line=Oe,f.LinePicture=Ud,f.LineQuadraticBezier=Nd,f.LinearSRGBColorSpace=Nn,f.LinearToSRGB=Le,f.LinearTransfer=Yn,f.Ls=Se,f.MVVM=Nm,f.Matrix=vt,f.Matrix2=Pn,f.Matrix3=je,f.Matrix4=St,f.NoColorSpace=Eo,f.Pagination=zg,f.Point=oe,f.Point3D=fs,f.Point3Ds=nm,f.Points=No,f.QRCode=be,f.Rabbit=Hd,f.Rect=he,f.Ring=$n,f.RingIndicator=em,f.SRGBColorSpace=ze,f.SRGBToLinear=Re,f.SRGBTransfer=di,f.SVGParse=Bo,f.SVGParsedPathArgsLength=us,f.Sector=Jd,f.SectorArc=Xo,f.Segment=Qd,f.Shape=j,f.ShapeCombo=Wn,f.ShapeGroup=ht,f.Ship=Zd,f.Slider=Kd,f.Star=jd,f.TWEEN=$u,f.Text=bs,f.Timeline=Zs,f.Tip=Uo,f.Tree=Wd,f.Tween=gn,f.Uint16BufferAttribute=Rd,f.Uint32BufferAttribute=zd,f.Uint8BufferAttribute=kd,f.Uint8ClampedBufferAttribute=Id,f.Vector2=ds,f.Vector3=Mt,f.Vector4=Cn,f.WebGLCoordinateSystem=ms,f.WebGLRenderer=eg,f.WebGPUCoordinateSystem=_n,f.WebRTCClient=tg,f.WebSocketClient=Ym,f.YZCanvas=Km,f.YZCanvasContext=ni,f.YZMessageChannel=Wm,f.YZSVG=Yd,f.YZWorker=$m,f.__color=Vt,f.addClass=Tm,f.addWatermark=Cd,f.addWxJsReadyFnBeforeConfig=nr,f.ajax=Jm,f.aliJsChooseImage=Dg,f.aliJsGetLocation=kg,f.aliJsOpenLocation=Ig,f.aliJsPreviewImage=Rg,f.aliJsReady=Mg,f.aliJsScan=Ag,f.aliJsTradePay=Eg,f.angle=ge,f.appendURL=ir,f.appendURLRecord=Hm,f.atomReadAttribute=eo,f.atomReadAttributes=Rn,f.atomReadStyle=lf,f.atomReadStyles=In,f.atomRemoveAttribute=df,f.atomRemoveDataset=Cm,f.atomRemoveStyle=Dn,f.atomWriteAttribute=$e,f.atomWriteStyle=oi,f.base64EncodeOutputStream=vo,f.bitmapMapper=Vo,f.blobToImageData=Wf,f.byteArrayOutputStream=Bn,f.canDrawBitmap=Da,f.canUsePaths=vu,f.canUseWorker=Ia,f.cancelBubble=_a,f.cancelFetch=wm,f.changeBrightness=Sd,f.changeDiaphaneity=vd,f.changeSize=bd,f.checkWxJsApi=ig,f.clearCookies=Gl,f.clearLocalStorage=ql,f.closeLog=Kh,f.combineTransformToMatrix=uf,f.compareVersion=ou,f.computeImageDisplayRect=qf,f.createElement=Em,f.createElementNS=Am,f.createFragment=Wo,f.createIndexDB=$l,f.createObjectURL=Go,f.createRunCycleInMaxRate=Mu,f.createTextNode=km,f.createXMLHttpRequest=eh,f.distance=ti,f.distance2=ei,f.domPrefixes=ff,f.drawBitmapInCanvas=om,f.drawQRCodeToCanvas=Ed,f.easeNameToCubicBezier=mn,f.flipSideToSide=Zf,f.flipUpsideDown=Kf,f.flushURL=th,f.flushURLRecord=jm,f.formDataToSearch=Qo,f.getBitmapFromCanvas=am,f.getBodyPosition=yf,f.getBrowserClient=nn,f.getBrowserClientVersion=hu,f.getBrowserLanguage=cu,f.getCSSVar=ho,f.getDOMMatrix=An,f.getDirection=Zu,f.getDocumentElementPosition=gs,f.getElementPositionInPage=Ln,f.getElementPositionInPage2=xf,f.getElementPositionInViewport=io,f.getFetchId=tr,f.getFileExtension=Yl,f.getFileMD5Hash=Ca,f.getFileTypeFromFile=Nl,f.getFormSubmitData=Zm,f.getImageData=xo,f.getImageDataByAIData=_d,f.getImageMainColor=Jf,f.getInternetExplorerVersion=Ma,f.getKeyCode=fm,f.getMIME=Ul,f.getMouseButton=ru,f.getMousePositionInElement=We,f.getMousePositionInPage=zn,f.getMousePositionInViewport=vf,f.getOperatingSystem=js,f.getOperatingSystemVersion=au,f.getPageSize=wf,f.getParameters=qm,f.getPath=Xm,f.getRelativeBoundingClientRect=bf,f.getScreenPosition=pf,f.getStyle=Ie,f.getTheme=Df,f.getTimeZone=lu,f.getURL=wi,f.getVerticalScrollPercentInPage=Sf,f.getViewportSize=so,f.getVnode=yn,f.gifImage=Co,f.h=Fe,f.hFromEl=pi,f.hasClass=Pm,f.hasDocument=xu,f.hasHistory=bu,f.hasWindow=ka,f.hideEl=$o,f.iframePostMessage=Dm,f.imageDataToBitmap=jf,f.imageDataToBlob=$f,f.imageDataToDataURL=Hf,f.immediateVnode=Wu,f.injectStyle=to,f.injectWxJsConfig=sg,f.isAliBrowser=Aa,f.isAliMiniProgram=wu,f.isAndroid=Pa,f.isAppleDevice=uu,f.isBrowserSupportFileAPI=Su,f.isElement=Cu,f.isEventSupported=nu,f.isIE=du,f.isIE10=gu,f.isIE11=pu,f.isIE9=mu,f.isIOS=rn,f.isMacOS=an,f.isMobile=fu,f.isNative=Hs,f.isTouchSupport=_u,f.isURL=Vm,f.isWxBrowser=Ea,f.isWxMiniProgram=yu,f.jpgToPng=pd,f.leftRotate=Qf,f.length=Qs,f.mapTDTJSSDK=Lg,f.marginSharpen=gd,f.microTask=Iu,f.mosaic=Td,f.mount=Ze,f.nextTick=ku,f.normalizePoint=Ju,f.objectSignature=xa,f.onBeforeUnload=lo,f.onDocumentReady=co,f.openLog=Zh,f.outputGifBase64=To,f.outputQRCodeBase64=Md,f.parseCSS=Fo,f.parseTransformToMatrix=En,f.patch=yi,f.pngToJpg=yd,f.polar=Lt,f.prefixes=Tu,f.preventDefault=de,f.radiusClip=xd,f.readFileInBrowser=ns,f.recordToSearch=xi,f.rectClip=wd,f.removeClass=_m,f.requestAnimationFrameCycle=on,f.reverseCSSToJSEasing=Uu,f.reverseEaseNameToCubicBezier=Ya,f.reverseEasing=za,f.revokeObjectURL=hm,f.rightRotate=td,f.rotatePoint=Xt,f.scheduleIdle=Ra,f.scheduleVnode=wn,f.scheduleYZIdle=un,f.scrollTo=Yf,f.searchToRecord=Gm,f.selectFileInBrowser=sn,f.setCSSVar=Lf,f.setIntervalAccurate=Pu,f.setLogUpload=Qh,f.setManualScroll=Uf,f.setRem=Um,f.setStyle=kn,f.setTheme=If,f.setTimeoutAccurate=hn,f.setWindowTitle=Of,f.sharpen=md,f.showEl=Ho,f.signature=wa,f.simulateMouseEventFromTouch=iu,f.stringToDOM=Bl,f.toBlackAndWhite=id,f.toBlue=od,f.toBlueAndGreen=ld,f.toBlueAndGrey=dd,f.toDegree=ft,f.toGreen=ad,f.toGreenAndGrey=fd,f.toGrey=ed,f.toGrey2=sd,f.toOpposite=nd,f.toRadian=Y,f.toRed=rd,f.toRedAndBlue=cd,f.toRedAndGreen=hd,f.toRedAndGrey=ud,f.toggleClass=er,f.toggleElDisplay=Mm,f.toggleTheme=Rf,f.transformPath2D=cf,f.trimHash=Ko,f.useAttribute=ye,f.useClickA=Kn,f.useClipboard=Rm,f.useCookie=Vl,f.useDataset=vm,f.useDraggable=mf,f.useDrop=gf,f.useElement=ce,f.useElementEventBus=Ef,f.useEventListener=B,f.useFeRouteChange=mo,f.useFetch=mi,f.useFetchCache=bm,f.useFetchRetry=xm,f.useFetchRetryCache=Sm,f.useFireEvent=su,f.useHistoryRouter=Ff,f.useHotKey=Zn,f.useHotKeyFileLoop=mm,f.useHotKeyFileOnce=dm,f.useIntersection=wo,f.useLoadImage=jo,f.useLoadLink=pm,f.useLoadScript=gm,f.useLocalStorage=Ta,f.useLocale=sr,f.useLocation=Lm,f.useMedia=oo,f.useMousePoint=no,f.useMutation=uo,f.usePressDownMove=we,f.usePressDownMoveWithMouse=Pf,f.usePressDownMoveWithPointer=ao,f.usePressDownMoveWithTouch=Mf,f.usePullDown=Af,f.usePullUp=kf,f.useResize=On,f.useRunInSandbox=Om,f.useSafeArea=Nf,f.useScroll=yo,f.useSelectFile=Jn,f.useSelectFileImage=cm,f.useSessionStorage=jl,f.useShadowRoot=Im,f.useVibrate=zm,f.useVisible=Vf,f.useVisibleSimple=Xf,f.useWindow=zf,f.useWindowResize=_f,f.useWindowVisible=Gf,f.waitForStyleSheetsLoaded=ym,f.writeToIndexDB=Wl,f.wxJsChooseImage=ag,f.wxJsDownloadImage=cg,f.wxJsDownloadVoice=xg,f.wxJsGetLocalImgData=lg,f.wxJsGetLocation=Cg,f.wxJsGetNetworkType=Sg,f.wxJsLogin=Pg,f.wxJsOnVoicePlayEnd=yg,f.wxJsOnVoiceRecordEnd=dg,f.wxJsOpenLocation=vg,f.wxJsPauseVoice=gg,f.wxJsPay=_g,f.wxJsPlayVoice=mg,f.wxJsPreviewImage=og,f.wxJsScanQRCode=Tg,f.wxJsStartRecord=ug,f.wxJsStopRecord=fg,f.wxJsStopVoice=pg,f.wxJsTranslateVoice=bg,f.wxJsUpdateAppMessageShareData=ng,f.wxJsUpdateTimelineShareData=rg,f.wxJsUploadImage=hg,f.wxJsUploadVoice=wg,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),f}({});
|
|
59
|
+
${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 tg{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 sh=[],ih={};function nr(i){sh.push(i)}function eg(i,t=!1){const e=Ko();if(ih[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{sh.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})),ih[e]=!0}function sg(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 ig(i){nr(function(){wx.updateAppMessageShareData(i)})}function ng(i){nr(function(){wx.updateTimelineShareData(i)})}function rg(i){wx.chooseImage(i)}function ag(i){wx.previewImage(i)}function og(i){wx.uploadImage(i)}function hg(i){wx.downloadImage(i)}function cg(i){wx.getLocalImgData(i)}function lg(){wx.startRecord()}function ug(i){wx.stopRecord(i)}function fg(i){wx.onVoiceRecordEnd(i)}function dg(i){wx.playVoice(i)}function mg(i){wx.pauseVoice(i)}function gg(i){wx.stopVoice(i)}function pg(i){wx.onVoicePlayEnd(i)}function yg(i){wx.uploadVoice(i)}function wg(i){wx.downloadVoice(i)}function xg(i){wx.translateVoice(i)}function bg(i){wx.getNetworkType(i)}function Sg(i){wx.openLocation(i)}function vg(i){wx.getLocation(i)}function Cg(i){wx.scanQRCode(i)}function Tg(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 _g(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 Pg(i){window.AlipayJSBridge?i&&i():document.addEventListener("AlipayJSBridgeReady",i,!1)}function Ss(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 Mg(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 Eg(i,t,e){ap.scan(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(s){t?.(s.code)})}function Ag(i,t,e){ap.getLocation(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(s){t?.(s)})}function kg(i,t,e){ap.openLocation(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(){t?.()})}function Ig(i,t,e){ap.chooseImage(Object.assign(i,{fail:s=>{e?.(Ss(s,"chooseImage"))}}),function(s){t?.(s)})}function Dg(i,t,e){ap.previewImage(Object.assign(i,{fail:s=>{e?.(Ss(s))}}),function(){t?.()})}class Rg{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 Lg{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 Fe("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?Fe("span",{class:`current ${r}`},n):Fe("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(Fe("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(Fe("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"}),yi(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=Ud,f.BezierEasing=dn,f.BufferAttribute=Jt,f.CSSToJSEasing=Nu,f.Clock=pn,f.Color=it,f.ColorManagement=Un,f.CommonKeyCode=lm,f.Confetti=nm,f.Cross=Hd,f.CustomCanvasContext=hs,f.CustomCanvasGradient=ii,f.CustomCanvasPattern=xn,f.DOMParse=Lo,f.DOMSVGUtil=ke,f.DOMToBlob=Sa,f.DOMToString=en,f.DOMVideo=xs,f.Easing=z,f.Ellipse=Yo,f.FetchWithAxios=tn,f.FetchWithAxiosRequestCancel=ba,f.FileUpload=Ul,f.Float16BufferAttribute=zd,f.Float32BufferAttribute=Od,f.Fox=Xd,f.HalfRing=Hn,f.HalfRingIndicator=Qd,f.Heart=Vd,f.HeartVariant=Gd,f.Int16BufferAttribute=Id,f.Int32BufferAttribute=Rd,f.Int8BufferAttribute=Ed,f.Interpolation=se,f.Line=Oe,f.LinePicture=Yd,f.LineQuadraticBezier=Bd,f.LinearSRGBColorSpace=Nn,f.LinearToSRGB=Le,f.LinearTransfer=Yn,f.Ls=Se,f.MVVM=Bm,f.Matrix=vt,f.Matrix2=Pn,f.Matrix3=je,f.Matrix4=St,f.NoColorSpace=Eo,f.Pagination=Lg,f.Point=oe,f.Point3D=fs,f.Point3Ds=im,f.Points=No,f.QRCode=be,f.Rabbit=jd,f.Rect=he,f.Ring=$n,f.RingIndicator=tm,f.SRGBColorSpace=ze,f.SRGBToLinear=Re,f.SRGBTransfer=di,f.SVGParse=Bo,f.SVGParsedPathArgsLength=us,f.Sector=Wd,f.SectorArc=Xo,f.Segment=Kd,f.Shape=j,f.ShapeCombo=Wn,f.ShapeGroup=ht,f.Ship=Jd,f.Slider=Zd,f.Star=qd,f.TWEEN=Hu,f.Text=bs,f.Timeline=Zs,f.Tip=Uo,f.Tree=$d,f.Tween=gn,f.Uint16BufferAttribute=Dd,f.Uint32BufferAttribute=Ld,f.Uint8BufferAttribute=Ad,f.Uint8ClampedBufferAttribute=kd,f.Vector2=ds,f.Vector3=Mt,f.Vector4=Cn,f.WebGLCoordinateSystem=ms,f.WebGLRenderer=tg,f.WebGPUCoordinateSystem=_n,f.WebRTCClient=Qm,f.WebSocketClient=Nm,f.YZCanvas=Zm,f.YZCanvasContext=ni,f.YZMessageChannel=$m,f.YZSVG=Nd,f.YZWorker=Hm,f.__color=Vt,f.addClass=Cm,f.addWatermark=vd,f.addWxJsReadyFnBeforeConfig=nr,f.ajax=Wm,f.aliJsChooseImage=Ig,f.aliJsGetLocation=Ag,f.aliJsOpenLocation=kg,f.aliJsPreviewImage=Dg,f.aliJsReady=Pg,f.aliJsScan=Eg,f.aliJsTradePay=Mg,f.angle=ge,f.appendURL=ir,f.appendURLRecord=jm,f.atomReadAttribute=eo,f.atomReadAttributes=Rn,f.atomReadStyle=cf,f.atomReadStyles=In,f.atomRemoveAttribute=ff,f.atomRemoveDataset=vm,f.atomRemoveStyle=Dn,f.atomWriteAttribute=$e,f.atomWriteStyle=oi,f.base64EncodeOutputStream=vo,f.bitmapMapper=Vo,f.blobToImageData=$f,f.byteArrayOutputStream=Bn,f.canDrawBitmap=Da,f.canUsePaths=Su,f.canUseWorker=Ia,f.cancelBubble=_a,f.cancelFetch=ym,f.changeBrightness=bd,f.changeDiaphaneity=Sd,f.changeSize=xd,f.checkWxJsApi=sg,f.clearCookies=Vl,f.clearLocalStorage=Gl,f.closeLog=Zh,f.combineTransformToMatrix=lf,f.compareVersion=au,f.computeImageDisplayRect=Gf,f.createElement=Mm,f.createElementNS=Em,f.createFragment=Wo,f.createIndexDB=Hl,f.createObjectURL=Go,f.createRunCycleInMaxRate=Pu,f.createTextNode=Am,f.createXMLHttpRequest=eh,f.distance=ti,f.distance2=ei,f.domPrefixes=uf,f.drawBitmapInCanvas=am,f.drawQRCodeToCanvas=Md,f.easeNameToCubicBezier=mn,f.flipSideToSide=Jf,f.flipUpsideDown=Zf,f.flushURL=th,f.flushURLRecord=qm,f.formDataToSearch=Qo,f.getBitmapFromCanvas=rm,f.getBodyPosition=pf,f.getBrowserClient=nn,f.getBrowserClientVersion=ou,f.getBrowserLanguage=hu,f.getCSSVar=ho,f.getDOMMatrix=An,f.getDirection=Ju,f.getDocumentElementPosition=gs,f.getElementPositionInPage=Ln,f.getElementPositionInPage2=wf,f.getElementPositionInViewport=io,f.getFetchId=tr,f.getFileExtension=Nl,f.getFileMD5Hash=Ca,f.getFileTypeFromFile=Bl,f.getFormSubmitData=Jm,f.getImageData=xo,f.getImageDataByAIData=Td,f.getImageMainColor=Wf,f.getInternetExplorerVersion=Ma,f.getKeyCode=um,f.getMIME=Yl,f.getMouseButton=nu,f.getMousePositionInElement=We,f.getMousePositionInPage=zn,f.getMousePositionInViewport=Sf,f.getOperatingSystem=js,f.getOperatingSystemVersion=ru,f.getPageSize=yf,f.getParameters=Gm,f.getPath=Um,f.getRelativeBoundingClientRect=xf,f.getScreenPosition=gf,f.getStyle=Ie,f.getTheme=If,f.getTimeZone=cu,f.getURL=wi,f.getVerticalScrollPercentInPage=bf,f.getViewportSize=so,f.getVnode=yn,f.gifImage=Co,f.h=Fe,f.hFromEl=pi,f.hasClass=_m,f.hasDocument=wu,f.hasHistory=xu,f.hasWindow=ka,f.hideEl=$o,f.iframePostMessage=Im,f.imageDataToBitmap=qf,f.imageDataToBlob=Hf,f.imageDataToDataURL=jf,f.immediateVnode=$u,f.injectStyle=to,f.injectWxJsConfig=eg,f.isAliBrowser=Aa,f.isAliMiniProgram=yu,f.isAndroid=Pa,f.isAppleDevice=lu,f.isBrowserSupportFileAPI=bu,f.isElement=vu,f.isEventSupported=iu,f.isIE=fu,f.isIE10=mu,f.isIE11=gu,f.isIE9=du,f.isIOS=rn,f.isMacOS=an,f.isMobile=uu,f.isNative=Hs,f.isTouchSupport=Tu,f.isURL=Xm,f.isWxBrowser=Ea,f.isWxMiniProgram=pu,f.jpgToPng=gd,f.leftRotate=Kf,f.length=Qs,f.mapTDTJSSDK=Rg,f.marginSharpen=md,f.microTask=ku,f.mosaic=Cd,f.mount=Ze,f.nextTick=Au,f.normalizePoint=Wu,f.objectSignature=xa,f.onBeforeUnload=lo,f.onDocumentReady=co,f.openLog=Jh,f.outputGifBase64=To,f.outputQRCodeBase64=Pd,f.parseCSS=Fo,f.parseTransformToMatrix=En,f.patch=yi,f.pngToJpg=pd,f.polar=Lt,f.prefixes=Cu,f.preventDefault=de,f.radiusClip=wd,f.readFileInBrowser=ns,f.recordToSearch=xi,f.rectClip=yd,f.removeClass=Tm,f.requestAnimationFrameCycle=on,f.reverseCSSToJSEasing=Yu,f.reverseEaseNameToCubicBezier=Ya,f.reverseEasing=za,f.revokeObjectURL=om,f.rightRotate=Qf,f.rotatePoint=Xt,f.scheduleIdle=Ra,f.scheduleVnode=wn,f.scheduleYZIdle=un,f.scrollTo=Nf,f.searchToRecord=Vm,f.selectFileInBrowser=sn,f.setCSSVar=Rf,f.setIntervalAccurate=_u,f.setLogUpload=Kh,f.setManualScroll=Yf,f.setRem=Ym,f.setStyle=kn,f.setTheme=kf,f.setTimeoutAccurate=hn,f.setWindowTitle=zf,f.sharpen=dd,f.showEl=Ho,f.signature=wa,f.simulateMouseEventFromTouch=su,f.stringToDOM=Fl,f.toBlackAndWhite=sd,f.toBlue=ad,f.toBlueAndGreen=cd,f.toBlueAndGrey=fd,f.toDegree=ft,f.toGreen=rd,f.toGreenAndGrey=ud,f.toGrey=td,f.toGrey2=ed,f.toOpposite=id,f.toRadian=Y,f.toRed=nd,f.toRedAndBlue=hd,f.toRedAndGreen=od,f.toRedAndGrey=ld,f.toggleClass=er,f.toggleElDisplay=Pm,f.toggleTheme=Df,f.transformPath2D=hf,f.trimHash=Ko,f.useAttribute=ye,f.useClickA=Kn,f.useClipboard=Dm,f.useCookie=Xl,f.useDataset=Sm,f.useDraggable=df,f.useDrop=mf,f.useElement=ce,f.useElementEventBus=Mf,f.useEventListener=B,f.useFeRouteChange=mo,f.useFetch=mi,f.useFetchCache=xm,f.useFetchRetry=wm,f.useFetchRetryCache=bm,f.useFireEvent=eu,f.useHistoryRouter=Of,f.useHotKey=Zn,f.useHotKeyFileLoop=dm,f.useHotKeyFileOnce=fm,f.useIntersection=wo,f.useLoadImage=jo,f.useLoadLink=gm,f.useLoadScript=mm,f.useLocalStorage=Ta,f.useLocale=sr,f.useLocation=Rm,f.useMedia=oo,f.useMousePoint=no,f.useMutation=uo,f.usePressDownMove=we,f.usePressDownMoveWithMouse=_f,f.usePressDownMoveWithPointer=ao,f.usePressDownMoveWithTouch=Pf,f.usePullDown=Ef,f.usePullUp=Af,f.useResize=On,f.useRunInSandbox=zm,f.useSafeArea=Bf,f.useScroll=yo,f.useSelectFile=Jn,f.useSelectFileImage=hm,f.useSessionStorage=ql,f.useShadowRoot=km,f.useVibrate=Lm,f.useVisible=Xf,f.useVisibleSimple=Uf,f.useWindow=Lf,f.useWindowResize=Tf,f.useWindowVisible=Vf,f.waitForStyleSheetsLoaded=pm,f.writeToIndexDB=$l,f.wxJsChooseImage=rg,f.wxJsDownloadImage=hg,f.wxJsDownloadVoice=wg,f.wxJsGetLocalImgData=cg,f.wxJsGetLocation=vg,f.wxJsGetNetworkType=bg,f.wxJsLogin=_g,f.wxJsOnVoicePlayEnd=pg,f.wxJsOnVoiceRecordEnd=fg,f.wxJsOpenLocation=Sg,f.wxJsPauseVoice=mg,f.wxJsPay=Tg,f.wxJsPlayVoice=dg,f.wxJsPreviewImage=ag,f.wxJsScanQRCode=Cg,f.wxJsStartRecord=lg,f.wxJsStopRecord=ug,f.wxJsStopVoice=gg,f.wxJsTranslateVoice=xg,f.wxJsUpdateAppMessageShareData=ig,f.wxJsUpdateTimelineShareData=ng,f.wxJsUploadImage=og,f.wxJsUploadVoice=yg,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),f}({});
|
|
60
60
|
//# sourceMappingURL=zyzgroup_core_web.iife.js.map
|