@zyzgroup/core-web 0.0.10 → 0.0.11
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 +1 -1
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +15 -0
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +1 -1
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/tween/Easing.d.ts +3 -0
- package/types/tween/Easing.d.ts.map +1 -1
- package/types/tween/index.d.ts +3 -0
- package/types/tween/index.d.ts.map +1 -1
|
@@ -14,5 +14,5 @@ var ZYZGroupCoreWeb=function(w){"use strict";class Pe extends Error{cause;constr
|
|
|
14
14
|
`+s.map(ro).join(`
|
|
15
15
|
`):" "+ro(s[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:fi};function ui(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xe(null,t)}function oo(t){return ui(t),t.headers=ct.from(t.headers),t.data=hi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),so.getAdapter(t.adapter||li.adapter)(t).then(function(e){return ui(t),e.data=hi.call(t,t.transformResponse,e),e.headers=ct.from(e.headers),e},function(e){return eo(e)||(ui(t),e&&e.response&&(e.response.data=hi.call(t,t.transformResponse,e.response),e.response.headers=ct.from(e.response.headers))),Promise.reject(e)})}const ao=t=>t instanceof ct?t.toJSON():t;function Yt(t,e){e=e||{};const n={};function i(l,f,u){return k.isPlainObject(l)&&k.isPlainObject(f)?k.merge.call({caseless:u},l,f):k.isPlainObject(f)?k.merge({},f):k.isArray(f)?f.slice():f}function r(l,f,u){if(k.isUndefined(f)){if(!k.isUndefined(l))return i(void 0,l,u)}else return i(l,f,u)}function s(l,f){if(!k.isUndefined(f))return i(void 0,f)}function o(l,f){if(k.isUndefined(f)){if(!k.isUndefined(l))return i(void 0,l)}else return i(void 0,f)}function a(l,f,u){if(u in e)return i(l,f);if(u in t)return i(void 0,l)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f)=>r(ao(l),ao(f),!0)};return k.forEach(Object.keys(Object.assign({},t,e)),function(l){const f=c[l]||r,u=f(t[l],e[l],l);k.isUndefined(u)&&f!==a||(n[l]=u)}),n}const lo="1.5.1",di={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{di[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const co={};di.transitional=function(t,e,n){function i(r,s){return"[Axios v"+lo+"] Transitional option '"+r+"'"+s+(n?". "+n:"")}return(r,s,o)=>{if(t===!1)throw new L(i(s," has been removed"+(e?" in "+e:"")),L.ERR_DEPRECATED);return e&&!co[s]&&(co[s]=!0,console.warn(i(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,s,o):!0}};function nd(t,e,n){if(typeof t!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new L("option "+s+" must be "+c,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+s,L.ERR_BAD_OPTION)}}const _i={assertOptions:nd,validators:di},vt=_i.validators;class sn{constructor(e){this.defaults=e,this.interceptors={request:new Ks,response:new Ks}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Yt(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&_i.assertOptions(i,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),r!=null&&(k.isFunction(r)?n.paramsSerializer={serialize:r}:_i.assertOptions(r,{encode:vt.function,serialize:vt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&k.merge(s.common,s[n.method]);s&&k.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),n.headers=ct.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});const l=[];this.interceptors.response.forEach(function(_){l.push(_.fulfilled,_.rejected)});let f,u=0,d;if(!c){const _=[oo.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,l),d=_.length,f=Promise.resolve(n);u<d;)f=f.then(_[u++],_[u++]);return f}d=a.length;let h=n;for(u=0;u<d;){const _=a[u++],p=a[u++];try{h=_(h)}catch(g){p.call(this,g);break}}try{f=oo.call(this,h)}catch(_){return Promise.reject(_)}for(u=0,d=l.length;u<d;)f=f.then(l[u++],l[u++]);return f}getUri(e){e=Yt(this.defaults,e);const n=no(e.baseURL,e.url);return Ws(n,e.params,e.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(t){sn.prototype[t]=function(e,n){return this.request(Yt(n||{},{method:t,url:e,data:(n||{}).data}))}}),k.forEach(["post","put","patch"],function(t){function e(n){return function(i,r,s){return this.request(Yt(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}sn.prototype[t]=e(),sn.prototype[t+"Form"]=e(!0)});const on=sn;class gi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const o=new Promise(a=>{i.subscribe(a),s=a}).then(r);return o.cancel=function(){i.unsubscribe(s)},o},e(function(r,s,o){i.reason||(i.reason=new xe(r,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new gi(function(n){e=n}),cancel:e}}}const id=gi;function rd(t){return function(e){return t.apply(null,e)}}function sd(t){return k.isObject(t)&&t.isAxiosError===!0}const pi={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(pi).forEach(([t,e])=>{pi[e]=t});const od=pi;function ho(t){const e=new on(t),n=Ls(on.prototype.request,e);return k.extend(n,on.prototype,e,{allOwnKeys:!0}),k.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return ho(Yt(t,i))},n}const N=ho(li);N.Axios=on,N.CanceledError=xe,N.CancelToken=id,N.isCancel=eo,N.VERSION=lo,N.toFormData=en,N.AxiosError=L,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=rd,N.isAxiosError=sd,N.mergeConfig=Yt,N.AxiosHeaders=ct,N.formToJSON=t=>Qs(k.isHTMLForm(t)?new FormData(t):t),N.getAdapter=so.getAdapter,N.HttpStatusCode=od,N.default=N;var mi=function(t,e){return mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},mi(t,e)};function bt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mi(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function wi(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ee(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,s=[],o;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Se(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}function ht(t){return typeof t=="function"}function yi(t){var e=function(i){Error.call(i),i.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var vi=yi(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
16
16
|
`+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
17
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function an(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var ke=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,i,r,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=wi(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(p){e={error:p}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else o.remove(this);var f=this.initialTeardown;if(ht(f))try{f()}catch(p){s=p instanceof vi?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=wi(u),h=d.next();!h.done;h=d.next()){var _=h.value;try{_o(_)}catch(p){s=s??[],p instanceof vi?s=Se(Se([],Ee(s)),Ee(p.errors)):s.push(p)}}}catch(p){i={error:p}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}}if(s)throw new vi(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)_o(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&an(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&an(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),fo=ke.EMPTY;function uo(t){return t instanceof ke||t&&"closed"in t&&ht(t.remove)&&ht(t.add)&&ht(t.unsubscribe)}function _o(t){ht(t)?t():t.unsubscribe()}var go={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ad={setTimeout:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,Se([t,e],Ee(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function ld(t){ad.setTimeout(function(){throw t})}function po(){}function ln(t){t()}var bi=function(t){bt(e,t);function e(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,uo(n)&&n.add(i)):i.destination=ud,i}return e.create=function(n,i,r){return new Ei(n,i,r)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(ke),cd=Function.prototype.bind;function xi(t,e){return cd.call(t,e)}var hd=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(i){cn(i)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(i){cn(i)}else cn(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){cn(n)}},t}(),Ei=function(t){bt(e,t);function e(n,i,r){var s=t.call(this)||this,o;if(ht(n)||!n)o={next:n??void 0,error:i??void 0,complete:r??void 0};else{var a;s&&go.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return s.unsubscribe()},o={next:n.next&&xi(n.next,a),error:n.error&&xi(n.error,a),complete:n.complete&&xi(n.complete,a)}):o=n}return s.destination=new hd(o),s}return e}(bi);function cn(t){ld(t)}function fd(t){throw t}var ud={closed:!0,next:po,error:fd,complete:po},dd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _d(t){return t}function gd(t){return t.length===0?_d:t.length===1?t[0]:function(e){return t.reduce(function(n,i){return i(n)},e)}}var mo=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,i){var r=this,s=md(e)?e:new Ei(e,n,i);return ln(function(){var o=r,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?r._subscribe(s):r._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var i=this;return n=wo(n),new n(function(r,s){var o=new Ei({next:function(a){try{e(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:r});i.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[dd]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return gd(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=wo(e),new e(function(i,r){var s;n.subscribe(function(o){return s=o},function(o){return r(o)},function(){return i(s)})})},t.create=function(e){return new t(e)},t}();function wo(t){var e;return(e=t??go.Promise)!==null&&e!==void 0?e:Promise}function pd(t){return t&&ht(t.next)&&ht(t.error)&&ht(t.complete)}function md(t){return t&&t instanceof bi||pd(t)&&uo(t)}(function(t){bt(e,t);function e(n,i,r,s,o,a){var c=t.call(this,n)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(l){try{i(l)}catch(f){n.error(f)}}:t.prototype._next,c._error=s?function(l){try{s(l)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=r?function(){try{r()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;t.prototype.unsubscribe.call(this),!i&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e})(bi);var wd=yi(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yd=function(t){bt(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var i=new yo(this,this);return i.operator=n,i},e.prototype._throwIfClosed=function(){if(this.closed)throw new wd},e.prototype.next=function(n){var i=this;ln(function(){var r,s;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=wi(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(n)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}}})},e.prototype.error=function(n){var i=this;ln(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var r=i.observers;r.length;)r.shift().error(n)}})},e.prototype.complete=function(){var n=this;ln(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var i=this,r=this,s=r.hasError,o=r.isStopped,a=r.observers;return s||o?fo:(this.currentObservers=null,a.push(n),new ke(function(){i.currentObservers=null,an(a,n)}))},e.prototype._checkFinalizedStatuses=function(n){var i=this,r=i.hasError,s=i.thrownError,o=i.isStopped;r?n.error(s):o&&n.complete()},e.prototype.asObservable=function(){var n=new mo;return n.source=this,n},e.create=function(n,i){return new yo(n,i)},e}(mo),yo=function(t){bt(e,t);function e(n,i){var r=t.call(this)||this;return r.destination=n,r.source=i,r}return e.prototype.next=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,n)},e.prototype.error=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.call(i,n)},e.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},e.prototype._subscribe=function(n){var i,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&r!==void 0?r:fo},e}(yd),vd={now:function(){return Date.now()},delegate:void 0},bd=function(t){bt(e,t);function e(n,i){return t.call(this)||this}return e.prototype.schedule=function(n,i){return this},e}(ke),Si={setInterval:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=Si.delegate;return r?.setInterval?r.setInterval.apply(r,Se([t,e],Ee(n))):setInterval.apply(void 0,Se([t,e],Ee(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},xd=function(t){bt(e,t);function e(n,i){var r=t.call(this,n,i)||this;return r.scheduler=n,r.work=i,r.pending=!1,r}return e.prototype.schedule=function(n,i){var r;if(i===void 0&&(i=0),this.closed)return this;this.state=n;var s=this.id,o=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(o,s,i)),this.pending=!0,this.delay=i,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(o,this.id,i),this},e.prototype.requestAsyncId=function(n,i,r){return r===void 0&&(r=0),Si.setInterval(n.flush.bind(n,this),r)},e.prototype.recycleAsyncId=function(n,i,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return i;i!=null&&Si.clearInterval(i)},e.prototype.execute=function(n,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(n,i);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,i){var r=!1,s;try{this.work(n)}catch(o){r=!0,s=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,i=n.id,r=n.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,an(s,this),i!=null&&(this.id=this.recycleAsyncId(r,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bd),vo=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,i){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(i,n)},t.now=vd.now,t}(),Ed=function(t){bt(e,t);function e(n,i){i===void 0&&(i=vo.now);var r=t.call(this,n,i)||this;return r.actions=[],r._active=!1,r}return e.prototype.flush=function(n){var i=this.actions;if(this._active){i.push(n);return}var r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=i.shift());if(this._active=!1,r){for(;n=i.shift();)n.unsubscribe();throw r}},e}(vo);new Ed(xd);function Sd(t){switch(t.responseType){case"json":{if("response"in t)return t.response;var e=t;return JSON.parse(e.responseText)}case"document":return t.responseXML;case"text":default:{if("response"in t)return t.response;var e=t;return e.responseText}}}var bo=yi(function(t){return function(e,n,i){this.message=e,this.name="AjaxError",this.xhr=n,this.request=i,this.status=n.status,this.responseType=n.responseType;var r;try{r=Sd(n)}catch{r=n.responseText}this.response=r}});(function(){function t(e,n){return bo.call(this,"ajax timeout",e,n),this.name="AjaxTimeoutError",this}return t.prototype=Object.create(bo.prototype),t})();const kd=t=>t*Math.PI/180,Td=t=>t*180/Math.PI,xo=function(t,e){const n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)},Ad=function(t,e){return{x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}},ki=function(t,e){const n=e.x-t.x,i=e.y-t.y;return Math.atan2(i,n)},Ti=(t,e)=>({x:Math.cos(e)*t,y:Math.sin(e)*t}),Eo=(t,e=0,n=0)=>{if(t.vx+=t.ax??0,t.vy+=t.ay??0,t.vy+=e,n>0){const i=Math.atan2(t.vy,t.vx);let r=Math.sqrt(t.vx*t.vx+t.vy*t.vy);r>n?r-=n:r=0,t.vx=Math.cos(i)*r,t.vy=Math.sin(i)*r}t.x+=t.vx,t.y+=t.vy},Cd=(t,e,n=.05,i=1,r=0)=>{const s=e.x-t.x,o=e.y-t.y;t.vx=s*n,t.vy=o*n,t.vy+=r,t.vx*=i,t.vy*=i,t.x+=t.vx,t.y+=t.vy},So=(t,e,n=.03,i=.95,r=0)=>{(zf(e)?e:[e]).forEach(o=>{const a=o.x-t.x,c=o.y-t.y,l=a*n,f=c*n;t.vx+=l,t.vy+=f}),t.vy+=r,t.vx*=i,t.vy*=i,t.x+=t.vx,t.y+=t.vy},Id=(t,e,n=100,i=.03,r=.95,s=0)=>{const o=ki(t,e),a={x:e.x-Math.cos(o)*n,y:e.y-Math.sin(o)*n};So(t,a,i,r,s)};function Dd(t,e){return{vx:e.x-t.x,vy:e.y-t.y}}const Pd=function(t,e){return!(t.x+t.width<e.x||e.x+e.width<t.x||t.y+t.height<e.y||e.y+e.height<t.y)},ko=function(t,e){return!(e.x<t.x||e.x>t.x+t.width||e.y<t.y||e.y>t.y+t.height)},Rd=(t,e)=>{const n=e.x,i=e.y,r=t.length;let s=!1;const o=2e-10;for(let a=0,c=r-1;a<r;c=a,a++){const l=t[a].x,f=t[a].y,u=t[c].x,d=t[c].y;if(l===n&&f===i||u===n&&d===i||i===f&&i===d)return!0;if(i>=f&&i<d||i<f&&i>=d){const h=(u-l)/(d-f),_=l+h*(i-f);if(_===n||Math.abs(_-n)<o)return!0;_>n&&(s=!s)}}return s};function xt(t,e,n,i,r=!1){return{x:r?t*i+e*n:t*i-e*n,y:r?e*i-t*n:e*i+t*n}}function Md(t,e){const n=e.x-t.x,i=e.y-t.y;if(Math.sqrt(n*n+i*i)<t.radius+e.radius){const s=Math.atan2(i,n),o=Math.sin(s),a=Math.cos(s),c={x:0,y:0},l=xt(n,i,o,a,!0),f=xt(t.vx,t.vy,o,a,!0),u=xt(e.vx,e.vy,o,a,!0),d=f.x-u.x;f.x=((t.mass-e.mass)*f.x+2*e.mass*u.x)/(t.mass+e.mass),u.x=d+f.x;const h=Math.abs(f.x)+Math.abs(u.x),_=t.radius+e.radius-Math.abs(c.x-l.x);c.x+=f.x/h*_,l.x+=u.x/h*_;const p=xt(c.x,c.y,o,a,!1),g=xt(l.x,l.y,o,a,!1);e.x=t.x+g.x,e.y=t.y+g.y,t.x=t.x+p.x,t.y=t.y+p.y;const m=xt(f.x,f.y,o,a,!1),y=xt(u.x,u.y,o,a,!1);t.vx=m.x,t.vy=m.y,e.vx=y.x,e.vy=y.y}}function Ld(t,e=0,n=0,i,r,s=-1){t.x+t.radius>i?(t.x=i-t.radius,t.vx*=s):t.x-t.radius<e&&(t.x=e+t.radius,t.vx*=s),t.y+t.radius>r?(t.y=r-t.radius,t.vy*=s):t.y-t.radius<n&&(t.y=n+t.radius,t.vy*=s)}const Od=t=>/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(t),Ud=()=>Math.random()*16777215,Fd=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,zd=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,st=function(t,e){return e===!0?typeof t=="number"?t|0:(typeof t=="string"&&t[0]==="#"&&(t=t.slice(1)),window.parseInt(t,16)):(typeof t=="number"&&(t="00000"+(t|0).toString(16),t="#"+t.substring(t.length-6)),t)},Ai=function(t,e){typeof t=="string"&&t[0]==="#"&&(t=window.parseInt(t.slice(1),16)),e=e===void 0?1:e;const n=t>>16&255,i=t>>8&255,r=t&255,s=e<0?0:e>1?1:e;return s===1?"rgb("+n+","+i+","+r+")":"rgba("+n+","+i+","+r+","+s+")"},Bd=t=>{const n=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(t);return n?"#"+((1<<24)+(parseInt(n[1])<<16)+(parseInt(n[2])<<8)+parseInt(n[3])).toString(16).slice(1):""},To=function(){const t={code:""},e=n=>{t.code=n.code.toLowerCase()};return window.addEventListener("keydown",e,!1),t},Ci=function(t){const e={x:0,y:0,isDown:!1},n=s=>{e.isDown=!0,document.addEventListener("mouseup",i,!1),t.style.userSelect="none",t.style.webkitUserSelect="none"},i=s=>{e.isDown=!1,e.x=0,e.y=0,document.removeEventListener("mouseup",i,!1),t.style.userSelect="",t.style.webkitUserSelect=""},r=s=>{const o=Me(t,s);e.x=o.x,e.y=o.y};return t.addEventListener("mousedown",n,!1),document.addEventListener("mousemove",r,!1),e},Nd=function(t){const e={x:0,y:0,isDown:!1},n=s=>{s.preventDefault(),e.isDown=!0},i=s=>{e.isDown=!1,e.x=0,e.y=0},r=s=>{const o=s.changedTouches[0],a=Me(t,o);e.x=a.x,e.y=a.y};return t.addEventListener("touchstart",n,!1),t.addEventListener("touchend",i,!1),t.addEventListener("touchcancel",i,!1),t.addEventListener("touchmove",r,!1),e},jd=function(t){const e={x:0,y:0,isDown:!1},n=s=>{e.isDown=!0,t.setPointerCapture(s.pointerId),t.style.userSelect="none",t.style.webkitUserSelect="none"},i=s=>{e.isDown=!1,e.x=0,e.y=0,t.style.userSelect="",t.style.webkitUserSelect=""},r=s=>{const a=Me(t,s);e.x=a.x,e.y=a.y};return t.addEventListener("pointerdown",n,!1),t.addEventListener("pointerup",i,!1),t.addEventListener("pointercancel",i,!1),t.addEventListener("pointermove",r,!1),e};class ft{m;constructor(e=[1,0,0,1,0,0]){this.m=[e[0],e[1],e[2],e[3],e[4],e[5]]}unit(){return this.m=[1,0,0,1,0,0],this}multiply(e){const n=this.m;let i;e instanceof ft?i=e.m:i=e;const r=n[0]*i[0]+n[2]*i[1],s=n[1]*i[0]+n[3]*i[1],o=n[0]*i[2]+n[2]*i[3],a=n[1]*i[2]+n[3]*i[3],c=n[0]*i[4]+n[2]*i[5]+n[4],l=n[1]*i[4]+n[3]*i[5]+n[5];return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=c,n[5]=l,this}inverse(){const e=new ft(this.m),n=e.m,i=1/(n[0]*n[3]-n[1]*n[2]),r=n[3]*i,s=-n[1]*i,o=-n[2]*i,a=n[0]*i,c=i*(n[2]*n[5]-n[3]*n[4]),l=i*(n[1]*n[4]-n[0]*n[5]);return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=c,n[5]=l,e}translate(e,n){return this.multiply([1,0,0,1,e,n])}rotate(e){const n=e*Math.PI/180,i=Math.cos(n),r=Math.sin(n);return this.multiply([i,r,-r,i,0,0])}skew(e,n=0){const i=e*Math.PI/180,r=n*Math.PI/180,s=Math.tan(i),o=Math.tan(r);return this.multiply([1,o,s,1,0,0])}scale(e,n){return this.multiply([e,0,0,n,0,0])}transformPoint(e,n){const i=e,r=n;return e=i*this.m[0]+r*this.m[2]+this.m[4],n=i*this.m[1]+r*this.m[3]+this.m[5],[e,n]}transformVector(e,n){const i=e,r=n;return e=i*this.m[0]+r*this.m[2],n=i*this.m[1]+r*this.m[3],[e,n]}}class hn{x;y;z;constructor(e=[0,0,0],n=[0,0,0]){const[i,r,s]=e,[o,a,c]=n;this.x=i-o,this.y=r-a,this.z=s-c}get length(){const{x:e,y:n,z:i}=this;return Math.sqrt(e*e+n*n+i*i)}unit(){const e=this.length;return new hn([this.x/e,this.y/e,this.z/e])}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}cross(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z;return new hn([i*a-r*o,r*s-n*a,n*o-s*i])}}const Wt={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}},Exponential:{In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}},Back:{In:function(t){return t===1?1:t*t*((1.70158+1)*t-1.70158)},Out:function(t){return t===0?0:--t*t*((1.70158+1)*t+1.70158)+1},InOut:function(t){const e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-Wt.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?Wt.Bounce.In(t*2)*.5:Wt.Bounce.Out(t*2-1)*.5+.5}},generatePow:function(t=4){return t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return e**t},Out:function(e){return 1-(1-e)**t},InOut:function(e){return e<.5?(e*2)**t/2:(1-(2-e*2)**t)/2+.5}}}};let Te;typeof self>"u"&&typeof process<"u"&&process.hrtime?Te=function(){const t=process.hrtime();return t[0]*1e3+t[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?Te=self.performance.now.bind(self.performance):Date.now!==void 0?Te=Date.now:Te=function(){return new Date().getTime()};const Kt=Te;class Ao{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(e=>this._tweens[e])}removeAll(){this._tweens={}}add(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e}remove(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]}update(e=Kt(),n=!1){let i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<i.length;r++){const s=this._tweens[i[r]],o=!n;s&&s.update(e,o)===!1&&!n&&delete this._tweens[i[r]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0}}const Lt={Linear:function(t,e){const n=t.length-1,i=n*e,r=Math.floor(i),s=Lt.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){let n=0;const i=t.length-1,r=Math.pow,s=Lt.Utils.Bernstein;for(let o=0;o<=i;o++)n+=r(1-e,i-o)*r(e,o)*t[o]*s(i,o);return n},CatmullRom:function(t,e){const n=t.length-1;let i=n*e,r=Math.floor(i);const s=Lt.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Factorial:function(){const t=[1];return function(e){let n=1;if(t[e])return t[e];for(let i=e;i>1;i--)n*=i;return t[e]=n,n}}(),Bernstein:function(t,e){const n=Lt.Utils.Factorial;return n(t)/n(e)/n(t-e)},CatmullRom:function(t,e,n,i,r){const s=(n-t)*.5,o=(i-e)*.5,a=r*r,c=r*a;return(2*e-2*n+s+o)*c+(-3*e+3*n-2*s-o)*a+s*r+e}}};class Ae{static _nextId=0;static nextId(){return Ae._nextId++}}const K=new Ao;class Hd{constructor(e,n=K){this._object=e,this._group=n}_id=Ae.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=Wt.Linear.None;_interpolationFunction=Lt.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(e,n){return this._valuesEnd=Object.create(e),n!==void 0&&(this._durationTime=n),this}duration(e=1e3){return this._durationTime=e,this}start(e=Kt()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(e,n,i,r){for(const s in i){const o=e[s],a=Array.isArray(o),c=a?"array":typeof o,l=!a&&Array.isArray(i[s]);if(!(c==="undefined"||c==="function")){if(l){let f=i[s];if(f.length===0)continue;f=f.map(this._handleRelativeValue.bind(this,o)),i[s]=[o].concat(f)}if((c==="object"||a)&&o&&!l){n[s]=a?[]:{};for(const f in o)n[s][f]=o[f];r[s]=a?[]:{},this._setupProperties(o,n[s],i[s],r[s])}else typeof n[s]>"u"&&(n[s]=o),a||(n[s]*=1),l?r[s]=i[s].slice().reverse():r[s]=n[s]||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(e=Kt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=e,this._group&&this._group.remove(this),this)}resume(e=Kt()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this}group(e=K){return this._group=e,this}delay(e=0){return this._delayTime=e,this}repeat(e=0){return this._initialRepeat=e,this._repeat=e,this}repeatDelay(e){return this._repeatDelayTime=e,this}yoyo(e=!1){return this._yoyo=e,this}easing(e=Wt.Linear.None){return this._easingFunction=e,this}interpolation(e=Lt.Linear){return this._interpolationFunction=e,this}chain(...e){return this._chainedTweens=e,this}onStart(e){return this._onStartCallback=e,this}onEveryStart(e){return this._onEveryStartCallback=e,this}onUpdate(e){return this._onUpdateCallback=e,this}onRepeat(e){return this._onRepeatCallback=e,this}onComplete(e){return this._onCompleteCallback=e,this}onStop(e){return this._onStopCallback=e,this}update(e=Kt(),n=!0){if(this._isPaused)return!0;let i,r;const s=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(e>s)return!1;n&&this.start(e)}if(this._goToEnd=!1,e<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),r=(e-this._startTime)/this._durationTime,r=this._durationTime===0||r>1?1:r;const o=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(e,n,i,r){for(const s in i){if(n[s]===void 0)continue;const o=n[s]||0;let a=i[s];const c=Array.isArray(e[s]),l=Array.isArray(a);!c&&l?e[s]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(e[s],o,a,r):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(e[s]=o+(a-o)*r))}}_handleRelativeValue(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)}_swapEndStartRepeatValues(e){const n=this._valuesStartRepeat[e],i=this._valuesEnd[e];typeof i=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(i):this._valuesStartRepeat[e]=i,this._valuesEnd[e]=n}}const qd=Ae.nextId,Zd=K.getAll.bind(K),Gd=K.removeAll.bind(K),Xd=K.add.bind(K),$d=K.remove.bind(K),Vd=K.update.bind(K),Yd={Easing:Wt,Group:Ao,Interpolation:Lt,now:Kt,Sequence:Ae,nextId:qd,Tween:Hd,getAll:Zd,removeAll:Gd,add:Xd,remove:$d,update:Vd};function Co(t){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",t),e}function Wd(t,e){const n=Co(t),{x:i,y:r}=n.getPointAtLength(e);return[i,r]}function Kd(t,e){return Co(t).getTotalLength(e)}let J=null;function Jd({d:t},e,n){J||(J=document.createElement("canvas").getContext("2d"));const i=new Path2D(t);return J.isPointInPath(i,e,n)}function Io({d:t},e,n,{lineWidth:i=1,lineCap:r="butt",lineJoin:s="miter"}){if(J||(J=document.createElement("canvas").getContext("2d")),J.isPointInStroke){J.save(),J.lineWidth=i,J.lineCap=r,J.lineJoin=s;const o=new Path2D(t),a=J.isPointInStroke(o,e,n);return J.restore(),a}}var Ii={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Qd=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function t0(t){var e=[];return t.replace(Qd,function(n,i,r){var s=i.toLowerCase();for(r=n0(r),s=="m"&&r.length>2&&(e.push([i].concat(r.splice(0,2))),s="l",i=i=="m"?"l":"L");;){if(r.length==Ii[s])return r.unshift(i),e.push(r);if(r.length<Ii[s])throw new Error("malformed path data");e.push([i].concat(r.splice(0,Ii[s])))}}),e}var e0=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function n0(t){var e=t.match(e0);return e?e.map(Number):[]}function i0(t){var e=0,n=0,i=0,r=0;return t.map(function(s){s=s.slice();var o=s[0],a=o.toUpperCase();if(o!=a)switch(s[0]=a,o){case"a":s[6]+=i,s[7]+=r;break;case"v":s[1]+=r;break;case"h":s[1]+=i;break;default:for(var c=1;c<s.length;)s[c++]+=i,s[c++]+=r}switch(a){case"Z":i=e,r=n;break;case"H":i=s[1];break;case"V":r=s[1];break;case"M":i=e=s[1],r=n=s[2];break;default:i=s[s.length-2],r=s[s.length-1]}return s})}const Ce=Math.PI*2;function Do(t,e,n,i){const r=t*i-e*n<0?-1:1;let s=t*n+e*i;return s>1&&(s=1),s<-1&&(s=-1),r*Math.acos(s)}function r0(t,e,n,i,r,s,o,a,c,l){const f=l*(t-n)/2+c*(e-i)/2,u=-c*(t-n)/2+l*(e-i)/2,d=o*o,h=a*a,_=f*f,p=u*u;let g=d*h-d*p-h*_;g<0&&(g=0),g/=d*p+h*_,g=Math.sqrt(g)*(r===s?-1:1);const m=g*o/a*u,y=g*-a/o*f,b=l*m-c*y+(t+n)/2,v=c*m+l*y+(e+i)/2,E=(f-m)/o,x=(u-y)/a,S=(-f-m)/o,C=(-u-y)/a,T=Do(1,0,E,x);let A=Do(E,x,S,C);return s===0&&A>0&&(A-=Ce),s===1&&A<0&&(A+=Ce),[b,v,T,A]}function s0(t,e){const n=1.3333333333333333*Math.tan(e/4),i=Math.cos(t),r=Math.sin(t),s=Math.cos(t+e),o=Math.sin(t+e);return[i,r,i-r*n,r+i*n,s+o*n,o-s*n,s,o]}function o0(t,e,n,i,r,s,o,a,c){const l=Math.sin(c*Ce/360),f=Math.cos(c*Ce/360),u=f*(t-n)/2+l*(e-i)/2,d=-l*(t-n)/2+f*(e-i)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const h=u*u/(o*o)+d*d/(a*a);h>1&&(o*=Math.sqrt(h),a*=Math.sqrt(h));const _=r0(t,e,n,i,r,s,o,a,l,f),p=[];let g=_[2],m=_[3];const y=Math.max(Math.ceil(Math.abs(m)/(Ce/4)),1);m/=y;for(let b=0;b<y;b++)p.push(s0(g,m)),g+=m;return p.map(b=>{for(let v=0;v<b.length;v+=2){let E=b[v+0],x=b[v+1];E*=o,x*=a;const S=f*E-l*x,C=l*E+f*x;b[v+0]=S+_[0],b[v+1]=C+_[1]}return b})}function a0(t){for(var e,n=[],i=0,r=0,s=0,o=0,a=null,c=null,l=0,f=0,u=0,d=t.length;u<d;u++){var h=t[u],_=h[0];switch(_){case"M":s=h[1],o=h[2];break;case"A":var p=o0(l,f,h[6],h[7],h[4],h[5],h[1],h[2],h[3]);if(!p.length)continue;p=p.map(v=>{const[E,x,S,C,T,A,D,P]=v;return{x1:S,y1:C,x2:T,y2:A,x:D,y:P}});for(var g=0,m;g<p.length;g++)m=p[g],h=["C",m.x1,m.y1,m.x2,m.y2,m.x,m.y],g<p.length-1&&n.push(h);break;case"S":var y=l,b=f;(e=="C"||e=="S")&&(y+=y-i,b+=b-r),h=["C",y,b,h[1],h[2],h[3],h[4]];break;case"T":e=="Q"||e=="T"?(a=l*2-a,c=f*2-c):(a=l,c=f),h=Po(l,f,a,c,h[1],h[2]);break;case"Q":a=h[1],c=h[2],h=Po(l,f,h[1],h[2],h[3],h[4]);break;case"L":h=fn(l,f,h[1],h[2]);break;case"H":h=fn(l,f,h[1],f);break;case"V":h=fn(l,f,l,h[1]);break;case"Z":h=fn(l,f,s,o);break}e=_,l=h[h.length-2],f=h[h.length-1],h.length>4?(i=h[h.length-4],r=h[h.length-3]):(i=l,r=f),n.push(h)}return n}function fn(t,e,n,i){return["C",t,e,n,i,n,i]}function Po(t,e,n,i,r,s){return["C",t/3+.6666666666666666*n,e/3+.6666666666666666*i,r/3+.6666666666666666*n,s/3+.6666666666666666*i,r,s]}function l0(t){return typeof t!="string"?!1:(t=t.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4)}const un=Symbol("initialPath"),ut=Symbol("path"),Et=Symbol("bounds"),dn=Symbol("savedPaths"),dt=Symbol("renderProps"),Di=Symbol("beginPath");class c0{constructor(e){if(!l0(e))throw new Error("Not an SVG path!");this[un]=i0(t0(e)),this[ut]=a0(this[un]),this[Et]=null,this[dn]=[],this[dt]={},this[Di]=!1}save(){return this[dn].push({path:this[ut],bounds:this[Et],renderProps:Object.assign({},this[dt])}),this}restore(){if(this[dn].length){const{path:e,bounds:n,renderProps:i}=this[dn].pop();this[ut]=e,this[Et]=n,this[dt]=i}return this}get bounds(){if(!this[Et]){const e=this[ut];if(this[Et]=[0,0,0,0],e.length){const n=[1/0,1/0,-1/0,-1/0];for(let i=0,r=e.length;i<r;i++){const s=e[i].slice(1);for(let o=0;o<s.length;o+=2)s[o+0]<n[0]&&(n[0]=s[o+0]),s[o+1]<n[1]&&(n[1]=s[o+1]),s[o+0]>n[2]&&(n[2]=s[o+0]),s[o+1]>n[3]&&(n[3]=s[o+1])}this[Et]=n}}return this[Et]}get size(){const e=this.bounds;return[e[2]-e[0],e[3]-e[1]]}get center(){const[e,n,i,r]=this.bounds;return[(e+i)/2,(n+r)/2]}get d(){let e=this[ut].map(n=>{const[i,...r]=n;return i+r.join()}).join("");return this.isClosed&&(e+="Z"),e}get path(){return this[ut]}get isClosed(){const e=this[un][this[un].length-1];return e&&e[0]==="Z"}isPointInPath(e,n){return Jd(this,e,n)}isPointInStroke(e,n,{lineWidth:i=1,lineCap:r="butt",lineJoin:s="miter"}){if(Io)return Io(this,e,n,{lineWidth:i,lineCap:r,lineJoin:s})}getPointAtLength(e){return Wd(this.d,e)}getTotalLength(){return Kd(this.d)}transform(...e){this[Et]=null;const n=new ft(e),i=this[ut];return this[ut]=i.map(r=>{const[s,...o]=r,a=[s];for(let c=0;c<o.length;c+=2){const l=o[c],f=o[c+1],[u,d]=n.transformPoint(l,f);a.push(u,d)}return a}),this}translate(e,n){const i=new ft().translate(e,n);return this.transform(...i.m)}rotate(e){const n=new ft().rotate(e);return this.transform(...n.m)}scale(e,n){n==null&&(n=e);const i=new ft().scale(e,n);return this.transform(...i.m)}skew(e,n){const i=new ft().skew(e,n);return this.transform(...i.m)}trim(){const[e,n]=this.bounds;return this.translate(-e,-n),this}beginPath(){return this[Di]=!0,this}toCanvas(e){const n=this[ut],i=this[dt];return n.length&&(this[Di]&&e.beginPath(),n.forEach(r=>{const[s,...o]=r;s==="M"?e.moveTo(...o):e.bezierCurveTo(...o)}),this.isClosed&&e.closePath()),Object.assign(e,i),{stroke(){return e.stroke(),this},fill(){return e.fill(),this}}}strokeStyle(e){return this[dt].strokeStyle=e,this}fillStyle(e){return this[dt].fillStyle=e,this}lineWidth(e){return this[dt].lineWidth=e,this}lineCap(e){return this[dt].lineCap=e,this}lineJoin(e){return this[dt].lineJoin=e,this}}const Ro=h0("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 h0(t,e=10){const n={},i=t.split(",");for(let r=0;r<i.length;r+=2){const s="&"+i[r+1]+";",o=parseInt(i[r],e);n[s]="&#"+o+";"}return n["\\xa0"]=" ",n}function Z(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t=t.replace(new RegExp("{"+n[i]+"}","gi"),""+e[n[i]]);return t}function _n(t){let e,n;if(!t)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";e="";do for(e="",n=0;n<12;n++)e+=i[Math.floor(Math.random()*i.length)];while(t[e]);return e}function f0(t){const e={left:"start",right:"end",center:"middle",start:"start",end:"end"};return e[t]||e.start}function u0(t){const e={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return e[t]||e.alphabetic}const Ie={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"}};class Pi{__root;__ctx;constructor(e,n){this.__root=e,this.__ctx=n}addColorStop(e,n){const i=this.__ctx.__createElement("stop");if(i.setAttribute("offset",""+e),n.indexOf("rgba")!==-1){const s=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(n);s&&(i.setAttribute("stop-color",Z("rgb({r},{g},{b})",{r:s[1],g:s[2],b:s[3]})),i.setAttribute("stop-opacity",s[4]))}else i.setAttribute("stop-color",n);this.__root.appendChild(i)}}class Mo{__root;__ctx;constructor(e,n){this.__root=e,this.__ctx=n}}class gn{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:e,width:n=500,height:i=500,enableMirroring:r=!1}){this.enableMirroring=r,e?(this.__canvas=e,this.__ctx=e.getContext("2d"),this.width=e.width,this.height=e.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=n,this.height=i),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 e=Object.keys(Ie);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=Ie[r].canvas}}__getStyleState(){const e={},n=Object.keys(Ie);for(let i=0,r=n.length;i<r;i++){const s=n[i];e[s]=this[s]}return e}__applyStyleState(e){const n=Object.keys(e);for(let i=0,r=n.length;i<r;i++){const s=n[i];this[s]=e[s]}}__createElement(e,n={},i=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",e),s=Object.keys(n);i&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let o=0;o<s.length;o++){const a=s[o];r.setAttribute(a,n[a])}return r}__applyStyleToCurrentElement(e){let n=this.__currentElement;const i=this.__currentElementsToStyle;i&&(n.setAttribute(e,""),n=i.element,i.children.forEach(s=>{s.setAttribute(e,"")}));const r=Object.keys(Ie);for(let s=0;s<r.length;s++){const o=Ie[r[s]],a=this[r[s]];if(o.apply){if(a instanceof Mo){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}n.setAttribute(o.apply,Z("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Pi)n.setAttribute(o.apply,Z("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(e)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const l=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);n.setAttribute(o.svgAttr,Z("rgb({r},{g},{b})",{r:l[1],g:l[2],b:l[3]}));let f=parseFloat(l[4]);const u=this.globalAlpha;u!=null&&(f*=u),n.setAttribute(o.svgAttr+"-opacity",""+f)}else{let c=o.svgAttr;if(r[s]==="globalAlpha"&&(c=e+"-"+o.svgAttr,n.getAttribute(c)))continue;c&&n.setAttribute(c,a)}}}}__closestGroupOrSvg(e){return e=e||this.__currentElement,e.nodeName==="g"||e.nodeName==="svg"?e:this.__closestGroupOrSvg(e.parentNode)}getSerializedSvg(e){let n=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(n)&&(n=n.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),e){const r=Object.keys(Ro);for(let s=0,o=r.length;s<o;s++){const a=r[s],c=Ro[a],l=new RegExp(a,"gi");l.test(n)&&(n=n.replace(l,c))}}return n}getSvg(){return this.__rootSVG}save(){const e=this.__createElement("g"),n=this.__closestGroupOrSvg();this.__groupStack.push(n),n.appendChild(e),this.__currentElement=e,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const e=this.__groupStack.pop();e?this.__currentElement=e:this.__currentElement=this.__rootSVG.childNodes[1];const n=this.__styleStack.pop();n&&this.__applyStyleState(n)}__addTransform(e){const n=this.__closestGroupOrSvg();if(n.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:n,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const r=this.__createElement("g");n.appendChild(r),this.__currentElement=r}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=e,this.__currentElement.setAttribute("transform",i)}scale(e,n){n===void 0&&(n=e),this.__addTransform(Z("scale({x},{y})",{x:e,y:n}))}rotate(e){const n=e*180/Math.PI;this.__addTransform(Z("rotate({angle},{cx},{cy})",{angle:n,cx:0,cy:0}))}translate(e,n){this.__addTransform(Z("translate({x},{y})",{x:e,y:n}))}transform(e,n,i,r,s,o){this.__addTransform(Z("matrix({a},{b},{c},{d},{e},{f})",{a:e,b:n,c:i,d:r,e:s,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const e=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(e),this.__currentElement=e}__applyCurrentDefaultPath(){const e=this.__currentElement;e.nodeName==="path"?e.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",e.nodeName)}__addPathCommand(e){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=e}moveTo(e,n){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:e,y:n},this.__addPathCommand(Z("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(e,n){this.__currentPosition={x:e,y:n},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Z("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Z("M {x} {y}",this.__currentPosition))}bezierCurveTo(e,n,i,r,s,o){this.__currentPosition={x:s,y:o},this.__addPathCommand(Z("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:e,cp1y:n,cp2x:i,cp2y:r,x:s,y:o}))}quadraticCurveTo(e,n,i,r){this.__currentPosition={x:i,y:r},this.__addPathCommand(Z("Q {cpx} {cpy} {x} {y}",{cpx:e,cpy:n,x:i,y:r}))}normalize(e){const n=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/n,e[1]/n]}arcTo(e,n,i,r,s){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(o===e&&a===n||e===i&&n===r||s===0){this.lineTo(e,n);return}const c=this.normalize([o-e,a-n]),l=this.normalize([i-e,r-n]);if(c[0]*l[1]===c[1]*l[0]){this.lineTo(e,n);return}const f=c[0]*l[0]+c[1]*l[1],u=Math.acos(Math.abs(f)),d=this.normalize([c[0]+l[0],c[1]+l[1]]),h=s/Math.sin(u/2),_=e+h*d[0],p=n+h*d[1],g=[-c[1],c[0]],m=[l[1],-l[0]],y=function(E){const x=E[0];return E[1]>=0?Math.acos(x):-Math.acos(x)},b=y(g),v=y(m);this.lineTo(_+g[0]*s,p+g[1]*s),this.arc(_,p,s,b,v)}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(e,n,i,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(e,n),this.lineTo(e+i,n),this.lineTo(e+i,n+r),this.lineTo(e,n+r),this.lineTo(e,n),this.closePath()}fillRect(e,n,i,r){const s=this.__createElement("rect",{x:e,y:n,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(e,n,i,r){const s=this.__createElement("rect",{x:e,y:n,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const n=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],r=i.childNodes;for(let s=r.length-1;s>=0;s--)r[s]&&i.removeChild(r[s]);this.__currentElement=i,this.__groupStack=[],n&&this.__addTransform(n)}clearRect(e,n,i,r){if(e===0&&n===0&&i===this.width&&r===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:e,y:n,width:i,height:r,fill:"#FFFFFF"},!0);s.appendChild(o)}createLinearGradient(e,n,i,r){const s=this.__createElement("linearGradient",{id:_n(this.__ids),x1:e+"px",x2:i+"px",y1:n+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new Pi(s,this)}createRadialGradient(e,n,i,r,s,o){const a=this.__createElement("radialGradient",{id:_n(this.__ids),cx:r+"px",cy:s+"px",r:o+"px",fx:e+"px",fy:n+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Pi(a,this)}__parseFont(){const n=/^\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),i={style:n[1]||"normal",size:n[4]||"10px",family:n[6]||"sans-serif",weight:n[3]||"normal",decoration:n[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(e,n){if(e.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.href),i.appendChild(n),i}return n}__applyText(e,n,i,r){const s=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:n,y:i,"text-anchor":f0(this.textAlign),"dominant-baseline":u0(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(e)),this.__currentElement=a,this.__applyStyleToCurrentElement(r),o.appendChild(this.__wrapTextLink(s,a))}fillText(e,n,i){this.__applyText(e,n,i,"fill")}strokeText(e,n,i){this.__applyText(e,n,i,"stroke")}measureText(e){return this.__ctx.font=this.font,this.__ctx.measureText(e)}arc(e,n,i,r,s,o){if(r===s)return;r=r%(2*Math.PI),s=s%(2*Math.PI),r===s&&(s=(s+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=e+i*Math.cos(s),c=n+i*Math.sin(s),l=e+i*Math.cos(r),f=n+i*Math.sin(r),u=o?0:1;let d=0,h=s-r;h<0&&(h+=2*Math.PI),o?d=h>Math.PI?0:1:d=h>Math.PI?1:0,this.lineTo(l,f),this.__addPathCommand(Z("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const e=this.__closestGroupOrSvg(),n=this.__createElement("clipPath"),i=_n(this.__ids),r=this.__createElement("g");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute("id",i),n.appendChild(this.__currentElement),this.__SVGdefs.appendChild(n),e.setAttribute("clip-path",Z("url(#{id})",{id:i})),e.appendChild(r),this.__currentElement=r}drawImage(...e){let n=e[0],i,r,s,o,a=0,c=0,l,f,u,d,h,_,p,g;if(e.length===3)i=e[1],r=e[2],l=n.width,f=n.height,s=l,o=f;else if(e.length===5)i=e[1],r=e[2],s=e[3],o=e[4],l=n.width,f=n.height;else if(e.length===9)a=e[1],c=e[2],l=e[3],f=e[4],i=e[5],r=e[6],s=e[7],o=e[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const m=this.__closestGroupOrSvg();this.__currentElement;const y="translate("+i+", "+r+")";if(n instanceof gn){if(u=n.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)g=d.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__SVGdefs.appendChild(d.childNodes[0]);if(h=u.childNodes[1],h){const b=h.getAttribute("transform");let v;b?v=b+" "+y:v=y,h.setAttribute("transform",v),m.appendChild(h)}}}else(n.nodeName==="CANVAS"||n.nodeName==="IMG")&&(_=this.__createElement("image"),_.setAttribute("width",s),_.setAttribute("height",o),_.setAttribute("preserveAspectRatio","none"),(a||c||l!==n.width||f!==n.height)&&(p=this.__document.createElement("canvas"),p.width=s,p.height=o,p.getContext("2d")?.drawImage(n,a,c,l,f,0,0,s,o),n=p),_.setAttribute("transform",y),_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n.nodeName==="CANVAS"?n.toDataURL():n.getAttribute("src")),m.appendChild(_))}createPattern(e,n){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=_n(this.__ids);let s;return i.setAttribute("id",r),e.nodeName==="CANVAS"||e.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+e.width),s.setAttribute("height",""+e.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),i.appendChild(s),this.__SVGdefs.appendChild(i)):e instanceof gn&&(i.setAttribute("width",""+e.width),i.setAttribute("height",""+e.height),i.appendChild(e.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new Mo(i,this)}setLineDash(e){e&&e.length>0?this.lineDash=e.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}const d0=gn,_0=function(t,e,n,i,r,s){t.beginPath(),t.moveTo(e,n+s),t.lineTo(e,n+r-s),t.quadraticCurveTo(e,n+r,e+s,n+r),t.lineTo(e+i-s,n+r),t.quadraticCurveTo(e+i,n+r,e+i,n+r-s),t.lineTo(e+i,n+s),t.quadraticCurveTo(e+i,n,e+i-s,n),t.lineTo(e+s,n),t.quadraticCurveTo(e,n,e,n+s),t.stroke()},g0=function(t,e,n,i){var r=e-i,s=0,o=1;t.beginPath(),t.moveTo(r,s);do{if(o>2e4)break;var a=(e+n)*Math.cos(o*Math.PI/72)-(n+i)*Math.cos((e+n)/n*(o*Math.PI/72)),c=(e+n)*Math.sin(o*Math.PI/72)-(n+i)*Math.sin((e+n)/n*(o*Math.PI/72));t.lineTo(a,c),r=a,s=c,o++}while(a!=e-i&&c!=0);t.stroke()},p0=function(t,e){t.save(),t.beginPath(),t.moveTo(e,0);for(var n=0;n<9;n++)t.rotate(Math.PI/5),n%2==0?t.lineTo(e/.525731*.200811,0):t.lineTo(e,0);t.closePath(),t.fill(),t.restore()},m0=function(t,e,n,i,r){var s=0;function o(){t.clearRect(e,n,i,r),t.setLineDash([4,2]),t.lineDashOffset=-s,t.strokeRect(e,n,i,r)}function a(){s++,s>16&&(s=0),o(),setTimeout(a,40)}a()},w0=function(t){t.beginPath(),t.arc(75,75,50,0,Math.PI*2,!0),t.moveTo(110,75),t.arc(75,75,35,0,Math.PI,!1),t.moveTo(65,65),t.arc(60,65,5,0,Math.PI*2,!0),t.moveTo(95,65),t.arc(90,65,5,0,Math.PI*2,!0),t.stroke()};class y0{constructor(e=0,n=0,i="#ffff00",r=0){this.x=e,this.y=n,this.color=i,this.rotation=r}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.lineWidth=2,e.fillStyle=this.color,e.beginPath(),e.moveTo(-50,-25),e.lineTo(0,-25),e.lineTo(0,-50),e.lineTo(50,0),e.lineTo(0,50),e.lineTo(0,25),e.lineTo(-50,25),e.lineTo(-50,-25),e.closePath(),e.fill(),e.stroke(),e.restore()}}class v0{constructor(e=40,n="#ff0000"){this.x=0,this.y=0,this.radius=e,this.vx=0,this.vy=0,this.mass=1,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(n),this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.arc(0,0,this.radius,0,Math.PI*2,!0),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}getBounds(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}}class b0{constructor(e=40,n="#ff0000"){this.x=0,this.y=0,this.xpos=0,this.ypos=0,this.zpos=0,this.radius=e,this.vx=0,this.vy=0,this.vz=0,this.mass=1,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(n),this.lineWidth=1,this.visible=!0}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.arc(0,0,this.radius,0,Math.PI*2,!0),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}}class x0{constructor(e=50,n=50,i="#ff0000"){this.x=0,this.y=0,this.width=e,this.height=n,this.vx=0,this.vy=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(i),this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.rect(0,0,this.width,this.height),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}}class E0{constructor(e,n,i,r){this.x=e===void 0?-100:e,this.y=n===void 0?-100:n,this.z=i===void 0?-100:i,this.brightness=r===void 0?1:r}setBrightness(e){this.brightness=Math.min(Math.max(e,0),1)}}class S0{constructor(e,n,i,r){this.x=0,this.y=0,this.x1=e===void 0?0:e,this.y1=n===void 0?0:n,this.x2=i===void 0?0:i,this.y2=r===void 0?0:r,this.rotation=0,this.scaleX=1,this.scaleY=1,this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.beginPath(),e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2),e.closePath(),e.stroke(),e.restore()}getBounds(){if(this.rotation===0){var e=Math.min(this.x1,this.x2),n=Math.min(this.y1,this.y2),i=Math.max(this.x1,this.x2),r=Math.max(this.y1,this.y2);return{x:this.x+e,y:this.y+n,width:i-e,height:r-n}}else{var s=Math.sin(this.rotation),o=Math.cos(this.rotation),a=o*this.x1-s*this.y1,c=o*this.x2-s*this.y2,l=o*this.y1+s*this.x1,f=o*this.y2+s*this.x2;return{x:this.x+Math.min(a,c),y:this.y+Math.min(l,f),width:Math.max(a,c)-Math.min(a,c),height:Math.max(l,f)-Math.min(l,f)}}}}class k0{constructor(e,n,i){this.x=e===void 0?0:e,this.y=n===void 0?0:n,this.z=i===void 0?0:i,this.fl=250,this.vpX=0,this.vpY=0,this.cX=0,this.cY=0,this.cZ=0}setVanishingPoint(e,n){this.vpX=e,this.vpY=n}setCenter(e,n,i){this.cX=e,this.cY=n,this.cZ=i}rotateX(e){var n=Math.cos(e),i=Math.sin(e),r=this.y*n-this.z*i,s=this.z*n+this.y*i;this.y=r,this.z=s}rotateY(e){var n=Math.cos(e),i=Math.sin(e),r=this.x*n-this.z*i,s=this.z*n+this.x*i;this.x=r,this.z=s}rotateZ(e){var n=Math.cos(e),i=Math.sin(e),r=this.x*n-this.y*i,s=this.y*n+this.x*i;this.x=r,this.y=s}getScreenX(){var e=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*e}getScreenY(){var e=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*e}}class T0{constructor(){this.x=0,this.y=0,this.width=25,this.height=20,this.rotation=0,this.showFlame=!1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.lineWidth=1,e.strokeStyle="#ffffff",e.beginPath(),e.moveTo(10,0),e.lineTo(-10,10),e.lineTo(-5,0),e.lineTo(-10,-10),e.lineTo(10,0),e.closePath(),e.stroke(),this.showFlame&&(e.beginPath(),e.moveTo(-7.5,-5),e.lineTo(-15,0),e.lineTo(-7.5,5),e.closePath(),e.stroke()),e.restore()}}class A0{constructor(e,n,i){this.min=e===void 0?0:e,this.max=n===void 0?100:n,this.value=i===void 0?100:i,this.onchange=null,this.x=0,this.y=0,this.width=16,this.height=100,this.backColor="#cccccc",this.backBorderColor="#999999",this.backWidth=4,this.backX=this.width/2-this.backWidth/2,this.handleColor="#eeeeee",this.handleBorderColor="#cccccc",this.handleHeight=6,this.handleY=0,this.updatePosition()}draw(e){e.save(),e.translate(this.x,this.y),e.fillStyle=this.backColor,e.beginPath(),e.fillRect(this.backX,0,this.backWidth,this.height),e.closePath(),e.strokeStyle=this.handleBorderColor,e.fillStyle=this.handleColor,e.beginPath(),e.rect(0,this.handleY,this.width,this.handleHeight),e.closePath(),e.fill(),e.stroke(),e.restore()}updateValue(){var e=this.value,n=this.height-this.handleHeight,i=this.max-this.min;this.value=(n-this.handleY)/n*i+this.min,typeof this.onchange=="function"&&this.value!==e&&this.onchange()}updatePosition(){var e=this.height-this.handleHeight,n=this.max-this.min;this.handleY=e-(this.value-this.min)/n*e}captureMouse(e){var n=this,i=Ci(e),r={};a(),e.addEventListener("mousedown",function(){ko(r,i.x,i.y)&&(e.addEventListener("mouseup",s,!1),e.addEventListener("mousemove",o,!1))},!1);function s(){e.removeEventListener("mousemove",o,!1),e.removeEventListener("mouseup",s,!1),a()}function o(){var c=i.y-n.y;n.handleY=Math.min(n.height-n.handleHeight,Math.max(c,0)),n.updateValue()}function a(){r.x=n.x,r.y=n.y+n.handleY,r.width=n.width,r.height=n.handleHeight}}}class C0{constructor(e,n,i,r){this.pointA=e,this.pointB=n,this.pointC=i,this.color=r===void 0?"#ff0000":st(r),this.lineWidth=1,this.alpha=1}draw(e){this.isBackface()||(e.save(),e.lineWidth=this.lineWidth,e.fillStyle=e.strokeStyle=Ai(this.color,this.alpha),e.beginPath(),e.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),e.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),e.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){var e=this.pointC.getScreenX()-this.pointA.getScreenX(),n=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return e*r>n*i}}class I0{constructor(e,n,i,r){this.pointA=e,this.pointB=n,this.pointC=i,this.color=r===void 0?"#ff0000":st(r),this.lineWidth=1,this.alpha=1,this.light=null}draw(e){this.isBackface()||(e.save(),e.lineWidth=this.lineWidth,e.fillStyle=e.strokeStyle=this.getAdjustedColor(),e.beginPath(),e.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),e.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),e.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){var e=this.pointC.getScreenX()-this.pointA.getScreenX(),n=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return e*r>n*i}getAdjustedColor(){var e=st(this.color,!0),n=e>>16,i=e>>8&255,r=e&255,s=this.getLightFactor();return n*=s,i*=s,r*=s,st(n<<16|i<<8|r)}getLightFactor(){var e={x:this.pointA.x-this.pointB.x,y:this.pointA.y-this.pointB.y,z:this.pointA.z-this.pointB.z},n={x:this.pointB.x-this.pointC.x,y:this.pointB.y-this.pointC.y,z:this.pointB.z-this.pointC.z},i={x:e.y*n.z-e.z*n.y,y:-(e.x*n.z-e.z*n.x),z:e.x*n.y-e.y*n.x},r=i.x*this.light.x+i.y*this.light.y+i.z*this.light.z,s=Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z),o=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(r/(s*o))/Math.PI*this.light.brightness}}class D0{constructor(){this.x=0,this.y=0,this.xpos=0,this.ypos=0,this.zpos=0,this.scaleX=1,this.scaleY=1,this.color="#ffffff",this.alpha=1,this.lineWidth=1,this.branch=[],this.branch[0]=-140-Math.random()*20,this.branch[1]=-30-Math.random()*30,this.branch[2]=Math.random()*80-40,this.branch[3]=-100-Math.random()*40,this.branch[4]=-60-Math.random()*40,this.branch[5]=Math.random()*60-30,this.branch[6]=-110-Math.random()*20}draw(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.strokeStyle=Ai(this.color,this.alpha),e.beginPath(),e.moveTo(0,0),e.lineTo(0,this.branch[0]),e.moveTo(0,this.branch[1]),e.lineTo(this.branch[2],this.branch[3]),e.moveTo(0,this.branch[4]),e.lineTo(this.branch[5],this.branch[6]),e.stroke(),e.restore()}}class P0{constructor(e,n,i){this.x=0,this.y=0,this.width=e,this.height=n,this.vx=0,this.vy=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=i===void 0?"#ffffff":st(i),this.lineWidth=1}draw(e){var n=this.height,i=this.width+n,r=n/2;e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.moveTo(0,-r),e.lineTo(i-2*r,-r),e.quadraticCurveTo(-r+i,-r,-r+i,0),e.lineTo(-r+i,n-2*r),e.quadraticCurveTo(-r+i,-r+n,i-2*r,-r+n),e.lineTo(0,-r+n),e.quadraticCurveTo(-r,-r+n,-r,n-2*r),e.lineTo(-r,0),e.quadraticCurveTo(-r,-r,0,-r),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.beginPath(),e.arc(0,0,2,0,Math.PI*2,!0),e.closePath(),e.stroke(),e.beginPath(),e.arc(this.width,0,2,0,Math.PI*2,!0),e.closePath(),e.stroke(),e.restore()}getPin(){return{x:this.x+Math.cos(this.rotation)*this.width,y:this.y+Math.sin(this.rotation)*this.width}}}class R0{canvas;context;mouse;keyboard;constructor(e){this.canvas=e,this.context=e.getContext("2d",{willReadFrequently:!0}),this.mouse=Ci(this.canvas),this.keyboard=To()}getMouseRotation(e){return ki(e,this.mouse)}followMouse(e,n){const i=this.getMouseRotation(e),{x:r,y:s}=Ti(n,i);return e.x+=r,e.y+=s,e}followMouseWithAcceleration(e,n=.05){const i=this.getMouseRotation(e),{x:r,y:s}=Ti(n,i);return e.ax=r,e.ay=s,Eo(e),e}getMouseDistance(e){return xo(e,this.mouse)}clearRect(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}lineWidth(e){return this.context.lineWidth=e,this}fillStyle(e){return this.context.fillStyle=e,this}fill(){return this.context.fill(),this}strokeStyle(e){return this.context.strokeStyle=e,this}stroke(){return this.context.stroke(),this}createLinearGradient(e,n,i){const r=this.context.createLinearGradient(e.x,e.y,n.x,n.y);return Object.keys(i).forEach(s=>r.addColorStop(parseFloat(s),i[parseFloat(s)])),r}createRadialGradient(e,n,i){const r=this.context.createRadialGradient(e.x,e.y,e.radius,n.x,n.y,n.radius);return Object.keys(i).forEach(s=>r.addColorStop(parseFloat(s),i[parseFloat(s)])),r}moveTo(e){this.context.moveTo(e.x,e.y)}closePath(){this.context.closePath()}lineTo(e,n){this.context.save(),this.context.beginPath(),this.context.moveTo(e.x,e.y),this.context.lineTo(n.x,n.y),this.context.stroke(),this.context.restore()}drawMouseMoveLine(){const e=()=>{this.context.lineTo(this.mouse.x,this.mouse.y),this.stroke()};this.canvas.addEventListener("mousedown",()=>{this.context.beginPath(),this.context.moveTo(this.mouse.x,this.mouse.y),this.canvas.addEventListener("mousemove",e,!1)},!1),this.canvas.addEventListener("mouseup",()=>{this.canvas.removeEventListener("mousemove",e,!1)},!1)}drawMouseMoveBrushLine({brush_size:e,brush_density:n,brush_color:i}={brush_size:25,brush_density:50,brush_color:"#000000"}){const r=this.getImageData(),s=r.data,o=st(i,!0),a=()=>{for(let c=0;c<n;c++){const l=Math.random()*Math.PI*2,f=Math.random()*e,u=this.mouse.x+Math.cos(l)*f|0,d=this.mouse.y+Math.sin(l)*f|0,h=(u+d*r.width)*4;s[h]=o>>16&255,s[h+1]=o>>8&255,s[h+2]=o&255,s[h+3]=255}this.putImageData(r)};this.canvas.addEventListener("mousedown",()=>{this.canvas.addEventListener("mousemove",a,!1)},!1),this.canvas.addEventListener("mouseup",()=>{this.canvas.removeEventListener("mousemove",a,!1)},!1)}quadraticCurveTo(e,n,i){this.context.save(),this.context.beginPath(),this.context.moveTo(e.x,e.y),this.context.quadraticCurveTo(n.x,n.y,i.x,i.y),this.context.stroke(),this.context.restore()}drawQuadraticCurveLine(e){const n=e.length;if(n<3)return new Error("points length must >= 3");this.context.beginPath(),this.context.moveTo(e[0].x,e[0].y);for(let i=1;i<n;i+=2)this.context.quadraticCurveTo(e[i].x,e[i].y,e[i+1].x,e[i+1].y);this.context.stroke()}quadraticThroughCurveTo(e,n,i){n.x=n.x*2-(e.x+i.x)/2,n.y=n.y*2-(e.y+i.y)/2,this.quadraticCurveTo(e,n,i)}drawQuadraticThroughCurveLine(e){const n=e.length;if(n<3)return new Error("points length must >= 3");this.context.beginPath(),this.context.moveTo(e[0].x,e[0].y);let i=1;for(;i<n-2;i++)this.context.quadraticCurveTo(e[i].x,e[i].y,(e[i].x+e[i+1].x)/2,(e[i].y+e[i+1].y)/2);this.context.quadraticCurveTo(e[i].x,e[i].y,e[i+1].x,e[i+1].y),this.context.stroke()}drawQuadraticThroughCurveLineBetter(e){const n=e.length;if(n<3)return new Error("points length must >= 3");const i=(e[0].x+e[n-1].x)/2,r=(e[0].y+e[n-1].y)/2;this.context.beginPath(),this.context.moveTo(i,r);let s=0;for(;s<n-1;s++){const o=(e[s].x+e[s+1].x)/2,a=(e[s].y+e[s+1].y)/2;this.context.quadraticCurveTo(e[s].x,e[s].y,o,a)}this.context.quadraticCurveTo(e[s].x,e[s].y,r,r),this.context.stroke()}fillRect(e){this.context.save(),this.context.fillRect(e.x,e.y,e.width,e.height),this.context.stroke(),this.context.restore()}drawImage(e,n=0,i=0){this.context.drawImage(e,n,i)}getImageData(e={x:0,y:0,width:this.canvas.width,height:this.canvas.height},n){return this.context.getImageData(e.x,e.y,e.width,e.height,n)}putImageData(e,n=0,i=0){return this.context.putImageData(e,n,i)}drawShape(e){e.draw(this.context)}}class Ri{static tryAutoPlayOrAutoPlayAfterClick(e){return new Promise(n=>{e.play().then(()=>{e.autoplay=!0,n(!0)}).catch(i=>{Ri.setAutoPlayWhenClick(e),n(!1)})})}static setAutoPlayWhenClick(e){function n(){e.autoplay=!0,e.play(),document.removeEventListener("click",n),document.removeEventListener("touchend",n)}document.addEventListener("click",n),document.addEventListener("touchend",n)}}function Lo(t,e){return!t||t.parentElement===null?e:Lo(t.parentElement,e.concat([t]))}const Mi=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)},M0=function(t){return Mi(t,"overflow")+Mi(t,"overflow-y")+Mi(t,"overflow-x")},L0=function(t){return/(auto|scroll)/.test(M0(t))};function O0(t){if(!(t instanceof HTMLElement||t instanceof SVGElement))return;const e=Lo(t.parentElement,[]);for(let n=0;n<e.length;n+=1)if(L0(e[n]))return e[n];return document.scrollingElement||document.documentElement}return w.Arrow=y0,w.Ball=v0,w.Ball3d=b0,w.BaseError=Pe,w.Box=x0,w.C2S=d0,w.CanvasPath=R0,w.DOMKeyboardKeyCode=kt,w.Dep=Es,w.EnvironmentError=Oi,w.FileSelectCancelError=pn,w.IllegalFileError=Ui,w.Light=E0,w.Line=S0,w.Matrix=ft,w.Point3d=k0,w.RGBToHex=Bd,w.Segment=P0,w.Ship=T0,w.Slider=A0,w.SvgPath=c0,w.TWEEN=Yd,w.Tree=D0,w.Triangle=C0,w.TriangleLight=I0,w.Vector=hn,w.VideoUtil=Ri,w.WebSocket=Qt,w.addEventListener=za,w.addWatermark=Ef,w.angle2radian=kd,w.animateCanvas=Ga,w.animateInWeb=Vi,w.blobToLinkExport=$h,w.blobToRawImage=Xh,w.captureKeyboard=To,w.captureMouse=Ci,w.capturePointer=jd,w.captureTouch=Nd,w.changeBrightness=bf,w.changeDiaphaneity=xf,w.changeSize=vf,w.checkAnimatedPointCollision=Md,w.checkAnimatedPointWalls=Ld,w.clearCookies=Go,w.clickEvent=qa,w.colorToRGB=Ai,w.compileTemplate=Fa,w.compression=kf,w.copyToClipboard=Sa,w.createXMLHttpRequest=Af,w.drawSpirograph=g0,w.drawStar=p0,w.dynamicStrokeLine=m0,w.fetchUseFetch=Df,w.fetchUseXMLHttpRequest=If,w.fileOrBlobToDataURL=Kn,w.flipSideToSide=Wh,w.flipUpsideDown=Kh,w.getBrowserClient=Qo,w.getBrowserClientVersion=ta,w.getBrowserLanguage=na,w.getCanvasImageData=Wn,w.getCanvasImageDataByBitmap=Hh,w.getCanvasImageDataByVideo=jh,w.getCookie=qo,w.getCookieObject=Zo,w.getDocumentElement=zt,w.getElementLeftInPage=Ni,w.getElementPositionInPage=Bi,w.getElementPositionInPage2=Vo,w.getElementPositionInViewport=Yo,w.getElementTopInPage=ji,w.getFileExtension=Fi,w.getFileType=Oo,w.getFilesImageInfo=Nh,w.getFixedWidthText=Oa,w.getFormElementData=Cf,w.getImageDataByAIData=Tf,w.getImageMainColor=Yh,w.getImageType=ws,w.getInternetExplorerVersion=Gi,w.getMouseButton=Za,w.getMouseOrTouchPositionInElement=Me,w.getMouseOrTouchPositionInPage=Hi,w.getMouseOrTouchPositionInViewport=Ko,w.getOperatingSystem=te,w.getOperatingSystemVersion=Jo,w.getPageClient=wn,w.getPageScroll=mn,w.getPageSize=Xo,w.getPageVerticalScrollPercent=Wo,w.getRawImageInfo=Yn,w.getScrollParent=O0,w.getSelectedText=ka,w.getTarget=Ha,w.getTextWidth=La,w.getTimeZone=ia,w.getURL=$i,w.getUrlParams=ya,w.getUrlParams2=va,w.getUserGeolocationPromise=ea,w.getViewportSize=Re,w.handleDragAndDropFiles=Fo,w.handleHashChange=xa,w.handleHistoryChange=Ea,w.handleInputFiles=Uo,w.handleURLChange=ba,w.hasDocument=ha,w.hasHistory=fa,w.hasProcess=ua,w.hasWindow=Xi,w.htmlElementToBlob=Vh,w.htmlIncodeOrDecode=Ua,w.ifWebFileHasChanged=Pf,w.imageDataToBitmap=qh,w.imageDataToBlob=Gh,w.imageDataToDataURL=Zh,w.isAndroid=Zi,w.isAppleDevice=ra,w.isBrowser=la,w.isBrowserSupportFileAPI=da,w.isDarkMode=oa,w.isElementFocus=Ta,w.isElementInViewport=$o,w.isHexColor=Od,w.isIE=aa,w.isIOS=qi,w.isMobile=sa,w.isNode=ca,w.isPolygonContainPoint=Rd,w.isRectContainPoint=ko,w.isRectIntersectRect=Pd,w.isTabInView=Ca,w.isURL=wa,w.isURLRelative=ma,w.jpgToPng=pf,w.lazyloadImages=Ra,w.leftRotate=Jh,w.loadScript=Pa,w.localstorage=Qn,w.marginSharpen=gf,w.microTask=jo,w.mosaic=Sf,w.navigateBack=Ia,w.navigateBack2=Da,w.newPointDependOnLengthAndRotation=Ti,w.nextFramePoint=Eo,w.nextFramePointEaseToTarget=Cd,w.nextFramePointSpringConnect=Id,w.nextFramePointSpringToTarget=So,w.onDocumentReady=No,w.parseColor=st,w.patchDOM=zi,w.pngToJpg=mf,w.pointDistance=xo,w.pointMiddle=Ad,w.pointRotationRadian=ki,w.preventDefault=ja,w.radian2angle=Td,w.radiusClip=yf,w.randomColorHex=Fd,w.randomColorHex2=zd,w.randomColorNumber=Ud,w.reactiveVue2=Of,w.reactiveVue3=Uf,w.readeFile=Bo,w.rectClip=wf,w.removeEventListener=Ba,w.rightRotate=Qh,w.rotate=xt,w.roundedRect=_0,w.scrollTo=Mf,w.selectFile=zo,w.setCookie=Ho,w.setRem=_a,w.setScrollRestoration=$e,w.setTheme=Rf,w.sharpen=_f,w.siblings=Aa,w.smileFace=w0,w.stopPropagation=Na,w.stringToBlob=ys,w.toBlackAndWhite=nf,w.toBlue=af,w.toBlueAndGreen=hf,w.toBlueAndGrey=df,w.toGreen=of,w.toGreenAndGrey=uf,w.toGrey=tf,w.toGrey2=ef,w.toOpposite=rf,w.toRed=sf,w.toRedAndBlue=cf,w.toRedAndGreen=lf,w.toRedAndGrey=ff,w.trackVelocity=Dd,w.urlsafe_base64decode=pa,w.urlsafe_base64encode=ga,w.waitForStyleSheetsLoaded=Ma,w.watchEffect=Lf,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),w}({});
|
|
17
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function an(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var ke=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,i,r,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=wi(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(p){e={error:p}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else o.remove(this);var f=this.initialTeardown;if(ht(f))try{f()}catch(p){s=p instanceof vi?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=wi(u),h=d.next();!h.done;h=d.next()){var _=h.value;try{_o(_)}catch(p){s=s??[],p instanceof vi?s=Se(Se([],Ee(s)),Ee(p.errors)):s.push(p)}}}catch(p){i={error:p}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}}if(s)throw new vi(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)_o(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&an(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&an(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),fo=ke.EMPTY;function uo(t){return t instanceof ke||t&&"closed"in t&&ht(t.remove)&&ht(t.add)&&ht(t.unsubscribe)}function _o(t){ht(t)?t():t.unsubscribe()}var go={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ad={setTimeout:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,Se([t,e],Ee(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function ld(t){ad.setTimeout(function(){throw t})}function po(){}function ln(t){t()}var bi=function(t){bt(e,t);function e(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,uo(n)&&n.add(i)):i.destination=ud,i}return e.create=function(n,i,r){return new Ei(n,i,r)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(ke),cd=Function.prototype.bind;function xi(t,e){return cd.call(t,e)}var hd=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(i){cn(i)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(i){cn(i)}else cn(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){cn(n)}},t}(),Ei=function(t){bt(e,t);function e(n,i,r){var s=t.call(this)||this,o;if(ht(n)||!n)o={next:n??void 0,error:i??void 0,complete:r??void 0};else{var a;s&&go.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return s.unsubscribe()},o={next:n.next&&xi(n.next,a),error:n.error&&xi(n.error,a),complete:n.complete&&xi(n.complete,a)}):o=n}return s.destination=new hd(o),s}return e}(bi);function cn(t){ld(t)}function fd(t){throw t}var ud={closed:!0,next:po,error:fd,complete:po},dd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _d(t){return t}function gd(t){return t.length===0?_d:t.length===1?t[0]:function(e){return t.reduce(function(n,i){return i(n)},e)}}var mo=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,i){var r=this,s=md(e)?e:new Ei(e,n,i);return ln(function(){var o=r,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?r._subscribe(s):r._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var i=this;return n=wo(n),new n(function(r,s){var o=new Ei({next:function(a){try{e(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:r});i.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[dd]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return gd(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=wo(e),new e(function(i,r){var s;n.subscribe(function(o){return s=o},function(o){return r(o)},function(){return i(s)})})},t.create=function(e){return new t(e)},t}();function wo(t){var e;return(e=t??go.Promise)!==null&&e!==void 0?e:Promise}function pd(t){return t&&ht(t.next)&&ht(t.error)&&ht(t.complete)}function md(t){return t&&t instanceof bi||pd(t)&&uo(t)}(function(t){bt(e,t);function e(n,i,r,s,o,a){var c=t.call(this,n)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(l){try{i(l)}catch(f){n.error(f)}}:t.prototype._next,c._error=s?function(l){try{s(l)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=r?function(){try{r()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;t.prototype.unsubscribe.call(this),!i&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e})(bi);var wd=yi(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yd=function(t){bt(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var i=new yo(this,this);return i.operator=n,i},e.prototype._throwIfClosed=function(){if(this.closed)throw new wd},e.prototype.next=function(n){var i=this;ln(function(){var r,s;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=wi(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(n)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}}})},e.prototype.error=function(n){var i=this;ln(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var r=i.observers;r.length;)r.shift().error(n)}})},e.prototype.complete=function(){var n=this;ln(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var i=this,r=this,s=r.hasError,o=r.isStopped,a=r.observers;return s||o?fo:(this.currentObservers=null,a.push(n),new ke(function(){i.currentObservers=null,an(a,n)}))},e.prototype._checkFinalizedStatuses=function(n){var i=this,r=i.hasError,s=i.thrownError,o=i.isStopped;r?n.error(s):o&&n.complete()},e.prototype.asObservable=function(){var n=new mo;return n.source=this,n},e.create=function(n,i){return new yo(n,i)},e}(mo),yo=function(t){bt(e,t);function e(n,i){var r=t.call(this)||this;return r.destination=n,r.source=i,r}return e.prototype.next=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,n)},e.prototype.error=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.call(i,n)},e.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},e.prototype._subscribe=function(n){var i,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&r!==void 0?r:fo},e}(yd),vd={now:function(){return Date.now()},delegate:void 0},bd=function(t){bt(e,t);function e(n,i){return t.call(this)||this}return e.prototype.schedule=function(n,i){return this},e}(ke),Si={setInterval:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=Si.delegate;return r?.setInterval?r.setInterval.apply(r,Se([t,e],Ee(n))):setInterval.apply(void 0,Se([t,e],Ee(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},xd=function(t){bt(e,t);function e(n,i){var r=t.call(this,n,i)||this;return r.scheduler=n,r.work=i,r.pending=!1,r}return e.prototype.schedule=function(n,i){var r;if(i===void 0&&(i=0),this.closed)return this;this.state=n;var s=this.id,o=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(o,s,i)),this.pending=!0,this.delay=i,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(o,this.id,i),this},e.prototype.requestAsyncId=function(n,i,r){return r===void 0&&(r=0),Si.setInterval(n.flush.bind(n,this),r)},e.prototype.recycleAsyncId=function(n,i,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return i;i!=null&&Si.clearInterval(i)},e.prototype.execute=function(n,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(n,i);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,i){var r=!1,s;try{this.work(n)}catch(o){r=!0,s=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,i=n.id,r=n.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,an(s,this),i!=null&&(this.id=this.recycleAsyncId(r,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bd),vo=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,i){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(i,n)},t.now=vd.now,t}(),Ed=function(t){bt(e,t);function e(n,i){i===void 0&&(i=vo.now);var r=t.call(this,n,i)||this;return r.actions=[],r._active=!1,r}return e.prototype.flush=function(n){var i=this.actions;if(this._active){i.push(n);return}var r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=i.shift());if(this._active=!1,r){for(;n=i.shift();)n.unsubscribe();throw r}},e}(vo);new Ed(xd);function Sd(t){switch(t.responseType){case"json":{if("response"in t)return t.response;var e=t;return JSON.parse(e.responseText)}case"document":return t.responseXML;case"text":default:{if("response"in t)return t.response;var e=t;return e.responseText}}}var bo=yi(function(t){return function(e,n,i){this.message=e,this.name="AjaxError",this.xhr=n,this.request=i,this.status=n.status,this.responseType=n.responseType;var r;try{r=Sd(n)}catch{r=n.responseText}this.response=r}});(function(){function t(e,n){return bo.call(this,"ajax timeout",e,n),this.name="AjaxTimeoutError",this}return t.prototype=Object.create(bo.prototype),t})();const kd=t=>t*Math.PI/180,Td=t=>t*180/Math.PI,xo=function(t,e){const n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)},Ad=function(t,e){return{x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}},ki=function(t,e){const n=e.x-t.x,i=e.y-t.y;return Math.atan2(i,n)},Ti=(t,e)=>({x:Math.cos(e)*t,y:Math.sin(e)*t}),Eo=(t,e=0,n=0)=>{if(t.vx+=t.ax??0,t.vy+=t.ay??0,t.vy+=e,n>0){const i=Math.atan2(t.vy,t.vx);let r=Math.sqrt(t.vx*t.vx+t.vy*t.vy);r>n?r-=n:r=0,t.vx=Math.cos(i)*r,t.vy=Math.sin(i)*r}t.x+=t.vx,t.y+=t.vy},Cd=(t,e,n=.05,i=1,r=0)=>{const s=e.x-t.x,o=e.y-t.y;t.vx=s*n,t.vy=o*n,t.vy+=r,t.vx*=i,t.vy*=i,t.x+=t.vx,t.y+=t.vy},So=(t,e,n=.03,i=.95,r=0)=>{(zf(e)?e:[e]).forEach(o=>{const a=o.x-t.x,c=o.y-t.y,l=a*n,f=c*n;t.vx+=l,t.vy+=f}),t.vy+=r,t.vx*=i,t.vy*=i,t.x+=t.vx,t.y+=t.vy},Id=(t,e,n=100,i=.03,r=.95,s=0)=>{const o=ki(t,e),a={x:e.x-Math.cos(o)*n,y:e.y-Math.sin(o)*n};So(t,a,i,r,s)};function Dd(t,e){return{vx:e.x-t.x,vy:e.y-t.y}}const Pd=function(t,e){return!(t.x+t.width<e.x||e.x+e.width<t.x||t.y+t.height<e.y||e.y+e.height<t.y)},ko=function(t,e){return!(e.x<t.x||e.x>t.x+t.width||e.y<t.y||e.y>t.y+t.height)},Rd=(t,e)=>{const n=e.x,i=e.y,r=t.length;let s=!1;const o=2e-10;for(let a=0,c=r-1;a<r;c=a,a++){const l=t[a].x,f=t[a].y,u=t[c].x,d=t[c].y;if(l===n&&f===i||u===n&&d===i||i===f&&i===d)return!0;if(i>=f&&i<d||i<f&&i>=d){const h=(u-l)/(d-f),_=l+h*(i-f);if(_===n||Math.abs(_-n)<o)return!0;_>n&&(s=!s)}}return s};function xt(t,e,n,i,r=!1){return{x:r?t*i+e*n:t*i-e*n,y:r?e*i-t*n:e*i+t*n}}function Md(t,e){const n=e.x-t.x,i=e.y-t.y;if(Math.sqrt(n*n+i*i)<t.radius+e.radius){const s=Math.atan2(i,n),o=Math.sin(s),a=Math.cos(s),c={x:0,y:0},l=xt(n,i,o,a,!0),f=xt(t.vx,t.vy,o,a,!0),u=xt(e.vx,e.vy,o,a,!0),d=f.x-u.x;f.x=((t.mass-e.mass)*f.x+2*e.mass*u.x)/(t.mass+e.mass),u.x=d+f.x;const h=Math.abs(f.x)+Math.abs(u.x),_=t.radius+e.radius-Math.abs(c.x-l.x);c.x+=f.x/h*_,l.x+=u.x/h*_;const p=xt(c.x,c.y,o,a,!1),g=xt(l.x,l.y,o,a,!1);e.x=t.x+g.x,e.y=t.y+g.y,t.x=t.x+p.x,t.y=t.y+p.y;const m=xt(f.x,f.y,o,a,!1),y=xt(u.x,u.y,o,a,!1);t.vx=m.x,t.vy=m.y,e.vx=y.x,e.vy=y.y}}function Ld(t,e=0,n=0,i,r,s=-1){t.x+t.radius>i?(t.x=i-t.radius,t.vx*=s):t.x-t.radius<e&&(t.x=e+t.radius,t.vx*=s),t.y+t.radius>r?(t.y=r-t.radius,t.vy*=s):t.y-t.radius<n&&(t.y=n+t.radius,t.vy*=s)}const Od=t=>/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(t),Ud=()=>Math.random()*16777215,Fd=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,zd=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,st=function(t,e){return e===!0?typeof t=="number"?t|0:(typeof t=="string"&&t[0]==="#"&&(t=t.slice(1)),window.parseInt(t,16)):(typeof t=="number"&&(t="00000"+(t|0).toString(16),t="#"+t.substring(t.length-6)),t)},Ai=function(t,e){typeof t=="string"&&t[0]==="#"&&(t=window.parseInt(t.slice(1),16)),e=e===void 0?1:e;const n=t>>16&255,i=t>>8&255,r=t&255,s=e<0?0:e>1?1:e;return s===1?"rgb("+n+","+i+","+r+")":"rgba("+n+","+i+","+r+","+s+")"},Bd=t=>{const n=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(t);return n?"#"+((1<<24)+(parseInt(n[1])<<16)+(parseInt(n[2])<<8)+parseInt(n[3])).toString(16).slice(1):""},To=function(){const t={code:""},e=n=>{t.code=n.code.toLowerCase()};return window.addEventListener("keydown",e,!1),t},Ci=function(t){const e={x:0,y:0,isDown:!1},n=s=>{e.isDown=!0,document.addEventListener("mouseup",i,!1),t.style.userSelect="none",t.style.webkitUserSelect="none"},i=s=>{e.isDown=!1,e.x=0,e.y=0,document.removeEventListener("mouseup",i,!1),t.style.userSelect="",t.style.webkitUserSelect=""},r=s=>{const o=Me(t,s);e.x=o.x,e.y=o.y};return t.addEventListener("mousedown",n,!1),document.addEventListener("mousemove",r,!1),e},Nd=function(t){const e={x:0,y:0,isDown:!1},n=s=>{s.preventDefault(),e.isDown=!0},i=s=>{e.isDown=!1,e.x=0,e.y=0},r=s=>{const o=s.changedTouches[0],a=Me(t,o);e.x=a.x,e.y=a.y};return t.addEventListener("touchstart",n,!1),t.addEventListener("touchend",i,!1),t.addEventListener("touchcancel",i,!1),t.addEventListener("touchmove",r,!1),e},jd=function(t){const e={x:0,y:0,isDown:!1},n=s=>{e.isDown=!0,t.setPointerCapture(s.pointerId),t.style.userSelect="none",t.style.webkitUserSelect="none"},i=s=>{e.isDown=!1,e.x=0,e.y=0,t.style.userSelect="",t.style.webkitUserSelect=""},r=s=>{const a=Me(t,s);e.x=a.x,e.y=a.y};return t.addEventListener("pointerdown",n,!1),t.addEventListener("pointerup",i,!1),t.addEventListener("pointercancel",i,!1),t.addEventListener("pointermove",r,!1),e};class ft{m;constructor(e=[1,0,0,1,0,0]){this.m=[e[0],e[1],e[2],e[3],e[4],e[5]]}unit(){return this.m=[1,0,0,1,0,0],this}multiply(e){const n=this.m;let i;e instanceof ft?i=e.m:i=e;const r=n[0]*i[0]+n[2]*i[1],s=n[1]*i[0]+n[3]*i[1],o=n[0]*i[2]+n[2]*i[3],a=n[1]*i[2]+n[3]*i[3],c=n[0]*i[4]+n[2]*i[5]+n[4],l=n[1]*i[4]+n[3]*i[5]+n[5];return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=c,n[5]=l,this}inverse(){const e=new ft(this.m),n=e.m,i=1/(n[0]*n[3]-n[1]*n[2]),r=n[3]*i,s=-n[1]*i,o=-n[2]*i,a=n[0]*i,c=i*(n[2]*n[5]-n[3]*n[4]),l=i*(n[1]*n[4]-n[0]*n[5]);return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=c,n[5]=l,e}translate(e,n){return this.multiply([1,0,0,1,e,n])}rotate(e){const n=e*Math.PI/180,i=Math.cos(n),r=Math.sin(n);return this.multiply([i,r,-r,i,0,0])}skew(e,n=0){const i=e*Math.PI/180,r=n*Math.PI/180,s=Math.tan(i),o=Math.tan(r);return this.multiply([1,o,s,1,0,0])}scale(e,n){return this.multiply([e,0,0,n,0,0])}transformPoint(e,n){const i=e,r=n;return e=i*this.m[0]+r*this.m[2]+this.m[4],n=i*this.m[1]+r*this.m[3]+this.m[5],[e,n]}transformVector(e,n){const i=e,r=n;return e=i*this.m[0]+r*this.m[2],n=i*this.m[1]+r*this.m[3],[e,n]}}class hn{x;y;z;constructor(e=[0,0,0],n=[0,0,0]){const[i,r,s]=e,[o,a,c]=n;this.x=i-o,this.y=r-a,this.z=s-c}get length(){const{x:e,y:n,z:i}=this;return Math.sqrt(e*e+n*n+i*i)}unit(){const e=this.length;return new hn([this.x/e,this.y/e,this.z/e])}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}cross(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z;return new hn([i*a-r*o,r*s-n*a,n*o-s*i])}}const Wt={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}},Exponential:{In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}},Back:{In:function(t){return t===1?1:t*t*((1.70158+1)*t-1.70158)},Out:function(t){return t===0?0:--t*t*((1.70158+1)*t+1.70158)+1},InOut:function(t){const e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-Wt.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?Wt.Bounce.In(t*2)*.5:Wt.Bounce.Out(t*2-1)*.5+.5}},generatePow:function(t=4){return t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return e**t},Out:function(e){return 1-(1-e)**t},InOut:function(e){return e<.5?(e*2)**t/2:(1-(2-e*2)**t)/2+.5}}},random:function(t){return Math.random()},createStep:function(t){return function(e){return Math.floor(e*t)/t}},createNoisyEasing:function(t,e=.1){const n=1-e;return function(i){return e*Math.random()+n*t(i)}}};let Te;typeof self>"u"&&typeof process<"u"&&process.hrtime?Te=function(){const t=process.hrtime();return t[0]*1e3+t[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?Te=self.performance.now.bind(self.performance):Date.now!==void 0?Te=Date.now:Te=function(){return new Date().getTime()};const Kt=Te;class Ao{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(e=>this._tweens[e])}removeAll(){this._tweens={}}add(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e}remove(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]}update(e=Kt(),n=!1){let i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<i.length;r++){const s=this._tweens[i[r]],o=!n;s&&s.update(e,o)===!1&&!n&&delete this._tweens[i[r]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0}}const Lt={Linear:function(t,e){const n=t.length-1,i=n*e,r=Math.floor(i),s=Lt.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){let n=0;const i=t.length-1,r=Math.pow,s=Lt.Utils.Bernstein;for(let o=0;o<=i;o++)n+=r(1-e,i-o)*r(e,o)*t[o]*s(i,o);return n},CatmullRom:function(t,e){const n=t.length-1;let i=n*e,r=Math.floor(i);const s=Lt.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Factorial:function(){const t=[1];return function(e){let n=1;if(t[e])return t[e];for(let i=e;i>1;i--)n*=i;return t[e]=n,n}}(),Bernstein:function(t,e){const n=Lt.Utils.Factorial;return n(t)/n(e)/n(t-e)},CatmullRom:function(t,e,n,i,r){const s=(n-t)*.5,o=(i-e)*.5,a=r*r,c=r*a;return(2*e-2*n+s+o)*c+(-3*e+3*n-2*s-o)*a+s*r+e}}};class Ae{static _nextId=0;static nextId(){return Ae._nextId++}}const K=new Ao;class Hd{constructor(e,n=K){this._object=e,this._group=n}_id=Ae.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=Wt.Linear.None;_interpolationFunction=Lt.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(e,n){return this._valuesEnd=Object.create(e),n!==void 0&&(this._durationTime=n),this}duration(e=1e3){return this._durationTime=e,this}start(e=Kt()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(e,n,i,r){for(const s in i){const o=e[s],a=Array.isArray(o),c=a?"array":typeof o,l=!a&&Array.isArray(i[s]);if(!(c==="undefined"||c==="function")){if(l){let f=i[s];if(f.length===0)continue;f=f.map(this._handleRelativeValue.bind(this,o)),i[s]=[o].concat(f)}if((c==="object"||a)&&o&&!l){n[s]=a?[]:{};for(const f in o)n[s][f]=o[f];r[s]=a?[]:{},this._setupProperties(o,n[s],i[s],r[s])}else typeof n[s]>"u"&&(n[s]=o),a||(n[s]*=1),l?r[s]=i[s].slice().reverse():r[s]=n[s]||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(e=Kt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=e,this._group&&this._group.remove(this),this)}resume(e=Kt()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this}group(e=K){return this._group=e,this}delay(e=0){return this._delayTime=e,this}repeat(e=0){return this._initialRepeat=e,this._repeat=e,this}repeatDelay(e){return this._repeatDelayTime=e,this}yoyo(e=!1){return this._yoyo=e,this}easing(e=Wt.Linear.None){return this._easingFunction=e,this}interpolation(e=Lt.Linear){return this._interpolationFunction=e,this}chain(...e){return this._chainedTweens=e,this}onStart(e){return this._onStartCallback=e,this}onEveryStart(e){return this._onEveryStartCallback=e,this}onUpdate(e){return this._onUpdateCallback=e,this}onRepeat(e){return this._onRepeatCallback=e,this}onComplete(e){return this._onCompleteCallback=e,this}onStop(e){return this._onStopCallback=e,this}update(e=Kt(),n=!0){if(this._isPaused)return!0;let i,r;const s=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(e>s)return!1;n&&this.start(e)}if(this._goToEnd=!1,e<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),r=(e-this._startTime)/this._durationTime,r=this._durationTime===0||r>1?1:r;const o=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(e,n,i,r){for(const s in i){if(n[s]===void 0)continue;const o=n[s]||0;let a=i[s];const c=Array.isArray(e[s]),l=Array.isArray(a);!c&&l?e[s]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(e[s],o,a,r):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(e[s]=o+(a-o)*r))}}_handleRelativeValue(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)}_swapEndStartRepeatValues(e){const n=this._valuesStartRepeat[e],i=this._valuesEnd[e];typeof i=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(i):this._valuesStartRepeat[e]=i,this._valuesEnd[e]=n}}const qd=Ae.nextId,Zd=K.getAll.bind(K),Gd=K.removeAll.bind(K),Xd=K.add.bind(K),$d=K.remove.bind(K),Vd=K.update.bind(K),Yd={Easing:Wt,Group:Ao,Interpolation:Lt,now:Kt,Sequence:Ae,nextId:qd,Tween:Hd,getAll:Zd,removeAll:Gd,add:Xd,remove:$d,update:Vd};function Co(t){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",t),e}function Wd(t,e){const n=Co(t),{x:i,y:r}=n.getPointAtLength(e);return[i,r]}function Kd(t,e){return Co(t).getTotalLength(e)}let J=null;function Jd({d:t},e,n){J||(J=document.createElement("canvas").getContext("2d"));const i=new Path2D(t);return J.isPointInPath(i,e,n)}function Io({d:t},e,n,{lineWidth:i=1,lineCap:r="butt",lineJoin:s="miter"}){if(J||(J=document.createElement("canvas").getContext("2d")),J.isPointInStroke){J.save(),J.lineWidth=i,J.lineCap=r,J.lineJoin=s;const o=new Path2D(t),a=J.isPointInStroke(o,e,n);return J.restore(),a}}var Ii={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Qd=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function t0(t){var e=[];return t.replace(Qd,function(n,i,r){var s=i.toLowerCase();for(r=n0(r),s=="m"&&r.length>2&&(e.push([i].concat(r.splice(0,2))),s="l",i=i=="m"?"l":"L");;){if(r.length==Ii[s])return r.unshift(i),e.push(r);if(r.length<Ii[s])throw new Error("malformed path data");e.push([i].concat(r.splice(0,Ii[s])))}}),e}var e0=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function n0(t){var e=t.match(e0);return e?e.map(Number):[]}function i0(t){var e=0,n=0,i=0,r=0;return t.map(function(s){s=s.slice();var o=s[0],a=o.toUpperCase();if(o!=a)switch(s[0]=a,o){case"a":s[6]+=i,s[7]+=r;break;case"v":s[1]+=r;break;case"h":s[1]+=i;break;default:for(var c=1;c<s.length;)s[c++]+=i,s[c++]+=r}switch(a){case"Z":i=e,r=n;break;case"H":i=s[1];break;case"V":r=s[1];break;case"M":i=e=s[1],r=n=s[2];break;default:i=s[s.length-2],r=s[s.length-1]}return s})}const Ce=Math.PI*2;function Do(t,e,n,i){const r=t*i-e*n<0?-1:1;let s=t*n+e*i;return s>1&&(s=1),s<-1&&(s=-1),r*Math.acos(s)}function r0(t,e,n,i,r,s,o,a,c,l){const f=l*(t-n)/2+c*(e-i)/2,u=-c*(t-n)/2+l*(e-i)/2,d=o*o,h=a*a,_=f*f,p=u*u;let g=d*h-d*p-h*_;g<0&&(g=0),g/=d*p+h*_,g=Math.sqrt(g)*(r===s?-1:1);const m=g*o/a*u,y=g*-a/o*f,b=l*m-c*y+(t+n)/2,v=c*m+l*y+(e+i)/2,E=(f-m)/o,x=(u-y)/a,S=(-f-m)/o,C=(-u-y)/a,T=Do(1,0,E,x);let A=Do(E,x,S,C);return s===0&&A>0&&(A-=Ce),s===1&&A<0&&(A+=Ce),[b,v,T,A]}function s0(t,e){const n=1.3333333333333333*Math.tan(e/4),i=Math.cos(t),r=Math.sin(t),s=Math.cos(t+e),o=Math.sin(t+e);return[i,r,i-r*n,r+i*n,s+o*n,o-s*n,s,o]}function o0(t,e,n,i,r,s,o,a,c){const l=Math.sin(c*Ce/360),f=Math.cos(c*Ce/360),u=f*(t-n)/2+l*(e-i)/2,d=-l*(t-n)/2+f*(e-i)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const h=u*u/(o*o)+d*d/(a*a);h>1&&(o*=Math.sqrt(h),a*=Math.sqrt(h));const _=r0(t,e,n,i,r,s,o,a,l,f),p=[];let g=_[2],m=_[3];const y=Math.max(Math.ceil(Math.abs(m)/(Ce/4)),1);m/=y;for(let b=0;b<y;b++)p.push(s0(g,m)),g+=m;return p.map(b=>{for(let v=0;v<b.length;v+=2){let E=b[v+0],x=b[v+1];E*=o,x*=a;const S=f*E-l*x,C=l*E+f*x;b[v+0]=S+_[0],b[v+1]=C+_[1]}return b})}function a0(t){for(var e,n=[],i=0,r=0,s=0,o=0,a=null,c=null,l=0,f=0,u=0,d=t.length;u<d;u++){var h=t[u],_=h[0];switch(_){case"M":s=h[1],o=h[2];break;case"A":var p=o0(l,f,h[6],h[7],h[4],h[5],h[1],h[2],h[3]);if(!p.length)continue;p=p.map(v=>{const[E,x,S,C,T,A,D,P]=v;return{x1:S,y1:C,x2:T,y2:A,x:D,y:P}});for(var g=0,m;g<p.length;g++)m=p[g],h=["C",m.x1,m.y1,m.x2,m.y2,m.x,m.y],g<p.length-1&&n.push(h);break;case"S":var y=l,b=f;(e=="C"||e=="S")&&(y+=y-i,b+=b-r),h=["C",y,b,h[1],h[2],h[3],h[4]];break;case"T":e=="Q"||e=="T"?(a=l*2-a,c=f*2-c):(a=l,c=f),h=Po(l,f,a,c,h[1],h[2]);break;case"Q":a=h[1],c=h[2],h=Po(l,f,h[1],h[2],h[3],h[4]);break;case"L":h=fn(l,f,h[1],h[2]);break;case"H":h=fn(l,f,h[1],f);break;case"V":h=fn(l,f,l,h[1]);break;case"Z":h=fn(l,f,s,o);break}e=_,l=h[h.length-2],f=h[h.length-1],h.length>4?(i=h[h.length-4],r=h[h.length-3]):(i=l,r=f),n.push(h)}return n}function fn(t,e,n,i){return["C",t,e,n,i,n,i]}function Po(t,e,n,i,r,s){return["C",t/3+.6666666666666666*n,e/3+.6666666666666666*i,r/3+.6666666666666666*n,s/3+.6666666666666666*i,r,s]}function l0(t){return typeof t!="string"?!1:(t=t.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4)}const un=Symbol("initialPath"),ut=Symbol("path"),Et=Symbol("bounds"),dn=Symbol("savedPaths"),dt=Symbol("renderProps"),Di=Symbol("beginPath");class c0{constructor(e){if(!l0(e))throw new Error("Not an SVG path!");this[un]=i0(t0(e)),this[ut]=a0(this[un]),this[Et]=null,this[dn]=[],this[dt]={},this[Di]=!1}save(){return this[dn].push({path:this[ut],bounds:this[Et],renderProps:Object.assign({},this[dt])}),this}restore(){if(this[dn].length){const{path:e,bounds:n,renderProps:i}=this[dn].pop();this[ut]=e,this[Et]=n,this[dt]=i}return this}get bounds(){if(!this[Et]){const e=this[ut];if(this[Et]=[0,0,0,0],e.length){const n=[1/0,1/0,-1/0,-1/0];for(let i=0,r=e.length;i<r;i++){const s=e[i].slice(1);for(let o=0;o<s.length;o+=2)s[o+0]<n[0]&&(n[0]=s[o+0]),s[o+1]<n[1]&&(n[1]=s[o+1]),s[o+0]>n[2]&&(n[2]=s[o+0]),s[o+1]>n[3]&&(n[3]=s[o+1])}this[Et]=n}}return this[Et]}get size(){const e=this.bounds;return[e[2]-e[0],e[3]-e[1]]}get center(){const[e,n,i,r]=this.bounds;return[(e+i)/2,(n+r)/2]}get d(){let e=this[ut].map(n=>{const[i,...r]=n;return i+r.join()}).join("");return this.isClosed&&(e+="Z"),e}get path(){return this[ut]}get isClosed(){const e=this[un][this[un].length-1];return e&&e[0]==="Z"}isPointInPath(e,n){return Jd(this,e,n)}isPointInStroke(e,n,{lineWidth:i=1,lineCap:r="butt",lineJoin:s="miter"}){if(Io)return Io(this,e,n,{lineWidth:i,lineCap:r,lineJoin:s})}getPointAtLength(e){return Wd(this.d,e)}getTotalLength(){return Kd(this.d)}transform(...e){this[Et]=null;const n=new ft(e),i=this[ut];return this[ut]=i.map(r=>{const[s,...o]=r,a=[s];for(let c=0;c<o.length;c+=2){const l=o[c],f=o[c+1],[u,d]=n.transformPoint(l,f);a.push(u,d)}return a}),this}translate(e,n){const i=new ft().translate(e,n);return this.transform(...i.m)}rotate(e){const n=new ft().rotate(e);return this.transform(...n.m)}scale(e,n){n==null&&(n=e);const i=new ft().scale(e,n);return this.transform(...i.m)}skew(e,n){const i=new ft().skew(e,n);return this.transform(...i.m)}trim(){const[e,n]=this.bounds;return this.translate(-e,-n),this}beginPath(){return this[Di]=!0,this}toCanvas(e){const n=this[ut],i=this[dt];return n.length&&(this[Di]&&e.beginPath(),n.forEach(r=>{const[s,...o]=r;s==="M"?e.moveTo(...o):e.bezierCurveTo(...o)}),this.isClosed&&e.closePath()),Object.assign(e,i),{stroke(){return e.stroke(),this},fill(){return e.fill(),this}}}strokeStyle(e){return this[dt].strokeStyle=e,this}fillStyle(e){return this[dt].fillStyle=e,this}lineWidth(e){return this[dt].lineWidth=e,this}lineCap(e){return this[dt].lineCap=e,this}lineJoin(e){return this[dt].lineJoin=e,this}}const Ro=h0("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 h0(t,e=10){const n={},i=t.split(",");for(let r=0;r<i.length;r+=2){const s="&"+i[r+1]+";",o=parseInt(i[r],e);n[s]="&#"+o+";"}return n["\\xa0"]=" ",n}function Z(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t=t.replace(new RegExp("{"+n[i]+"}","gi"),""+e[n[i]]);return t}function _n(t){let e,n;if(!t)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";e="";do for(e="",n=0;n<12;n++)e+=i[Math.floor(Math.random()*i.length)];while(t[e]);return e}function f0(t){const e={left:"start",right:"end",center:"middle",start:"start",end:"end"};return e[t]||e.start}function u0(t){const e={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return e[t]||e.alphabetic}const Ie={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"}};class Pi{__root;__ctx;constructor(e,n){this.__root=e,this.__ctx=n}addColorStop(e,n){const i=this.__ctx.__createElement("stop");if(i.setAttribute("offset",""+e),n.indexOf("rgba")!==-1){const s=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(n);s&&(i.setAttribute("stop-color",Z("rgb({r},{g},{b})",{r:s[1],g:s[2],b:s[3]})),i.setAttribute("stop-opacity",s[4]))}else i.setAttribute("stop-color",n);this.__root.appendChild(i)}}class Mo{__root;__ctx;constructor(e,n){this.__root=e,this.__ctx=n}}class gn{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:e,width:n=500,height:i=500,enableMirroring:r=!1}){this.enableMirroring=r,e?(this.__canvas=e,this.__ctx=e.getContext("2d"),this.width=e.width,this.height=e.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=n,this.height=i),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 e=Object.keys(Ie);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=Ie[r].canvas}}__getStyleState(){const e={},n=Object.keys(Ie);for(let i=0,r=n.length;i<r;i++){const s=n[i];e[s]=this[s]}return e}__applyStyleState(e){const n=Object.keys(e);for(let i=0,r=n.length;i<r;i++){const s=n[i];this[s]=e[s]}}__createElement(e,n={},i=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",e),s=Object.keys(n);i&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let o=0;o<s.length;o++){const a=s[o];r.setAttribute(a,n[a])}return r}__applyStyleToCurrentElement(e){let n=this.__currentElement;const i=this.__currentElementsToStyle;i&&(n.setAttribute(e,""),n=i.element,i.children.forEach(s=>{s.setAttribute(e,"")}));const r=Object.keys(Ie);for(let s=0;s<r.length;s++){const o=Ie[r[s]],a=this[r[s]];if(o.apply){if(a instanceof Mo){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}n.setAttribute(o.apply,Z("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Pi)n.setAttribute(o.apply,Z("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(e)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const l=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);n.setAttribute(o.svgAttr,Z("rgb({r},{g},{b})",{r:l[1],g:l[2],b:l[3]}));let f=parseFloat(l[4]);const u=this.globalAlpha;u!=null&&(f*=u),n.setAttribute(o.svgAttr+"-opacity",""+f)}else{let c=o.svgAttr;if(r[s]==="globalAlpha"&&(c=e+"-"+o.svgAttr,n.getAttribute(c)))continue;c&&n.setAttribute(c,a)}}}}__closestGroupOrSvg(e){return e=e||this.__currentElement,e.nodeName==="g"||e.nodeName==="svg"?e:this.__closestGroupOrSvg(e.parentNode)}getSerializedSvg(e){let n=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(n)&&(n=n.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),e){const r=Object.keys(Ro);for(let s=0,o=r.length;s<o;s++){const a=r[s],c=Ro[a],l=new RegExp(a,"gi");l.test(n)&&(n=n.replace(l,c))}}return n}getSvg(){return this.__rootSVG}save(){const e=this.__createElement("g"),n=this.__closestGroupOrSvg();this.__groupStack.push(n),n.appendChild(e),this.__currentElement=e,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const e=this.__groupStack.pop();e?this.__currentElement=e:this.__currentElement=this.__rootSVG.childNodes[1];const n=this.__styleStack.pop();n&&this.__applyStyleState(n)}__addTransform(e){const n=this.__closestGroupOrSvg();if(n.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:n,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const r=this.__createElement("g");n.appendChild(r),this.__currentElement=r}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=e,this.__currentElement.setAttribute("transform",i)}scale(e,n){n===void 0&&(n=e),this.__addTransform(Z("scale({x},{y})",{x:e,y:n}))}rotate(e){const n=e*180/Math.PI;this.__addTransform(Z("rotate({angle},{cx},{cy})",{angle:n,cx:0,cy:0}))}translate(e,n){this.__addTransform(Z("translate({x},{y})",{x:e,y:n}))}transform(e,n,i,r,s,o){this.__addTransform(Z("matrix({a},{b},{c},{d},{e},{f})",{a:e,b:n,c:i,d:r,e:s,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const e=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(e),this.__currentElement=e}__applyCurrentDefaultPath(){const e=this.__currentElement;e.nodeName==="path"?e.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",e.nodeName)}__addPathCommand(e){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=e}moveTo(e,n){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:e,y:n},this.__addPathCommand(Z("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(e,n){this.__currentPosition={x:e,y:n},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Z("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Z("M {x} {y}",this.__currentPosition))}bezierCurveTo(e,n,i,r,s,o){this.__currentPosition={x:s,y:o},this.__addPathCommand(Z("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:e,cp1y:n,cp2x:i,cp2y:r,x:s,y:o}))}quadraticCurveTo(e,n,i,r){this.__currentPosition={x:i,y:r},this.__addPathCommand(Z("Q {cpx} {cpy} {x} {y}",{cpx:e,cpy:n,x:i,y:r}))}normalize(e){const n=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/n,e[1]/n]}arcTo(e,n,i,r,s){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(o===e&&a===n||e===i&&n===r||s===0){this.lineTo(e,n);return}const c=this.normalize([o-e,a-n]),l=this.normalize([i-e,r-n]);if(c[0]*l[1]===c[1]*l[0]){this.lineTo(e,n);return}const f=c[0]*l[0]+c[1]*l[1],u=Math.acos(Math.abs(f)),d=this.normalize([c[0]+l[0],c[1]+l[1]]),h=s/Math.sin(u/2),_=e+h*d[0],p=n+h*d[1],g=[-c[1],c[0]],m=[l[1],-l[0]],y=function(E){const x=E[0];return E[1]>=0?Math.acos(x):-Math.acos(x)},b=y(g),v=y(m);this.lineTo(_+g[0]*s,p+g[1]*s),this.arc(_,p,s,b,v)}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(e,n,i,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(e,n),this.lineTo(e+i,n),this.lineTo(e+i,n+r),this.lineTo(e,n+r),this.lineTo(e,n),this.closePath()}fillRect(e,n,i,r){const s=this.__createElement("rect",{x:e,y:n,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(e,n,i,r){const s=this.__createElement("rect",{x:e,y:n,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const n=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],r=i.childNodes;for(let s=r.length-1;s>=0;s--)r[s]&&i.removeChild(r[s]);this.__currentElement=i,this.__groupStack=[],n&&this.__addTransform(n)}clearRect(e,n,i,r){if(e===0&&n===0&&i===this.width&&r===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:e,y:n,width:i,height:r,fill:"#FFFFFF"},!0);s.appendChild(o)}createLinearGradient(e,n,i,r){const s=this.__createElement("linearGradient",{id:_n(this.__ids),x1:e+"px",x2:i+"px",y1:n+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new Pi(s,this)}createRadialGradient(e,n,i,r,s,o){const a=this.__createElement("radialGradient",{id:_n(this.__ids),cx:r+"px",cy:s+"px",r:o+"px",fx:e+"px",fy:n+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Pi(a,this)}__parseFont(){const n=/^\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),i={style:n[1]||"normal",size:n[4]||"10px",family:n[6]||"sans-serif",weight:n[3]||"normal",decoration:n[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(e,n){if(e.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.href),i.appendChild(n),i}return n}__applyText(e,n,i,r){const s=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:n,y:i,"text-anchor":f0(this.textAlign),"dominant-baseline":u0(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(e)),this.__currentElement=a,this.__applyStyleToCurrentElement(r),o.appendChild(this.__wrapTextLink(s,a))}fillText(e,n,i){this.__applyText(e,n,i,"fill")}strokeText(e,n,i){this.__applyText(e,n,i,"stroke")}measureText(e){return this.__ctx.font=this.font,this.__ctx.measureText(e)}arc(e,n,i,r,s,o){if(r===s)return;r=r%(2*Math.PI),s=s%(2*Math.PI),r===s&&(s=(s+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=e+i*Math.cos(s),c=n+i*Math.sin(s),l=e+i*Math.cos(r),f=n+i*Math.sin(r),u=o?0:1;let d=0,h=s-r;h<0&&(h+=2*Math.PI),o?d=h>Math.PI?0:1:d=h>Math.PI?1:0,this.lineTo(l,f),this.__addPathCommand(Z("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const e=this.__closestGroupOrSvg(),n=this.__createElement("clipPath"),i=_n(this.__ids),r=this.__createElement("g");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute("id",i),n.appendChild(this.__currentElement),this.__SVGdefs.appendChild(n),e.setAttribute("clip-path",Z("url(#{id})",{id:i})),e.appendChild(r),this.__currentElement=r}drawImage(...e){let n=e[0],i,r,s,o,a=0,c=0,l,f,u,d,h,_,p,g;if(e.length===3)i=e[1],r=e[2],l=n.width,f=n.height,s=l,o=f;else if(e.length===5)i=e[1],r=e[2],s=e[3],o=e[4],l=n.width,f=n.height;else if(e.length===9)a=e[1],c=e[2],l=e[3],f=e[4],i=e[5],r=e[6],s=e[7],o=e[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const m=this.__closestGroupOrSvg();this.__currentElement;const y="translate("+i+", "+r+")";if(n instanceof gn){if(u=n.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)g=d.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__SVGdefs.appendChild(d.childNodes[0]);if(h=u.childNodes[1],h){const b=h.getAttribute("transform");let v;b?v=b+" "+y:v=y,h.setAttribute("transform",v),m.appendChild(h)}}}else(n.nodeName==="CANVAS"||n.nodeName==="IMG")&&(_=this.__createElement("image"),_.setAttribute("width",s),_.setAttribute("height",o),_.setAttribute("preserveAspectRatio","none"),(a||c||l!==n.width||f!==n.height)&&(p=this.__document.createElement("canvas"),p.width=s,p.height=o,p.getContext("2d")?.drawImage(n,a,c,l,f,0,0,s,o),n=p),_.setAttribute("transform",y),_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n.nodeName==="CANVAS"?n.toDataURL():n.getAttribute("src")),m.appendChild(_))}createPattern(e,n){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=_n(this.__ids);let s;return i.setAttribute("id",r),e.nodeName==="CANVAS"||e.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+e.width),s.setAttribute("height",""+e.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),i.appendChild(s),this.__SVGdefs.appendChild(i)):e instanceof gn&&(i.setAttribute("width",""+e.width),i.setAttribute("height",""+e.height),i.appendChild(e.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new Mo(i,this)}setLineDash(e){e&&e.length>0?this.lineDash=e.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}const d0=gn,_0=function(t,e,n,i,r,s){t.beginPath(),t.moveTo(e,n+s),t.lineTo(e,n+r-s),t.quadraticCurveTo(e,n+r,e+s,n+r),t.lineTo(e+i-s,n+r),t.quadraticCurveTo(e+i,n+r,e+i,n+r-s),t.lineTo(e+i,n+s),t.quadraticCurveTo(e+i,n,e+i-s,n),t.lineTo(e+s,n),t.quadraticCurveTo(e,n,e,n+s),t.stroke()},g0=function(t,e,n,i){var r=e-i,s=0,o=1;t.beginPath(),t.moveTo(r,s);do{if(o>2e4)break;var a=(e+n)*Math.cos(o*Math.PI/72)-(n+i)*Math.cos((e+n)/n*(o*Math.PI/72)),c=(e+n)*Math.sin(o*Math.PI/72)-(n+i)*Math.sin((e+n)/n*(o*Math.PI/72));t.lineTo(a,c),r=a,s=c,o++}while(a!=e-i&&c!=0);t.stroke()},p0=function(t,e){t.save(),t.beginPath(),t.moveTo(e,0);for(var n=0;n<9;n++)t.rotate(Math.PI/5),n%2==0?t.lineTo(e/.525731*.200811,0):t.lineTo(e,0);t.closePath(),t.fill(),t.restore()},m0=function(t,e,n,i,r){var s=0;function o(){t.clearRect(e,n,i,r),t.setLineDash([4,2]),t.lineDashOffset=-s,t.strokeRect(e,n,i,r)}function a(){s++,s>16&&(s=0),o(),setTimeout(a,40)}a()},w0=function(t){t.beginPath(),t.arc(75,75,50,0,Math.PI*2,!0),t.moveTo(110,75),t.arc(75,75,35,0,Math.PI,!1),t.moveTo(65,65),t.arc(60,65,5,0,Math.PI*2,!0),t.moveTo(95,65),t.arc(90,65,5,0,Math.PI*2,!0),t.stroke()};class y0{constructor(e=0,n=0,i="#ffff00",r=0){this.x=e,this.y=n,this.color=i,this.rotation=r}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.lineWidth=2,e.fillStyle=this.color,e.beginPath(),e.moveTo(-50,-25),e.lineTo(0,-25),e.lineTo(0,-50),e.lineTo(50,0),e.lineTo(0,50),e.lineTo(0,25),e.lineTo(-50,25),e.lineTo(-50,-25),e.closePath(),e.fill(),e.stroke(),e.restore()}}class v0{constructor(e=40,n="#ff0000"){this.x=0,this.y=0,this.radius=e,this.vx=0,this.vy=0,this.mass=1,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(n),this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.arc(0,0,this.radius,0,Math.PI*2,!0),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}getBounds(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}}class b0{constructor(e=40,n="#ff0000"){this.x=0,this.y=0,this.xpos=0,this.ypos=0,this.zpos=0,this.radius=e,this.vx=0,this.vy=0,this.vz=0,this.mass=1,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(n),this.lineWidth=1,this.visible=!0}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.arc(0,0,this.radius,0,Math.PI*2,!0),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}}class x0{constructor(e=50,n=50,i="#ff0000"){this.x=0,this.y=0,this.width=e,this.height=n,this.vx=0,this.vy=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=st(i),this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.rect(0,0,this.width,this.height),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore()}}class E0{constructor(e,n,i,r){this.x=e===void 0?-100:e,this.y=n===void 0?-100:n,this.z=i===void 0?-100:i,this.brightness=r===void 0?1:r}setBrightness(e){this.brightness=Math.min(Math.max(e,0),1)}}class S0{constructor(e,n,i,r){this.x=0,this.y=0,this.x1=e===void 0?0:e,this.y1=n===void 0?0:n,this.x2=i===void 0?0:i,this.y2=r===void 0?0:r,this.rotation=0,this.scaleX=1,this.scaleY=1,this.lineWidth=1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.beginPath(),e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2),e.closePath(),e.stroke(),e.restore()}getBounds(){if(this.rotation===0){var e=Math.min(this.x1,this.x2),n=Math.min(this.y1,this.y2),i=Math.max(this.x1,this.x2),r=Math.max(this.y1,this.y2);return{x:this.x+e,y:this.y+n,width:i-e,height:r-n}}else{var s=Math.sin(this.rotation),o=Math.cos(this.rotation),a=o*this.x1-s*this.y1,c=o*this.x2-s*this.y2,l=o*this.y1+s*this.x1,f=o*this.y2+s*this.x2;return{x:this.x+Math.min(a,c),y:this.y+Math.min(l,f),width:Math.max(a,c)-Math.min(a,c),height:Math.max(l,f)-Math.min(l,f)}}}}class k0{constructor(e,n,i){this.x=e===void 0?0:e,this.y=n===void 0?0:n,this.z=i===void 0?0:i,this.fl=250,this.vpX=0,this.vpY=0,this.cX=0,this.cY=0,this.cZ=0}setVanishingPoint(e,n){this.vpX=e,this.vpY=n}setCenter(e,n,i){this.cX=e,this.cY=n,this.cZ=i}rotateX(e){var n=Math.cos(e),i=Math.sin(e),r=this.y*n-this.z*i,s=this.z*n+this.y*i;this.y=r,this.z=s}rotateY(e){var n=Math.cos(e),i=Math.sin(e),r=this.x*n-this.z*i,s=this.z*n+this.x*i;this.x=r,this.z=s}rotateZ(e){var n=Math.cos(e),i=Math.sin(e),r=this.x*n-this.y*i,s=this.y*n+this.x*i;this.x=r,this.y=s}getScreenX(){var e=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*e}getScreenY(){var e=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*e}}class T0{constructor(){this.x=0,this.y=0,this.width=25,this.height=20,this.rotation=0,this.showFlame=!1}draw(e){e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.lineWidth=1,e.strokeStyle="#ffffff",e.beginPath(),e.moveTo(10,0),e.lineTo(-10,10),e.lineTo(-5,0),e.lineTo(-10,-10),e.lineTo(10,0),e.closePath(),e.stroke(),this.showFlame&&(e.beginPath(),e.moveTo(-7.5,-5),e.lineTo(-15,0),e.lineTo(-7.5,5),e.closePath(),e.stroke()),e.restore()}}class A0{constructor(e,n,i){this.min=e===void 0?0:e,this.max=n===void 0?100:n,this.value=i===void 0?100:i,this.onchange=null,this.x=0,this.y=0,this.width=16,this.height=100,this.backColor="#cccccc",this.backBorderColor="#999999",this.backWidth=4,this.backX=this.width/2-this.backWidth/2,this.handleColor="#eeeeee",this.handleBorderColor="#cccccc",this.handleHeight=6,this.handleY=0,this.updatePosition()}draw(e){e.save(),e.translate(this.x,this.y),e.fillStyle=this.backColor,e.beginPath(),e.fillRect(this.backX,0,this.backWidth,this.height),e.closePath(),e.strokeStyle=this.handleBorderColor,e.fillStyle=this.handleColor,e.beginPath(),e.rect(0,this.handleY,this.width,this.handleHeight),e.closePath(),e.fill(),e.stroke(),e.restore()}updateValue(){var e=this.value,n=this.height-this.handleHeight,i=this.max-this.min;this.value=(n-this.handleY)/n*i+this.min,typeof this.onchange=="function"&&this.value!==e&&this.onchange()}updatePosition(){var e=this.height-this.handleHeight,n=this.max-this.min;this.handleY=e-(this.value-this.min)/n*e}captureMouse(e){var n=this,i=Ci(e),r={};a(),e.addEventListener("mousedown",function(){ko(r,i.x,i.y)&&(e.addEventListener("mouseup",s,!1),e.addEventListener("mousemove",o,!1))},!1);function s(){e.removeEventListener("mousemove",o,!1),e.removeEventListener("mouseup",s,!1),a()}function o(){var c=i.y-n.y;n.handleY=Math.min(n.height-n.handleHeight,Math.max(c,0)),n.updateValue()}function a(){r.x=n.x,r.y=n.y+n.handleY,r.width=n.width,r.height=n.handleHeight}}}class C0{constructor(e,n,i,r){this.pointA=e,this.pointB=n,this.pointC=i,this.color=r===void 0?"#ff0000":st(r),this.lineWidth=1,this.alpha=1}draw(e){this.isBackface()||(e.save(),e.lineWidth=this.lineWidth,e.fillStyle=e.strokeStyle=Ai(this.color,this.alpha),e.beginPath(),e.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),e.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),e.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){var e=this.pointC.getScreenX()-this.pointA.getScreenX(),n=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return e*r>n*i}}class I0{constructor(e,n,i,r){this.pointA=e,this.pointB=n,this.pointC=i,this.color=r===void 0?"#ff0000":st(r),this.lineWidth=1,this.alpha=1,this.light=null}draw(e){this.isBackface()||(e.save(),e.lineWidth=this.lineWidth,e.fillStyle=e.strokeStyle=this.getAdjustedColor(),e.beginPath(),e.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),e.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),e.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){var e=this.pointC.getScreenX()-this.pointA.getScreenX(),n=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return e*r>n*i}getAdjustedColor(){var e=st(this.color,!0),n=e>>16,i=e>>8&255,r=e&255,s=this.getLightFactor();return n*=s,i*=s,r*=s,st(n<<16|i<<8|r)}getLightFactor(){var e={x:this.pointA.x-this.pointB.x,y:this.pointA.y-this.pointB.y,z:this.pointA.z-this.pointB.z},n={x:this.pointB.x-this.pointC.x,y:this.pointB.y-this.pointC.y,z:this.pointB.z-this.pointC.z},i={x:e.y*n.z-e.z*n.y,y:-(e.x*n.z-e.z*n.x),z:e.x*n.y-e.y*n.x},r=i.x*this.light.x+i.y*this.light.y+i.z*this.light.z,s=Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z),o=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(r/(s*o))/Math.PI*this.light.brightness}}class D0{constructor(){this.x=0,this.y=0,this.xpos=0,this.ypos=0,this.zpos=0,this.scaleX=1,this.scaleY=1,this.color="#ffffff",this.alpha=1,this.lineWidth=1,this.branch=[],this.branch[0]=-140-Math.random()*20,this.branch[1]=-30-Math.random()*30,this.branch[2]=Math.random()*80-40,this.branch[3]=-100-Math.random()*40,this.branch[4]=-60-Math.random()*40,this.branch[5]=Math.random()*60-30,this.branch[6]=-110-Math.random()*20}draw(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.strokeStyle=Ai(this.color,this.alpha),e.beginPath(),e.moveTo(0,0),e.lineTo(0,this.branch[0]),e.moveTo(0,this.branch[1]),e.lineTo(this.branch[2],this.branch[3]),e.moveTo(0,this.branch[4]),e.lineTo(this.branch[5],this.branch[6]),e.stroke(),e.restore()}}class P0{constructor(e,n,i){this.x=0,this.y=0,this.width=e,this.height=n,this.vx=0,this.vy=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=i===void 0?"#ffffff":st(i),this.lineWidth=1}draw(e){var n=this.height,i=this.width+n,r=n/2;e.save(),e.translate(this.x,this.y),e.rotate(this.rotation),e.scale(this.scaleX,this.scaleY),e.lineWidth=this.lineWidth,e.fillStyle=this.color,e.beginPath(),e.moveTo(0,-r),e.lineTo(i-2*r,-r),e.quadraticCurveTo(-r+i,-r,-r+i,0),e.lineTo(-r+i,n-2*r),e.quadraticCurveTo(-r+i,-r+n,i-2*r,-r+n),e.lineTo(0,-r+n),e.quadraticCurveTo(-r,-r+n,-r,n-2*r),e.lineTo(-r,0),e.quadraticCurveTo(-r,-r,0,-r),e.closePath(),e.fill(),this.lineWidth>0&&e.stroke(),e.beginPath(),e.arc(0,0,2,0,Math.PI*2,!0),e.closePath(),e.stroke(),e.beginPath(),e.arc(this.width,0,2,0,Math.PI*2,!0),e.closePath(),e.stroke(),e.restore()}getPin(){return{x:this.x+Math.cos(this.rotation)*this.width,y:this.y+Math.sin(this.rotation)*this.width}}}class R0{canvas;context;mouse;keyboard;constructor(e){this.canvas=e,this.context=e.getContext("2d",{willReadFrequently:!0}),this.mouse=Ci(this.canvas),this.keyboard=To()}getMouseRotation(e){return ki(e,this.mouse)}followMouse(e,n){const i=this.getMouseRotation(e),{x:r,y:s}=Ti(n,i);return e.x+=r,e.y+=s,e}followMouseWithAcceleration(e,n=.05){const i=this.getMouseRotation(e),{x:r,y:s}=Ti(n,i);return e.ax=r,e.ay=s,Eo(e),e}getMouseDistance(e){return xo(e,this.mouse)}clearRect(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}lineWidth(e){return this.context.lineWidth=e,this}fillStyle(e){return this.context.fillStyle=e,this}fill(){return this.context.fill(),this}strokeStyle(e){return this.context.strokeStyle=e,this}stroke(){return this.context.stroke(),this}createLinearGradient(e,n,i){const r=this.context.createLinearGradient(e.x,e.y,n.x,n.y);return Object.keys(i).forEach(s=>r.addColorStop(parseFloat(s),i[parseFloat(s)])),r}createRadialGradient(e,n,i){const r=this.context.createRadialGradient(e.x,e.y,e.radius,n.x,n.y,n.radius);return Object.keys(i).forEach(s=>r.addColorStop(parseFloat(s),i[parseFloat(s)])),r}moveTo(e){this.context.moveTo(e.x,e.y)}closePath(){this.context.closePath()}lineTo(e,n){this.context.save(),this.context.beginPath(),this.context.moveTo(e.x,e.y),this.context.lineTo(n.x,n.y),this.context.stroke(),this.context.restore()}drawMouseMoveLine(){const e=()=>{this.context.lineTo(this.mouse.x,this.mouse.y),this.stroke()};this.canvas.addEventListener("mousedown",()=>{this.context.beginPath(),this.context.moveTo(this.mouse.x,this.mouse.y),this.canvas.addEventListener("mousemove",e,!1)},!1),this.canvas.addEventListener("mouseup",()=>{this.canvas.removeEventListener("mousemove",e,!1)},!1)}drawMouseMoveBrushLine({brush_size:e,brush_density:n,brush_color:i}={brush_size:25,brush_density:50,brush_color:"#000000"}){const r=this.getImageData(),s=r.data,o=st(i,!0),a=()=>{for(let c=0;c<n;c++){const l=Math.random()*Math.PI*2,f=Math.random()*e,u=this.mouse.x+Math.cos(l)*f|0,d=this.mouse.y+Math.sin(l)*f|0,h=(u+d*r.width)*4;s[h]=o>>16&255,s[h+1]=o>>8&255,s[h+2]=o&255,s[h+3]=255}this.putImageData(r)};this.canvas.addEventListener("mousedown",()=>{this.canvas.addEventListener("mousemove",a,!1)},!1),this.canvas.addEventListener("mouseup",()=>{this.canvas.removeEventListener("mousemove",a,!1)},!1)}quadraticCurveTo(e,n,i){this.context.save(),this.context.beginPath(),this.context.moveTo(e.x,e.y),this.context.quadraticCurveTo(n.x,n.y,i.x,i.y),this.context.stroke(),this.context.restore()}drawQuadraticCurveLine(e){const n=e.length;if(n<3)return new Error("points length must >= 3");this.context.beginPath(),this.context.moveTo(e[0].x,e[0].y);for(let i=1;i<n;i+=2)this.context.quadraticCurveTo(e[i].x,e[i].y,e[i+1].x,e[i+1].y);this.context.stroke()}quadraticThroughCurveTo(e,n,i){n.x=n.x*2-(e.x+i.x)/2,n.y=n.y*2-(e.y+i.y)/2,this.quadraticCurveTo(e,n,i)}drawQuadraticThroughCurveLine(e){const n=e.length;if(n<3)return new Error("points length must >= 3");this.context.beginPath(),this.context.moveTo(e[0].x,e[0].y);let i=1;for(;i<n-2;i++)this.context.quadraticCurveTo(e[i].x,e[i].y,(e[i].x+e[i+1].x)/2,(e[i].y+e[i+1].y)/2);this.context.quadraticCurveTo(e[i].x,e[i].y,e[i+1].x,e[i+1].y),this.context.stroke()}drawQuadraticThroughCurveLineBetter(e){const n=e.length;if(n<3)return new Error("points length must >= 3");const i=(e[0].x+e[n-1].x)/2,r=(e[0].y+e[n-1].y)/2;this.context.beginPath(),this.context.moveTo(i,r);let s=0;for(;s<n-1;s++){const o=(e[s].x+e[s+1].x)/2,a=(e[s].y+e[s+1].y)/2;this.context.quadraticCurveTo(e[s].x,e[s].y,o,a)}this.context.quadraticCurveTo(e[s].x,e[s].y,r,r),this.context.stroke()}fillRect(e){this.context.save(),this.context.fillRect(e.x,e.y,e.width,e.height),this.context.stroke(),this.context.restore()}drawImage(e,n=0,i=0){this.context.drawImage(e,n,i)}getImageData(e={x:0,y:0,width:this.canvas.width,height:this.canvas.height},n){return this.context.getImageData(e.x,e.y,e.width,e.height,n)}putImageData(e,n=0,i=0){return this.context.putImageData(e,n,i)}drawShape(e){e.draw(this.context)}}class Ri{static tryAutoPlayOrAutoPlayAfterClick(e){return new Promise(n=>{e.play().then(()=>{e.autoplay=!0,n(!0)}).catch(i=>{Ri.setAutoPlayWhenClick(e),n(!1)})})}static setAutoPlayWhenClick(e){function n(){e.autoplay=!0,e.play(),document.removeEventListener("click",n),document.removeEventListener("touchend",n)}document.addEventListener("click",n),document.addEventListener("touchend",n)}}function Lo(t,e){return!t||t.parentElement===null?e:Lo(t.parentElement,e.concat([t]))}const Mi=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)},M0=function(t){return Mi(t,"overflow")+Mi(t,"overflow-y")+Mi(t,"overflow-x")},L0=function(t){return/(auto|scroll)/.test(M0(t))};function O0(t){if(!(t instanceof HTMLElement||t instanceof SVGElement))return;const e=Lo(t.parentElement,[]);for(let n=0;n<e.length;n+=1)if(L0(e[n]))return e[n];return document.scrollingElement||document.documentElement}return w.Arrow=y0,w.Ball=v0,w.Ball3d=b0,w.BaseError=Pe,w.Box=x0,w.C2S=d0,w.CanvasPath=R0,w.DOMKeyboardKeyCode=kt,w.Dep=Es,w.EnvironmentError=Oi,w.FileSelectCancelError=pn,w.IllegalFileError=Ui,w.Light=E0,w.Line=S0,w.Matrix=ft,w.Point3d=k0,w.RGBToHex=Bd,w.Segment=P0,w.Ship=T0,w.Slider=A0,w.SvgPath=c0,w.TWEEN=Yd,w.Tree=D0,w.Triangle=C0,w.TriangleLight=I0,w.Vector=hn,w.VideoUtil=Ri,w.WebSocket=Qt,w.addEventListener=za,w.addWatermark=Ef,w.angle2radian=kd,w.animateCanvas=Ga,w.animateInWeb=Vi,w.blobToLinkExport=$h,w.blobToRawImage=Xh,w.captureKeyboard=To,w.captureMouse=Ci,w.capturePointer=jd,w.captureTouch=Nd,w.changeBrightness=bf,w.changeDiaphaneity=xf,w.changeSize=vf,w.checkAnimatedPointCollision=Md,w.checkAnimatedPointWalls=Ld,w.clearCookies=Go,w.clickEvent=qa,w.colorToRGB=Ai,w.compileTemplate=Fa,w.compression=kf,w.copyToClipboard=Sa,w.createXMLHttpRequest=Af,w.drawSpirograph=g0,w.drawStar=p0,w.dynamicStrokeLine=m0,w.fetchUseFetch=Df,w.fetchUseXMLHttpRequest=If,w.fileOrBlobToDataURL=Kn,w.flipSideToSide=Wh,w.flipUpsideDown=Kh,w.getBrowserClient=Qo,w.getBrowserClientVersion=ta,w.getBrowserLanguage=na,w.getCanvasImageData=Wn,w.getCanvasImageDataByBitmap=Hh,w.getCanvasImageDataByVideo=jh,w.getCookie=qo,w.getCookieObject=Zo,w.getDocumentElement=zt,w.getElementLeftInPage=Ni,w.getElementPositionInPage=Bi,w.getElementPositionInPage2=Vo,w.getElementPositionInViewport=Yo,w.getElementTopInPage=ji,w.getFileExtension=Fi,w.getFileType=Oo,w.getFilesImageInfo=Nh,w.getFixedWidthText=Oa,w.getFormElementData=Cf,w.getImageDataByAIData=Tf,w.getImageMainColor=Yh,w.getImageType=ws,w.getInternetExplorerVersion=Gi,w.getMouseButton=Za,w.getMouseOrTouchPositionInElement=Me,w.getMouseOrTouchPositionInPage=Hi,w.getMouseOrTouchPositionInViewport=Ko,w.getOperatingSystem=te,w.getOperatingSystemVersion=Jo,w.getPageClient=wn,w.getPageScroll=mn,w.getPageSize=Xo,w.getPageVerticalScrollPercent=Wo,w.getRawImageInfo=Yn,w.getScrollParent=O0,w.getSelectedText=ka,w.getTarget=Ha,w.getTextWidth=La,w.getTimeZone=ia,w.getURL=$i,w.getUrlParams=ya,w.getUrlParams2=va,w.getUserGeolocationPromise=ea,w.getViewportSize=Re,w.handleDragAndDropFiles=Fo,w.handleHashChange=xa,w.handleHistoryChange=Ea,w.handleInputFiles=Uo,w.handleURLChange=ba,w.hasDocument=ha,w.hasHistory=fa,w.hasProcess=ua,w.hasWindow=Xi,w.htmlElementToBlob=Vh,w.htmlIncodeOrDecode=Ua,w.ifWebFileHasChanged=Pf,w.imageDataToBitmap=qh,w.imageDataToBlob=Gh,w.imageDataToDataURL=Zh,w.isAndroid=Zi,w.isAppleDevice=ra,w.isBrowser=la,w.isBrowserSupportFileAPI=da,w.isDarkMode=oa,w.isElementFocus=Ta,w.isElementInViewport=$o,w.isHexColor=Od,w.isIE=aa,w.isIOS=qi,w.isMobile=sa,w.isNode=ca,w.isPolygonContainPoint=Rd,w.isRectContainPoint=ko,w.isRectIntersectRect=Pd,w.isTabInView=Ca,w.isURL=wa,w.isURLRelative=ma,w.jpgToPng=pf,w.lazyloadImages=Ra,w.leftRotate=Jh,w.loadScript=Pa,w.localstorage=Qn,w.marginSharpen=gf,w.microTask=jo,w.mosaic=Sf,w.navigateBack=Ia,w.navigateBack2=Da,w.newPointDependOnLengthAndRotation=Ti,w.nextFramePoint=Eo,w.nextFramePointEaseToTarget=Cd,w.nextFramePointSpringConnect=Id,w.nextFramePointSpringToTarget=So,w.onDocumentReady=No,w.parseColor=st,w.patchDOM=zi,w.pngToJpg=mf,w.pointDistance=xo,w.pointMiddle=Ad,w.pointRotationRadian=ki,w.preventDefault=ja,w.radian2angle=Td,w.radiusClip=yf,w.randomColorHex=Fd,w.randomColorHex2=zd,w.randomColorNumber=Ud,w.reactiveVue2=Of,w.reactiveVue3=Uf,w.readeFile=Bo,w.rectClip=wf,w.removeEventListener=Ba,w.rightRotate=Qh,w.rotate=xt,w.roundedRect=_0,w.scrollTo=Mf,w.selectFile=zo,w.setCookie=Ho,w.setRem=_a,w.setScrollRestoration=$e,w.setTheme=Rf,w.sharpen=_f,w.siblings=Aa,w.smileFace=w0,w.stopPropagation=Na,w.stringToBlob=ys,w.toBlackAndWhite=nf,w.toBlue=af,w.toBlueAndGreen=hf,w.toBlueAndGrey=df,w.toGreen=of,w.toGreenAndGrey=uf,w.toGrey=tf,w.toGrey2=ef,w.toOpposite=rf,w.toRed=sf,w.toRedAndBlue=cf,w.toRedAndGreen=lf,w.toRedAndGrey=ff,w.trackVelocity=Dd,w.urlsafe_base64decode=pa,w.urlsafe_base64encode=ga,w.waitForStyleSheetsLoaded=Ma,w.watchEffect=Lf,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),w}({});
|
|
18
18
|
//# sourceMappingURL=zyzgroup_core_web.iife.js.map
|